Fix dangling task for insteon (#88293)

pull/88352/head
Paulus Schoutsen 2023-02-17 14:53:06 -05:00 committed by GitHub
parent 517e88600c
commit 28a09199ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,4 @@
"""Support for INSTEON Modems (PLM and Hub)."""
import asyncio
from contextlib import suppress
import logging
@ -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