From 28599b9137f67ce8019e643c926b7a92c5311196 Mon Sep 17 00:00:00 2001 From: InTheDaylight14 <67400055+InTheDaylight14@users.noreply.github.com> Date: Wed, 24 Apr 2024 23:07:21 -0400 Subject: [PATCH 1/4] Missing closthing parentheses --- custom_components/npm_switches/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/npm_switches/__init__.py b/custom_components/npm_switches/__init__.py index 39b1c85..d7d2ddb 100644 --- a/custom_components/npm_switches/__init__.py +++ b/custom_components/npm_switches/__init__.py @@ -61,7 +61,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): coordinator.platforms.append(platform) entry.async_create_task(hass( hass, hass.config_entries.async_forward_entry_setup(entry, platform) - ) + )) entry.async_on_unload(entry.add_update_listener(async_reload_entry)) return True From 57630f46d3d7762deb6a3a7f73edb7c9dc14cab6 Mon Sep 17 00:00:00 2001 From: InTheDaylight14 <67400055+InTheDaylight14@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:19:29 -0400 Subject: [PATCH 2/4] Update pull.yml to python 3.12 --- .github/workflows/pull.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index d895c86..7880fd8 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -36,10 +36,10 @@ jobs: steps: - name: Check out code from GitHub uses: "actions/checkout@v2" - - name: Setup Python - uses: "actions/setup-python@v1" + - name: Setup Python 3.12 + uses: "actions/setup-python@v2" with: - python-version: "3.8" + python-version: "3.12" - name: Install requirements run: python3 -m pip install -r requirements_test.txt - name: Run tests From afd600f9268ba04d9acf5efe72b1678c15237c11 Mon Sep 17 00:00:00 2001 From: InTheDaylight14 <67400055+InTheDaylight14@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:20:18 -0400 Subject: [PATCH 3/4] Update hacs.json ha 2023.7.0 --- hacs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hacs.json b/hacs.json index 73009d3..7586782 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "NPM Switches", "hacs": "1.6.0", - "homeassistant": "2022.06.01" -} \ No newline at end of file + "homeassistant": "2022.7.0" +} From 67e38d7e16e12473f1dc2ff7d0c5d4c8245064a7 Mon Sep 17 00:00:00 2001 From: InTheDaylight14 <67400055+InTheDaylight14@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:23:06 -0400 Subject: [PATCH 4/4] Update __init__.py --- custom_components/npm_switches/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/custom_components/npm_switches/__init__.py b/custom_components/npm_switches/__init__.py index d7d2ddb..3327b1b 100644 --- a/custom_components/npm_switches/__init__.py +++ b/custom_components/npm_switches/__init__.py @@ -59,9 +59,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): for platform in PLATFORMS: if entry.options.get(platform, True): coordinator.platforms.append(platform) - entry.async_create_task(hass( - hass, hass.config_entries.async_forward_entry_setup(entry, platform) - )) + await hass.config_entries.async_forward_entry_setup(entry, platform) entry.async_on_unload(entry.add_update_listener(async_reload_entry)) return True