How to detect which satellite I'm talking too?

After searching on this forum, the web and even asking chatgpt I still got no answer that allowed me to do the following.

I have 2 Voice PEs and 1 (of 3) Atom Echo’s up and running. I would like to catch an event as soon as a wake word has been detected and tell me which satellite has been woken up. E.g. I would like to be able to switch assist pipeline by voice.

Subscribing to following events in developer tools didn’t result in any events:

  • homeassistant_satellite_event
  • assist_pipeline_run
  • conversation.process

Hopefully someone can point me to the correct event. Thanks!

IIRC, you should get a state change on the assist_satellite entities from “idle” to “listening” when you use the wake word.

Yes, but to do that you have to explicitly listen to each and every satellite. I just want an event when any satellite has been woken up telling me which one it was that woke up.

Just an idea: what about creating an automation that triggers when your voice assistants wake up and make them announce themselves in an action?

What task do you need to accomplish?
Finding the last active device is accomplished by working with the domain. Changing the conversation agent for a device is solved by using the trigger data.

Well, that’s precisely what I want. But that automation needs a trigger right! I want one single trigger (wakeword spoken), with the device which was woken up with it as a value/parameter of the event.

That was just an example, changing the pipeline/conversation agent. I’m after the most simple and elegant solution to detect which satellite is being talked to.

Then the first option is the standard method for any devices.
Come up with a specific example of a task, and you will be helped to implement it.

What’s wrong with the changing state from idle to listening to trigger your automation?

If you use 3 triggers, 1 for each VA, and use trigger ID’s, you could use a template to make the VA announce it’s ID.

Just a rough, maybe not so advanced solution.

Yes, I could do that. But it simply does not feel like a scalable approach, the more satellites I add the more of them I have to “monitor” individually to detect the state change to listening. It would have been much cleaner and more efficient when there was a single event that gave you the actual satellite as argument.

I created a Template

>   - sensor:
>       - name: "ESPHome Assist In Progress"
>         state: >
>           {%  if (expand(integration_entities('esphome')) | selectattr('entity_id', 'search', 'assist_satellite.') | selectattr('state', 'in', 'listening, responding, processing') | selectattr("attributes.friendly_name", 'defined') | map(attribute="attributes.friendly_name") | list | sort | count) > 0 -%}
>               {{expand(integration_entities('esphome')) | selectattr('entity_id', 'search', 'assist_satellite.') | selectattr('state', 'in', 'listening, responding, processing') | selectattr("attributes.friendly_name", 'defined') | map(attribute="attributes.friendly_name") | list | sort}}
>           {%- else -%}
>           {%- endif %}
>         icon: mdi:account-voice
>         unique_id: "esphome_assist_in_progress"

This will create a sensor ESPHome Assist in Progress and the state will have the Friendly Name of which Voice Satellite that is in use. If none are in use, the state is blank.

2 Likes

Awesome, thanks so much!!

Please take the time to mark the solution as the answer, you do that by selecting the three dots under the post:

image

Then select the check box:

image
By doing so:

  • this thread can be useful to other users as well (this thread comes up as solution when starting a thread which is similar to yours).
  • this prevents that someone else steps in trying to help

Thanks for giving back to the community! :+1:

1 Like

I will, as soon as I have had the time to try it out.