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:
N1nja98 authored and Rohan Kapoor committed 2019-03-31 23:27:47 -07:00
1 parent 7bd8c0d39a
commit a61181b10c
1 file changed
+1 -1
+1 -1
View File
@@ -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()