palitu
July 10, 2016, 12:40am
1
I am trying to use an input slider to control a scrip minutes configuration.
pool_timer:
alias: "1h pool timer"
sequence:
- delay:
minutes: '{{ int(states("input_slider.slider1")) }}'
- service: switch.turn_off
data:
entity_id: switch.Pool_Pump
I get the following error:
homeassistant.bootstrap: Invalid config for [script]: expected int for dictionary value @ data['script']['pool_timer']['sequence'][0]['delay']['minutes']
so obviously it expects an int and is receiving something else. However i have typecast the template to an int, but it still has the issue.
anyway to make this work?
Template is currently not supported for delay
.
Hello, I want to create a script with a configurable delay but I can’t figure out how to correctly define it.
I tried the following using templating:
countdown_run:
alias: 'Countdown running'
sequence:
- delay:
minutes: '{{states.input_select.timeout_delai.state|int}}'
...
But I end up with this error :
ERROR:homeassistant.bootstrap:Invalid config for [script]: expected int for dictionary value @ data[‘script’][‘countdown_run’][‘sequence’][0][‘delay’][‘minute…
1 Like
palitu
July 10, 2016, 10:57pm
3
thanks, i have added my vote.
Hi Palitu,
You can now achieve this with templating.
delay: '00:{{ states.input_slider.minute_delay.state | int }}:00'
Rich
1 Like