Skip to content

Commit

Permalink
Update hub.py
Browse files Browse the repository at this point in the history
  • Loading branch information
unregist committed Jan 29, 2024
1 parent 6109324 commit d8717b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/tuiss2ha/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ def return_hex_bytearray(self, x):

def split_data(self, data):
"""Split the byte response into decimal."""
customdecode = str(self.return_hex_bytearray(data))
data_hex = self.return_hex_bytearray(data)
customdecode = str(data_hex)
customdecodesplit = customdecode.split("\\x")
response = ""
decimals = []
Expand All @@ -247,7 +248,7 @@ def split_data(self, data):
decimals.append(int(resp, 16))
x += 1

_LOGGER.debug("%s: As byte:%s", self.name, data)
_LOGGER.debug("%s: As byte:%s", self.name, data_hex)
_LOGGER.debug("%s: As string:%s", self.name, response)
_LOGGER.debug("%s: As decimals:%s", self.name, decimals)
return decimals
Expand Down

0 comments on commit d8717b9

Please sign in to comment.