Repeating rule help - double triggering

I've looked over a few threads and got my rule to start and stop depended on the state of a virtual switch. My problem is that the event is triggered every 30sec so if the virtual switch is toggled on and off 15sec into the 30 sec delay I will now have 2 triggered events every 15 sec.
Is there a way to evaluate the variable outside of the loop delay?

SEELCT TRIGGER EVENTS
kitchen color wheel (virtual switch)

SELECT ACTIONS TO RUN
REP every 30sec (stoppabale)
IF(not kitchen color wheel(off) is on(f) [true]) then
stop repeating actions
exit rule
else
set color: kitchen cab->random color ->level: 95
end if
end rep

Maybe you need to include a "Stop Repeating Actions" at the very beginning, before entering the repeat?