Automation using UI light on

I am trying to set an automation to keep a light on for a period of time after motion is detected by a sensor using the UI for automatons.
I have tried using the “for” setting using syntax -
minutes: 10

This does not work what am I doing wrong?

It might be a simple answer to this question but all attempts have failed.

I’m afraid I don’t personally use the UI for setting up these kind of automations, however I can say under the action I do indeed turn the light on, then I use a “delay: 5” then I use the turn off action so in yaml it kinda looks like this:

action:
  - service: light.turn_on
    entity_id: light.hallway_light
  - delay: "00:05"
  - service: light.turn_off
    entity_id: light.hallway_light

Don’t use a delay. If the automation is re-triggered (i.e. more motion) the delay will be skipped.

The cookbook example shows the best practice:

I think I have found part of the issue.
I am using Siri and Google assistant To also control the devices and if you use the voice commands it also over-rides the settings set up in HA automations.
Not sure how to overcome this.

[Where are all the GUI editor guru’s when people ask questions like this ?] general comment, don’t respond, but I’m going to start using this a LOT.

Mike, you say you have an automation set up that detects motion, light goes on, sensor goes off, timer starts and 10 minutes later the light goes off.
But siri and Google interfere with this behaviour.
How ?
Are you asking siri to turn the light off after (say) 5 minutes ? What’s wrong with that ? You will have to explain a little further.

Thats the problem, timer when using automations UI syntax under “for” using minutes: 10 or 00:10:00 wont turn light off. I have tried “for” and “delay” and despite responses from members in the forum I can not resolve.
There is something up with the automations UI in my opinion.
Throwing other possible complications into the mix, if you use siri or google in the period of “for” or “delay” the automation does not appear to reset and things get very complicated.
I have a separate automations.yaml file and the automations UI threw a message that the issue can not be amended in config.yaml.
All very confusing.