Need Help with Rule Machine

Hello Community,

I am trying to figure out how to write a rule for a contact sensor. My goal is when the sensor opens (Garage Door), a timer starts for 5 minutes. On the first pass, Hubitat will send a notification to my phone that the garage door is STILL OPEN. That part works perfectly. The problem is I cannot figure out how to write an IF-THEN loop to check every 2 minutes until the sensor is CLOSED. If not CLOSED, continue to send the GARAGE DOOR IS STILL OPEN, until the sensor closes. I know this is really basic, but I only dabble in programming, and Rule Machine is not very intuitive to me.

Thanks in advance.

REPEAT is I expect what you are looking for.

For your 5 minute wait I expect you could use the sticky trigger, if you aren't already. With a notification as the first action. After the initial notification, put in a repeat for every two minutes to send another notification or whatever you need. Making sure to include some exit condition.

Check out the documentation for Repeat Action, I think you'll want to use the while loop with a 2 minute repeat.

https://docs.hubitat.com/index.php?title=Rule-5.0#Repeat_Actions

1 Like

@woodythomas

This is what I use for my doors... Easily adaptable to your garage...

2 Likes

Might be worth calling out the parts that are relevant... I am thinking the trigger.... the wait for... the Repeat every.... with some mods...

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.