Argh ... "turn_on" for certain time (timer)

Argh … I am still struggling with HA yaml …
I have an automation running my screen tablet when someone rings the bell, but the screen automatically turns off after 30 seconds (set by default by Fully kiosk …)

What would be the best way to set a “timer” so that the screen stays ON for 2 minutes ?
I assume I need to create an helper, but then how should I use it in my code :

… and would this timer overwrite the one set by Fully kiosk ?
Many thanks for your help

Um… Why don’t you change the time in Fully Kiosk?

thank you … because by default when I am in front of the tablet, the camera switches on the tablet for 30 seconds … and that is enough … but when someone rings the bell, I want the screen to be ON for a longer period

Why not repeat the command every 30s

There should be a simple way in automaayion tu run a timer before next action is executed, but I can not figure out how to do this.
I have created a timer helper of 5 minutes, then trying to use it in an automation.

… but what happens is that the timer is launched, but next action is executed straight after the timer is launched, and not waiting for the timer to finish it :

So below, when wifi is turned “ON”, I start timer of 5 minutes then a value should be changed to my tablet to “500” … but instead, the value is directly changed, and the timer continues to run till 5 minutes :

- id: '1707661377044'
  alias: Nouvelle automatisation
  description: ''
  trigger:
  - type: turned_on
    platform: device
    device_id: 78384ed7e417960e820ab66fa4e1b32c
    entity_id: e70eb1d348cb0882e1c6b3918bfb673b
    domain: binary_sensor
  condition: []
  action:
  - service: timer.start
    metadata: {}
    data: {}
    target:
      entity_id: timer.minuteur_ecran_tablette_5_minutes
  - service: number.set_value
    metadata: {}
    data:
      value: '500'
    target:
      entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
  mode: single

How Should I do to tell him to WAIT for 5 minutes (so that the timer is finished) to run next action ??
In the UI, there is also no possibility to add a condition after the trigger is executed :

You add a building block of wait for time to pass (delay). This will halt the script for that time before continuing.

Yeah I just found it, but that is not working … I have inserted a delay to wait for 5 minytes after I have turned my WIFI ON to then set a value of 500, but it sets it after a couple of seconds :

- id: '1707661377044'
  alias: Nouvelle automatisation
  description: ''
  trigger:
  - type: turned_on
    platform: device
    device_id: 78384ed7e417960e820ab66fa4e1b32c
    entity_id: e70eb1d348cb0882e1c6b3918bfb673b
    domain: binary_sensor
  condition: []
  action:
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
  - service: number.set_value
    metadata: {}
    data:
      value: '500'
    target:
      entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
  mode: single

That looks right, are you sure you havent got an old automation still doing it? Maybe add a persistant notification to send when it does it and see if that takes 5 mins to send.

Thank you, I will have a look