Skip to content

Conversation

@hcarter-775
Copy link
Contributor

@hcarter-775 hcarter-775 commented Oct 21, 2025

Description of Change

Right now, nearly all Light / PlugIn / Switch fingerprints are static in the Matter Switch driver. This update makes it so that more dynamic ability to re-profiling these devices. It also attempts to streamline some of this handling.

Though there are a few cases where parent/child device composition may cause a parent device to mis-profile (which this would fix- ex. a child with more support than its parent will cause the parent to misprofile with the more robust child support), this change mostly aims at making dynamic profiling more straightforward in later work.

Summary of Completed Tests

All Light superset devices were onboarded with correct profile.
All Plug devices were onboarded with correct profile.
Specialty devices show continued correct profiling through unit tests.

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

Channel deleted.

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

Test Results

   71 files    459 suites   0s ⏱️
2 388 tests 2 388 ✅ 0 💤 0 ❌
4 056 runs  4 056 ✅ 0 💤 0 ❌

Results for commit 4e103bd.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/generic_handlers/attribute_handlers.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/generic_handlers/capability_handlers.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/generic_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/switch_fields.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/device_configuration.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/switch_utils.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 96%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 4e103bd

@hcarter-775 hcarter-775 force-pushed the update-metadata-switch branch from ca60426 to fb3f845 Compare October 28, 2025 20:27
@nickolas-deboom
Copy link
Contributor

Have you tested with plugs that support energy clusters?

@hcarter-775
Copy link
Contributor Author

hcarter-775 commented Oct 29, 2025

Have you tested with plugs that support energy clusters?

Unit tests catch the case that anything has changed in that regard, and no functionality would be changed as far as this path goes. That is to say, if a plug correctly profiles then the electrical sensor portion would not be breaking (and thus can be confirmed in unit tests)

@hcarter-775 hcarter-775 force-pushed the update-metadata-switch branch from fb3f845 to 73aa8dc Compare October 29, 2025 20:07
@nickolas-deboom
Copy link
Contributor

I took another pass through this PR and it's looking good from my perspective 👍 I'm approving now but I had one more comment about a unit test that would be good to add before merging

@hcarter-775 hcarter-775 merged commit 08ea8eb into main Oct 31, 2025
11 checks passed
@hcarter-775 hcarter-775 deleted the update-metadata-switch branch October 31, 2025 17:15
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