From a29cc29304686d8ed3d68b0e6dedc958628783bc Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Mon, 29 Nov 2021 02:06:11 +0100 Subject: [PATCH] Fix DeprecationWarning for asyncio.wait() in mysensors (#60512) --- homeassistant/components/mysensors/gateway.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/mysensors/gateway.py b/homeassistant/components/mysensors/gateway.py index fa7bf1ca88d..b167c8c58de 100644 --- a/homeassistant/components/mysensors/gateway.py +++ b/homeassistant/components/mysensors/gateway.py @@ -246,15 +246,8 @@ async def finish_setup( hass: HomeAssistant, entry: ConfigEntry, gateway: BaseAsyncGateway ) -> None: """Load any persistent devices and platforms and start gateway.""" - discover_tasks = [] - start_tasks = [] - 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) + await _discover_persistent_devices(hass, entry, gateway) + await _gw_start(hass, entry, gateway) async def _discover_persistent_devices(