You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Matter LockUserChange events and optimistic push updates (#986)
* Add LockUserChange event handling and optimistic push updates for Matter
Subscribe to DoorLock LockUserChange events (event ID 4) to get real-time
credential change notifications. When a PIN is added/modified, push
SlotCode.UNKNOWN to coordinator; when cleared, push SlotCode.EMPTY.
This replaces waiting for the 5-minute poll cycle.
Also add optimistic push updates in async_set_usercode and
async_clear_usercode, matching the Z-Wave pattern where the service
call success triggers an immediate coordinator update.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 03ca04bf0391
* Use push framework for Matter event subscriptions
Address review feedback:
- Set supports_push=True so BaseLock skips post-set/clear coordinator
refresh that would overwrite optimistic push updates
- Implement setup_push_subscription/teardown_push_subscription instead
of manual _subscribe_to_events, getting automatic retry on failure
- Raise LockDisconnected when client/node unavailable (triggers retry)
instead of silently skipping
- Add defensive try/except for dataIndex int conversion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 44c903d5ea75
* Address code review findings: logging, data guards, and test gaps
- Log warning for non-integer dataIndex in LockUserChange events
- Log debug for unhandled DoorLock cluster event IDs
- Guard coordinator.data is not None before push_update to prevent
TypeError if event arrives before first coordinator poll
- Add supports_push property test
- Add tests for service failure preventing optimistic push
- Add tests for non-integer dataIndex and coordinator.data=None
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c82ae55fd83a
* Add TODO: consider event-driven vs optimistic push updates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 82e727c603a2
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments