How to expire rules using Paper UI

I have a motion detector and a plug. I have a rule saying that if there is motion, the plug turns on. However I want this rule to expire after 10 days. How do I that using Paper UI?

I am not looking for turning it off when it is a specific date. I want it to be a specific duration(10 days)

I would suggest to use

createTimer(now.plusHours(240), [|
... here you code to turn the plug off

If your OH restarts within the 240 hours (or if you update the rule) turning off will not work. You get a Java error because your Timer reference is gone.

how to do it through Paper UI?

Better use rules and not Paper UI

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.