mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 07:47:08 +00:00
Fix DeprecationWarning for asyncio.wait() in mysensors (#60512)
This commit is contained in:
parent
2918e2d7d0
commit
a29cc29304
@ -246,15 +246,8 @@ async def finish_setup(
|
|||||||
hass: HomeAssistant, entry: ConfigEntry, gateway: BaseAsyncGateway
|
hass: HomeAssistant, entry: ConfigEntry, gateway: BaseAsyncGateway
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Load any persistent devices and platforms and start gateway."""
|
"""Load any persistent devices and platforms and start gateway."""
|
||||||
discover_tasks = []
|
await _discover_persistent_devices(hass, entry, gateway)
|
||||||
start_tasks = []
|
await _gw_start(hass, entry, gateway)
|
||||||
discover_tasks.append(_discover_persistent_devices(hass, entry, gateway))
|
|
||||||
start_tasks.append(_gw_start(hass, entry, gateway))
|
|
||||||
if discover_tasks:
|
|
||||||
# Make sure all devices and platforms are loaded before gateway start.
|
|
||||||
await asyncio.wait(discover_tasks)
|
|
||||||
if start_tasks:
|
|
||||||
await asyncio.wait(start_tasks)
|
|
||||||
|
|
||||||
|
|
||||||
async def _discover_persistent_devices(
|
async def _discover_persistent_devices(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user