mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Migrate _async_when_setup to use eager_start (#112872)
This one does not make much difference, but its a lot easier to do it now instead of in the future
This commit is contained in:
parent
89c24b2f75
commit
5e94858821
@ -601,11 +601,14 @@ def _async_when_setup(
|
|||||||
EVENT_COMPONENT_LOADED,
|
EVENT_COMPONENT_LOADED,
|
||||||
_matched_event,
|
_matched_event,
|
||||||
event_filter=_async_is_component_filter,
|
event_filter=_async_is_component_filter,
|
||||||
|
run_immediately=True,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if start_event:
|
if start_event:
|
||||||
listeners.append(
|
listeners.append(
|
||||||
hass.bus.async_listen(EVENT_HOMEASSISTANT_START, _matched_event)
|
hass.bus.async_listen(
|
||||||
|
EVENT_HOMEASSISTANT_START, _matched_event, run_immediately=True
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user