From 5e94858821d0857f0bec1005485a7d2bd784f279 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 11 Mar 2024 09:02:35 -1000 Subject: [PATCH] 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 --- homeassistant/setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/setup.py b/homeassistant/setup.py index 186d5d6b75c..45e3b328fc3 100644 --- a/homeassistant/setup.py +++ b/homeassistant/setup.py @@ -601,11 +601,14 @@ def _async_when_setup( EVENT_COMPONENT_LOADED, _matched_event, event_filter=_async_is_component_filter, + run_immediately=True, ) ) if start_event: listeners.append( - hass.bus.async_listen(EVENT_HOMEASSISTANT_START, _matched_event) + hass.bus.async_listen( + EVENT_HOMEASSISTANT_START, _matched_event, run_immediately=True + ) )