Rule manager based on contact status, not trigger

I am one of the new Iris converts and trying to setup a rule to turn on a switch when my garage door contacts are left open. I do not want this to be a trigger, I want the setup to look at the contacts at 10pm and turn on switch telling me I have an open garage door at that time. Hope this makes sense, and appreciate any help.

You want a triggered rule. The trigger is Certain Time, and the rule is any contact open. Turning the switch on would be under Actions when True.

Worked like a charm, thank you! What a great first experience in the Hubitat Community!!!

1 Like

Welcome to the Hubitat community! :sunglasses:

As you set up more rules in Rule Machine, remember "in the absence of triggers, conditions become triggers". Meaning...

  • Trigger:
    -- Runs when a trigger happens. The actions are executed each time.

  • Triggered Rule:
    -- Runs when a trigger happens. Actions are executed based on the combined truth of the conditions (i.e. the rule). If the rule is True, True actions are run. If the rule is False, False actions are run.
    -- A Triggered Rule will NOT run if one of the conditions changes.

  • Rule:
    -- Since there are no triggers, each of the conditions effectively becomes a trigger and causes the rule to be evaluated.
    -- Actions are ONLY run when the combined condition truth (i.e. rule) changes from True to False, or False to True. If the rule has changed from True to False, False actions will be executed. If the rule has changed from False to True, True actions will be executed. If there is no change in rule truth, nothing happens.

  • Restrictions:
    -- These "freeze" the rule to prevent it from doing anything. When a restriction is in effect, the rule will not run, and any pending actions due to delays or repeats will not happen (except for a pending unrestrict...this is an exception). It is essentially frozen in time.
    -- For triggers and triggered rules, this is straightforward, like hitting the pause button.
    -- For rules that have a True and False state, it can get tricky because the rule's state is also frozen in time. For example, let's say you have a rule that turns on a light when a door opens (door open = state True, door closed = state False). Now, let's say you restrict that rule while the door is open and the rule is True. When you close the door, the rule retains it's True state. Now if you unrestrict it, it's still True even though the door is closed. This means when you open the door next time, the rule evaluates True....but it was already True. Since there is no state change, nothing happens.

3 Likes

Excellent summary :smiley:

Gonna add a warning about restrictions:

Restrictions
-- Will prevent the rule from doing anything. (Except for ending a restriction.) If you have a Rule that turns a light On when a door opens, Off when it closes. And a Restriction of 10:00 to 10:30. IF you open the door before 10:30, the light goes on. But if you close the door AFTER 10:30, nothing happens... it's as if the rule got deleted. Tomorrow, at 10:00 the light will go off, assuming the door's still closed.

@destructure00 Since your Summarize Tool is so much better than mine... perhaps you can run that through your tool? :smiley:

2 Likes

Good idea...I added a restriction section, took a little bit of yours and added my own example.

@destructure00 is the king of rule manipulation.

1 Like

Is there a way to accomplish the same thing, but only if the contact sensor is left open for 1 hour? I am trying to be alerted if I leave my side gate open. Thank you.