I think that’s your problem.
If that accepts a template at all, the entire field would have to be a template, not the mash-up you have there. And TBH I’m not sure that field accepts templates, you would have to check in the Docs or someone here will know.
Thank you for taking time to go through, the aim is to set variable timers based on sentences via automation. I could either use the templating for duration or the voice assistant timer. Looking for a solution in either direction
Sorted it out , the issue was to capture the right variable from the sentence and then validate it proper, to set the duration for timer.
alias: Set Timer
description: Set a custom timer
triggers:
- trigger: conversation
command:
- book a timer for {minute} minute[s]
- book a timer for {second} second[s]
- book a timer for {hour} hours[s]
- book a timer for {hour} hours[s] and {minute} minute[s]
- book a timer for {minute} minute[s] and {second} second[s]
conditions: []
actions:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.alarm_play
- action: timer.start
metadata: {}
data:
duration: |
{% set t_hour = trigger.slots.hour | default(0) | int %}
{% set t_sec = trigger.slots.second | default(0) | int %}
{% set t_min = trigger.slots.minute | default(0) | int %}
{{t_hour}}:{{t_min}}:{{t_sec}}
target:
entity_id: timer.variable_timer
mode: single