OH3: automation scription Jython

Maybe I missed it - what version of openHAB?

For OH2&3, all you need is explained in this post: