SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
269 stars 462 forks source link

Matter Window Covering: Add preference to reverse device operation #1768

Open nickolas-deboom opened 5 days ago

nickolas-deboom commented 5 days ago

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 the windowShadeLevel capability, and a shadeLevel 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.

github-actions[bot] commented 5 days ago

Duplicate profile check: Passed - no duplicate profiles detected.

github-actions[bot] commented 5 days ago

Invitation URL: https://bestow-regional.api.smartthings.com/invite/d429L0n3PMoe

github-actions[bot] commented 5 days ago

File Coverage
All files 69% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/matter-window-covering-position-updates-while-moving/init.lua 32% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/init.lua 94% :white_check_mark:

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against 0df4c8912b519959d17550b2acf8d502b6548cf2

github-actions[bot] commented 5 days ago

Test Results

   64 files    402 suites   0s ⏱️ 2 000 tests 2 000 ✅ 0 💤 0 ❌ 3 452 runs  3 452 ✅ 0 💤 0 ❌

Results for commit 0df4c891.