[BETA] Average Temperature Thermostat Controller

I adopted ST a few weeks ago and I have just written my first app. There may be other apps that do something similar, but I came across a post on Reddit where someone was looking for something like this so I figured it would be a good learning experience as I plan to write more code.

Basically the app accepts a bunch of devices capable of measuring temperature. Based on the average temperature of the selected devices you can set your thermostat to cool or heat (and specific temperatures). I don’t have 2 thermostats but I believe if you install the app twice it will work just fine.

7 Likes

I’ll post the code soon, would love someone to make it cleaner, but I wrote something very similar. What I like about mine is you don’t actually define the temp in the app, it knows what the Thermostat is set to and bases everything on that. Which means if you change the temp on the thermostat it will make the house based on that new temp.

Makes the app very complex, storing desired temperature vs. temp temperature, knowing when a change is occurring due to needing lower temp setting to meet average temp needs, vs actually changing the thermostat but I got it working pretty darn good after a ton of trail and error.

Feel free to use the code or adopt it, please just give me a call out (if you grab bits). Also please put a note that no one is able to use your code for pay applications there are a few greedy people on these forums that I can’t stand.

2 Likes