mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 18:57:57 +00:00
Start tasks eagerly in for async_at_start(ed) (#112802)
This commit is contained in:
parent
ff4e9eb31e
commit
d7cc30fd2b
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user