From 6e3e2d1693e68aa82420c88e2cd164bdb4e9e4f2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 16 Mar 2024 13:39:31 -1000 Subject: [PATCH] Shutdown config entry manager immediately at the stop event (#113632) --- homeassistant/config_entries.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index 4b2eb81c870..3b4787120dd 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -1591,7 +1591,9 @@ class ConfigEntries: old_conf_migrate_func=_old_conf_migrator, ) - self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, self._async_shutdown) + self.hass.bus.async_listen_once( + EVENT_HOMEASSISTANT_STOP, self._async_shutdown, run_immediately=True + ) if config is None: self._entries = ConfigEntryItems(self.hass)