From 4d430520a0d33220221a8b64a20b78f1794f9922 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 16 Mar 2024 17:06:31 -1000 Subject: [PATCH] Run yalexs_ble shutdown with run_immediately (#113653) --- homeassistant/components/yalexs_ble/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/yalexs_ble/__init__.py b/homeassistant/components/yalexs_ble/__init__.py index 8c9c5176003..f608da6cd60 100644 --- a/homeassistant/components/yalexs_ble/__init__.py +++ b/homeassistant/components/yalexs_ble/__init__.py @@ -127,7 +127,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) entry.async_on_unload(entry.add_update_listener(_async_update_listener)) entry.async_on_unload( - hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_shutdown) + hass.bus.async_listen_once( + EVENT_HOMEASSISTANT_STOP, _async_shutdown, run_immediately=True + ) ) return True