mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Allow transitioning to colour temp for tradfri (#14157)
This commit is contained in:
parent
8e7f500f28
commit
113bdc493a
@ -253,6 +253,8 @@ class TradfriLight(Light):
|
|||||||
params[ATTR_BRIGHTNESS] = brightness
|
params[ATTR_BRIGHTNESS] = brightness
|
||||||
hue = int(kwargs[ATTR_HS_COLOR][0] * (65535 / 360))
|
hue = int(kwargs[ATTR_HS_COLOR][0] * (65535 / 360))
|
||||||
sat = int(kwargs[ATTR_HS_COLOR][1] * (65279 / 100))
|
sat = int(kwargs[ATTR_HS_COLOR][1] * (65279 / 100))
|
||||||
|
if brightness is None:
|
||||||
|
params[ATTR_TRANSITION_TIME] = transition_time
|
||||||
await self._api(
|
await self._api(
|
||||||
self._light_control.set_hsb(hue, sat, **params))
|
self._light_control.set_hsb(hue, sat, **params))
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user