Skip to content

zigbee-lock: addCredential always creates a new user - #3333

Closed
hcarter-775 wants to merge 1 commit into
feat/zigbee-lock-master-code-distinctfrom
add-credential-creates-user
Closed

hcarter-775 wants to merge 1 commit into
feat/zigbee-lock-master-code-distinctfrom
add-credential-creates-user

Conversation

@hcarter-775

Copy link
Copy Markdown
Contributor

Description of Change

addCredential has no credentialIndex argument, so its userIndex argument now selects the credential slot (0 auto-assigns). The user is always new and takes the next free user slot. Also accept the master userType, and reject a requested slot that is already occupied. This is a useful change in order to allow users to add pin codes at specified slots, if they so choose, via the ST api.

Summary of Completed Tests

Tested on-device. Unit tests updated.

addCredential has no credentialIndex argument, so its userIndex
argument now selects the credential slot (0 auto-assigns). The user is
always new and takes the next free user slot. Also accept the master
userType, and reject a requested slot that is already occupied.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Channel deleted.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Test Results

   73 files  ±0    549 suites  ±0   0s ⏱️ ±0s
3 349 tests +4  3 333 ✅ +2  0 💤 ±0  0 ❌ ±0  16 🔥 +2 
5 358 runs  +4  5 342 ✅ +2  0 💤 ±0  0 ❌ ±0  16 🔥 +2 

For more details on these errors, see this check.

Results for commit 47cf28f. ± Comparison against base commit bb08c2c.

This pull request removes 1 and adds 5 tests. Note that renamed tests count towards both.
addCredential: auto-assign (userIndex 0) skips credential slot 0, which is reserved for the master code
addCredential: a requested credential slot beyond pinUsersSupported is still sent to the lock
addCredential: a requested free credential slot is used, with the user in the next free user slot
addCredential: creates the user with the userType given in the command
addCredential: rejects a requested credential slot that already holds a master code
addCredential: the master userType is sent to the lock as MASTER_USER

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

zigbee-lock_coverage.xml

File Coverage
All files 92% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/yale/init.lua 91% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/init.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/migrate.lua 91% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_handlers/capabilities.lua 83% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_handlers/zigbee_responses.lua 85% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/configurations.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lazy_load_subdriver.lua 57% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/init.lua 99% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/samsungsds/init.lua 89% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_utils/tables.lua 98% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_utils/utils.lua 87% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/yale/yale-fingerprint-lock/can_handle.lua 88% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/yale/init.lua 97% ✅

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 47cf28f

@hcarter-775

Copy link
Copy Markdown
Contributor Author

closing- this is now a commit on top of #3331

@hcarter-775 hcarter-775 closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant