My first piston not working


#1

1) Give a description of the problem
(The piston is turning on the light, but not off)

2) What is the expected behaviour?
(Turn on light when motion, and off after 30 sek or so)

3) What is happening/not happening?
(Turning on, but not off)

4) Post a Green Snapshot of the pistonimage
(

)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

If you move your second IF block down to it’s own block, it will work.


#3

You have a nested trigger at line 31 ( the orange lightning bolt in the left margin). I like to keep all of my triggers top level. Pull the IF at line 30 out into a block of its own (as suggested above).


#4

Like this?


#5

Yes. Looks good.


#6

just be aware… there is a block of 29 minutes and 30 seconds where the light will not be turned off when the motion sensor is inactive :slight_smile:

because one is set to 30 minutes before sunset and he other to 30 seconds before


#7

Good catch. Missed that.


#8

Thanks. Works now.