From 80e066a7a8f545942cd2c5d7fc7c65ab325ac178 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 3 Apr 2024 00:23:36 -1000 Subject: [PATCH] Use eager_start to create async_update_alerts task in homeassistant_alerts (#114707) If there are no alerts, the task will finish synchronously --- homeassistant/components/homeassistant_alerts/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/homeassistant_alerts/__init__.py b/homeassistant/components/homeassistant_alerts/__init__.py index 338d8679b19..7d0a7c588dd 100644 --- a/homeassistant/components/homeassistant_alerts/__init__.py +++ b/homeassistant/components/homeassistant_alerts/__init__.py @@ -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)