[1.5 backport] OccupancySensing: report HoldTime on legacy *OccupiedToUnoccupiedDelay aliases#71816
Open
j-ororke wants to merge 2 commits intoproject-chip:v1.5-branchfrom
Conversation
…oUnoccupiedDelay aliases
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the occupancy sensor server to ensure that changes to the HoldTime attribute are correctly propagated to its deprecated aliases: PIROccupiedToUnoccupiedDelay, UltrasonicOccupiedToUnoccupiedDelay, and PhysicalContactOccupiedToUnoccupiedDelay. The implementation includes a check for the presence of these attributes on the endpoint before triggering the reporting callback. Feedback was provided regarding a redundant line in the source code comments that should be removed to improve readability.
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.
Summary
Backport of the alternative, ember/codegen-based fix (see #71370): when HoldTime changes, report the change not only for HoldTime but for each deprecated *OccupiedToUnoccupiedDelay attribute that is present on the endpoint, so clients subscribed to those legacy attribute IDs also receive a report. Those attributes alias the same value as HoldTime.
Related issues
Tracked by: matter-test-scripts#766
Upstream / reference: #71370
Testing
Build verification (compile the occupancy sensor server in the all-clusters test app without issues):
Ran OCC_2_3 test to cover this change:
No issues with running the test with the code changes made, in which this issue was found initially.