Skip to content

Conversation

@nickolas-deboom
Copy link
Contributor

This change utilizes the new lazy_load_sub_driver_v2 api to lazy load subdrivers in the matter switch driver.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Channel deleted.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Test Results

   71 files    477 suites   0s ⏱️
2 471 tests 2 471 ✅ 0 💤 0 ❌
4 236 runs  4 236 ✅ 0 💤 0 ❌

Results for commit 69e20ee.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/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/switch_utils/fields.lua 99%
/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/device_configuration.lua 97%
/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/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_handlers/attribute_handlers.lua 84%
/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/capability_handlers.lua 88%
/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/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/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%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 69e20ee

Copy link
Contributor

@cjswedes cjswedes left a comment

Choose a reason for hiding this comment

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

Can you update the copywrite on all the files? Its nice to get that done when there are actual code changes for a driver in a release cycle. You can do in a follow up PR too, if you get it in this release cycle.

@hcarter-775
Copy link
Contributor

Also, with the PR I just merged, the switch_utils file now has a different name and is in a different directory (thus a conflict). Should be a simple fix, but I'm not sure how nicely git rebase will understand this change. Maybe well

@cjswedes
Copy link
Contributor

cjswedes commented Nov 5, 2025

Please make sure tests are run against 59 58 lua libs locally before merging to exercise these changes with lazy_load_sub_driver_v2. edit: to 58 since now 59 is what is being used as the latest release, but we need to check tests on both.

@aleclorimer
Copy link
Contributor

What is the plan/status of this?

@nickolas-deboom
Copy link
Contributor Author

What is the plan/status of this?

This will most likely land this week.

@nickolas-deboom
Copy link
Contributor Author

Can you update the copywrite on all the files? Its nice to get that done when there are actual code changes for a driver in a release cycle. You can do in a follow up PR too, if you get it in this release cycle.

Sure thing. Should the dates be updated to 2025 or left as they are? I've heard conflicting direction on that so not too sure

@hcarter-775
Copy link
Contributor

@nickolas-deboom I'd say leave the year as-is. However in this case I think all the files are already 2025

@aleclorimer
Copy link
Contributor

Can you update the copywrite on all the files? Its nice to get that done when there are actual code changes for a driver in a release cycle. You can do in a follow up PR too, if you get it in this release cycle.

Sure thing. Should the dates be updated to 2025 or left as they are? I've heard conflicting direction on that so not too sure

What I've been told and have been doing is updating everything to the newer shorter copyright notice. I think we should go for that

@nickolas-deboom nickolas-deboom force-pushed the matter-switch-lazy-loading-for-subdrivers branch 3 times, most recently from a9e8841 to 603a2ae Compare December 3, 2025 17:59
@nickolas-deboom
Copy link
Contributor Author

Please make sure tests are run against 59 58 lua libs locally before merging to exercise these changes with lazy_load_sub_driver_v2. edit: to 58 since now 59 is what is being used as the latest release, but we need to check tests on both.

I checked on 58 and everything passes except for the camera tests, since they use clusters not available below 59.

@nickolas-deboom nickolas-deboom force-pushed the matter-switch-lazy-loading-for-subdrivers branch from 603a2ae to 757b393 Compare December 3, 2025 18:02
sub_drivers = {
require("sub_drivers.aqara_cube"),
switch_utils.lazy_load_if_possible("sub_drivers.aqara_cube"),
switch_utils.lazy_load("sub_drivers.camera"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This one can't use lazy_load_if_possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can't, because it's not supported at all for lower lua libs versions, rather only supported for 16 and above where lazy_load_sub_driver_v2 is available

@nickolas-deboom nickolas-deboom force-pushed the matter-switch-lazy-loading-for-subdrivers branch from 757b393 to 1a398d2 Compare December 3, 2025 22:00
@nickolas-deboom
Copy link
Contributor Author

FYI I rebased following the changes from #2579, and so in the latest force push I added lazy loading for the bilresa subdriver.

This change utilizes the new `lazy_load_sub_driver_v2` api to lazy load
subdrivers.
@nickolas-deboom nickolas-deboom force-pushed the matter-switch-lazy-loading-for-subdrivers branch from 1a398d2 to 69e20ee Compare December 3, 2025 22:04
@nickolas-deboom nickolas-deboom merged commit 63158a5 into main Dec 4, 2025
11 checks passed
@nickolas-deboom nickolas-deboom deleted the matter-switch-lazy-loading-for-subdrivers branch December 4, 2025 17:02
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.

6 participants