Non Coder needs some help

As non coder I was getting around ok with my Hubitat until they changed the way we make rules with rule machine in specific. I'm not sure I could have written this even with the old way of making rules but here's my rule I need help with. I have a simple automation that works all the time BUT my cat's food is in the garage and he turns on my lights when we're gone or in the middle of the night and I want to change that. I want the garage lights to turn on with motion between certain times but only when one or the other presence sensors are home and if motion stops, the lights go off after two minutes. I wrote this but the lights don't come on and maybe I'm just tired but can't seem to think my way through this one.

Any help is greatly appreciated.

The trigger event should be the motion sensor, not the iPhones.

Unless you used Rule Machine before summer 2019 or so when Rule 4.0 was introduced, there haven't been any significant changes to how you write rules. I'm mentioning this only because if you were used to something radically different, perhaps you were using a different app that might still be around. Or, maybe there's a new app that would better suit your needs. (Basic Rule is new since then, for example, though it doesn't have conditionals; the "Restrictions" feature can take care of some of that functionality, though).

That being said, if you want to stick with RM, I think that the above should help. :slight_smile: There are also other way this could be written, and it should be noted that nothing cancels your delayed "off," which will only be a concern if you leave and come back within that time and want to restart the two minutes. But that's the general idea!


I do want to cancel the delay if I come back. How would I go about that and still have the lights shut off when the motion stops? This is what I thought it should be but doesn't seem to ever shut them off now.

You can keep it mostly as you had it before; just enable the "Cancelable" option on your delay, then add a "Cancel Delayed Actions" somewhere in the other half of your rule, e.g.. right before the "On." (Cancel Rule Timers would technically work for this too but is overkill. Alternatively, you could use Wait for event: Elapsed Time instead of Delay, in which case you don't need to worry about explicit cancelation since a retrigger does cancel those.)

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