Implement timed effects for Hue lights#144
Merged
chrivers merged 10 commits intochrivers:masterfrom Jun 2, 2025
Merged
Conversation
Owner
|
Hey - sorry I completely overlooked this somehow 😅 I'll take a look now! |
Owner
|
Do we know what |
chrivers
reviewed
May 30, 2025
chrivers
reviewed
May 30, 2025
chrivers
reviewed
May 30, 2025
chrivers
reviewed
May 31, 2025
Contributor
Author
|
Owner
|
Fantastic work 👍 Let's get it merged :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using timed_effects made it much easier to inspect the zigbee message output of running the sunrise effect, so I tweaked EffectDuration to be as accurate as possible. Unfortunately that revealed some edge cases that didn't fit the existing model which made the conversion function uglier.
To test "timed effects" send a PUT request with
{ "on": { "on": true }, "timed_effects": { "effect": "sunrise", "duration": 60000 } }Duration is in milliseconds.
One thing that is missing is updating
timed_effects.status. Since that can easily lead to concurrency issues I'll keep that out of the scope for now.Oh, and as a bonus I added the sunset effect 🌆
{ "on": { "on": true }, "timed_effects": { "effect": "sunset", "duration": 60000 } }