From 30b0e581c742bf9f8b9486948663ac926a6e87c8 Mon Sep 17 00:00:00 2001 From: mattsaxon Date: Sun, 20 Mar 2022 22:03:32 +0000 Subject: [PATCH] Fix confirms (needs refactor) --- custom_components/jablotron80/jablotron.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/jablotron80/jablotron.py b/custom_components/jablotron80/jablotron.py index 6399a51..e2e6df1 100644 --- a/custom_components/jablotron80/jablotron.py +++ b/custom_components/jablotron80/jablotron.py @@ -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")