dzungpv / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266/ESP32 module
GNU General Public License v3.0
68 stars 13 forks source link

Differentiate between cooling and heating when in auto mode. #20

Closed SpencerMichaels closed 6 months ago

SpencerMichaels commented 6 months ago

The current state update handling code incorrectly reports that the heat pump is always idling when it's in "auto" (heat/cool) mode, even when the operating flag is true.

This PR implements a short fix that correctly reports the heat pump's current action in auto mode, as tested on my SVZ-KP36NA unit. The heat pump's status packets don't explicitly indicate whether it's specifically heating or cooling, just that it's "operating" (i.e. doing one of the two), but we can infer which of the two actions must be occurring by checking whether the room temperature is above the set point (desired) temperature or below it.