Whenever the piston triggers again, the action automatically overrides the pending tasks (ie decrease the var). You may want to set the override scope to None for that action so that all scheduled decreases do eventually happen…
Wha are you trying to achieve though? There may be other (better) ways…
Ah, thanks. If there is a maximum limit on timers that can be the reason.
I would like to implement conditions in other pistons to act when the time since the last (of a set of) motion sensors turned active exeeds 20 minutes.
Like, if I enter the room 15:00 and leaves immediately, and enters again 15:15 and leaves 15:18, I can turn off the light not before 15:35. It is important that the lights do not turn off at 15:20.
I saw that thread, but I felt it was very difficult to get track of the question and answers when they are mixed within a single thread. What is the reason why you want it that way?
I just thought that as you are having a problem with a piston and you are looking for peer assistance with the issue, then that was the appropriate place to put it.
Please feel free to put your query where you wish.
@andreassolberg It should work if you set the TOS to None on all actions that alter the variable (increase, wait, decrease).
I would do it differently though. Set a global time variable to $now + 20 minutes. No need to wait and decrease anymore (lighter on resources too). Then the lights off piston should compare the time larger than the global variable…
@eibyer any SmartApp has a physical limit of 4 timers. A CoRE piston never uses more than two of the four available slots. You can have unlimited waits but watch for the overrides. By default, any action that runs will automatically cancel any timers previously set by the same action. Setting TOS to None will fix that, but you run the risk of overschedulling - get the piston to run so often that it hits the 60 runs per minute limit.