Control a switch based on temperature i.e below this turn on, above this turn off

Hi if someone could help that would be great. I have a fireplace that I now have connected to a smart switch that i can automate via my echo (Alexa). What I would like to do is to figure out HOW I can turn this fireplace on (when the temp falls below “X”) and off when it rises above “Y”. Further I would like to be able to (in a perfect world) enable and disable this skill so that my fireplace isn’t turning on when Im not home and the house is cold. lol

The fireplace has an electronic ignition that works great. As well I can easily set up routines to turn the fireplace on for an hour or so then off. but not temperature control it as above… I had purchased a Govee wifi temp probe that grabs the temp fine and can even speak to alexa, but I think perhaps that smart things hub would be a better option…??
help would be greatly appreciated…


Use a virtual thermostat. There are a couple around. I use Virtual Thermostat with Device. It will do what you want.

Thanks andy… any specific suggestions? I bought a govee but can t get that to speak to the switch.

This seems like a job for Smartthings and Webcore. While things like Alexa and ST itself have basic if/then routines, in my experience they fail miserably when you do anything outside the ‘if’ like god forbid, leave your house. That’s too many things for a smart product to handle (think fembot overload!).

So we all bought ST and built some basic “smart” things, only to realize we needed more on day 2. My day 2 realization that I needed smarter things consisted of what I thought was a fairly basic scenario:
While the garage door is open
if more than 15 minutes has elapsed
then text me / have alexa tell me /close garage door (or any combo of those)
UNLESS there is motion in the garage (i.e. me doing something in the garage, yard etc)
in which case wait 5 minutes and check again

If after 5 minutes later the garage door is still open AND there is no motion in the garage, repeat/loop above. You get the idea…

While it seems like a fairly normal scenario that any tool that calls itself smart should be able to do, it’s not remotely possible with most of them without some decent logic which none of these built for idiots products you can buy anywhere are capable of.

The vast majority of people want to tell Alexa to turn on and off a light. That’s what smart home means to them. That’s what manufacturers build to.

Here’s my webcore automation to handle the above. I originally had it close the garage door after at least 15 mins and no motion, but there were a few times I was unloading my car, had the hatch open, no motion, > 15 mins and webcore closed the garage. My garage is too small for me to drive in far enough for the hatch not to be completely inside and so the garage door scratched the hatch on the way down. Not bad though, which is why I just have it text me these days.

There’s still some random logic issue with it where it doesn’t keep track of time properly, but on the whole it keeps notifying me while the door is open > 15 mins and there is no motion.

Good luck and welcome to the world of webcore.

You can use ifttt to connect Govee to a smartthings device. I use one ifttt applets to turn Govee leds on and one to turn Govee off. I use a virtual switch created in Smartthings but you could use any device.

Just need a virtual thermostat, not a real one. Do a search for ‘Virtual Thermostat with Device’ will bring up one that you tie a separate temperature sensor to. This will enable you to set a switch on or off depending on whether the temperature is above or below the setpoint. I think that’s what you want to do, or have I got the wrong end of the stick!

From a smartthings perspective a virtual thermostat shouldn’t be needed as long as Smartthings can see your temp sensor and the switch. You can use the native rule engine to simply say when temp goes below x and your presence sensors are home then turn on the fireplace. Then you can have another rule that says when the temp rises above x turn that switch off.

Webcore is good for some instances but currently i wouldn’t rush to implement it. The new rule engine can support allot more then the old one could that lead to webcore being created. I would also be inclined to stay away from it until i see it converted to the new API. It could be completely broken when the Groovey IDE is retired.

The big question is simply what can you use to access both the switch and the temp. The easiest solution would be if Alexa could trigger a routine from the temp change. I don’t see temp available from any of my sensors. Did you confirm when setting up a routine temp isn’t available in Alexa?

The problem you may run into with Smartthings is that your current sensors and switches may not really integrate with Smartthings. You may find you need to get different sensors to talk to smartthngs to be able to setup those automations, or use something like IFTTT that connects different services and clouds that are not integrated.

Personally i would look for a decent Zigbee/Zwave temp sensor and possibly your switch setup for the fireplace. Get some Smarthome hub that uses those standards like Smartthings or Hubitat. Then use their rule engine to do the automation you have. Google and Alexa that are primarily Wifi based systems tend to have some interesting limitations when it comes to making things work together.