Thank you for the detailed response. Unfortunately, the proposed solution did not work for me. I followed the steps you outlined, including enabling the “Allow device to perform Home Assistant actions” option and adding the code to the S3 box’s YAML configuration:
substitutions:
name: esp32-s3-box-3-04dc14
friendly_name: ESP32 S3 Box 3 04dc14
packages:
esphome.voice-assistant: github://esphome/firmware/wake-word-voice-assistant/esp32-s3-box-3.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
api:
encryption:
key: !secret api_key
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
voice_assistant:
on_tts_end:
- homeassistant.service:
service: media_player.play_media
data:
entity_id: media_player.homepods
media_content_id: !lambda 'return x;'
media_content_type: music
announce: "true"
I tried both approaches – using voice_assistant
and just on_tts_end
. When I used only on_tts_end
, I received the error: “Component not found: on_tts_end.” when saving and attempting to install the configuration onto the S3 box. With voice_assistant
, I encountered this error:
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 8, in <module>
sys.exit(main())
^^^^^^
File "/esphome/esphome/__main__.py", line 1014, in main
return run_esphome(sys.argv)
^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 1001, in run_esphome
rc = POST_CONFIG_ACTIONS[args.command](args, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 485, in command_run
exit_code = write_cpp(config)
^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 195, in write_cpp
return write_cpp_file()
^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 213, in write_cpp_file
writer.write_cpp(code_s)
File "/esphome/esphome/writer.py", line 352, in write_cpp
copy_src_tree()
File "/esphome/esphome/writer.py", line 305, in copy_src_tree
copy_files()
File "/esphome/esphome/components/esp32/__init__.py", line 709, in copy_files
shutil.copytree(
File "/usr/lib/python3.11/shutil.py", line 561, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/shutil.py", line 515, in _copytree
raise Error(errors)
shutil.Error: [('/data/idf_components/b0ad5728/components/esp-sr/docs/myapp/lib64', '/data/build/esp32-s3-box-3-04dc14/components/esp-sr/docs/myapp/lib64', "[Errno 17] File exists: 'lib' -> '/data/build/esp32-s3-box-3-04dc14/components/esp-sr/docs/myapp/lib64'"), ('/data/idf_components/b0ad5728/components/esp-sr/docs/myapp/bin/python', '/data/build/esp32-s3-box-3-04dc14/components/esp-sr/docs/myapp/bin/python', "[Errno 17] File exists: 'python3' -> '/data/build/esp32-s3-box-3-04dc14/components/esp-sr/docs/myapp/bin/python'"), ('/data/idf_components/b0ad5728/components/esp-sr/docs/myapp/bin/python3', '/data/build/esp32-s3-box-3-04dc14/components/esp-sr/docs/myapp/bin/python3', "[Errno 17] File exists: '/usr/bin/python3' -> '/data/build/esp32-s3-box-3-04dc14/components/esp-sr/docs/myapp/bin/python3'")]