Skip to content

Conversation

@ngaustad
Copy link
Contributor

Fixed issue where duration was not using seconds.

Fixed issue where duration was not using seconds.
@ngaustad
Copy link
Contributor Author

The duration for multizone lights (I do not own any other lifx lights so I'm not sure if this issue exists there) was always happening instantly regardless of what I set the duration to, in testing if I set the duration to 5000 it would take 5 seconds, it looks like this bit of the code was not accounting for the millisecond conversion.

off()
} else {
setZones('999:"[brightness: ' + level + ']"', duration)
setZones('999:"[brightness: ' + level + ']"', duration * 1000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you actually want this change at line 120, in setZones, so that the conversion from s to ms occurs for all calls.

Copy link
Contributor Author

@ngaustad ngaustad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my change worked for everything I was using it for but this is more complete.

@robheyes robheyes merged commit 0cae141 into robheyes:master Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants