Matter Switch/Camera: Remove Unique Camera Lifecycle Handlers#2898
Matter Switch/Camera: Remove Unique Camera Lifecycle Handlers#2898hcarter-775 wants to merge 8 commits intomatter-cam/re-init-feature-changefrom
Conversation
…Smart Scene Contact into zigbee-contact (#2539) * Add Sonoff SNZB-04PR2 Smart Scene Contact into zigbee-contact * Add Sonoff profile into zigbee-contact * Delete the program, that is only submit the relevant configuration. * Modify the profile configuration of the fingerprint file * The anti-tampering function has been changed to a standard attribute
* Inovelli - adding vzw31 red series dimmer switch * needed to add multilevel report handler to pass test suite * adding tests for vzw31 * removing extra code for button value init
* Add fingerprint for PAD19 dimmer * Add fingerprint for PAD19 dimmer * Add fingerprint for PAD19 dimmer
* Add Zooz ZSE50 to zwave-siren
* add new zigbee-humididt-sensor SNZB-02DR2
|
Duplicate profile check: Passed - no duplicate profiles detected. |
|
Invitation URL: |
Test Results 72 files ± 0 500 suites +5 0s ⏱️ ±0s Results for commit 1e00f84. ± Comparison against base commit 1094ae3. This pull request removes 1 and adds 28 tests. Note that renamed tests count towards both. |
|
matter-switch_coverage.xml
zigbee-contact_coverage.xml
zigbee-humidity-sensor_coverage.xml
zwave-siren_coverage.xml
zwave-switch_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 1e00f84 |
| }, | ||
| } | ||
| 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.
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: