georgezhao2010 / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
1.37k stars 231 forks source link

Midea heat pump outside temperature issue when below zero #427

Closed Fenix131313 closed 8 months ago

Fenix131313 commented 8 months ago

HA core version

No response

Intergration version

0.3.22

Device type and model

Heat Pump Wi-Fi Controller 171H120F

Used App

MSmartHome

The description of problem

The outdoor temperature is showing wrong number when its below zero outside. Midea

The logs

No response

Unwies commented 8 months ago

There is a work around, which works: https://github.com/georgezhao2010/midea_ac_lan/issues/394#issuecomment-1837959454

Work around: Open file homeassistant/custom_components/midea_ac_lan/midea/devices/c3/message.py and replace line: self.outdoor_temperature = body[data_offset + 9]

With line: self.outdoor_temperature = body[data_offset + 9] - 256 if body[data_offset + 9] > 127 else body[data_offset + 9]

Fenix131313 commented 8 months ago

thank you, it works, i feel stupid now for not searching the comments...