From 6b32853f6ade376d5ffad26cfe2e1a1f5cda92a3 Mon Sep 17 00:00:00 2001 From: JLo Date: Wed, 2 Jul 2025 10:37:57 +0200 Subject: [PATCH] Ask Yes/No Question Blueprint Update (#39804) --- .../blog/2025-07/ask_yes_no_question.yaml | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/source/blueprints/blog/2025-07/ask_yes_no_question.yaml b/source/blueprints/blog/2025-07/ask_yes_no_question.yaml index 87c5b7c9234..4fae8689f78 100644 --- a/source/blueprints/blog/2025-07/ask_yes_no_question.yaml +++ b/source/blueprints/blog/2025-07/ask_yes_no_question.yaml @@ -7,25 +7,11 @@ blueprint: 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', ...) @@ -200,6 +186,24 @@ variables: - Let's skip that - I'm not comfortable with that +fields: + voice_assistant: + name: Voice assistant + description: The voice assistant that will be used for that conversation. + required: true + selector: + entity: + multiple: false + filter: + - domain: assist_satellite + preannounce: + name: Preannounce + description: Play a sound before the question is asked. + required: true + default: true + selector: + boolean: + sequence: - variables: number_of_retries: !input number_of_retries @@ -209,8 +213,8 @@ sequence: continue_on_error: true data: question: !input question - preannounce: !input preannounce - entity_id: !input voice_assistant + preannounce: "{{preannounce}}" + entity_id: "{{voice_assistant}}" answers: - id: "yes" sentences: "{{yes_sentences}}" @@ -229,7 +233,7 @@ sequence: message: !input yes_answer preannounce: false target: - entity_id: !input voice_assistant + entity_id: "{{voice_assistant}}" - conditions: - condition: template value_template: "{{response.id == 'no'}}" @@ -241,7 +245,7 @@ sequence: message: !input no_answer preannounce: false target: - entity_id: !input voice_assistant + entity_id: "{{voice_assistant}}" default: - sequence: !input other_actions - action: assist_satellite.announce @@ -250,7 +254,7 @@ sequence: message: !input other_answer preannounce: false target: - entity_id: !input voice_assistant + entity_id: "{{voice_assistant}}" until: - condition: template value_template: "{{ (response is defined and response.id in ['yes','no']) or repeat.index > number_of_retries}}"