Skip to content

Conversation

@hcarter-775
Copy link
Contributor

@hcarter-775 hcarter-775 commented Nov 25, 2025

Description of Change

Break subdriver files apart further to match what was done in Matter Camera and the Bilresa subdriver.

Further, adds support for setting the supportedAttributeValues on an infoChanged event.

Summary of Completed Tests

Unit tests updated. Tested on-device to ensure only correct values are populated

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Channel deleted.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Test Results

   71 files    477 suites   0s ⏱️
2 470 tests 2 470 ✅ 0 💤 0 ❌
4 235 runs  4 235 ✅ 0 💤 0 ❌

Results for commit c10b5ec.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

File Coverage
All files 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/air_quality_sensor/init.lua 82%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sensor_utils/embedded_cluster_utils.lua 45%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sensor_utils/device_configuration.lua 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/air_quality_sensor/air_quality_sensor_utils/legacy_device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/air_quality_sensor/air_quality_sensor_utils/fields.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/air_quality_sensor/air_quality_sensor_utils/device_configuration.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/air_quality_sensor/air_quality_sensor_utils/utils.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sensor_handlers/attribute_handlers.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/bosch_button_contact/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/smoke_co_alarm/init.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-sensor/src/sub_drivers/air_quality_sensor/air_quality_sensor_handlers/attribute_handlers.lua 76%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against c10b5ec

@@ -0,0 +1,90 @@
-- Copyright © 2025 SmartThings, Inc.
Copy link
Contributor Author

@hcarter-775 hcarter-775 Dec 3, 2025

Choose a reason for hiding this comment

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

handlers unchanged, just moved

local conversion_function = fields.conversion_tables[from_unit][to_unit]
if conversion_function == nil then
device.log.info_with( {hub_logs = true} , string.format("Unsupported unit conversion from %s to %s", fields.unit_strings[from_unit], fields.unit_strings[to_unit]))
return 1
Copy link
Contributor

Choose a reason for hiding this comment

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

I realize this was existing code, but we might want to return nil and check this at the callsite, otherwise the capability would be emitted with a wrong value if 1 is returned

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gonna put up a separate PR for this promptly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR up: #2602

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 think I'll wait for this guy to merge, then merge 2602 promptly afterwards.

Copy link
Contributor

Choose a reason for hiding this comment

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

TY! Just approved it.

Copy link
Contributor

@nickolas-deboom nickolas-deboom left a comment

Choose a reason for hiding this comment

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

LGTM! I might just recommend doing a quick smoke test on device if you haven't

@hcarter-775 hcarter-775 merged commit 4f1be7e into main Dec 3, 2025
11 checks passed
@hcarter-775 hcarter-775 deleted the add/supported-health-concern-handling branch December 3, 2025 21:04
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.

4 participants