A couple of bug fixes and some compiler warnings/errors:
MQTT status messages contained a corrupted "mode" values. The culprit was rootInfo["mode"] = hpmode.c_str();, the fix is just to remove the c_str() call but I also kept some of the refactoring/cleanup changes I needed to discover it.
2021-11-28 21:04:13 WARNING (MainThread) [homeassistant.components.mqtt] Can't decode payload b'{"temperature":19.5,"fan":"AUTO","vane":"AUTO","wideVane":"|","mode":"\xcd_ @"}' on hvac/hp-basement/state with encoding utf-8 (for <Job HassJobType.Callback <function MqttClimate._subscribe_topics.<locals>.handle_swing_mode_received at 0xffff791eaca0>>)
HTTP request handler functions terminate immediately if checkLogin() fails. The unauthorized changes were getting applied even though the HTTP response indicated failure (redirect to login).
A couple of bug fixes and some compiler warnings/errors:
"mode"
values. The culprit wasrootInfo["mode"] = hpmode.c_str();
, the fix is just to remove thec_str()
call but I also kept some of the refactoring/cleanup changes I needed to discover it.checkLogin()
fails. The unauthorized changes were getting applied even though the HTTP response indicated failure (redirect to login).