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 diff --git a/custom_components/npm_switches/__init__.py b/custom_components/npm_switches/__init__.py index a0f3f7c..e20d197 100644 --- a/custom_components/npm_switches/__init__.py +++ b/custom_components/npm_switches/__init__.py @@ -59,9 +59,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): for platform in PLATFORMS: if entry.options.get(platform, True): coordinator.platforms.append(platform) - hass.async_add_job( - 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 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" +}