I have setup home assistant ussing Raspberry Pi4. I also have enabled voice assistants using home assistant cloud. In “Settings > Voice assistants”, “Home Assistant” is selected for “Conversation agent”. On the iphone, if I said “Hello”, it will reply “Hello from Home Assistant.” (both text and audio). It looks good. Then I want to redirect the replies to my Sonos speaker.
In the “Settings > Automations & scenes” I use following yaml script. But after that, when I said “Hello”, but then it will only reply “Done”. Anyone has idea about this? Thank you.
"alias: to_sonos
description: ""
triggers:
- trigger: conversation
command: "{question}"
conditions: []
actions:
- action: conversation.process
metadata: {}
data:
text: "{{trigger.slots.question }}"
agent_id: conversation.home_assistant
response_variable: rep
- set_conversation_response: "{{ rep.response.speech.plain.speech }}"
- data:
cache: false
message: "{{ rep.response.speech.plain.speech }}"
media_player_entity_id: media_player.sonos_roam_sl
options:
voice: en_GB-northern_english_male-medium
action: tts.speak
target:
entity_id: tts.home_assistant_cloud
mode: single
"