Compare commits

...

1 commit

Author SHA1 Message Date
Bas Nijholt
7eebe2407a Remove reset calls where not needed 2023-07-31 16:33:48 -07:00

View file

@ -1556,6 +1556,8 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
if event.context.parent_id and not self.manager.is_proactively_adapting(
event.context.id,
):
# We don't reset manual_control because it might be set before
# the 'off' → 'on' event is fired.
self.manager.reset(entity_id, reset_manual_control=False)
lock = self._locks.setdefault(entity_id, asyncio.Lock())
@ -2069,7 +2071,6 @@ class AdaptiveLightingManager:
call.context.id,
)
self.reset(entity_id, reset_manual_control=False)
self.clear_proactively_adapting(entity_id)
transition = data[CONF_PARAMS].get(