One more RM upgrade

Okay, last 2.5 rule I need to convert to 4.0.

Thoughts? Over complicated? I think the true is easy... the false I'm not positive on. Would this all go under Else?

Condition
Front Door Motion

Action
IF Time Between Sunset -30 minutes and Sunrise +30 Minutes
Dim Bulb - Porch: 100 Fade: 2
Cancel Delayed Actions???

Else
Dim Bulb - Porch: 0 Fade: 2 Delay 5 mins - cancelable???

That doesn't seem right... I also don't know how to add the re-trigger delay (my Ring Doorbell will trigger on the light change, and I don't want the light going out to cause the light to come back on... so I have to add a delay to prevent retriggering.

This looks like just a basic motion lighting automation, right? If so, the Rule 4.0 docs contain an example almost exactly like what you're looking for (highly recommend reading them to see what's changed).

What you want is something like:

Trigger: Front door motion *changed*

Actions:

IF (Front Door Motion is active) THEN
  Cancel Delayed Actions
  IF (Time Between Sunset-30 and Sunrise+30) THEN
    Dim Bulb - Porch: 100 Fade: 2
  END-IF
ELSE
  Delay 0:05:00 (cancelable)
  Dim Bulb - Porch: 0 Fade 2
END-IF

You might also consider Motion Lighting (can probably be handled in one instance) or Simple Lighting (probably need two, one or on and one for off due to how naïve the time restrictions would be for your "on" condition) instead of a rule--it's good to learn how 4.0 works, but one of these apps is smaller, easier to set up, and will probably execute a bit faster.

PS - Sharing what you have defined in Conditions for Rule 4.0 isn't really necessary. They don't do anything on their own; they're just easily accessible in your actions section (and can be modified in the Conditions section if needed without going into your actions). Unlike earlier versions, their mere existence does not cause anything to ever happen--only your triggers (or calling this rule from another rule) cause the actions to run.

Hope this helps!

1 Like

This is good, thanks. I'll read the docs.

I don't see any way to prevent re-triggering though. =/

I see. it's covered in the docs. lol. will add.

So like this?

1 Like

Sadly does not work. Light comes on. Never shuts off.

Will need to refactor. :confused:

Have you tested that fade 0 over 2 seconds works on the driver page? I can't see any issues with the rue above :thinking:

was using the 2sec fade with old Rule 2.5.

Glad you don't see any issues. Oh, wait... I'm an idiot. I thought I'd set the delay to 2 minutes, not 5...

yup, works. I'm just a dolt. =P

Thanks all! got everything converted over to RM4 now. =)