Skip to content

Commit

Permalink
Fix dangling task for insteon (#88293)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Feb 17, 2023
1 parent 517e886 commit 28a0919
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions homeassistant/components/insteon/__init__.py
@@ -1,5 +1,4 @@
"""Support for INSTEON Modems (PLM and Hub)."""
import asyncio
from contextlib import suppress
import logging

Expand Down Expand Up @@ -173,7 +172,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
api.async_load_api(hass)
await api.async_register_insteon_frontend(hass)

asyncio.create_task(async_get_device_config(hass, entry))
entry.async_create_background_task(
hass, async_get_device_config(hass, entry), "insteon-get-device-config"
)

return True

Expand Down

0 comments on commit 28a0919

Please sign in to comment.