Skip to content

Commit

Permalink
Modify some code that are not clear
Browse files Browse the repository at this point in the history
Signed-off-by: Hunsup Jung <[email protected]>
  • Loading branch information
HunsupJung committed Oct 11, 2024
1 parent 65d52f9 commit 404cddc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/SmartThings/matter-lock/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local function set_cota_credential(device, credential_index)
-- Shouldn't happen but defensive to try to figure out if we need the cota cred and set it.
device:send(DoorLock.attributes.RequirePINforRemoteOperation:read(device, #eps > 0 and eps[1] or 1))
return
elseif not cota_cred then
elseif cota_cred = false then
device.log.debug("Device does not require PIN for remote operation. Not setting COTA credential")
return
end
Expand Down
4 changes: 2 additions & 2 deletions drivers/SmartThings/matter-lock/src/new-matter-lock/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ local function set_cota_credential(device, credential_index)
-- Shouldn't happen but defensive to try to figure out if we need the cota cred and set it.
device:send(DoorLock.attributes.RequirePINforRemoteOperation:read(device, #eps > 0 and eps[1] or 1))
return
elseif not cota_cred then
elseif cota_cred == false then
device.log.debug("Device does not require PIN for remote operation. Not setting COTA credential")
return
end
Expand Down Expand Up @@ -424,7 +424,7 @@ local function delete_user_from_table(device, userIdx)
{}
))

-- Re-create user table
-- Remove element from user table
for index, entry in pairs(user_table) do
if entry.userIndex == userIdx then
table.remove(user_table, index)
Expand Down

0 comments on commit 404cddc

Please sign in to comment.