limitlessled: scale brightness to meet ledcontroller expectations
LedController's set_brightness() method expects either an int between 0 and 100, or a float between 0.0 and 1.0, but the brightness here is an int between 0-255. Scale the brightness appropriately.
This commit is contained in:
parent
dc2ed19105
commit
4bbe716710
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ class LimitlessLED(Light):
|
|||
if ATTR_BRIGHTNESS in kwargs:
|
||||
self._brightness = kwargs[ATTR_BRIGHTNESS]
|
||||
|
||||
self.led.set_brightness(self._brightness, self.group)
|
||||
self.led.set_brightness(self._brightness / 255.0, self.group)
|
||||
self.update_ha_state()
|
||||
|
||||
def turn_off(self, **kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue