From 3af3fd51725a6c21df177d4e3b6b274823793059 Mon Sep 17 00:00:00 2001 From: Gerard Date: Sun, 20 Mar 2022 01:04:01 +0100 Subject: [PATCH] Change check for supported_color_modes --- apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py b/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py index e3a0297f..43c078a2 100644 --- a/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py +++ b/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py @@ -558,7 +558,8 @@ class NsPanelLovelaceUI: else: 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" else: color = "disable"