Skip to content

Commit

Permalink
Simplify config_entries entity registry filter (home-assistant#115678)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Apr 17, 2024
1 parent 7a67304 commit f62a3a7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions homeassistant/config_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2609,14 +2609,12 @@ def _handle_entry_updated_filter(
Only handle changes to "disabled_by".
If "disabled_by" was CONFIG_ENTRY, reload is not needed.
"""
if (
return not (
event_data["action"] != "update"
or "disabled_by" not in event_data["changes"]
or event_data["changes"]["disabled_by"]
is entity_registry.RegistryEntryDisabler.CONFIG_ENTRY
):
return False
return True
)


async def support_entry_unload(hass: HomeAssistant, domain: str) -> bool:
Expand Down

0 comments on commit f62a3a7

Please sign in to comment.