Repository navigation
zwave lock: make sync codes more robust, add it to refresh handling - #3339
Conversation
|
Channel deleted. |
|
zwave-lock_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 65f06c8 |
Test Results 73 files 571 suites 0s ⏱️ Results for commit 65f06c8. ♻️ This comment has been updated with latest results. |
e6cd227 to
6aa1ce1
Compare
|
Rebased changes. Made a few small updates to match the zigbee equivalent changes in #3330 , but they were mostly already the same. Claude found a bug in AI review that I added a patch for, but otherwise the original two commits are unchanged. |
hcarter-775
left a comment
There was a problem hiding this comment.
cannot approve my own pr, but @ctowns I approve the changes made- I have checked that they are 1-1 with the Zigbee logic, altered of course to fit the Zwave particularities.
Match the zigbee-lock sync handling merged in #3330. During a code sync, user_code_report compared the reported user ID status, rather than its user identifier, against the expected code index, so a report for a different slot was taken as the result for the current one. A late or duplicate report could record an occupied code at the wrong slot and skip the slot actually being checked. - A report for an index below the current one has already been processed: log it and return without advancing the sync. - A report for any other unexpected index is logged and treated as an unoccupied slot, so the sync continues. - add_reported_credential returns the result of the add, as in zigbee-lock. Adds tests for both cases, and ports the zigbee-lock tests for persisting the sync index, clearing the unoccupied counter on completion, and retrying a stalled sync after the busy window expires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6aa1ce1 to
65f06c8
Compare
|
Rebased due to conflicts, but the changes were either due to command ordering or test cases, no functional conflicts |
This reverts commit 91a7498. Conflicts with later changes (#3337, #3339, #3346) in the zwave-lock tests were resolved by dropping the tests added by #3323 and keeping the lock_utils require and Schlage mock device that remaining code and tests still use. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Description of Change
Attempt a re-sync of lock codes after migration is completed as a backup measure, in case our local lockCodes cache missed. Also, retry lock codes migration on every driver init, until the sync has actually completed at least once. Finally, include code syncing in refresh to allow users some retry functionality in the case that something fails.
Summary of Completed Tests
Tests updated. Tested on a Yale lock with a fresh onboard.