This Piston is to automatically turn on and off the lights in the hallway. I use 2 motion detectors and to overrule them i have a button. Everything works fine except for the last IF block.
Once the 10 second timer from the last IF block starts and someone enters the hallway again the 10sec timer keeps running and will turn off the lights. Instead the timer should get cancelled as soon as motion gets detected.
How can i keep the piston as it is but add a rule that when motion gets detected in the first IF block, the last IF block gets cancelled.
Any help will be very much appreciated. Thanks!