Matter Switch/Camera: Remove Unique Camera Lifecycle Handlers#2898
Matter Switch/Camera: Remove Unique Camera Lifecycle Handlers#2898hcarter-775 wants to merge 1 commit intomainfrom
Conversation
|
Duplicate profile check: Passed - no duplicate profiles detected. |
|
Invitation URL: |
Test Results 72 files 503 suites 0s ⏱️ Results for commit 4a34bf2. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 4a34bf2 |
| }, | ||
| } | ||
| end | ||
| if CameraUtils.feature_supported(device, clusters.CameraAvStreamManagement.ID, clusters.CameraAvStreamManagement.types.Feature.VIDEO) then |
There was a problem hiding this comment.
Is it really VIDEO or is it SPEAKER?
clusters.CameraAvStreamManagement.types.Feature.SPEAKER)
| @@ -0,0 +1,106 @@ | |||
| -- Copyright © 2026 SmartThings, Inc. | |||
There was a problem hiding this comment.
This feels like a missing features of our Lua Libraries that sub drivers cannot provide/update a subscription map. I think we could address this in the lua libs by keeping the same "subscribed_attributes" field that is used in the parent driver, but we could just include the subdriver's attribute table as a part of the considered attributes in the populate_subscribed_attributes_from_driver_defaults function . I think you should be able to repurpose the code you've used below for aggregating the sub driver subscriptions.
This can solution here can be a short term solution, but if the goal of this is to provide a long term solution for sub drivers to provide unique subscriptions, then I think we should make that change in the lua libs themselves in order to keep the structure of sub drivers similar to those of the parent drivers.
1e00f84 to
4a34bf2
Compare
Description of Change
Primarily, this PR removes the camera subdriver lifecycle events in order to create more cohesive device configuration steps within the Matter Switch driver. It does this by using the main driver util functions where appropriate and by integrating a new step into the Matter Switch-specific subscribe function, where the function reads a "subscriptions.lua" file for sub-driver specific information.
As a secondary piece, it rewrites the Matter Camera integration tests. These tests were originally handled in a single file that took a very long time (at least for drivers) to run, and duplicated many parts of tests. I therefore broke it into two parts- one that handles device configuration logic, and the other that handles the attribute/event/capability handlers, which is not likely to change.
It also re-works some helper functions and helper systems to hopefully be more clear/concise.
Summary of Completed Tests
Tested with a series of spot-checks for common device types: