Skip to content

Commit

Permalink
Fix switch5 protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
rrooggiieerr committed Jun 27, 2024
1 parent fe798fe commit 883e953
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rfcontrol/protocols/switch5.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def encode(id: int, unit: int, state: bool, all: bool = False):
encoded = binary2pulses(f"{id:020b}", binary2pulses_mapping)
if all:
unit_code = 6 if state else 7
state = not state
else:
unit_code = (None, 0, 1, 2, 4)[unit]
encoded += binary2pulses(f"{unit_code:03b}", binary2pulses_mapping)
Expand Down

0 comments on commit 883e953

Please sign in to comment.