Skip to content

Commit

Permalink
Fix confirms (needs refactor)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsaxon committed Mar 20, 2022
1 parent 3f1184f commit 30b0e58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/jablotron80/jablotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,8 @@ def read_send_packet_loop(self) -> None:
self._forward_records(records_tmp)
for record in records_tmp:
if (self._type == CABLE_MODEL_JA82T and record[:len(send_cmd.confirm_prefix)] == send_cmd.confirm_prefix) \
or (self._type == CABLE_MODEL_JA80T and (send_cmd.confirm_prefix == send_cmd.code or \
or (self._type == CABLE_MODEL_JA80T and \
((send_cmd.confirm_prefix == send_cmd.code and record[1:2] == b'\xff') or \
record[:len(send_cmd.confirm_prefix)] == send_cmd.confirm_prefix)):
LOGGER.info(
f"confirmation for command {send_cmd} received")
Expand Down

0 comments on commit 30b0e58

Please sign in to comment.