From 1691c5f2968a499b1bfad179151104de7bacc96d Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 10:05:49 +0200 Subject: [PATCH 01/11] Fix depreciated async_get_registry --- custom_components/localtuya/config_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/localtuya/config_flow.py b/custom_components/localtuya/config_flow.py index d4272d4..58159cf 100644 --- a/custom_components/localtuya/config_flow.py +++ b/custom_components/localtuya/config_flow.py @@ -740,7 +740,7 @@ class LocalTuyaOptionsFlowHandler(config_entries.OptionsFlow): new_data = self.config_entry.data.copy() entry_id = self.config_entry.entry_id # removing entities from registry (they will be recreated) - ent_reg = await er.async_get_registry(self.hass) + ent_reg = er.async_get(self.hass) reg_entities = { ent.unique_id: ent.entity_id for ent in er.async_entries_for_config_entry(ent_reg, entry_id) From d241f0323bae8d03cc610b07b4028a8ca8be12c8 Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 13:47:25 +0200 Subject: [PATCH 02/11] Add HACS validation --- .github/workflows/validate.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..e7e8e0a --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,18 @@ +name: HACS Validate + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + validate-hacs: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v3" + - name: HACS validation + uses: "hacs/action@main" + with: + category: "integration" From e79520ebc09121abd314f5f2af0661e00547f6ef Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 13:54:46 +0200 Subject: [PATCH 03/11] Remove extra key --- hacs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/hacs.json b/hacs.json index 3c5a41a..116f017 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,5 @@ { "name": "Local Tuya", - "domains": ["climate", "cover", "fan", "light", "number", "select", "sensor", "switch"], "homeassistant": "0.116.0", "iot_class": ["Local Push"] } From 861dcc5ffdd7067d71f0e8fe22c1f43ee58af04f Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 13:58:52 +0200 Subject: [PATCH 04/11] Update manifest.json --- custom_components/localtuya/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/localtuya/manifest.json b/custom_components/localtuya/manifest.json index 3f1e00b..9403b7b 100644 --- a/custom_components/localtuya/manifest.json +++ b/custom_components/localtuya/manifest.json @@ -1,7 +1,7 @@ { "domain": "localtuya", "name": "LocalTuya integration", - "version": "5.0.0", + "version": "5.0.1", "documentation": "https://github.com/rospogrigio/localtuya/", "dependencies": [], "codeowners": [ From de88ee5681af6cffb93b32a671db19953a08d9c8 Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 13:59:29 +0200 Subject: [PATCH 05/11] Remove extra key --- hacs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/hacs.json b/hacs.json index 116f017..65bb6af 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,4 @@ { "name": "Local Tuya", "homeassistant": "0.116.0", - "iot_class": ["Local Push"] } From 651dc8bd94756269da66a251ede3547ea23b44a2 Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 14:00:48 +0200 Subject: [PATCH 06/11] Update hacs.json --- hacs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacs.json b/hacs.json index 65bb6af..0496f6f 100644 --- a/hacs.json +++ b/hacs.json @@ -1,4 +1,4 @@ { "name": "Local Tuya", - "homeassistant": "0.116.0", + "homeassistant": "0.116.0" } From a47cdc4096e3f1b6a6530db4afcc94d3ee36d2e3 Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 14:06:54 +0200 Subject: [PATCH 07/11] Add Hassfest validation --- .github/workflows/validate.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e7e8e0a..f0e209c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -16,3 +16,5 @@ jobs: uses: "hacs/action@main" with: category: "integration" + - name: Hassfest validation + uses: home-assistant/actions/hassfest@master From 2dbff4750570b510fa9b0f979240a60e6b1b93c9 Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 14:15:08 +0200 Subject: [PATCH 08/11] Alphabetize manifest.json Alphabetized manifest.json according to home assistant requirements. --- custom_components/localtuya/manifest.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom_components/localtuya/manifest.json b/custom_components/localtuya/manifest.json index 9403b7b..e492348 100644 --- a/custom_components/localtuya/manifest.json +++ b/custom_components/localtuya/manifest.json @@ -1,14 +1,14 @@ { "domain": "localtuya", "name": "LocalTuya integration", - "version": "5.0.1", - "documentation": "https://github.com/rospogrigio/localtuya/", - "dependencies": [], "codeowners": [ "@rospogrigio", "@postlund" ], + "config_flow": true, + "dependencies": [], + "documentation": "https://github.com/rospogrigio/localtuya/", + "iot_class": "local_push", "issue_tracker": "https://github.com/rospogrigio/localtuya/issues", "requirements": [], - "config_flow": true, - "iot_class": "local_push" + "version": "5.0.1" } From 7329aefd08ae0aa064dd43f1a713f2466904ccb4 Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 14:24:06 +0200 Subject: [PATCH 09/11] Delete combined.yaml As described in KTibow/ha-blueprint, ha-blueprint is being retired and we should thereby switch over to hassfest and hacs validation. --- .github/workflows/combined.yaml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/combined.yaml diff --git a/.github/workflows/combined.yaml b/.github/workflows/combined.yaml deleted file mode 100644 index 8cad813..0000000 --- a/.github/workflows/combined.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: "Validation And Formatting" -on: - push: - pull_request: - schedule: - - cron: '0 0 * * *' -jobs: - ci: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - name: Download repo - with: - fetch-depth: 0 - - uses: actions/setup-python@v2 - name: Setup Python - - uses: actions/cache@v2 - name: Cache - with: - path: | - ~/.cache/pip - key: custom-component-ci - - uses: KTibow/ha-blueprint@stable - name: CI - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f2134b877f01ff96b184cc4ae26629c15d47e2dd Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 14:27:49 +0200 Subject: [PATCH 10/11] Update tox.yaml Added workflow_dispatch --- .github/workflows/tox.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tox.yaml b/.github/workflows/tox.yaml index 05465c0..a7910f4 100644 --- a/.github/workflows/tox.yaml +++ b/.github/workflows/tox.yaml @@ -1,6 +1,8 @@ name: Tox PR CI -on: [pull_request] +on: + pull_request: + workflow_dispatch: jobs: build: From 8af18365427e600e3b67faef60ae6e5ec72a1040 Mon Sep 17 00:00:00 2001 From: oven-lab Date: Sat, 20 May 2023 14:49:49 +0200 Subject: [PATCH 11/11] Update tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 031fef7..a0b7eac 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ python = [testenv] passenv = TOXENV,CI -whitelist_externals = +allowlist_externals = true setenv = LANG=en_US.UTF-8