mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
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
This commit is contained in:
parent
d66145358a
commit
69a6e9f5d7
@ -208,16 +208,14 @@ class WemoDispatcher:
|
|||||||
self._dispatch_backlog[platform] = [coordinator]
|
self._dispatch_backlog[platform] = [coordinator]
|
||||||
platforms_to_load.append(platform)
|
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._added_serial_numbers.add(wemo.serial_number)
|
||||||
self._failed_serial_numbers.discard(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(
|
async def async_connect_platform(
|
||||||
self, platform: Platform, dispatch: DispatchCallback
|
self, platform: Platform, dispatch: DispatchCallback
|
||||||
) -> None:
|
) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user