Fix homeassistant_alerts delaying shutdown (#116340)

This commit is contained in:
J. Nick Koston 2024-04-28 10:36:03 -05:00 committed by GitHub
parent 7a4aa3c40c
commit ddf58b6905
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,7 +87,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
if not coordinator.last_update_success:
return
hass.async_create_task(async_update_alerts(), eager_start=True)
hass.async_create_background_task(
async_update_alerts(), "homeassistant_alerts update", eager_start=True
)
coordinator = AlertUpdateCoordinator(hass)
coordinator.async_add_listener(async_schedule_update_alerts)