mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
don't run if statements that will never run
This commit is contained in:
parent
e381d0c0e3
commit
34c4fdb71a
1 changed files with 3 additions and 3 deletions
|
|
@ -373,7 +373,7 @@ class CircadianSwitch(SwitchEntity, RestoreEntity):
|
|||
)
|
||||
|
||||
# Set color of array of rgb.
|
||||
if self._lights_rgb is not None and light in self._lights_rgb:
|
||||
elif self._lights_rgb is not None and light in self._lights_rgb:
|
||||
service_data = {ATTR_ENTITY_ID: light}
|
||||
if rgb is not None:
|
||||
service_data[ATTR_RGB_COLOR] = rgb
|
||||
|
|
@ -388,7 +388,7 @@ class CircadianSwitch(SwitchEntity, RestoreEntity):
|
|||
)
|
||||
|
||||
# Set color of array of xy.
|
||||
if self._lights_xy is not None and light in self._lights_xy:
|
||||
elif self._lights_xy is not None and light in self._lights_xy:
|
||||
service_data = {ATTR_ENTITY_ID: light}
|
||||
if xy is not None:
|
||||
service_data[ATTR_XY_COLOR] = xy
|
||||
|
|
@ -404,7 +404,7 @@ class CircadianSwitch(SwitchEntity, RestoreEntity):
|
|||
)
|
||||
|
||||
# Set color of array of brightness.
|
||||
if self._lights_brightness is not None and light in self._lights_brightness:
|
||||
elif self._lights_brightness is not None and light in self._lights_brightness:
|
||||
service_data = {ATTR_ENTITY_ID: light}
|
||||
if brightness is not None:
|
||||
service_data[ATTR_BRIGHTNESS] = brightness
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue