From f62a3a7176af5cab107a56aa0736ec1e584ad13c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 17 Apr 2024 09:42:23 -0500 Subject: [PATCH] Simplify config_entries entity registry filter (#115678) --- homeassistant/config_entries.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index a3f31ff8715..bf576b517d3 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -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: