Rule Correct

I want to turn on a light when any of certain conditions happen. Motion, door opened, presence. But only leave the light on for 5 minutes, irregardless of the condtions. Is this rule configured right?

Probably better to set it up as a trigger. I think as a Rule it's going to turn the light back on every time the rule gets evaluated. The trigger is going to turn the light on every time one of the conditions go true. You could set up another trigger using a virtual switch to disable this trigger or rule after the light turns on.

I guess where I still get confused is when you have a triggered rule you still have to have a condition. I had a restriction in the original version above that this would only work at night. I changed it as follows using the night switch as the condition.
It's ok for it to go on again when any of the items changes. That's not really a problem. If it stays on longer than 5 minutes due to that happening its ok.

I'm confused with what you are trying to accomplish. Do you want the have the light turn on based on an event (something happening) or a a condition (some state happening). Since you say you want the light to turn off after 5 minutes, I assume you want it to be based on events, so I would use a trigger, not a triggered rule.

When any of those door open, or motion is detected, or presence is detected I want the light to come on. Then stay on for 5 minutes and go off. If another one of those events happens while the light is on and it resets the 5 minute timer, thats ok. I just don't want the light to stay on forever, but also not turn off when the event clears. In other words I want it to stay on at least 5 minutes. The night switch is a virtual switch I have set up to let me know when its night time. No need for the light to work during the day.

Then I would go with a Trigger, not a triggered rule. I would also not go with a regular rule. That is going to look at the state of the rule being true or not. So, if someone is present and someone else arrives, the rule would already be true and the light would not come on.

I fought this same situation on that other platform. Couldn't get it to work the way I wanted with smart lighting or webcore, etc. So ended up writing my own app. Just installed that app here on Hubitat and using it. I know it works fine. Just thought it would be easier with rule machine, but apparently not.

Thanks for the help.

Exactly. That is a very common, and simple, RM rule... @j715 just needs to use the correct rule type.

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