Rule help

Hello, I did this rule and it's not working, I added a refresh because sometimes it will restore one light or the other, but on rare occasions it will restore both. Without the refresh does the same behavior. Any suggestions? Thanks

One minute is for testing, should be 5.

I dont use capture/restore, so cant speak to that part of the rule, but you probably want to delay everything after the refresh (and before the ELSE), so that Hubitat can wait for the data to come back from the light. What's hapenning now is that the capture is occuring before the refreshed data returns. That would be my limited understanding.......

Thanks Mike, I tested the rule without the refresh, same results :pensive:

Does hubitat reflect the correct state of the lights before trigger?

Find out where problem is.......

Again, I dont use capture/restore, but it seems to me that the rule should work, except if you re-trigger the rule by activating the motion sensor (after the rule has already triggered), since the second time it's triggered it will capture the lights in the state from the first trigger.

Very good point! How can I avoid this?

Create a local variable....busy as type boolean, initially to false.

IF
leave untouched
THEN
If local variable (busy) = false, then capture front porch, garage outdoor light (this is a simple conditional action)
Set local variable (busy) = true
plus other actions
ELSE
Restore (leave as it)
Set local variable (busy) to false.
ENDIF

I will try this tonight, thanks.

Hello Mike, I will test it now, thanks

Similar behavior, works if the motion active is once, if the motion active goes inactive then active but the lights were modified already it will capture the wrong state. I'm not good on this RM4...

Maybe adding a delay to set private boolean false? Same delay time as the restore? adding cancelable?

Like this

Edit: above rule works, now to figure out how to make the HUE outdoor motion in low sensitivity detect less than 50ft.... thanks Mike

1 Like

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