From 69a6e9f5d7c842371e5300084cc970c93c106557 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 3 Apr 2024 08:29:48 -1000 Subject: [PATCH] Use eager_start to forward wemo config entry platforms (#114702) * Use eager_start to forward wemo config entry platforms These can all be setup synchronously * do not create another task --- homeassistant/components/wemo/__init__.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/wemo/__init__.py b/homeassistant/components/wemo/__init__.py index 8a9a122c03c..4eb33a09553 100644 --- a/homeassistant/components/wemo/__init__.py +++ b/homeassistant/components/wemo/__init__.py @@ -208,16 +208,14 @@ class WemoDispatcher: self._dispatch_backlog[platform] = [coordinator] platforms_to_load.append(platform) - if platforms_to_load: - hass.async_create_task( - hass.config_entries.async_forward_entry_setups( - self._config_entry, platforms_to_load - ) - ) - self._added_serial_numbers.add(wemo.serial_number) self._failed_serial_numbers.discard(wemo.serial_number) + if platforms_to_load: + await hass.config_entries.async_forward_entry_setups( + self._config_entry, platforms_to_load + ) + async def async_connect_platform( self, platform: Platform, dispatch: DispatchCallback ) -> None: