mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
zha: fix 0 second transitions being ignored. (#26654)
Allow turning a light on instantly, with no transition time. This is actually required for IKEA lights to be able to set brightness and color temp in a single call.
This commit is contained in:
parent
db48d5effd
commit
8de84c53a1
@ -201,7 +201,7 @@ class Light(ZhaEntity, light.Light):
|
||||
async def async_turn_on(self, **kwargs):
|
||||
"""Turn the entity on."""
|
||||
transition = kwargs.get(light.ATTR_TRANSITION)
|
||||
duration = transition * 10 if transition else DEFAULT_DURATION
|
||||
duration = transition * 10 if transition is not None else DEFAULT_DURATION
|
||||
brightness = kwargs.get(light.ATTR_BRIGHTNESS)
|
||||
effect = kwargs.get(light.ATTR_EFFECT)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user