Execute command every x minutes IF a virtual switch is open


1) Give a description of the problem
Hi there. I am trying to set up a piston to execute a command every 10 minutes whenever a virtual switch is on (or when a virtual presence is not present).

2) What is the expected behaviour?
Whenever the virtual switch is on, the “refresh” command executes every 10 minutes. And stop when virtual switch is off.

3) What is happening/not happening?
The command is firing every 10 minutes regardless of status of switch. The timer command “Every” seem to ignore any conditions.


I think you want

Every 10 mins
if switch is on


How do you do an “if” statement after an “timer” statement?


inside the every block, put your restrictions to do something or nothing.


Ok thanks… I figured how to do that. I was looking for the Conditional “If” statement while in the “Every” timer statement. My mistake.


a restriction on the every, or the if restriction within the every operates the same way.