Motion sensor time to remain in

I am having trouble with a time setting for lights to remain on for a period of time with a motion sensor using automation editor.
I have tried using the for: 00:00:05 etc and minutes: 5 but can seem to get it to work. Help appreciated.

Use this method:

1 Like

Can you not do it in automations rather than yaml

No sure what you are on about. It is an automation. If you mean the Automation UI editor, yes you should be able to do it there as well. Just dont use the hideous “device automations”, use entities for the triggers.