mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-21 21:54:46 +01:00
Merge pull request #45 from gerard33/patch-2
Change check for supported_color_modes
This commit is contained in:
@@ -558,7 +558,8 @@ class NsPanelLovelaceUI:
|
|||||||
else:
|
else:
|
||||||
color_temp = "disable"
|
color_temp = "disable"
|
||||||
|
|
||||||
if "xy" in entity.attributes.supported_color_modes or "rgb" in entity.attributes.supported_color_modes or "rgbw" in entity.attributes.supported_color_modes or "hs" in entity.attributes.supported_color_modes:
|
list_color_modes = ["xy", "rgb", "rgbw", "hs"]
|
||||||
|
if any(item in list_color_modes for item in entity.attributes.supported_color_modes):
|
||||||
color = "enable"
|
color = "enable"
|
||||||
else:
|
else:
|
||||||
color = "disable"
|
color = "disable"
|
||||||
|
|||||||
Reference in New Issue
Block a user