Fix transition length and flash length operation
This commit is contained in:
parent
9e7c0b9101
commit
16fb2bff90
|
@ -819,10 +819,10 @@ class APIClient:
|
||||||
req.color_temperature = color_temperature
|
req.color_temperature = color_temperature
|
||||||
if transition_length is not None:
|
if transition_length is not None:
|
||||||
req.has_transition_length = True
|
req.has_transition_length = True
|
||||||
req.transition_length = int(round(transition_length / 1000))
|
req.transition_length = int(round(transition_length * 1000))
|
||||||
if flash_length is not None:
|
if flash_length is not None:
|
||||||
req.has_flash_length = True
|
req.has_flash_length = True
|
||||||
req.flash_length = int(round(flash_length / 1000))
|
req.flash_length = int(round(flash_length * 1000))
|
||||||
if effect is not None:
|
if effect is not None:
|
||||||
req.has_effect = True
|
req.has_effect = True
|
||||||
req.effect = effect
|
req.effect = effect
|
||||||
|
|
Loading…
Reference in New Issue