mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 14:24:03 +02:00
be explicit in unpacking RGB
This commit is contained in:
parent
9dc04bc7c1
commit
98efae7e40
1 changed files with 2 additions and 1 deletions
|
|
@ -328,7 +328,8 @@ class CircadianSwitch(SwitchEntity, RestoreEntity):
|
|||
if light_type == "ct":
|
||||
service_data[ATTR_COLOR_TEMP] = int(self.calc_ct())
|
||||
elif light_type == "rgb":
|
||||
service_data[ATTR_RGB_COLOR] = tuple(map(int, self.calc_rgb()))
|
||||
r, g, b = self.calc_rgb()
|
||||
service_data[ATTR_RGB_COLOR] = (int(r), int(g), int(b))
|
||||
elif light_type == "xy":
|
||||
service_data[ATTR_XY_COLOR] = self.calc_xy()
|
||||
if service_data.get(ATTR_BRIGHTNESS, False):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue