After updating to the latest version I noticed that my thermostat in KH showed "Cooling off to X" despite being in the HEAT state, confirmed by the Alexa app too.
The code was looking for the first entry in the state that matched the namespace Alexa.ThermostatController.HVAC.Components with name being either primaryHeaterOperation or coolerOperation, without considering its actual status.
In the json returned by my Alexa API there were two entries matching those criteria, but the coolerOperation one appeared first and got therefore matched as the current state despite being OFF
Description
After updating to the latest version I noticed that my thermostat in KH showed "Cooling off to X" despite being in the HEAT state, confirmed by the Alexa app too.
The code was looking for the first entry in the state that matched the namespace
Alexa.ThermostatController.HVAC.Components
with name being eitherprimaryHeaterOperation
orcoolerOperation
, without considering its actual status. In the json returned by my Alexa API there were two entries matching those criteria, but thecoolerOperation
one appeared first and got therefore matched as the current state despite beingOFF
I changed the code to match any entry that is not set to
OFF
, built and test locally and the current state is now properly displayed.