Setting Timer to Turn off Lamp After Set Time?

I have a lamp plugged into a smart plug that is activated when the motion sensor is activated at the front door to turn on a light. How can I have the lamp turn off after a set time after turning on?

which ST app are you using…Classic or STSC? Which smartapp are you using… Routines, Smart Lights or Custom Automations?

I recommend using Smart Lights which offers the ability to tun off devices after a certain amount of time.


STSC. I have added the smart lighting automation but can’t figure out how to use it

in that rule, if you enable Turn off after motion stops