From 6bfb2460f2e4f6c93b23b07005fc9db5fb1cd0ef Mon Sep 17 00:00:00 2001 From: guillempages Date: Fri, 25 Oct 2019 16:06:52 +0200 Subject: [PATCH] [homematic]Pass channel to light color functions (#27306) The device HmIP-BSL has two independent LEDs on two different channels, so the channel needs to be explictly specified when setting the color. --- homeassistant/components/homematic/light.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homematic/light.py b/homeassistant/components/homematic/light.py index 32fa0bb358e..29992bccef3 100644 --- a/homeassistant/components/homematic/light.py +++ b/homeassistant/components/homematic/light.py @@ -66,7 +66,7 @@ class HMLight(HMDevice, Light): """Return the hue and saturation color value [float, float].""" if not self.supported_features & SUPPORT_COLOR: return None - hue, sat = self._hmdevice.get_hs_color() + hue, sat = self._hmdevice.get_hs_color(self._channel) return hue * 360.0, sat * 100.0 @property @@ -98,6 +98,7 @@ class HMLight(HMDevice, Light): self._hmdevice.set_hs_color( hue=kwargs[ATTR_HS_COLOR][0] / 360.0, saturation=kwargs[ATTR_HS_COLOR][1] / 100.0, + channel=self._channel, ) if ATTR_EFFECT in kwargs: self._hmdevice.set_effect(kwargs[ATTR_EFFECT])