From 4369b0b8bede44ed9100f2fcae4bc21b02071e59 Mon Sep 17 00:00:00 2001 From: rik-v Date: Fri, 22 Oct 2021 22:09:19 +0200 Subject: [PATCH] Fix Fibaro light features (#56385) --- homeassistant/components/fibaro/light.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/fibaro/light.py b/homeassistant/components/fibaro/light.py index aed1da543ee..fa9248dc11e 100644 --- a/homeassistant/components/fibaro/light.py +++ b/homeassistant/components/fibaro/light.py @@ -60,10 +60,25 @@ class FibaroLight(FibaroDevice, LightEntity): devconf = fibaro_device.device_config self._reset_color = devconf.get(CONF_RESET_COLOR, False) supports_color = ( - "color" in fibaro_device.properties and "setColor" in fibaro_device.actions + "color" in fibaro_device.properties + or "colorComponents" in fibaro_device.properties + or "RGB" in fibaro_device.type + or "rgb" in fibaro_device.type + or "color" in fibaro_device.baseType + ) and ( + "setColor" in fibaro_device.actions + or "setColorComponents" in fibaro_device.actions + ) + supports_white_v = ( + "setW" in fibaro_device.actions + or "RGBW" in fibaro_device.type + or "rgbw" in fibaro_device.type + ) + supports_dimming = ( + "levelChange" in fibaro_device.interfaces + or supports_color + or supports_white_v ) - supports_dimming = "levelChange" in fibaro_device.interfaces - supports_white_v = "setW" in fibaro_device.actions # Configuration can override default capability detection if devconf.get(CONF_DIMMING, supports_dimming):