Hi,
I installed a few atom echo’s according to the “$13 instructions” and that works as expected. But the atom echo doesn’t have a very nice speaker and is sometimes hard to understand.
So I followed the instructions found here: ESPHome: Voice Assistant with External Speaker Integration
I have tried a few things, and the part that I can’t get to work is:
on_tts_end:
- homeassistant.service:
service: switch.toggle
data:
entity_id: switch.shelly1_01
- homeassistant.service:
service: media-player.play_media
data:
entity_id: media_player.sonos_move
media_content_id: "http://192.168.1.18/test_piper.wav"
media_content_type: music
announce: 'true'
As you can see in the snippet above, I added another service call (the first) to switch a light, and this is working as expected. So the automation on_tts_end is executed.
The second service call is the one I need, but this doesn’t produce any audio.
In the original solution the media_content_id has a lambda function, but I replaced it with a static id just to eliminate any lambda errors. I also needed to put quotes around the ‘true’ value of announce, because without the quotes tje code compilation fails with:
Must be string, got <class ‘bool’>. did you forget putting quotes around the value?.
I also tested without the announce: line , but with the same results
If I test the following in the dev tools => services:
service: media_player.play_media
target:
entity_id: media_player.sonos_move
data:
media_content_id: http://192.168.1.18/test_piper.wav
media_content_type: music
announce: true
This works fine.
Before you ask, I installed and updated everything:
HAOS 12.2, Core 2024.5.2, Supervisor 2024.04.4, Frontend 20240501.1
ESPHome 2024.4.2
I really do not understand what I am doing wrong, any help will be greatly appreciated!
Marcel