Skip to content

Commit

Permalink
Optimized Debug-data
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsK1 committed Nov 30, 2024
1 parent cf1ce86 commit 77530b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/solvis_control/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ async def _async_update_data(self):

decoder = BinaryPayloadDecoder.fromRegisters(result.registers, byteorder=Endian.BIG)
try:
value = round(decoder.decode_16bit_int() * register.multiplier, 2)
rawvalue = decoder.decode_16bit_int()
_LOGGER.debug(f"Decoded raw value: {rawvalue}")
value = round(rawvalue * register.multiplier, 2)
except struct.error:
parsed_data[register.name] = -300
else:
Expand Down

0 comments on commit 77530b6

Please sign in to comment.