Skip to content

Matter Thermostat: add support for modular profiles #2084

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

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

Conversation

ctowns
Copy link
Contributor

@ctowns ctowns commented Apr 18, 2025

Check all that apply

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

Summary of Completed Tests

Copy link

Copy link

github-actions bot commented Apr 18, 2025

Test Results

   66 files  ± 0    427 suites  +4   0s ⏱️ ±0s
2 185 tests +10  2 114 ✅  - 61  0 💤 ±0  0 ❌ ±0   71 🔥 + 71 
3 734 runs  +34  3 624 ✅  - 76  0 💤 ±0  1 ❌ +1  109 🔥 +109 

For more details on these errors, see this check.

Results for commit 29382c5. ± Comparison against base commit 0d97bf5.

This pull request removes 1 and adds 11 tests. Note that renamed tests count towards both.
On changing the operatinalState to STOPPED, robotCleanerOperatingState must be set to the appropriate value
Clear alarm and smokeDetector states, and read firmware version when the device is added
Should detect newer firmware version and use correct endian format to turn off the siren
Should detect newer firmware version and use correct endian format to turn on the siren
Should detect older firmware version and use correct endian format to turn on the siren
Test filter state reset command
Test firmware version conversion using direct simulation
Test profile change on init for basic Air Purifier device
Test set heating setpoint on thermostat endpoint
ZoneStatusChangeNotification should be handled: tested
infochanged to check for necessary preferences settings: tempSensitivity, warningDuration
…

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 18, 2025

File Coverage
All files 58%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/init.lua 56%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/embedded-cluster-utils.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 29382c5


local function match_profile(driver, device)
-- must use profile switching on older hubs
if version.api < 14 and version.rpc < 7 then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be an or, if either one is too low we use a static profile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - I updated this to an or instead, and I also left a note to update the RPC version to 8 once that gets into a build since I bumped the version number for the sake of tracking modular profile support 👍

Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

components:
- id: main
capabilities:
- id: airPurifierFanMode
Copy link
Contributor

@nickolas-deboom nickolas-deboom Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the order of the capabilities going to match the order in existing profiles?

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.

3 participants