Basic rundown of what I’m working with. I have a bunch of ESP32-S3’s with mic’s that I’m putting around the house. I have in ceiling speakers in most rooms and google mini’s in the rooms without them. I’d like to be able to select the speaker (media player) to use in the HA UI instead of hard coding it in the ESP.
Yes I know I can add this to hardcode it like this:
It seems like there should be a way to make a virtual speaker or media_player in the ESPhome config file and have a selector in the UI. Even if I needed to hardcode a list of all of my speakers in the yaml that would be better than maintaining 20 different files - one for each speaker.
I didn’t understand “or don’t use a speaker in your echo assistant, a speaker is optional”. In the M5 Atom Echo, the output goes directly to the speaker. Your automation sends the sound to my speaker and then to the M5 Atom Echo’s speaker. media_player.media_stop - can’t solve this problem?
I made this automation and everything works the way I wanted it to.
And of course, your automation! That is, everything that the firmware does, two automations do, but you don’t need to reflash anything!
alias: "M5Stack Atom Echo: Stop when starts playing"
description: Automatically stops the M5Stack if it starts playing
triggers:
- entity_id: media_player.m5stack_atom_echo_fd623c
to: playing
trigger: state
actions:
- data:
entity_id: media_player.m5stack_atom_echo_fd623c
action: media_player.media_stop
mode: single