Action when door opens

Is it possible to have hubitat perform an action one time every time a door opens and NOT continue this action when the door stays open?

Yes. I'm kind of confused by your question. If you set your trigger to Contact Sensor Open it would only trigger when you opened the door and not when it was closed. You would have to build logic into the rule for it to continue repeating.

If you wanted the rule to trigger when the door was OPENED and CLOSED you would set your trigger to CHANGED.

1 Like

I need the action to run ONCE everytime the door opens, ei. not continue running the command if the door stays open - does that make sense?

Yes. For your trigger, select when “contact becomes open”. The trigger will fire only when the door becomes open.

2 Likes

Can you describe in more detail what you’re trying to accomplish?

Depending on your goal, you may not even need rule machine. Other built-in apps like simple lighting or notifier that are easier to use for beginners might suffice.

2 Likes

I was just going to suggest the above myself!

The question posed is likely better phrased as a general question about how Rule Machine works. Rules (in version 4.0) are divided into two main sections, triggers and actions. Triggers are events (a contact sensor opening, a motion sensor becoming inactive, the clock striking a specific time, etc.). When an event happens that matches any trigger (you can have more than one), your actions will run. If you want something in your actions to keep running (e.g., re-notify you every 10 minutes after a contact sensor opens until it closes), that's actually something that--as stated above--you need to put specific effort into making happen

...or at least that's the basic idea. You can have a rule with no triggers as long as you know it won't do anything unless you invoke it from another rule (or manually). Additionally, there are some considerations to keep in mind when using delays and waits (which it doesn't sound like you would need here).

Rule Machine can be complicated; the specific question posed above is not really one of these circumstances because actions that run (once) when a specific event happens are very easy rules to create. The RM UI, however, may take some getting used to if you're totally new to it--that may be the hard part. But it's likely you don't even need to resort to RM at all for this (many people overlook the Notifications app--just guessing here--or other built-in options that might be able to do whatever it is you really want).

2 Likes