Input drop down helper to use as timer picker for automation

hey all, need some help.
im sure its a simple enough implementation, i’m just lacking the brain to figure it out for myself…

what would be the proper way to use a dropdown input helper to set a time countdown in minutes?
i want to create an automation to turn a light at specific time, and turn it off again after an amount that will be determined by a dropdown helper with the option of several different values like 20, 30, 40, 50, 60 minuets.
guess i can write an “if/than” automation/script with all the “helpers” options listed as conditions, but i thought there might be a better way using templates or something like it - that im not familiar with…

what would be the best way of doing so?


Why would you do that when the input_select’s value is time in minutes?

{{ states('input_select.your_helper') | int(0) }}


i know there must be a better way using some kind of templating! thanks for pointing it out man! ill give it a go

Simplest example:

- delay:
    minutes: "{{ states('input_select.your_helper') | int(0) }}"