From 144bb3492ad260f77ef1374d2de15a07c0b04f57 Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Mon, 28 May 2018 10:32:47 -0400 Subject: [PATCH] zha/light: Properly parse currentX and currentY on async_update() (#14605) --- homeassistant/components/light/zha.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/light/zha.py b/homeassistant/components/light/zha.py index b44bf820b23..bd01a513e0b 100644 --- a/homeassistant/components/light/zha.py +++ b/homeassistant/components/light/zha.py @@ -172,7 +172,8 @@ class Light(zha.Entity, light.Light): result = await zha.safe_read(self._endpoint.light_color, ['current_x', 'current_y']) if 'current_x' in result and 'current_y' in result: - xy_color = (result['current_x'], result['current_y']) + xy_color = (round(result['current_x']/65535, 3), + round(result['current_y']/65535, 3)) self._hs_color = color_util.color_xy_to_hs(*xy_color) @property