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)
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.