mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
zha/light: Properly parse currentX and currentY on async_update() (#14605)
This commit is contained in:
parent
6f4dd7b057
commit
144bb3492a
@ -172,7 +172,8 @@ class Light(zha.Entity, light.Light):
|
|||||||
result = await zha.safe_read(self._endpoint.light_color,
|
result = await zha.safe_read(self._endpoint.light_color,
|
||||||
['current_x', 'current_y'])
|
['current_x', 'current_y'])
|
||||||
if 'current_x' in result and 'current_y' in result:
|
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)
|
self._hs_color = color_util.color_xy_to_hs(*xy_color)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user