Skip to content

Conversation

@hcarter-775
Copy link
Contributor

Description of Change

Set the supportedThermostatOperatingStates, if applicable, based on the feature map of the device.

Summary of Completed Tests

Unit tests updated.

@github-actions
Copy link

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

Test Results

   71 files  ±0    480 suites  ±0   0s ⏱️ ±0s
2 488 tests ±0  2 488 ✅ ±0  0 💤 ±0  0 ❌ ±0 
4 271 runs  ±0  4 271 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3b325e9. ± Comparison against base commit 2192441.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

File Coverage
All files 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/thermostat_handlers/capability_handlers.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/thermostat_handlers/attribute_handlers.lua 81%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/thermostat_utils/embedded_cluster_utils.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/thermostat_utils/device_configuration.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/thermostat_utils/legacy_device_configuration.lua 86%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/thermostat_utils/utils.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/init.lua 98%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 3b325e9

@hcarter-775 hcarter-775 force-pushed the add/supported-thermostat-operating-states branch from d6c5e1b to fb4330e Compare January 21, 2026 17:45
device:subscribe()
device:set_component_to_endpoint_fn(thermostat_utils.component_to_endpoint)
device:set_endpoint_to_component_fn(thermostat_utils.endpoint_to_component)
thermostat_utils.handle_thermostat_operating_state_info(device)
Copy link
Contributor

@nickolas-deboom nickolas-deboom Jan 21, 2026

Choose a reason for hiding this comment

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

I think that this running in init could falsely cause an offline device to be marked online since it emits a capability. doConfigure might be a better spot for this call (infoChanged as well in case to update the capability if the profile changes)?
Edit: thinking about it again, I'm not sure if this is true for a driver-scoped lifecycle event.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did add it to info_changed. I also put it in init because I want already existing devices to be udpated. Finally, I believe the {visibility = {displayed = false}} option should fix the issue you're describing? Or am I misremembering what that does?

Copy link
Contributor

@nickolas-deboom nickolas-deboom Jan 21, 2026

Choose a reason for hiding this comment

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

Edit 2: I confirmed that this does indeed cause offline devices to be marked online

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I edited the conditional to only set this if it has not been set before. Effectively, that will only do the setting once, on startup. Else, it will do this once for existing devices (and may make offline devices appear online in-app, once)

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect, thanks!

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