Interesting use of the state test inside the [ |…] clause. Might work OK. I prefer to separate timer-triggered actions by using PROXY elements for switches and intercepting the command to the PROXY at timer execution time. Puts all the run-time parts “together” for easier testing/maintenance. YMMV