From a61181b10cca2f6517dac74f0f13465f1811afec Mon Sep 17 00:00:00 2001 From: N1nja98 <47512532+N1nja98@users.noreply.github.com> Date: Mon, 1 Apr 2019 01:27:47 -0500 Subject: [PATCH] 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. --- homeassistant/components/zengge/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/zengge/light.py b/homeassistant/components/zengge/light.py index b283b8611dc..69ca3da0af9 100644 --- a/homeassistant/components/zengge/light.py +++ b/homeassistant/components/zengge/light.py @@ -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()