I have a voice assistant automation for setting a meat thermometer target temp and notifying me when its reached. I wanted to take it to the next level and try the ask_question action, where after the temperature target is set, the voice assistant asks if i would like to set a kitchen timer as well. Simple enough - but assist_satellite.ask_question’s response_variable seems to only return the chosen answers[].id (e.g., “yes”, “no”, etc), not the slot values like {minutes} or {hours} from the answer sentences. I can’t find a way to access the parsed slot data from the response variable…
I tried an approach with two seperate automations, where the first automation ‘yes’ ‘answer.id’ sets a input_boolean.meat_thermometer_waiting_for_timer and then a second automation is triggered and listens for “{minutes} minutes” / “{hour} hours and {minutes} minutes” and starts the timer — but that follow-up approach isn’t triggering because the input_boolean is the trigger, and not the sentence…i think.
Automation 1:
alias: Set meat thermometer target (ask about timer)
triggers:
- command:
- set the oven temperature to {temperature} degrees
- set oven temperature to {temperature} degrees
- notify me when the oven reaches {temperature} degrees
trigger: conversation
actions:
- variables:
target_temp: "{{ trigger.slots.temperature | int(0) }}"
- choose:
- conditions:
- condition: template
value_template: "{{ target_temp > 0 }}"
sequence:
- action: input_number.set_value
target:
entity_id: input_number.meat_thermometer_target
data:
value: "{{ target_temp }}"
- action: input_boolean.turn_on
target:
entity_id: input_boolean.meat_thermometer_alert_armed
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.meat_thermometer_last_set
data:
datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
- action: input_boolean.turn_off
target:
entity_id: input_boolean.meat_thermometer_waiting_for_timer
- action: assist_satellite.ask_question
data:
entity_id: assist_satellite.home_assistant_voice_091f89_assist_satellite
preannounce: true
question: >-
Okay — I’ll notify you when the oven probe reaches {{
target_temp }}°. Would you like me to set a kitchen timer as
well?
answers:
- id: "yes"
sentences:
- "Yes"
- Yes please
- Sure
- Okay
- Yeah
- id: "no"
sentences:
- "No"
- No thanks
- No thank you
- Nope
- Nah
response_variable: meat_thermometer_timer_response
- choose:
- conditions:
- condition: template
value_template: "{{ meat_thermometer_timer_response == 'yes' }}"
sequence:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.meat_thermometer_waiting_for_timer
- set_conversation_response: >
Okay — how long should I set the kitchen timer for? You
can say “10 minutes” or “1 hour and 15 minutes”.
- conditions:
- condition: template
value_template: "{{ meat_thermometer_timer_response == 'no' }}"
sequence:
- set_conversation_response: >
All set — I’ll notify you when the target temperature is
reached.
- conditions: []
sequence:
- set_conversation_response: |
Sorry — I didn’t catch a valid temperature.
mode: restart
Automation 2:
alias: Meat Thermometer Follow-Up (Set Kitchen Timer)
description: ""
triggers:
- command:
- set a timer for {minutes} minutes
- "{minutes} minutes"
- set a timer for {hour} hour
- set a timer for {hour} hours
- "{hour} hour"
- "{hour} hours"
- set a timer for {hour} hour and {minutes} minutes
- set a timer for {hour} hours and {minutes} minutes
- "{hour} hour and {minutes} minutes"
- "{hour} hours and {minutes} minutes"
trigger: conversation
conditions:
- condition: state
entity_id: input_boolean.meat_thermometer_waiting_for_timer
state: "on"
actions:
- variables:
mins: "{{ trigger.slots.minutes | default(0) | int(0) }}"
hrs: "{{ trigger.slots.hour | default(0) | int(0) }}"
total_seconds: "{{ (hrs * 3600) + (mins * 60) }}"
- choose:
- conditions:
- condition: template
value_template: "{{ total_seconds > 0 }}"
sequence:
- action: timer.start
target:
entity_id: timer.kitchen_2_timer
data:
duration: "{{ total_seconds }}"
- action: input_boolean.turn_off
target:
entity_id: input_boolean.meat_thermometer_waiting_for_timer
- set_conversation_response: >
Kitchen timer set for {% if hrs > 0 %}{{ hrs }} hour{% if hrs != 1
%}s{% endif %}{% endif %} {% if hrs > 0 and mins > 0 %} and {%
endif %} {% if mins > 0 %}{{ mins }} minute{% if mins != 1 %}s{%
endif %}{% endif %}.
- conditions: []
sequence:
- set_conversation_response: >
I didn’t catch a valid duration. Try “10 minutes” or “1 hour and
15 minutes”.
mode: restart
Any ideas how this slot data can be passed within the first automation? If it can’t - any ideas about how to use the input_boolean to trigger another voice automation?
Thanks