Matter Camera: Only update profile if capabilities have changed#2686
Merged
nickolas-deboom merged 1 commit intomainfrom Jan 12, 2026
Conversation
nickolas-deboom
commented
Jan 6, 2026
|
|
||
| if camera_utils.optional_capabilities_list_changed(optional_supported_component_capabilities, device.profile.components) then | ||
| device:try_update_metadata({profile = "camera", optional_component_capabilities = optional_supported_component_capabilities}) | ||
| if #doorbell_endpoints > 0 then |
Contributor
Author
There was a problem hiding this comment.
button config can be put behind the optional_capabilities_list_changed gate so it doesn't run each time CameraAvStreamManagement.AttributeList is received.
Test Results 71 files 480 suites 0s ⏱️ Results for commit c914691. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against c914691 |
hcarter-775
reviewed
Jan 6, 2026
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
hcarter-775
reviewed
Jan 6, 2026
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
hcarter-775
reviewed
Jan 6, 2026
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
hcarter-775
reviewed
Jan 6, 2026
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
hcarter-775
reviewed
Jan 6, 2026
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
784195c to
7f067b7
Compare
hcarter-775
reviewed
Jan 9, 2026
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Show resolved
Hide resolved
hcarter-775
reviewed
Jan 9, 2026
drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua
Outdated
Show resolved
Hide resolved
b5204a5 to
c6c6f67
Compare
hcarter-775
approved these changes
Jan 12, 2026
c6c6f67 to
6b5ec29
Compare
The `optional_capabilities_list_changed` function was not properly comparing the new set of supported capabilities with the current set, meaning that a profile update was occurring each time `camera_av_stream_management_attribute_list_handler` runs. This commit fixes `optional_capabilities_list_changed` and provides new test cases to ensure that the extraneous profile updates no longer occur.
6b5ec29 to
c914691
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
optional_capabilities_list_changedfunction was not properly comparing the new set of supported capabilities with the current set, meaning that a profile update was occurring each timecamera_av_stream_management_attribute_list_handlerruns. This commit fixesoptional_capabilities_list_changedand provides new test cases to ensure that the extraneous profile updates no longer occur.Tested with Matter SDK Camera example.