Fix transition length and flash length operation

This commit is contained in:
Otto Winter 2019-01-19 15:25:31 +01:00
parent 9e7c0b9101
commit 16fb2bff90
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
1 changed files with 2 additions and 2 deletions

View File

@ -819,10 +819,10 @@ class APIClient:
req.color_temperature = color_temperature
if transition_length is not None:
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:
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:
req.has_effect = True
req.effect = effect