Matter Window Covering: Update shade status via latest shade level when movement halts#3132
Open
hcarter-775 wants to merge 1 commit into
Open
Matter Window Covering: Update shade status via latest shade level when movement halts#3132hcarter-775 wants to merge 1 commit into
hcarter-775 wants to merge 1 commit into
Conversation
hcarter-775
requested review from
NoahCornell,
aleclorimer,
cjswedes,
ctowns,
gharveymn and
tpmanley
July 17, 2026 20:04
hcarter-775
force-pushed
the
bugfix/handle-0-operational-state
branch
from
July 17, 2026 20:05
59036d0 to
e364737
Compare
|
Invitation URL: |
12 tasks
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against e364737 |
Test Results 73 files 536 suites 0s ⏱️ Results for commit e364737. |
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.
Description of Change
If an operational status of 0 is received (not moving), we should emit an event setting the
windowShadeLeveloperational status (open, closed, etc). This is to ensure that a final status is handled in the case that a device sends any kind of "movement" operational status after the last current position is sent.This is a follow-up to this PR that also attempts to resolve: #3043, without adding a timer to the handling. This timer is less ideal, since responsiveness is slow by definition of the timer with little value (as there is another route), reads do fail at times, and read timers adds extra time state to keep in mind, which can complicate the handlers.
Tag-along updates:
Several fields are not needed, so I have removed them to add greater clarity to the updated handling.
CURRENT_LIFT/CURRENT_TILTare fields that store some latest attribute states during runtime. A field is not required for this.REVERSE_POLARITYstored the state ofdevice.preferences.reverse, which is already stored in the data model. Therefore this is not needed. As it is persisted, it needs to be made nil to remove.PRESET_LEVEL_KEYis only ever used (get_field) when the capability state is nil, and is therefore nil in that context as well. So we don't need this.In
info_changed, we should not try to update the device profile on any non-profile update, as the inventories can be synced for many reasons. In fact, the only case this would be required for is a software update, so I have altered the logic to explicitly check for that- this has been validated with identical handling in Matter Switch, and a unit test has been updated to validate this as well.Summary of Completed Tests
Unit tests updated.