Matter Window Covering: Add preference to reverse device operation #1768
+141
−19
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.
Type of Change
Checklist
Description of Change
CHAD-12704
Add the reverse preference for the window covering device type, so that a user may select to toggle the polarity of the device. This will not change the motor direction of the window covering device, but rather will invert the 0-100% scale in the driver, such that a
shadeLevel
of 100% would present as Closed rather than Open in thewindowShadeLevel
capability, and ashadeLevel
of 0% would present as Open. Additionally, while the shade level is being increased, the capability would display as "Closing", and while it is being decreased the capability would display as "Opening".Note that the default value of the preference is false, which will match the previous behavior.
Summary of Completed Tests
This change was tested with the VDA to ensure that when the preference is not set, the window shade behaves as normal, and when the preference is set, the window shade behaves with its polarity inverted as described above. Also see new unit test.