Skip to content

Commit

Permalink
Fix temperature out of range heat pump (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokam authored May 28, 2024
1 parent 1b65a30 commit c37a5e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion midealocal/devices/c3/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ def __init__(self, body, data_offset=0):
+ (body[data_offset + 7] << 8)
+ (body[data_offset + 8])
)
self.outdoor_temperature = int(body[data_offset + 9])
base_value = body[data_offset + 9]
self.outdoor_temperature = (
(base_value - 256) if base_value > 127 else base_value
)


class MessageC3Response(MessageResponse):
Expand Down

0 comments on commit c37a5e3

Please sign in to comment.