Creating a delay number that translates to minutes and seconds

Hi Y’all,

I’m trying to create an input number I can use as a delay in various lights. I have this as the input number which is obviously not right.

timer_delay_slider:
    name: Delay Values
    initial: 20
    min: 5
    max: 120
    step: 5
    icon: mdi:camera-timer

If I use the template editor and enter 00:00:{{ states.input_number.timer_delay_slider.state | int }} which returns the correct value 00:00:20 but the config checker does not like it. Odd, because if I enter - delay 00:00:20, it’s happy.

I want to be able to set delays for sensors lights anywhere from 5 seconds to say 5 minutes but not quite sure how to go about it.

1 Like

You should be able to use something like

delay:
  seconds:
 {{states.input_number.timer_delay_slider.state | int }}

in your automation/script.

2 Likes

^ now that is a genius solution to the over-a-minute problem from the other thread, @xbmcnut

2 Likes