Skip to content

Commit

Permalink
Allow 4 byte input for Door Lock Operation Report (#919)
Browse files Browse the repository at this point in the history
Added to support a lock that only sends 4 bytes.
  • Loading branch information
bjyoungblood committed Apr 26, 2024
1 parent 1c8a0f9 commit 58fa7fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/grizzly/zwave/commands/door_lock_operation_report.ex
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ defmodule Grizzly.ZWave.Commands.DoorLockOperationReport do
end
end

# This is to support a lock that erroneously omits the timeout_seconds field.
def decode_params(bin) when byte_size(bin) == 4, do: decode_params(<<bin::binary, 0>>)

# Version 4
def decode_params(
<<mode_byte, outside_handles_int::size(4), inside_handles_int::size(4),
Expand Down

0 comments on commit 58fa7fc

Please sign in to comment.