Support scene transition times with a resolution of 100ms instead of 1 second #6656
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.
enhancedAdd
for scenes is able to use a transition time with a resolution of 100ms, instead of 1 second foradd
.In this PR, the code for
scene_add
will first check if the specifiedtransition
is an integer. If it is, it continues to useadd
, but if it is a decimal number, it will try to useenhancedAdd
instead.enhancedAdd
is already supported in zigbee-herdsman.Potentially breaking change:
With this change, if someone uses
scene_add
with a decimal transition time, with a device that doesn't supportenhancedAdd
(as it is optional), the operation will fail. The current behaviour is that it will successfully store the scene but will round down the transition time.The workaround is to make sure you specify an integer for transition time if a device doesn't support
enhancedAdd
.