There are a few different ways you can still make the piston behave the way you want… you just have to make sure the IF statement at the top won’t prevent your following actions from being completed. Here are two samples:
In the above, the wait and subsequent code isn’t dependent on any IF evaluation. This can be good or bad… meaning if the piston is triggered for another reason, the last 3 lines are executed. You’d have to decide if this is a good implementation since you know your system, what other inputs could make your piston execute, etc.
Another method that is less likely to cause “hmm, wasn’t expected that to happen” scenarios is to use a variable:
In this case, since your IF condition would still evaluate TRUE, you piston will jump in and resume execution from the WAIT command.
First run:
Button is pushed evaluates true
Sets variable
THEN pauses piston and sets light level to 100%
Sets wake-up timer for 3 minutes from now
Second run, 3 minutes later:
Variable evaluates true
THEN sets level to 28% and resumes piston, and sets variable back to false
Coming out of a WAIT command, the conditions are re-evaulated but no every step in your THEN/DO is repeated, otherwise you’d hit the same WAIT command and never get past it.