diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 43afcda..38611e4 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -10,7 +10,7 @@ Opening multiple projects inside of a devcontainer is a bit cluncky so follow th 1. Create a parent directory that will contain both the integration and the API library. 2. Create a folder for the integration. Make sure it follows the structure required by HACS, in particular it must have "custome_components" subfolder where all the integration code will reside. The .devcontainer folder should also be here. -3. Create a folder for the API library. Since this library has to be pubuilshed to +3. Create a folder for the API library. Since this library has to be published to pypi make sure it has a setup.py file at its root. At this point your folder structure should look something like this: ``` diff --git a/.devcontainer/config/configuration.yaml b/.devcontainer/config/configuration.yaml index 0fada74..32125bd 100644 --- a/.devcontainer/config/configuration.yaml +++ b/.devcontainer/config/configuration.yaml @@ -11,11 +11,12 @@ tts: # Dev config starts here logger: - default: warn + default: info logs: - home_connect_async: debug - home_connect_alt: debug - custom_components.home_connect_alt: debug + home_connect_async: error + home_connect_alt: error + custom_components.home_connect_alt: error + homeassistant.helpers.config_entry_oauth2_flow: debug # If you need to debug uncomment the line below (doc: https://www.home-assistant.io/integrations/debugpy/) #debugpy: diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 962c16b..a29d5dd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "VARIANT": "3.9", + "VARIANT": "3.10", "LOCAL_INTEGRATION_FOLDER": "${localWorkspaceFolder}" }, "context": ".." @@ -21,6 +21,7 @@ "source=${localWorkspaceFolderBasename}_config,target=/config,type=volume", // create a persistent named volume for the configuration folder "source=${localWorkspaceFolder}/../home-connect-async,target=${containerWorkspaceFolder}/../home-connect-async,type=bind,consistency=consistent" ], + "remoteUser": "root", "postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/post-create.sh", "postStartCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/post-start.sh", "extensions": [ diff --git a/.devcontainer/scripts/install-ha.sh b/.devcontainer/scripts/install-ha.sh index eb798ce..5a027e0 100644 --- a/.devcontainer/scripts/install-ha.sh +++ b/.devcontainer/scripts/install-ha.sh @@ -7,5 +7,5 @@ if [ "$hassver" = "" ]; then fi # Update Home Assistant to the latest version -python3 -m pip --disable-pip-version-check install --upgrade git+https://github.com/home-assistant/home-assistant.git@$hassver -hass --script ensure_config -c /config \ No newline at end of file +sudo python3 -m pip --disable-pip-version-check install --upgrade git+https://github.com/home-assistant/home-assistant.git@$hassver +sudo hass --script ensure_config -c /config \ No newline at end of file diff --git a/.devcontainer/scripts/post-create.sh b/.devcontainer/scripts/post-create.sh index 98d0899..e49c63d 100644 --- a/.devcontainer/scripts/post-create.sh +++ b/.devcontainer/scripts/post-create.sh @@ -6,8 +6,8 @@ pip3 install isort colorlog SCRIPT_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # This chmod is a safety measure for scripts that are added after the container was first created -chmod +x $SCRIPT_PATH/* -$SCRIPT_PATH/install-ha.sh +sudo chmod +x $SCRIPT_PATH/* +sudo $SCRIPT_PATH/install-ha.sh