Using a helper inside the "for" part of an automation's trigger

Hello there,
I have an automation with many triggers with each having to be in a certain state for an identical amount of time.

  - platform: state
    entity_id:
      - binary_sensor.window_small_contact
    to: "on"
    for:
      hours: 0
      minutes: 1
      seconds: 0
    enabled: true

I’m still experimenting with how long that time should be, so I thought that using a helper to make it easier to change the time across all triggers would make my life easier. But I soon found out that using an input_number.xxx is not an option.

Is there any other option?

Thanks!

The for option supports the use of templates.

  - platform: state
    entity_id:
      - binary_sensor.window_small_contact
    to: "on"
    for:
      hours: 0
      minutes: "{{ states('input_number.xxx') | int(0) }}"
      seconds: 0
    enabled: true

Reference

State Trigger