From 934c19445d967988b9de9dc9c9bca6dc60a868b3 Mon Sep 17 00:00:00 2001 From: chocomega Date: Tue, 28 Nov 2017 05:54:56 +0100 Subject: [PATCH] Fixed Yeelight's color temperature conversion to RGB (#10831) --- homeassistant/components/light/yeelight.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/light/yeelight.py b/homeassistant/components/light/yeelight.py index 126318f187f..c31bfec4927 100644 --- a/homeassistant/components/light/yeelight.py +++ b/homeassistant/components/light/yeelight.py @@ -222,7 +222,8 @@ class YeelightLight(Light): color_mode = int(color_mode) if color_mode == 2: # color temperature - return color_temperature_to_rgb(self.color_temp) + temp_in_k = mired_to_kelvin(self._color_temp) + return color_temperature_to_rgb(temp_in_k) if color_mode == 3: # hsv hue = int(self._properties.get('hue')) sat = int(self._properties.get('sat'))