-
Notifications
You must be signed in to change notification settings - Fork 508
CHAD-16364 & CHAD-16365: Add lockUsers and lockCredentials to profiles and also implement lockCodes:migrate functionality. #2416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Duplicate profile check: Passed - no duplicate profiles detected. |
Invitation URL: |
Test Results 70 files 451 suites 0s ⏱️ Results for commit 03327d2. |
zigbee-lock_coverage.xml
zwave-lock_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against 03327d2 |
local index = 0 | ||
for code_slot, code_name in pairs(lock_utils.get_lock_codes(device)) do | ||
table.insert(lock_users, {userIndex = index, userType = "guest", userName = code_name}) | ||
table.insert(lock_credentails, {userIndex = index, credentialIndex = code_slot, crednetialType = "pin"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table.insert(lock_credentails, {userIndex = index, credentialIndex = code_slot, crednetialType = "pin"}) | |
table.insert(lock_credentails, {userIndex = index, credentialIndex = code_slot, crednentialType = "pin"}) |
index = index + 1 | ||
end | ||
|
||
local code_length = device:get_field(capabilities.lockCodes.codeLength) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you would want to be pulling from the device state store with
device:get_latest_state("main", lockCodes.ID, lockCodes.codeLength.NAME)
get_latest_state
gives you the most recent value of a capability attribute for a given device
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests