From bf765802dd54ab8937472c7b25a80c2d80020274 Mon Sep 17 00:00:00 2001 From: "Penney, Emory J" Date: Fri, 26 Apr 2024 15:26:08 +0000 Subject: [PATCH] Completely different approach --- .github/workflows/pull.yml | 2 +- .github/workflows/push.yml | 2 +- custom_components/npm_switches/__init__.py | 4 +--- hacs.json | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index e6eb2a9..c0cb818 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -39,7 +39,7 @@ jobs: - name: Setup Python uses: "actions/setup-python@v1" with: - python-version: "3.10" + python-version: "3.8" - name: Install requirements run: python3 -m pip install -r requirements_test.txt - name: Run tests diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ebe3fc1..4ea8495 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -42,7 +42,7 @@ jobs: - name: Setup Python uses: "actions/setup-python@v1" with: - python-version: "3.10" + python-version: "3.8" - name: Install requirements run: python3 -m pip install -r requirements_test.txt - name: Run tests diff --git a/custom_components/npm_switches/__init__.py b/custom_components/npm_switches/__init__.py index 690626a..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.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 diff --git a/hacs.json b/hacs.json index b1c0d36..eff67a4 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "NPM Switches", "hacs": "1.6.0", - "homeassistant": "2023.02.0" + "homeassistant": "2022.06.01" }