Skip to content

Commit

Permalink
Merge pull request #1323 from jaemin11lee/fix/chad-12999
Browse files Browse the repository at this point in the history
[CHAD-12999] fix (Zigbee Lock): Ignore unknown status for sds lock
  • Loading branch information
greens authored Apr 17, 2024
2 parents 926083a + fbfc7a8 commit 02ece0e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/SmartThings/zigbee-lock/src/samsungsds/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ local function handle_lock_state(driver, device, value, zb_rx)
device:emit_event(Lock.lock.locked())
elseif value.value == DoorLock.attributes.LockState.UNLOCKED then
device:emit_event(Lock.lock.unlocked())
else
device:emit_event(Lock.lock.unknown())
end
end

Expand All @@ -52,7 +50,7 @@ local function unlock_cmd_handler(driver, device, command)
end

local function lock_cmd_handler(driver, device, command)
--do nothing in lock command handler
-- do nothing in lock command handler
end

local refresh = function(driver, device, cmd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ test.register_message_test(
}
)

test.register_message_test(
"Not Fully Locked status reporting should not be handled",
{
{
channel = "zigbee",
direction = "receive",
message = { mock_device.id, DoorLock.attributes.LockState:build_test_attr_report(mock_device,
DoorLockState.NOT_FULLY_LOCKED) }
}
}
)

test.register_message_test(
"Lock operation event reporting should be handled",
{
Expand Down

0 comments on commit 02ece0e

Please sign in to comment.