-
Notifications
You must be signed in to change notification settings - Fork 521
Matter Switch: Lazy load subdrivers if possible #2525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matter Switch: Lazy load subdrivers if possible #2525
Conversation
|
Channel deleted. |
Test Results 71 files 477 suites 0s ⏱️ Results for commit 69e20ee. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 69e20ee |
drivers/SmartThings/matter-switch/src/utils/lazy_load_subdriver.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/can_handle.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/can_handle.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/can_handle.lua
Outdated
Show resolved
Hide resolved
drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/can_handle.lua
Outdated
Show resolved
Hide resolved
cjswedes
left a comment
There was a problem hiding this 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.
|
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 |
|
Please make sure tests are run against |
|
What is the plan/status of this? |
This will most likely land this week. |
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 |
|
@nickolas-deboom I'd say leave the year as-is. However in this case I think all the files are already 2025 |
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 |
a9e8841 to
603a2ae
Compare
I checked on 58 and everything passes except for the camera tests, since they use clusters not available below 59. |
603a2ae to
757b393
Compare
drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/can_handle.lua
Show resolved
Hide resolved
| sub_drivers = { | ||
| require("sub_drivers.aqara_cube"), | ||
| switch_utils.lazy_load_if_possible("sub_drivers.aqara_cube"), | ||
| switch_utils.lazy_load("sub_drivers.camera"), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
757b393 to
1a398d2
Compare
|
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.
1a398d2 to
69e20ee
Compare
This change utilizes the new
lazy_load_sub_driver_v2api to lazy load subdrivers in the matter switch driver.