Turn off thermostat if there are already open doors/windows?

I have routines that turn off the thermostat (furnace) whenever a contact sensor is opened. That works great. The weakness in the system is if a door/contact sensor is already open when the thermostat is turned on, then there is no trigger to turn it off. (Ideal would be a status check of all contact sensors when furnace kicks on - or is turned on manually - and then it could just run for a few minutes and shut off). Is there a way to do that?

Can you use the thermostat turning on as the trigger (If Thermostat is turned on and contact sensor is open then…).

Yes, the problem is that “contact sensor open” seems to just refer to the status change from closed to open. So, if the contact sensor is ALREADY open when the thermostat triggers on, then there isn’t a status change in the contact sensor to trigger the shut down and the thermostat just stays on.

The approach I used for this is to use the contact sensor and thermostat state to trigger virtual switches. And then a routine based on the virtual switches to implement the logic. That lets you convert the status change into a constant state.

Thanks Garin, I suspected a virtual switch would be involved. So, if I make a VS named “heater” and set it to be OFF any time any contact sensor is opened and ON only if all are closed. And then make a routine that says IF thermostat ON and “heater” OFF then turn off heater after 5 minutes. … Does that sound about right?

[I meant “turn off THERMOSTAT” in that last bit. Not “heater”.]

You need two Routines. One that uses contact sensors to turn off the thermostat on state change of the sensors. The second to use the current state of the contact sensors when the thermostat state changes. The second one would be something like:

If Sensor 1 is open (precondition)
   Sensor 2 is open (precondition)
   Thermostat turns on
Then
   Turn Thermostat off
   Send Notification "Turned Thermostat off because Window(s) are open"

That’s a little odd. The underlying Rules have some undocumented automatic triggering behaviour but Routines tend to avoid that. So if you have a Routine with conditions ‘contact is open AND thermostat is on’ then changes to either the contact or the thermostat state should act as a trigger.

After saving/enabling Routines you might need to toggle the states of the contacts and thermostats to initialise the conditions correctly, but otherwise it should work.

1 Like

Thank you for all the guidance. I ended up using the Virtual Switch suggestion and initial testing seems like it works. I also like the suggestion to send a notification as to why the thermostat was turned off. I’ll likely modify that to broadcast throughout the smart speakers in the house. (This is, after all, largely an issue with kids/young adults). Anyway, thanks again, great fast response to my first post on this forum!