-
-
Notifications
You must be signed in to change notification settings - Fork 16
Implement timed effects for Hue lights #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hey - sorry I completely overlooked this somehow 😅 I'll take a look now! |
|
Do we know what |
|
|
Fantastic work 👍 Let's get it merged :) |
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 } }