mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
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
@ -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…
x
Reference in New Issue
Block a user