mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
Change brightness scale to max at 254
Supposedly the max light brightness is 255, but my Hue and Lightify lights both max at 254. 0 turns off the light, so the range is probably (0, 255) not [0, 255]
This commit is contained in:
parent
40568296ed
commit
14f272e8cd
1 changed files with 1 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ class CircadianSwitch(SwitchDevice, RestoreEntity):
|
|||
if transition == None:
|
||||
transition = self._cl.data['transition']
|
||||
|
||||
brightness = int((self._attributes['brightness'] / 100) * 255) if self._attributes['brightness'] is not None else None
|
||||
brightness = int((self._attributes['brightness'] / 100) * 254) if self._attributes['brightness'] is not None else None
|
||||
mired = int(self.calc_ct()) if self._lights_ct is not None else None
|
||||
rgb = tuple(map(int, self.calc_rgb())) if self._lights_rgb is not None else None
|
||||
xy = self.calc_xy() if self._lights_xy is not None else None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue