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

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nickolas-deboom
Copy link
Contributor

@nickolas-deboom nickolas-deboom commented Nov 20, 2024

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

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.

Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

Copy link

Copy link

github-actions bot commented Nov 20, 2024

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

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against f4c9fcd

Copy link

github-actions bot commented Nov 20, 2024

Test Results

   64 files    402 suites   0s ⏱️
2 001 tests 2 001 ✅ 0 💤 0 ❌
3 453 runs  3 453 ✅ 0 💤 0 ❌

Results for commit f4c9fcd.

♻️ This comment has been updated with latest results.

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.

1 participant