Item timer

Hi all just transferred over to OH 3, loving it so far, a quick question.

What is my best approach?

When contact 1 changes state from closed to open light A comes on for 5 minutes then Light A goes off.

Just a pointer into the right direction would be appreciated.

Thanks

The best approach would be the same as it was in OH 2.5.

You can configure Expire (which is part of core instead of a separate binding now) by setting metadata on the light Item so it turns off after 5 minutes.

Or you can write a rule with a Timer.

Thanks for the reply, I’ve used the expire which works great but I also would like light to be switchable.

What would be the syntax be for using a timer within a rule

Example in the Actions docs.

Thanks