Simple turn A/C off rule in newest rule machine?

Well for me the weather here is nice for multiple weeks of the year and I want to open the front and back doors and during that time it can get warmer or colder than what the thermostat is set to so I need to do something to keep the unit from coming on.

1 Like

Thanks for the replies/suggestions all!

My problem is not that I don’t understand the logic behind what I want to do. My issue is how the heck do you configure it inside of Rule Machine?

I see a lot of you have IF/THEN statement but how are you entering that in Rule Machine?

I don’t see anywhere that you can type it out long hand, which I suspect no one is doing but I also don’t see where you can choose IF’s or THEN’s etc if you take my meaning?


You could do something like this, but have it additionally turn off the AC when you silence the notification (meaning you're leaving the door open)

Essentially what this rule does is if either the front or back door are left open for more than 5 minutes it sends a notification that that particular door is open and to close it. (I had tts on here but switched to Homepod mini's and waiting for @bcopeland to work on that, he's busy on some other stuff right now though).

If the door is closed the rule resets and the notifications stop. If I want to leave the door(s) open I have a virtual button that I can turn on via my phone or a pico by the front door that will silence the notifications. Again, if at anytime the door(s) close the rule resets. You could modify this to add in turning off AC if you silence the notifications (meaning you're leaving the doors open)

You might start with something a bit simpler since you are new to all of this.

You can also use my app to group the contact sensors :grin:


You actually want wait for condition here. Currently if you opened two of them then waited and then closed just one of them it would turn the heating back on.

So where you have wait for event you also have wait for expression I think it's now called.

Hi @aaiyar and all,

I also run ac (heat pump) automation, but for different reasons. I share the concern about short-cycling esp. the compressor.

In my case I have two Ecobee thermostats, and new heat pumps with motor controllers (variable speed air handlers too).

So, instead of turning the thermostats on or off, I change the set points signicantly and allow the system to ramp up or down normally. The power traces look normal when run this way.

One caveat with this approach is that these are “Smart” thermostats. They use a schedule with “comfort” settings for each period. The t-stat will anticipate the next set point and try to reach that value in time for the start of the next period.

I work around this issue by setting the schedules to avoid such issues.

Maybe I’ll try on/off and see if the heat pump systems turn on and off gradually.

1 Like

I would recommend sticking to this. It is sensible, and safeguards your inverter heat-pumps.

1 Like

Nah...they have the "wait for event" set to "all contact closed"

1 Like

I was thinking I should do that... :wink:

1 Like

I have all contact closed so if only one closes but another is still open the heat won't come on.

That's a good idea!

1 Like

Thanks again all.

Shame on me for not looking into the basics of condition rules before asking questions!

Basically what I’m doing here in south Florida is opening the door out to a screened in poach at night to let the cats roam around a little! A/C is never actually turned off.

What I do now, manually, is set the thermostats cooling temp set point up to about 82 degrees when the door is open, that way the A/C won’t kick in for the couple hours the door will be open. Once I bring the cats in, I resume the scheduled program.

So all I’m looking to do is:

IF door is open and remains open for 5 minutes THEN change cooling set point to 82.
ELSE set thermostat to auto.

I got the IF/THEN down but couldn’t figure out the ELSE part.

I see the official rules tutorial on YouTube and although a few years old now should help me figure it out.

I tried the online help section but to be honest, reading that over just made my eyes glaze over!!

SmartThings seemed to be easier to figure out for this sort of setup so I went into Hubitat head first!


What you're doing makes good sense - especially for that length of time. I would suggest using a rule that changes that setpoint akin to what @Doug_Phoenix does (and you do manually).

You don't even need an "if/then". Rule machine works based off events to trigger rules and there are some limited conditions that you can add into the rule trigger. So, you can do something like this:

Basically (although not entirely technically correct), this is saying

IF the door is open for 5 minutes" THEN
	Set the AC cool point to 82°
	Wait for the door to close for 1 minutes
	Set the AC back to auto

To be a little more specific to the logic, the rule will wait for the trigger to be fulfilled before running.

  • Trigger: The rule subscribes to events around the "contact" capability of the device. If that updates to "open" then the timer is started. If the attribute changes back to closed, the timer will cancel. Once the timer is fulfilled, the 'trigger' is fulfilled, then the actions list is ran.
  • First action will send the selected setPoint to the thermostat.
  • The, we wait (another even subscription here) for the contact sensor to go back to closed and stay closed for a minute. The "stays" is just to give a grace period in case the door is accidentally shut.
  • Once the wait event is fulfilled, set the thermostat back to auto (or whatever you want).
1 Like

This looks perfect and actually makes logical sense to my aging brain!

Only thing I’m not finding is the wait event? Is that pit in as a condition? It doesn’t appear in that list.

It's in the very last action type — "Delay, Wait, Exit or Comment". There's a list of where to find everything in the documentation: Rule 5.1 | Hubitat Documentation

Got it!

It’s not under the conditions box. You add it to the actions section.

I think I have mine set exactly like @FriedCheese2006 shows.

Off to test!

Thanks guys!!


Correct. The conditions box is for editing conditions. So, you can add them there for later use in a rule or RM will populate them as you build the rule out. The box allows for later editing of a particular condition without having to directly edit the rule.

1 Like

Download the Hubitat app