Timer that stops the Code for a long certain time


I want to create a timer that will activate once I’ve turned a light on, which is active for 15 minutes and when it is over, turns the light off again. Judging by other forum posts about this topic, Thread::sleep stops the code until the timer is over but is only possible for smaller amounts of time. Now I don’t quite know what to do. I also tried with blockly, but there’s nothing like “wait x minutes” and my experience with actual coding is rather limited.

Thanks for any help!

openHAB Blockly does not yet include timing functions.

Providing you always want the light to turn off fifteen minutes after it was turned on, you might look at the expire option for your Item.

If there’s more complicated ifs-or-buts, then you’ll have to adventure with a rule.