How to turn off light if no motion is detected for 10 minutes?

You can find an example for this, and many more things in the Home Assistant Cookbook: