Skip to content
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

Support scene transition times with a resolution of 100ms instead of 1 second #6656

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

Flavien
Copy link
Contributor

@Flavien Flavien commented Dec 8, 2023

enhancedAdd for scenes is able to use a transition time with a resolution of 100ms, instead of 1 second for add.

image

In this PR, the code for scene_add will first check if the specified transition is an integer. If it is, it continues to use add, but if it is a decimal number, it will try to use enhancedAdd 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 support enhancedAdd (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.

@Flavien Flavien changed the title Use 'enhancedAdd' when a non-integer scene transition time is specified Support scene transition times with a resolution of 100ms instead of 1 second Dec 8, 2023
src/converters/toZigbee.ts Outdated Show resolved Hide resolved
@Koenkk Koenkk merged commit cc816f4 into Koenkk:master Dec 9, 2023
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Dec 9, 2023

Thanks!

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.

2 participants