If rossko57 did the right suggestion, the code is simple:
var Timer tToggle = null
rule "toggle frequently"
Item myTriggerItem changed
if(myTriggerItem.state == ON)
tToggle = createTimer(now.plusMillis(200),[ |
myTogglingItem.sendCommand(if(myTogglingItem.state != ON) ON else OFF)
When the rule gets triggered (because the Item myTriggerItem changed its state), the first thing is, an existing timer is killed. The second step is, to create a new timer, but only if the current state is ON.
The timer will expire almost immediately and will toggle the Item myTogglingItem. Then the timer will reschedule itself two hours later.
Please be aware that myTogglingItem will keep its state when myTriggerItem is switched OFF, so the only thing which is switched, is the toggling!