mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
cleaned up
This commit is contained in:
parent
8afd13e8f4
commit
441cb1ff5c
1 changed files with 3 additions and 7 deletions
|
|
@ -1234,8 +1234,6 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
transition: int | None,
|
||||
force: bool,
|
||||
context: Context | None,
|
||||
adapt_brightness: bool | None = None,
|
||||
adapt_color: bool | None = None,
|
||||
) -> None:
|
||||
assert context is not None
|
||||
_LOGGER.debug(
|
||||
|
|
@ -1247,10 +1245,8 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
context.id,
|
||||
)
|
||||
|
||||
if adapt_brightness is None:
|
||||
adapt_brightness = self.adapt_brightness_switch.is_on
|
||||
if adapt_color is None:
|
||||
adapt_color = self.adapt_color_switch.is_on
|
||||
adapt_brightness = self.adapt_brightness_switch.is_on
|
||||
adapt_color = self.adapt_color_switch.is_on
|
||||
|
||||
for light in lights:
|
||||
if not is_on(self.hass, light):
|
||||
|
|
@ -1282,7 +1278,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
context,
|
||||
)
|
||||
):
|
||||
_fire_manual_control_event(self, light, context, is_async=False)
|
||||
_fire_manual_control_event(self, light, context)
|
||||
continue
|
||||
await self._adapt_light(light, transition, force=force, context=context)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue