diff --git a/source/_posts/2025-07-02-release-20257.markdown b/source/_posts/2025-07-02-release-20257.markdown index fb9f9e68774..284362fddc8 100644 --- a/source/_posts/2025-07-02-release-20257.markdown +++ b/source/_posts/2025-07-02-release-20257.markdown @@ -100,12 +100,22 @@ Until now, Assist was mostly transactional: say something, get a response, done This lets you build custom conversations from the comfort of our automation engine. Ask a question, handle the answer, and keep the interaction going. -**TODO**: Screenshot of the ask question block in an automation +The new 'Ask Question' action This action even allows you to define expected answers so that our extremely fast speech engine Speech-to-Phrase can train on them. Yes! Fully local, custom conversations! Here is a video of what this allows you to build. -**TODO:** Video of Ask Question in action +To help you get started, we are providing a blueprint that covers the most useful use-case: Asking a closed Yes/No question: + +{% my blueprint_import badge blueprint_url="https://www.home-assistant.io/blueprints/blog/2025-07/ask_yes_no_question.yaml" %} + +This blueprint allows you to focus on what you want to do if you answer positively or negatively to any question your voice assistant will ask, the blueprint supports 50 different ways of saying "Yes" and "No". + +Here it is in action! + + + +In case you want to dive deeper into conversation building, here is an example on how to ask question and process the different answers: {% details "Example YAML automation actions" %} diff --git a/source/blueprints/blog/2025-07/ask_yes_no_question.yaml b/source/blueprints/blog/2025-07/ask_yes_no_question.yaml new file mode 100644 index 00000000000..87c5b7c9234 --- /dev/null +++ b/source/blueprints/blog/2025-07/ask_yes_no_question.yaml @@ -0,0 +1,256 @@ +blueprint: + name: Ask a Yes/No question + description: | + Ask a simple Yes/No question. Supports 50 different ways of confirming or rejecting the question. Supports retries. + domain: script + author: JLo + homeassistant: + min_version: 2025.6.99 + input: + voice_assistant: + name: Voice assistant + description: The voice assistant that will be used for that conversation. + selector: + entity: + multiple: false + filter: + - domain: assist_satellite + question: + name: Question + description: The question that will be asked by the voice assistant. + selector: + text: + preannounce: + name: Preannounce + description: Play a sound before the question is asked. + default: true + selector: + boolean: + + yes_section: + name: Confirmation ('Yes', 'Of course', ...) + description: Define what should happen if you reply positively to the question asked. + icon: mdi:play + input: + yes_actions: + name: Actions + description: Actions to perform if you reply positively to the question asked. + default: [] + selector: + action: + yes_answer: + name: Answer + description: Answer of the voice assistant if you reply positively to the question asked. + default: "Done" + selector: + text: + + no_section: + name: Rejection ('No', 'Negative', ...) + description: Define what should happen if you reply negatively to the question asked. + icon: mdi:stop + input: + no_actions: + name: Actions + description: Actions to perform if you reply negatively to the question asked. + default: [] + selector: + action: + no_answer: + name: Answer + description: Answer of the voice assistant if you reply negatively to the question asked. + default: "Action cancelled" + selector: + text: + + other_section: + name: Other responses + description: Define what should happen if the response is not understood. + icon: mdi:help + collapsed: true + input: + other_actions: + name: Actions + description: Actions to perform if the response is not understood. + default: [] + selector: + action: + other_answer: + name: Answer + description: Answer of the voice assistant if the response is not understood. + default: "Sorry, I couldn't understand that" + selector: + text: + + repeat_section: + name: Advanced parameters (Retries) + description: Define how many times the question should be asked if the answer is not understood. + icon: mdi:cog + collapsed: true + input: + number_of_retries: + name: Number of retries + description: Number of times the question should be re-asked if the answer is not understood. + default: 0 + selector: + number: + min: 0 + max: 10 + mode: slider +variables: + yes_sentences: + - "Yes" + - Sure + - Absolutely + - Go ahead + - Please do + - Of course + - That's fine + - Do it + - Yep + - Yeah + - Ok + - Okay + - Affirmative + - I agree + - Sounds good + - You got it + - Definitely + - By all means + - Why not + - Indeed + - Confirmed + - Let's do it + - Certainly + - Right + - Fine + - All good + - Make it so + - I approve + - That's right + - I'm okay with that + - No problem + - Go for it + - Sounds fine + - I'm on board + - Proceed + - It's a yes + - I'm in + - Okay yes + - That's a yes + - Yeah go ahead + - I'm good with that + - Positive + - Do that + - It's okay + - Works for me + - I'm fine with that + - Yep do it + - Please go ahead + - That's what I want + - Exactly + no_sentences: + - "No" + - Nope + - Don't + - Please don't + - No thank you + - I don't think so + - Not now + - That's a no + - I'd rather not + - No way + - Not really + - Cancel that + - Negative + - Stop + - Don't do it + - I said no + - No need + - Never mind + - Not necessary + - No that's not right + - I disagree + - Skip it + - Don't proceed + - I don't want that + - Don't go ahead + - Leave it + - That's incorrect + - I prefer not to + - No thanks + - I'm not okay with that + - I'm saying no + - Let's not + - Not this time + - I'm not in + - Please don't do that + - Don't take action + - I'd say no + - No action needed + - I'm against that + - I'd skip it + - Rather not + - Not today + - I'm not sure better not + - That's not what I want + - That won't be necessary + - I don't agree + - No that's wrong + - Let's skip that + - I'm not comfortable with that + +sequence: + - variables: + number_of_retries: !input number_of_retries + - repeat: + sequence: + - action: assist_satellite.ask_question + continue_on_error: true + data: + question: !input question + preannounce: !input preannounce + entity_id: !input voice_assistant + answers: + - id: "yes" + sentences: "{{yes_sentences}}" + - id: "no" + sentences: "{{no_sentences}}" + response_variable: response + - choose: + - conditions: + - condition: template + value_template: "{{response.id == 'yes'}}" + sequence: + - sequence: !input yes_actions + - action: assist_satellite.announce + metadata: {} + data: + message: !input yes_answer + preannounce: false + target: + entity_id: !input voice_assistant + - conditions: + - condition: template + value_template: "{{response.id == 'no'}}" + sequence: + - sequence: !input no_actions + - action: assist_satellite.announce + metadata: {} + data: + message: !input no_answer + preannounce: false + target: + entity_id: !input voice_assistant + default: + - sequence: !input other_actions + - action: assist_satellite.announce + metadata: {} + data: + message: !input other_answer + preannounce: false + target: + entity_id: !input voice_assistant + until: + - condition: template + value_template: "{{ (response is defined and response.id in ['yes','no']) or repeat.index > number_of_retries}}" diff --git a/source/images/blog/2025-07/ask_question.png b/source/images/blog/2025-07/ask_question.png new file mode 100644 index 00000000000..f2a27641202 Binary files /dev/null and b/source/images/blog/2025-07/ask_question.png differ