mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fixed brightness reducing after each light change (#22606)
self._brightness max is 255 and hsv brightness max is 100. Assigning 255 based brightness value directly with 100 based hsv reduces brightness eventually to zero.
This commit is contained in:
parent
7bd8c0d39a
commit
a61181b10c
@ -157,6 +157,6 @@ class ZenggeLight(Light):
|
||||
rgb = self._bulb.get_colour()
|
||||
hsv = color_util.color_RGB_to_hsv(*rgb)
|
||||
self._hs_color = hsv[:2]
|
||||
self._brightness = hsv[2]
|
||||
self._brightness = (hsv[2] / 100) * 255
|
||||
self._white = self._bulb.get_white()
|
||||
self._state = self._bulb.get_on()
|
||||
|
Loading…
x
Reference in New Issue
Block a user