Hello all. I have attempted to modify a smart app and device handler (originally authored by Eliot S.), that was originally designed to be a virtual heating thermostat. I am trying to change it so that it works for cooling instead of for heating. I’ve taken some modifications suggested by others, and applied some of my own, but am now having some trouble.
When the desired temperature is set to a value lower than the temperature sensor reading, then the virtual switch turns on as expected. When, however, the desired temperature is set above the current temperature sensor reading, the virtual switch also gets a turn on command.
For some reason, no matter what I do, I cant get the virtual switch to turn off via this smart app. Any help here would be greatly appreciated.
Also, I’ve mostly left the original comments in place.
Here’s the smart app fork:
And here’s the device handler fork: