Skip to content

Commit

Permalink
fix temperatur sensor extraction
Browse files Browse the repository at this point in the history
not sure why the other implementation works for ManClone, this works for me
  • Loading branch information
Thomas fake Högemann committed Oct 16, 2024
1 parent 01cc319 commit 00f0c97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/ledatroniclt3/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ def update(self):

data = bytearray()
while len(data) < STATUS_END:
next = s.recv(STATUS_END - len(data))
if next == b'':
next_pkg = s.recv(STATUS_END - len(data))
if next_pkg == b'':
raise Exception("Interrupted")
data += next
data += next_pkg

self.current_temp = data[1] + (data[55] * 255)
self.current_temp = int.from_bytes(data[0:2], byteorder='big')

self.current_valve_pos_target = data[2]
self.current_valve_pos_actual = data[3]
Expand Down

0 comments on commit 00f0c97

Please sign in to comment.