Motion Lighting with RM - Best Way With Single Rule

I'm trying (and failing) to work out a rule that I can use for my motion lighting. I'm moving away from the battery motion/illuminance sensors I've been using so the standard motion lighting app doesn't do what I want.

I want the rule to go live between sunset and sunrise or if the curtain is closed. Motion triggered, set the dimmer to 40 and switch off once the motion is inactive for a minute. I set up the following to start:

Unfortunately it's no good - as every time the PIR triggers it starts another instance. So if I trigger the PIR multiple times, theres a 1 minute delay timer for each time the PIR restores to inactive. This results in repeated off commands going to to the dimmer. If I walk back into the room the light may just switch on and immediately off as it receives one of the outstanding commands:

How can I amend the rule so that once triggered, each consecutive motion event resets the wait timer without generating another?

Get rid of the Delay on the Off. Instead, use Wait for Event, Elapsed time of 1:00. That will be cancelled by the PIR going active. That Wait for Elapsed time should go before the Off.

2 Likes

That worked a treat - thanks so much.

Will there ever be an option available to duplicate a rule in Rule Machine? Often when I'm trying to amend a rule when it's not working the way I want, or I want to try adding additional steps to it, I have problems. Clicking on the wrong option/making a mistake takes me into another page where I can't click cancel or back (to avoid breaking/corrupting the rule) More often than not I'm forced to select further options for that incorrect action, in order to move on to a point where I can cleanly delete the step. Invariably I think "I can't get my head around this - bollocks to it I'll just use the switch"

If we had something available like "duplicate rule and pause existing" it would allow us to mess around with the duplicate to our hearts content, trying options etc. As the original would be paused nothing should conflict. All safe in the knowledge that if we get it wrong, we can roll back to the original, simply by deleting the duplicate and resuming the original. Users with more complicated rules could develop them in steps, by duplicating and pausing the duplicate, creating paused versions as they go.

If my suggestion for "Rule Machine Time Machine" is ridiculous, please feel free to shoot me down in flames :slight_smile:

Cloning a Rule has been possible for quite some time.

Right now, the option may be exercised by opening the rule, clicking the gear icon in the upper right corner, then clicking the “Export/Import/Clone” button.

1 Like

Lol. I should've known it would've already been thought of. Right - I'm off to invent something to make it easier to move things about - it'll probably be round in shape.......

1 Like