mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Simplify signal_discovered_config_entry_removed job (#126591)
This commit is contained in:
parent
f1e8675756
commit
4a66395d51
@ -395,7 +395,6 @@ class ZeroconfDiscovery:
|
|||||||
@callback
|
@callback
|
||||||
def _handle_config_entry_removed(
|
def _handle_config_entry_removed(
|
||||||
self,
|
self,
|
||||||
change: config_entries.ConfigEntryChange,
|
|
||||||
entry: config_entries.ConfigEntry,
|
entry: config_entries.ConfigEntry,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle config entry changes."""
|
"""Handle config entry changes."""
|
||||||
|
@ -196,7 +196,7 @@ SIGNAL_CONFIG_ENTRY_CHANGED = SignalType["ConfigEntryChange", "ConfigEntry"](
|
|||||||
@cache
|
@cache
|
||||||
def signal_discovered_config_entry_removed(
|
def signal_discovered_config_entry_removed(
|
||||||
discovery_domain: str,
|
discovery_domain: str,
|
||||||
) -> SignalType[ConfigEntryChange, ConfigEntry]:
|
) -> SignalType[ConfigEntry]:
|
||||||
"""Format signal."""
|
"""Format signal."""
|
||||||
return SignalType(f"{discovery_domain}_discovered_config_entry_removed")
|
return SignalType(f"{discovery_domain}_discovered_config_entry_removed")
|
||||||
|
|
||||||
@ -1875,7 +1875,6 @@ class ConfigEntries:
|
|||||||
async_dispatcher_send_internal(
|
async_dispatcher_send_internal(
|
||||||
self.hass,
|
self.hass,
|
||||||
signal_discovered_config_entry_removed(discovery_domain),
|
signal_discovered_config_entry_removed(discovery_domain),
|
||||||
ConfigEntryChange.REMOVED,
|
|
||||||
entry,
|
entry,
|
||||||
)
|
)
|
||||||
return {"require_restart": not unload_success}
|
return {"require_restart": not unload_success}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user