From d7cc30fd2bf60de008f365fe7df855221eff96f4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 11 Mar 2024 08:46:11 -1000 Subject: [PATCH] Start tasks eagerly in for async_at_start(ed) (#112802) --- homeassistant/helpers/start.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/start.py b/homeassistant/helpers/start.py index 148b416e087..d09e542e2e0 100644 --- a/homeassistant/helpers/start.py +++ b/homeassistant/helpers/start.py @@ -30,7 +30,7 @@ def _async_at_core_state( """ at_start_job = HassJob(at_start_cb) if check_state(hass): - hass.async_run_hass_job(at_start_job, hass) + hass.async_run_hass_job(at_start_job, hass, eager_start=True) return lambda: None unsub: None | CALLBACK_TYPE = None @@ -38,7 +38,7 @@ def _async_at_core_state( @callback def _matched_event(event: Event) -> None: """Call the callback when Home Assistant started.""" - hass.async_run_hass_job(at_start_job, hass) + hass.async_run_hass_job(at_start_job, hass, eager_start=True) nonlocal unsub unsub = None