I try to use a input_number (input_number.temps_remplissage) to set up a delay in automation, to keep possibility to quick change de value on the dashboard…
I try something like this in template…
alias: test
- id: '1122334459999'
alias: delaytest
description: ''
trigger:
- entity_id: switch.relay_pression
for:
seconds: "{{ states('input_number.temps_remplissage') | int(0) }}"
platform: state
to: 'off'
I probably completly wrong but if someone have any clue…
You can use delay to suspend the execution of action (not to suspend the processing of a condition).
Whatever you use in condition is processed immediately after the trigger occurs. It doesn’t pause or wait for something else to happen before it proceeds to execute the action. Basically, everything within condition serves as a go/no-go filter to determine if it should or should not execute action.
Ok, but in my case it is the reverse that I am trying to obtain, I want to turn off a relay after a certain delay, unless the water level is reached before
Items in a list are numbered starting with zero. So the first item is 0, the second is 1, etc. The error message refers to ['wait_for_trigger'][1] which means the second item in wait_for_trigger. What is the second item in your wait_for_template? It’s this invalid entry here:
- null
Remove it.
In addition, the template for timeout is missing an initial single quote to match its terminating single quote. Add the missing single quote.
You should mark tom_l’s post with the Solution tag because it answers the question in your original post. What I supplied answers your follow-up question and isn’t the solution to the original question.