Only update disabled_by when enabled default and entity enabled states differ (#29643)
This commit is contained in:
parent
f5d4878992
commit
db0baab692
2 changed files with 9 additions and 4 deletions
|
@ -40,6 +40,9 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
"""Update the values of the controller."""
|
||||
for entity in sensors.values():
|
||||
|
||||
if entity.entity_registry_enabled_default == entity.enabled:
|
||||
continue
|
||||
|
||||
disabled_by = None
|
||||
if not entity.entity_registry_enabled_default and entity.enabled:
|
||||
disabled_by = DISABLED_CONFIG_ENTRY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue