mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Simplify config_entries entity registry filter (#115678)
This commit is contained in:
parent
7a67304301
commit
f62a3a7176
@ -2609,14 +2609,12 @@ def _handle_entry_updated_filter(
|
|||||||
Only handle changes to "disabled_by".
|
Only handle changes to "disabled_by".
|
||||||
If "disabled_by" was CONFIG_ENTRY, reload is not needed.
|
If "disabled_by" was CONFIG_ENTRY, reload is not needed.
|
||||||
"""
|
"""
|
||||||
if (
|
return not (
|
||||||
event_data["action"] != "update"
|
event_data["action"] != "update"
|
||||||
or "disabled_by" not in event_data["changes"]
|
or "disabled_by" not in event_data["changes"]
|
||||||
or event_data["changes"]["disabled_by"]
|
or event_data["changes"]["disabled_by"]
|
||||||
is entity_registry.RegistryEntryDisabler.CONFIG_ENTRY
|
is entity_registry.RegistryEntryDisabler.CONFIG_ENTRY
|
||||||
):
|
)
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
async def support_entry_unload(hass: HomeAssistant, domain: str) -> bool:
|
async def support_entry_unload(hass: HomeAssistant, domain: str) -> bool:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user