Skip to content

Improve Matter Thermostat component to endpoint mapping #2099

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 5 commits into
base: main
Choose a base branch
from

Conversation

nickolas-deboom
Copy link
Contributor

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

Add an optional argument to component_to_endpoint to specify a cluster ID. The previous implementation checked for the presence of airPurifierFanMode within this function, which fails to account for situations where a device supports both the FanControl and Thermostat clusters on different endpoints.

Summary of Completed Tests

Add an optional argument to component_to_endpoint to specify a cluster
ID. The previous implementation checked for the presence of airPurifierFanMode
within this function, which fails to account for situations where a
device supports both the FanControl and Thermostat clusters on different
endpoints.
Copy link

Copy link

github-actions bot commented Apr 28, 2025

Test Results

   66 files    426 suites   0s ⏱️
2 177 tests 2 177 ✅ 0 💤 0 ❌
3 723 runs  3 723 ✅ 0 💤 0 ❌

Results for commit f00fbac.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 28, 2025

File Coverage
All files 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/init.lua 87%
/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 f00fbac

The additional argument of component_to_endpoint was previously being
dropped in the lua libs when device:component_to_endpoint is called.
Calling the function directly solves this issue.
Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

@nickolas-deboom nickolas-deboom force-pushed the fix/matter-thermostat-component-to-endpoint-mapping-improvement branch from 4b76b1c to 69c96a8 Compare April 30, 2025 16:12
This commit adds support for the ResetCondition command for the
ActivatedCarbonFilterMonitoring and HepaFilterMonitoring clusters. Also,
thermostatOperatingState is removed from
air-purifier-hepa-ac-rock-wind-thermostat-humidity-fan-heating-only-nostate-nobattery-aqs-pm10-pm25-ch2o-meas-pm10-pm25-ch2o-no2-tvoc-level,
which should not have included this capability.
@nickolas-deboom nickolas-deboom force-pushed the fix/matter-thermostat-component-to-endpoint-mapping-improvement branch from 69c96a8 to 4167e8c Compare April 30, 2025 16:12
@hcarter-775
Copy link
Contributor

Have you tested this on older FW? Also, since the changes to filterStatus are 1.4 changes, we need to change the lowest allowed lua libs version from the 1.2 release to the 1.4 release version.

@nickolas-deboom
Copy link
Contributor Author

Have you tested this on older FW? Also, since the changes to filterStatus are 1.4 changes, we need to change the lowest allowed lua libs version from the 1.2 release to the 1.4 release version.

I added test cases to cover lua libs API < 10, which allows the embedded clusters to be utilized. Also as discussed the filter reset command change was on the capabilities side rather than in the spec.

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.

2 participants