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
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.......
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.
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
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?