Use run_immediately for starting discovery at the started event (#113112)

This commit is contained in:
J. Nick Koston 2024-03-11 14:29:39 -10:00 committed by GitHub
parent b87036eebe
commit 1536a3981f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -82,7 +82,9 @@ class FlowDispatcher:
@callback
def async_setup(self) -> None:
"""Set up the flow disptcher."""
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STARTED, self._async_start)
self.hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_STARTED, self._async_start, run_immediately=True
)
async def _async_start(self, event: Event) -> None:
"""Start processing pending flows."""