Implement support for transition (color, brightness) #141
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.
Transitioning between different brightness levels and color is a native zigbee feature and z2m seems to handle this very well.
Most of this PR is adding the necessary fields to the API update models (v1 and v2) and forwarding this to z2m.
I also added a default transition time of 0.4s for brightness and color (same as the Hue bridges uses). With a short transition changing brightness/color in the Hue app looks much better than the default choppy effect.
As previously mentioned on Discord changing IKEA light colors doesn't look good, but at least now it behaves more or less the same as the Hue bridge. From a little experimenting with a IKEA LED2109G6 I think this is because the IKEA firmware doesn't support rapidly changing colors with a transition. It does support brightness nicely, and it also works with a single color transition. Doing multiple in a row (which happens easily when picking a color in the Hue app) looks bad.