mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 08:47:09 +00:00
Guard Z-Wave light HS conversion on None (#31320)
This commit is contained in:
parent
202fd4197b
commit
6b95e98eeb
@ -380,7 +380,9 @@ class ZwaveColorLight(ZwaveDimmer):
|
|||||||
# white LED must be off in order for color to work
|
# white LED must be off in order for color to work
|
||||||
self._white = 0
|
self._white = 0
|
||||||
|
|
||||||
if ATTR_WHITE_VALUE in kwargs or ATTR_HS_COLOR in kwargs:
|
if (
|
||||||
|
ATTR_WHITE_VALUE in kwargs or ATTR_HS_COLOR in kwargs
|
||||||
|
) and self._hs is not None:
|
||||||
rgbw = "#"
|
rgbw = "#"
|
||||||
for colorval in color_util.color_hs_to_RGB(*self._hs):
|
for colorval in color_util.color_hs_to_RGB(*self._hs):
|
||||||
rgbw += format(colorval, "02x")
|
rgbw += format(colorval, "02x")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user