Slider to set timer (minutes)

No still not working -_-"

Shouldn’t it be something like the following?

delay: '00:{{ states.input_slider.slider1.state | int }}:00'
2 Likes

Thanks @fanaticDavid I’ll check that and let you guys know :slight_smile:

@ThinkPad It works! :tada:
Thanks @fanaticDavid

You’re welcome! Happy to help :slight_smile:

Thanks for notifying!
Can you post your final code?

Any chance you could paste the working code formatted?

Here’s mine to turn off the coffee machine.

    kitchen_turncoffeemachine_off:
      alias: "Turn Off - CoofeeMachine"
      sequence:
        - delay: '00:{{ states.input_slider.coffeemachineshotdowndelay.state | int }}:00'
        - service: switch.turn_off
          data:
            entity_id: switch.relay1
2 Likes

Thank you!

Is there a way to define the value as seconds (for testing purposes)? I’ve tried the following but that doesn’t work.

#garden_water_timer:
#  alias: "Turn off garden water after x minutes"
#  sequence:
#    - condition: state
#      entity_id: input_boolean.water_timer
#      state: 'on'
#    - delay:
#        seconds: '00:{{ states.input_slider.timer_options_slider.state | int }}:00'
#    - service: switch.turn_off
#      entity_id: switch.ed01_relay1
#    - service: switch.turn_off
#      entity_id: switch.ed01_relay2

Try it like this:

- delay: '00:00:{{ states.input_slider.timer_options_slider.state | int }}'

Thank you!

Hi @xbmcnut. Still need it? I’m sorry for my late response :slight_smile:

I got it working but it’s always valuable to have others. Could you share?

timer_off_brm:
  alias: "Ceiling light bedroom timer"
  sequence:
    - delay: '00:{{ states.input_slider.slider2.state | int }}:00'
    - service: homeassistant.turn_off
      data:
        entity_id: switch.wall_plug

Thank you!

Hi, I tried adding this config to my automation file but nothing’s showing up in the frontend

plug_off:
  alias: "Ceiling light bedroom timer"
  sequence:
    - delay: '00:{{ states.input_slider.plug.state | int }}:00'
    - service: homeassistant.turn_off
      data:
        entity_id: switch.power_plug

When I reboot home assistant, it wouldn’t start because of an error so I had it removed

Any recommendation on how I can fix this?

did you ever get this resolved? i have some experience with input sliders and time templates if not.

I managed to get this working thanks to this post.

Hi,
I just tried this config, but not working for me:

   trigger:
      platform: time
      at: '{{ states.input_number.ontozo_ora.state | int }}:{{ states.input_number.ontozo_perc.state | int }}:00'

Any idea?

Thank you