Pause rule after execution

Hi,

I have a rule that detect motions from my DSC alarm system.

rule "Motion detected"
	when
		Item DSCMotion1_ZoneStatus changed from CLOSED to OPEN
	then
    sendPushoverMessage(pushoverBuilder("Motion Detected!"))
end

The issue is that it can send many events - so I would like to pause the execution of this particular rule for let say 5 min.

Is that possible and how should it be done?

something like

var boolean flag = true

if (flag)
   sendPushOver ...
   flag = false
   t = createTimer(now.plusMinutes(5)) [ |
      flag = true
  ]
1 Like
1 Like

Thanks @mstormi and @rlkoshak