I have this basic automation. See line that starts with for:
How do I add user input value from helper “input_datetime.timeout” in this “for:” field?
alias: 'Alarm: Valve timeout '
description: 'Close valve after x hours x=input_datetime.timeout'
trigger:
- platform: state
entity_id: switch.main
to: 'on'
--> for: {{states('input_datetime.timeout')}} <----- Can I do this?
condition: []
action:
- service: notify.emailer
...
After saving it shows as this:
alias: 'Alarm: Valve timeout '
description: 'Close valve after x hours x=input_datetime'
trigger:
- platform: state
entity_id: switch.main
to: 'on'
for: '[object Object]'
condition: []
action:
- service: notify.emailer
Developer tab confirms input field {{states(‘input_datetime.timeout’)}} is 03:00:00
2 posts - 2 participants