I am trying create a piston that is active between sunset and sunrise only. When there is motion at my front door I want the porch light to go on at a time between 3 and 8 seconds. Then wait 1 minute and turn back off. Here is my code. I tested it and it didn’t work. What am I doing wrong?
Front Door Motion, light on then off after time
Bry
#2
Define “didn’t work” … . . Do you mean the light doesn’t turn on or are you talking about the THEN statement?
I’d try using sensor CHANGES to active. I think you need a trigger because your two conditions won’t ever evaluate as true.
Ryan780
#4
This would activate when motion is detected and then again when it is not. You want motion changes to Active. Also, what is the timeout on your motion sensor? If its short, you want to make sure you don’t cancel the wait task on the status of the motion sensor changing. That is changed through changing the cancelation policy to Never.