Fix Aqara vibration sensor sensitivity configuration#8135
Merged
Conversation
This caused the GUI never updating the attributes listed in the proper attribute set. But only the attributes which were placed wrongly in the "Basic Device Information" attribute set.
Contributor
The REST-API values (0: low, 1: medium, 2: high) map to on device values (3, 2, 1). By DDF default high sensitivity (API: 2) will be configured.
When setting low sensitivity `{"sensitivity": 0}` via API the correct value 3 was written to the device. However the bug was: reading back value 3 wasn't parsed right and reverted to default value 2 (high). The fix ensures only correct on devices values (high:1, med: 2, low: 3) will be written. Any out of bound values are corrected. Further it fixes that on device values > 3 won't be turned into high sensitivity.
Contributor
|
This pull request is now merged. The new DDB files have been uploaded to the store. DDB FilesModified
🕙 Updated for commit 06daef2 |
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.
Part I Remove duplicate for Basic cluster Xiaomi manufacturer specific attributes in
general.xmlThe duplicate in
general.xmlcaused the GUI never updating the attributes listed in the proper attribute set. But only the attributes which were placed wrongly in the "Basic Device Information" attribute set.Part II Aqara vibration sensor sensitivity fix.
The REST-API values (0: low, 1: medium, 2: high) map to on device values (3, 2, 1). By default the DDF sets high sensitivity (API value: 2) which will be configured automatically.
When setting low sensitivity
{"sensitivity": 0}via API the correct value 3 was written to the device. However the bug was: reading back value 3 wasn't parsed right and reverted to default value 2 (high). The fix ensures that only correct on devices values (high:1, med: 2, low: 3) will be written. Any out of bound values are corrected. Further it fixes that on device values > 3 won't be turned into API values for high sensitivity (2) but low sensitivity (0).