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 authored Apr 24, 2024
1 parent 65dbe97 commit 09f998a
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 09f998a

Please sign in to comment.