mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Merge pull request #6507 from amelchio/longer-light-transitions
Increase upper limit on light transitions (#2843)
This commit is contained in:
commit
c721ec7ab0
@ -86,7 +86,7 @@ PROP_TO_ATTR = {
|
||||
}
|
||||
|
||||
# Service call validation schemas
|
||||
VALID_TRANSITION = vol.All(vol.Coerce(float), vol.Clamp(min=0, max=900))
|
||||
VALID_TRANSITION = vol.All(vol.Coerce(float), vol.Clamp(min=0, max=6553))
|
||||
VALID_BRIGHTNESS = vol.All(vol.Coerce(int), vol.Clamp(min=0, max=255))
|
||||
|
||||
LIGHT_TURN_ON_SCHEMA = vol.Schema({
|
||||
|
@ -436,12 +436,7 @@ class HueLight(Light):
|
||||
command = {'on': False}
|
||||
|
||||
if ATTR_TRANSITION in kwargs:
|
||||
# Transition time is in 1/10th seconds and cannot exceed
|
||||
# 900 seconds.
|
||||
command['transitiontime'] = min(
|
||||
9000,
|
||||
int(kwargs[ATTR_TRANSITION] * 10)
|
||||
)
|
||||
command['transitiontime'] = int(kwargs[ATTR_TRANSITION] * 10)
|
||||
|
||||
flash = kwargs.get(ATTR_FLASH)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user