Closed reibuehl closed 2 years ago
If you assign a mode then it will turn ON. That's the logic.
Agree, but why not support just switching it on in the last used mode as that one is already known by the unit?
Changing the code to
if (modeUpper == "OFF") { hp.setPowerSetting("OFF"); hp.update(); } else if (modeUpper == "ON") { hp.setPowerSetting("ON"); hp.update(); }
seems to work fine on my units. That way a simple ON/OFF logic can be implemented for MQTT similar to what the ON/OFF selection box does in the HTML interface.
If "ON" is send to the power/set MQTT topic, the unit is not switched on.
I think there should be a corresponding else or else if section to the if clause in https://github.com/gysmo38/mitsubishi2MQTT/blob/2b09164a9aca409cfaa18bf70d4d69cce068ecb2/src/mitsubishi2mqtt/mitsubishi2mqtt.ino#L1367