From e9e401ae2929591ba4fceeec8b17f9f5302c9b5d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 24 Apr 2024 11:26:48 +0200 Subject: [PATCH] Migrate discovery debouncer callback to async_fire_internal (#116078) --- 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 bf576b517d3..0637e5f7c87 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -1405,7 +1405,9 @@ class ConfigEntriesFlowManager(data_entry_flow.FlowManager[ConfigFlowResult]): @callback def _async_discovery(self) -> None: """Handle discovery.""" - self.hass.bus.async_fire(EVENT_FLOW_DISCOVERED) + # async_fire_internal is used here because this is only + # called from the Debouncer so we know the usage is safe + self.hass.bus.async_fire_internal(EVENT_FLOW_DISCOVERED) persistent_notification.async_create( self.hass, title="New devices discovered",