Skip to content

Zigbee/Zwave: Add explicit index mins for lock capability defs - #3305

Closed
hcarter-775 wants to merge 2 commits into
mainfrom
add/explicit-lock-mins
Closed

hcarter-775 wants to merge 2 commits into
mainfrom
add/explicit-lock-mins

Conversation

@hcarter-775

Copy link
Copy Markdown
Contributor

Description of Change

In Zigbee, the minimum for PIN code indices starts at 0, not 1, which was previously being skipped even though it is an allowed value. This change makes that allowable, and makes the minimum handling for other index values more explicit (though the rest were, correctly, 1).

Summary of Completed Tests

Unit tests continue to pass.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Channel deleted.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

zigbee-lock_coverage.xml

File Coverage
All files 94% ✅
/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/lock_utils/tables.lua 98% ✅
/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/configurations.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_handlers/zigbee_responses.lua 89% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_handlers/capabilities.lua 90% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/yale/init.lua 92% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/samsungsds/init.lua 89% ❌

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 581819e

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

zwave-lock_coverage.xml

File Coverage
All files 87% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/lock_utils/utils.lua 88% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/lock_utils/tables.lua 98% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/legacy-handlers/zwave-alarm-v1-lock/init.lua 89% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/init.lua 93% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/lazy_load_subdriver.lua 57% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/legacy-handlers/schlage-lock/init.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/lock_handlers/capabilities.lua 94% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/lock_handlers/zwave_responses.lua 83% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/zwave-alarm-v1-lock/init.lua 24% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/legacy-handlers/keywe-lock/init.lua 77% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/keywe-lock/can_handle.lua 87% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/legacy-handlers/samsung-lock/init.lua 94% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/schlage-lock/can_handle.lua 75% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-lock/src/samsung-lock/can_handle.lua 75% ❌

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 581819e

@hcarter-775 hcarter-775 added the CGAI Contains code that was generated by AI label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Test Results

   73 files    545 suites   0s ⏱️
3 313 tests 3 313 ✅ 0 💤 0 ❌
5 313 runs  5 313 ✅ 0 💤 0 ❌

Results for commit 581819e.

♻️ This comment has been updated with latest results.

capability = capabilities.lockCredentials,
attribute = capabilities.lockCredentials.credentials,
max_entries = capabilities.lockCredentials.pinUsersSupported,
minimum = 0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before making this change, we also need to make sure that we sync the master codes from devices that already have them but either weren't present before migration or weren't synced when onboarding to the new lock experience. Otherwise the driver will see that slot 0 is available and we would have failures when writing to that index if that slot already exists but we just hadn't synced it to our capabilities yet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

@cbaumler

Copy link
Copy Markdown
Contributor

Do we need to decouple credential index and user index in the auto case here?

hcarter-775 and others added 2 commits October 28, 2026 12:47
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hcarter-775
hcarter-775 force-pushed the add/explicit-lock-mins branch from 62294d5 to 581819e Compare October 28, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CGAI Contains code that was generated by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants