mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix dangling task for wiz (#88301)
This commit is contained in:
parent
9989a4787b
commit
f3e4783a5e
@ -1,7 +1,6 @@
|
||||
"""WiZ Platform integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from typing import Any
|
||||
@ -51,7 +50,7 @@ async def async_setup(hass: HomeAssistant, hass_config: ConfigType) -> bool:
|
||||
hass, await async_discover_devices(hass, DISCOVER_SCAN_TIMEOUT)
|
||||
)
|
||||
|
||||
asyncio.create_task(_async_discovery())
|
||||
hass.async_create_background_task(_async_discovery(), "wiz-discovery")
|
||||
async_track_time_interval(hass, _async_discovery, DISCOVERY_INTERVAL)
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user