Skip to content

Conversation

@hcarter-775
Copy link
Contributor

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

Description of Change

We store data related to the device software version (saved from the BasicInformation cluster's softwareVersion attribute) on the driver st_store. This leverages that version to attempt a re-profiling if this is ever updated. The same data is what is leveraged by the hub to re-interview a device on a device update as well.

This is built on top of the following PR: #2481 since that allows for more generic re-profiling of the parent devices.

Summary of Completed Tests

Tested that try_update_metadata works as expected for child devices.

@github-actions
Copy link

github-actions bot commented Oct 14, 2025

Channel deleted.

@github-actions
Copy link

github-actions bot commented Oct 14, 2025

Test Results

   71 files    477 suites   0s ⏱️
2 473 tests 2 473 ✅ 0 💤 0 ❌
4 239 runs  4 239 ✅ 0 💤 0 ❌

Results for commit 1c77860.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 14, 2025

File Coverage
All files 92%
/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/switch_handlers/capability_handlers.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/fields.lua 99%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97%
/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/camera/camera_handlers/capability_handlers.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 1c77860

@hcarter-775 hcarter-775 force-pushed the switch-allow-reprofiling branch from 199f355 to eda1721 Compare October 22, 2025 03:06
@hcarter-775 hcarter-775 changed the base branch from main to update-metadata-switch October 22, 2025 03:06
end
end

function SwitchLifecycleHandlers.device_removed(driver, device)
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 just moved this to the bottom of the file. We never touch this and I personally am always getting confused where device_init is when developing with this placed above it.

@hcarter-775 hcarter-775 force-pushed the update-metadata-switch branch 2 times, most recently from fb3f845 to 73aa8dc Compare October 29, 2025 20:07
Base automatically changed from update-metadata-switch to main October 31, 2025 17:15
@hcarter-775 hcarter-775 force-pushed the switch-allow-reprofiling branch 2 times, most recently from 9daef3c to 2f1d29e Compare December 5, 2025 20:18
@hcarter-775 hcarter-775 force-pushed the switch-allow-reprofiling branch from 2f1d29e to 844dc8d Compare December 8, 2025 20:01
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.

I don't see any issues with these changes and think this will be a super handy feature. It would be good to see if we can test this on device and then this should be good to go!

@hcarter-775 hcarter-775 merged commit c795f82 into main Jan 8, 2026
11 checks passed
@hcarter-775 hcarter-775 deleted the switch-allow-reprofiling branch January 8, 2026 22:41
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