mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Use eager_start to create async_update_alerts task in homeassistant_alerts (#114707)
If there are no alerts, the task will finish synchronously
This commit is contained in:
@@ -84,7 +84,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
if not coordinator.last_update_success:
|
||||
return
|
||||
|
||||
hass.async_create_task(async_update_alerts())
|
||||
hass.async_create_task(async_update_alerts(), eager_start=True)
|
||||
|
||||
coordinator = AlertUpdateCoordinator(hass)
|
||||
coordinator.async_add_listener(async_schedule_update_alerts)
|
||||
|
Reference in New Issue
Block a user