From faf58c08119077e4827dfbe7878d1094ad4d114a Mon Sep 17 00:00:00 2001 From: bkbilly Date: Thu, 13 Feb 2025 23:45:06 +0200 Subject: [PATCH] Fix msg_length --- custom_components/tpms_ble/tpms_parser/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tpms_ble/tpms_parser/parser.py b/custom_components/tpms_ble/tpms_parser/parser.py index 4fb61fe..df1361b 100644 --- a/custom_components/tpms_ble/tpms_parser/parser.py +++ b/custom_components/tpms_ble/tpms_parser/parser.py @@ -76,8 +76,8 @@ def _process_tpms_2(self, address: str, local_name: str, data: bytes, company_id data_hex = data.hex() msg_length = len(data_hex) - if msg_length != 5: - _LOGGER.error("Can't parse the data because the data length should be 5") + if msg_length != 10: + _LOGGER.error("Can't parse the data because the data length should be 10") return voltage = int(comp_hex[2:4], 16) / 10 temperature = int(data_hex[0:2], 16)