Skip to content

Conversation

nickolas-deboom
Copy link
Contributor

@nickolas-deboom nickolas-deboom commented Sep 24, 2025

This change removes Off as a default value from supportedFanModes attribute for the Thermostat device type.

Copy link

Copy link

github-actions bot commented Sep 24, 2025

Test Results

   71 files    452 suites   0s ⏱️
2 351 tests 2 351 ✅ 0 💤 0 ❌
3 959 runs  3 959 ✅ 0 💤 0 ❌

Results for commit 264f055.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Sep 24, 2025

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

Off is an optional enum value for SystemMode and setting fanMode to Off
may have no effect if the thermostat mode is set to heating or cooling.
This commit removes this value from supportedFanModes attribute unless
Off is reported by the SystemMode attribute at some point.
@nickolas-deboom nickolas-deboom force-pushed the dont-use-off-for-thermostat-fan-mode branch from 9a12e9c to 264f055 Compare September 24, 2025 21:07
device:set_field(OPTIONAL_THERMOSTAT_MODES_SEEN, {capabilities.thermostatMode.thermostatMode.off.NAME}, {persist=true})
end
local supported_modes = utils.deep_copy(device:get_field(OPTIONAL_THERMOSTAT_MODES_SEEN))
local supported_modes = utils.deep_copy(device:get_field(OPTIONAL_THERMOSTAT_MODES_SEEN) or {})
Copy link
Contributor

Choose a reason for hiding this comment

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

due to the logic in line 1475, this will literally never be empty, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, good point 😅

local supportedFanModes, supported_fan_modes_attribute
if ib.data.value == clusters.FanControl.attributes.FanModeSequence.OFF_LOW_MED_HIGH then
supportedFanModes = { "off", "low", "medium", "high" }
supportedFanModes = { "low", "medium", "high" }
Copy link
Contributor

Choose a reason for hiding this comment

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

does this mean we'll be deleting options from currently existing thermostat devices with this capability? What are the numbers on this- specifically routines using off for thermostats? Assume it's very low (maybe 0), but still worth checking. Otherwise this looks good to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great point, I will try to figure out how many there are if any before proceeding. If there are a lot of existing rules we could opt to only implement this change for new devices

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