Migrate discovery debouncer callback to async_fire_internal (#116078)

This commit is contained in:
J. Nick Koston 2024-04-24 11:26:48 +02:00 committed by GitHub
parent 1120246194
commit e9e401ae29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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",