Fix lingering timer in wiz (#91745)

pull/91873/head
epenet 2023-04-22 21:12:48 +02:00 committed by GitHub
parent 957181d38f
commit 102613a1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ async def async_setup(hass: HomeAssistant, hass_config: ConfigType) -> bool:
)
hass.async_create_background_task(_async_discovery(), "wiz-discovery")
async_track_time_interval(hass, _async_discovery, DISCOVERY_INTERVAL)
async_track_time_interval(
hass, _async_discovery, DISCOVERY_INTERVAL, cancel_on_shutdown=True
)
return True