Using the Google Assistant SDK to broadcast from dashboard

Hey All

I love the TTS setting available from the dashboard. I select the speaker, select the TTS, type the message, and it broadcasts. Only issue is if media is playing, it stops.
I discovered the Google Assistant SDK can broadcast without interruption, and it works great, but the integration is a bit tough.

Right now I have a script that calls the service notify.google_assistant_sdk and sends my message. Only issue is I have to edit that script each time to change the broadcast message and the target speaker. Is there any way to integrate this better into home assistant. Ideally I press the button and it gives me the option to modify the script before executing.

Thanks in advance

Share the script you have now please.

Just a simple script made in the visual editor

alias: Broadcast
sequence:
  - service: notify.google_assistant_sdk
    data:
      message: "Open the door please"
      target: Den
mode: single
icon: mdi:message-alert

I basically have to modify the message and target manually from the script editor. If I could have a dialog box right from the dashboard it would be much easier.

Managed to build a basic one using

type: entities
entities:
  - input_text.message
footer:
  type: buttons
  entities:
    - entity: script.broadcast
      show_icon: true
      show_name: true

not the greatest but at least I got the function down

I’m using GitHub - bernikr/lovelace-notify-card: Send notifications directly from the dashboard
and I have the following card in my dashboard:

type: custom:notify-card
target: google_assistant_sdk
label: message
card_title: Broadcast

@tronikos is there a way of adding a drop-down menu to select where to broadcast? Basically, I want "Hey Google," then: "Broadcast to [room name] [message]."

I’m not aware of any custom card that allows this. Your could achieve what you want with a dropdown helper, text helper, and a button/script. Or you can just type: “to [room name] [message]” in the custom:notify-card.

I’m listening to music at 50%, for example, and I want to hear the notification at 100% and then resume playback at 50%. It’s possible?

You’d have to have your script include changing the volume. Not sure if it will resume playback after a volume change but I would think so

Anyone know if there’s a way to do this without the “Incoming broadcast, it says…” prefix?

3 Likes

You’d need to use TTS. Google broadcast will always start with that