Skip to content

Matter Thermostat: Use fanMode capability #2205

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 1 commit 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

This change replaces the use of thermostatFanMode with fanMode, to better align with the fan modes and sequences defined by the Fan Control cluster.

Also, fanMode is now used in fan profiles over airConditionerFanMode.

Summary of Completed Tests

Unit tests updated. Needs device testing to ensure no regression.

Copy link

Duplicate profile check: Warning - duplicate profiles detected.
fan-wind.yml == fan.yml

Copy link

github-actions bot commented Jun 18, 2025

Test Results

   67 files    441 suites   0s ⏱️
2 263 tests 2 263 ✅ 0 💤 0 ❌
3 859 runs  3 859 ✅ 0 💤 0 ❌

Results for commit 10c58ef.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 18, 2025

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

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 10c58ef

Copy link

This change replaces the use of thermostatFanMode with fanMode, to
better align with the fan modes and sequences defined by the Fan Control
cluster.

Also, fanMode is now used in fan profiles over airConditionerFanMode.
@nickolas-deboom nickolas-deboom force-pushed the matter-thermostat-use-fan-mode-capability branch from fd88017 to 10c58ef Compare June 18, 2025 16:42
is_air_conditioner = true
end
local fan_mode = {
["off"] = is_air_conditioner and "off" or fan_mode_attr.off.NAME,
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty sure these both map to the same thing. I understand why the or was introduced, but fan_mode_attr.off.NAME and the others just map to a string, so I'd feel comfortable cutting the is_air_conditioner check altogether. You could leave a comment if you wanted to clarify why this is allowed, but for example see how it's done for ConcentrationHealthConcern capability attributes.

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