Skip to content

Commit

Permalink
Fix msg_length
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbilly committed Feb 13, 2025
1 parent bd330bf commit faf58c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/tpms_ble/tpms_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit faf58c0

Please sign in to comment.