For now it’s not possible to use a value from a input_slider as a template for delay
timers. I think it’s on planning, but not implemented yet.
I’ve moved this to feature request in hope someone will catchup
This is a duplicate of this feature request:
ah alright
In 0.25 luckily it’s added
timer_off_lrm: alias: "Ceiling light living room timer" sequence: - delay: minutes: '{{ input_slider.slider1 }}' - service: homeassistant.turn_off data: entity_id: switch.light_dining_table
and
delay: '00:{{ input_slider.slider1 }}:00'
Doesn’t work for me…
Am I missing something?
Did you got this working? If you did, can you post your code?
This would be a nice addition, to set a timer for my ceilingfan.
No still not working -_-"
Shouldn’t it be something like the following?
delay: '00:{{ states.input_slider.slider1.state | int }}:00'
You’re welcome! Happy to help
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
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!
I got it working but it’s always valuable to have others. Could you share?