mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
Update switch.py
This commit is contained in:
parent
9eb56463ec
commit
a6641d0daf
1 changed files with 1 additions and 13 deletions
|
|
@ -1142,17 +1142,6 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
# Don't adapt lights that haven't finished prior transitions.
|
||||
if self.turn_on_off_listener.transition_timers.get(light):
|
||||
lights.remove(light)
|
||||
|
||||
await self._adapt_lights(lights, transition, force, context)
|
||||
|
||||
if not force:
|
||||
if self._only_once:
|
||||
return
|
||||
for light in lights:
|
||||
# Don't adapt lights that haven't finished prior transitions.
|
||||
if self.turn_on_off_listener.transition_timers.get(light):
|
||||
lights.remove(light)
|
||||
|
||||
await self._update_manual_control_and_maybe_adapt(
|
||||
lights, transition, force, context
|
||||
)
|
||||
|
|
@ -1192,7 +1181,6 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
force,
|
||||
adapt_brightness,
|
||||
adapt_color,
|
||||
context,
|
||||
):
|
||||
_LOGGER.debug(
|
||||
"%s: '%s' is being manually controlled, stop adapting, context.id=%s.",
|
||||
|
|
@ -1202,7 +1190,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
)
|
||||
continue
|
||||
if (
|
||||
(self._detect_non_ha_changes or self._alt_detect_method)
|
||||
self._detect_non_ha_changes
|
||||
and not force
|
||||
and await self.turn_on_off_listener.significant_change(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue