From 6df3e9d7c0d8b0aa686fc0bd306d41b85b4d9774 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 16 Mar 2024 17:21:03 -1000 Subject: [PATCH] Run bond shutdown listener with run_immediately (#113657) --- homeassistant/components/bond/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/bond/__init__.py b/homeassistant/components/bond/__init__.py index 9ecfedee570..216a4b501f2 100644 --- a/homeassistant/components/bond/__init__.py +++ b/homeassistant/components/bond/__init__.py @@ -68,7 +68,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: entry.async_on_unload(_async_stop_event) entry.async_on_unload( - hass.bus.async_listen(EVENT_HOMEASSISTANT_STOP, _async_stop_event) + hass.bus.async_listen( + EVENT_HOMEASSISTANT_STOP, _async_stop_event, run_immediately=True + ) ) hass.data.setdefault(DOMAIN, {})[entry.entry_id] = BondData(hub, bpup_subs)