Google Assistant SDK send command to specific device

Now that Google Assistant SDK is a thing (excellent work @tronikos, thank you for it!), would it be possible to add a parameter for which device to run the command on?

Ideally something like:

service: google_assistant_sdk.send_text_command
data:
  command: tell me a joke
  device: living room home

and then it tells a random joke on the Google/Nest Home in the living room.

I think the above is a valid command that Google doesn’t support something like “tell me a joke on living room home”, though the usefulness of this is very limited I know.
The real usefulness however is technically another feature request - to make routines work. I know this is a known limitation so far, but I couldn’t figure out if this is a planned future feature or should I create a separate feature request for it maybe or is it even possible to do it?

Example here would be a morning routine that tells the weather, agend for the day, news, etc., if your HA knows when you wake up one could make an automation to trigger that routione on wake up on a specific device in the bedroom. I’m sure there’s loads of other examples of this being useful.

I’m not a Python developer (I work in C#), but maybe I could help out with the implementation. The Google SDK and whatnot is too expansive for me though so if I get some pointers I might be able to help?

Agree on this one. And as an additional request, to have the option to set off the welcome text of the broadcast. “There is a new incoming broadcast” and then the sended message. Not sure if there is a way to send the message directly? When I just say the “send broadcast” and speak out my message, it’s get broadcasted right away without the default welcome text.

1 Like

Google Assistant SDK: TTS for response playback by tronikos · Pull Request #85416 · home-assistant/core · GitHub will allow playing back assistant’s response on any media player.

Sorry there is currently no way to disable “Incoming broadcast. It says …”.

Since 2023.2 release the service call takes media_player. Example from the documentation at Google Assistant SDK - Home Assistant

# Say a joke on the living room speaker
service: google_assistant_sdk.send_text_command
data:
  command: "tell me a joke"
  media_player: media_player.living_room_speaker
1 Like

Excellent work @tronikos, thank you for it!

I assume this is on Google, but some things are not working, is there a list somewhere of what’s not working? For example:

  • I tried to trigger a custom routine, it didn’t pick it up and assumed I was querying something instead for which it gave me a response
  • I tried “tell me a joke”, it worked
  • I tried triggering my good morning routine and that did trigger, however that routine contains a few things, of which:
    – greeting worked
    – telling the weather worked
    – triggering a script in HA (which is connected to Google Assistant and the script is exposed, it works when triggering the routine via voice) did not work
    – playing the news did not work (and Google informed me this is not supported, unlike with the script)

(apologies couldn’t test earlier)

The HA script activation doesn’t bother me too much since, if I’m triggering the routine from HA anyway I can just call the script from HA instead of from the routine :slight_smile: (and in my case I don’t need to be able to call the same routine via voice), but I would like to be able to get the news to play ideally.

But with that said, I wanted to just list out the results of my test and see if it’s a bug, a missing feature on Google’s side, missing feature on the integration side, planned to be implemented, not planned, … :slight_smile:
And thank you again for all the hard and good work!

There isn’t an exhaustive list. The ones I know that aren’t working are: media controls (except news, relaxing sounds, and podcasts), routines, and personal results. I have a PR to allow personal results but the other ones are on Google side and there is nothing I can do.

1 Like

Are podcasts working for people? For example I want it to play latest episode of Conan O’Brien Needs a Friend podcast but having no luck.