From c462292e4d3017401a7def24ca8051b34ad605f1 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Wed, 7 Mar 2018 05:55:04 +0100 Subject: [PATCH] Fix LIFX color conversions (#12957) --- homeassistant/components/light/lifx.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/light/lifx.py b/homeassistant/components/light/lifx.py index 2b76a01dbc9..5e347742681 100644 --- a/homeassistant/components/light/lifx.py +++ b/homeassistant/components/light/lifx.py @@ -169,15 +169,15 @@ def find_hsbk(**kwargs): if ATTR_RGB_COLOR in kwargs: hue, saturation, brightness = \ color_util.color_RGB_to_hsv(*kwargs[ATTR_RGB_COLOR]) - hue = hue / 360 * 65535 - saturation = saturation / 100 * 65535 - brightness = brightness / 100 * 65535 + hue = int(hue / 360 * 65535) + saturation = int(saturation / 100 * 65535) + brightness = int(brightness / 100 * 65535) kelvin = 3500 if ATTR_XY_COLOR in kwargs: hue, saturation = color_util.color_xy_to_hs(*kwargs[ATTR_XY_COLOR]) - hue = hue / 360 * 65535 - saturation = saturation / 100 * 65535 + hue = int(hue / 360 * 65535) + saturation = int(saturation / 100 * 65535) kelvin = 3500 if ATTR_COLOR_TEMP in kwargs: