Repository navigation
Zwave lock: add explicit mins and migration validation - #3313
Open
hcarter-775 wants to merge 3 commits into
Open
hcarter-775 wants to merge 3 commits into
hcarter-775 wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Drop legacy lockCodes slots that are not valid credential indices (such as 0, which means "all users" in Z-Wave) when migrating to lockUsers/lockCredentials. Remaining users are numbered sequentially from 1. Add tables.get_minimum to read a table's minimum index, and tests for deleting credentials whose user or credential index maps to no entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Invitation URL: |
|
zwave-lock_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 06b7443 |
Test Results 73 files 545 suites 0s ⏱️ Results for commit 06b7443. ♻️ This comment has been updated with latest results. |
cbaumler
approved these changes
Oct 28, 2026
ctowns
approved these changes
Oct 29, 2026
ctowns
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Just one comment that could be a follow up if needed
| max_entries = capabilities.lockCredentials.pinUsersSupported, | ||
| -- Z-Wave User Identifiers are a sequence starting at 1; 0 is reserved to mean "all users". | ||
| -- This differs from the lockCredentials capability, which allows a credentialIndex of 0. | ||
| minimum = 1, |
Contributor
There was a problem hiding this comment.
Credential index is valid at the capability level as you mentioned, so we could potentially still get an addCredential command with index 0 - should we add this minumum check in the addCredential handling as well?
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
Add explicit minimums to add greater clarity to the Zwave Lock table handling. Also, add explicit validation of Zwave codes during migration to ensure that only valid codes are moved (no indices allowed for 0, which is a special catch-all sentinal in Zwave), and that all codes are given a valid userIndex (>=1).
Summary of Completed Tests
Unit tests updated. Migration of device with a handful of valid lock codes tested on-device.