Driveway lights on with motion or open door


#1

1) Give a description of the problem
Critique my code

2) What is the expected behavior?
At night, driveway lights (sconces) turn on with driveway motion or one of the driveway doors opens, then turn off.

3) What is happening/not happening?
Appears to be working.

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

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


#2

Looks fine to me.


#3

I’d worry about this piston potentially running for a long time if one of the doors stays open. I would change the piston to trigger on any change in motion/door, then check if anything was active/open to turn on the lights, or everything is inactive/closed/present to turn off the lights.