diff --git a/.devcontainer/configuration.yaml b/.devcontainer/configuration.yaml index 7b12af9..fec452b 100644 --- a/.devcontainer/configuration.yaml +++ b/.devcontainer/configuration.yaml @@ -31,16 +31,7 @@ timer: updater: zeroconf: zone: - -#group: !include groups.yaml -#automation: !include automations.yaml -#script: !include scripts.yaml -#scene: !include scenes.yaml - -group: !include groups.yaml -automation: !include automations.yaml -script: !include scripts.yaml -scene: !include scenes.yaml +group: # enable remote python debugger debugpy: diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 568eb92..2e33867 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,6 +9,7 @@ // "containerEnv": { // "WS_PATH": "/usr/share/hassio/share/dev/hacs-govee", // }, + //"image": "laggat/hacs-base-container", "image": "ludeeus/container:python-base-debian", //"vsch.local.folder": "/usr/share/hassio/share/dev/hacs-govee", //"dockerFile": "Dockerfile", @@ -17,7 +18,7 @@ // "appPort": [ // "9123:8123" // ], - "postCreateCommand": "/bin/echo ------------ postCreateCommand apt-get ------------ && apt-get update && apt-get -y install bash bluetooth bluez bluez-tools build-essential ca-certificates cython gcc git iputils-ping libatomic1 libavcodec-dev libc-dev libffi-dev libjpeg-dev libpcap-dev libssl-dev make nano openssh-client procps python3 python3-dev python3-dev python3-pip python3-setuptools rfkill unzip wget wget zlib1g-dev && /bin/echo ------------ postCreateCommand python/pip ------------ && /usr/local/bin/python3 -m pip install --upgrade pip && /usr/local/bin/pip3 install black colorlog debugpy pexpect pygatt pylint PyNaCl==1.3.0 && /usr/local/bin/pip3 install -r /workspaces/hacs-govee/requirements_test.txt && /bin/echo ------------ postCreateCommand container install ------------ && mkdir -p /src/ludeeus && cd /src/ludeeus && git clone https://github.com/ludeeus/container && cp -r ./container/rootfs/common/* / && chmod +x /usr/bin/container && /usr/bin/container install && /bin/echo ------------ postCreateCommand symlink our component ------------ && /bin/mkdir -p /config/custom_components && /bin/ln -s /workspaces/hacs-govee/custom_components/govee /config/custom_components/govee && /bin/echo ------------ postCreateCommand install hacs ------------ && mkdir -p /src/hacs && cd /src/hacs && /bin/mkdir -p /config/custom_components/hacs && /usr/bin/wget https://github.com/hacs/integration/releases/latest/download/hacs.zip && /usr/bin/unzip hacs.zip -d /config/custom_components/hacs && /bin/rm hacs.zip && /bin/echo ------------ postCreateCommand finished, starting HASS ------------ ", + "postCreateCommand": "/bin/chmod +x /workspaces/hacs-govee/.devcontainer/postCreateContainer.sh && /workspaces/hacs-govee/.devcontainer/postCreateContainer.sh", "extensions": [ "ms-python.python", "github.vscode-pull-request-github", @@ -70,4 +71,4 @@ "-v", "/run/udev:/run/udev:ro", ] -} +} \ No newline at end of file diff --git a/.devcontainer/postCreateContainer.sh b/.devcontainer/postCreateContainer.sh new file mode 100644 index 0000000..b0f6e45 --- /dev/null +++ b/.devcontainer/postCreateContainer.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +/bin/echo ------------ postCreateCommand apt-get ------------ +apt-get update +apt-get -y install bash bluetooth bluez bluez-tools build-essential ca-certificates cython gcc git iputils-ping libatomic1 libavcodec-dev libc-dev libffi-dev libjpeg-dev libpcap-dev libssl-dev make nano openssh-client procps python3 python3-dev python3-dev python3-pip python3-setuptools rfkill unzip wget wget zlib1g-dev + +/bin/echo ------------ postCreateCommand python/pip ------------ +/usr/local/bin/python3 -m pip install --upgrade pip +/usr/local/bin/pip3 install black colorlog debugpy pexpect pygatt pylint PyNaCl==1.3.0 +/usr/local/bin/pip3 install -r /workspaces/hacs-govee/requirements_test.txt + +/bin/echo ------------ postCreateCommand container install ------------ +mkdir -p /src/ludeeus +cd /src/ludeeus +git clone https://github.com/ludeeus/container +cp -r ./container/rootfs/common/* / +chmod +x /usr/bin/container +/usr/bin/container install + +/bin/echo ------------ postCreateCommand symlink our component ------------ +/bin/mkdir -p /config/custom_components +/bin/ln -s /workspaces/hacs-govee/custom_components/govee /config/custom_components/govee + +/bin/echo ------------ postCreateCommand install hacs ------------ +mkdir -p /src/hacs +cd /src/hacs +/bin/mkdir -p /config/custom_components/hacs +/usr/bin/wget https://github.com/hacs/integration/releases/latest/download/hacs.zip +/usr/bin/unzip hacs.zip -d /config/custom_components/hacs +/bin/rm hacs.zip + +/bin/echo ------------ postCreateCommand finished ------------ diff --git a/.vscode/launch.json b/.vscode/launch.json index 2da02af..07a5a94 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,14 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Launch Home Assistant UI in Chrome", + "request": "launch", + "type": "pwa-chrome", + "url": "http://192.168.144.5:9123 + ", + "webRoot": "${workspaceFolder}" + }, { "name": "Python: Remote Attach", "type": "python", diff --git a/custom_components/govee/manifest.json b/custom_components/govee/manifest.json index 656aa54..487bc3e 100644 --- a/custom_components/govee/manifest.json +++ b/custom_components/govee/manifest.json @@ -2,11 +2,11 @@ "codeowners": ["@LaggAt"], "domain": "govee", "name": "Govee", - "version": "0.1.7", + "version": "0.1.8", "config_flow": true, "documentation": "https://github.com/LaggAt/hacs-govee/blob/master/README.md", "issue_tracker": "https://github.com/LaggAt/hacs-govee/issues", - "requirements": ["govee-api-laggat==0.1.38", "dacite==1.5.1"], + "requirements": ["govee-api-laggat==0.1.39", "dacite==1.6.0"], "ssdp": [], "zeroconf": [], "homekit": {}, diff --git a/hacs.json b/hacs.json index 89a9009..889444a 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "govee", - "hacs": "0.1.7", + "hacs": "0.1.8", "domains": [ "light" ], diff --git a/setup.cfg b/setup.cfg index 6e3c410..9c79c52 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,5 +31,5 @@ not_skip = __init__.py force_sort_within_sections = true sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER default_section = THIRDPARTY -known_first_party = custom_components.integration_blueprint +known_first_party = custom_components.govee combine_as_imports = true