Disable Google Home casting sound

Never thought of muting it instead of setting volume to 0%. Both methods do work as intended, though muting will restore the state of the previous volume, which can be convenient. Will try it out.

I think we will have to live with the volume boop sound effect, there’s no setting to disable it from Google’s end.

Where does $PLAYER come from? Is this a parameter from a automation service call? Parameter are in {{ }} so I don’t understand.

$PLAYER is just a placeholder for your media_player entity

2 Likes

Hello, I was wondering if there has been any update to this? I’ve currently set my similar script automation up, and I can’t get rid of the new speaker startup sound that google has set. It sounds different than the old chime, so I was wondering if you are having any issues with this now, or this work-around is still working for you?

I’ve got it set up and working as a script, and it does work, but it doesn’t stop the google start-up chime, just mixes in with it.

Hello, could someone explain how or where i could use this code snippet? I’d like to get rid of that sound also

Have you, has anyone tried this with a list of media players or with a google generated group of players?
I’m going to play with that today unless someone else has advice…
Want to incorporate it in my blueprints hopefully.
https://community.home-assistant.io/t/script-blueprint-for-google-translate-say-and-tts-cloud-say-message-not-an-automation-blueprint/333199

Update, I’ve given up. It seems that it will only work if you keep the speakers in playing mode all the time.
Also My speakers never appear to go into idle mode, just off and playing…
Someday maybe…

Oh, the set volume to zero I think only works if you set that to very low volume, volume 0 = mute and that changes the behavior. I have me speakers set to all kinds of levels for different areas, so unless I can capture that I’m not going there.

1 Like

I’ve added the script and created an automation which starts the script, however it only works if the Google Home is in idle, and not off. Anyone know what could be the problem here?

I can’t seem to get either examples to work - regardless, the chime plays… has anyone gotten this to work?

Like @Poyaan says, this only seems to work if the Google devices is in IDLE state but most of the time, these devices should be in OFF state?

Also, getting IDLE state for a Google Audio Group doesn’t seem to work, but that is a separate issue.

I can’t even find idle. All I see is playing and off.

This seems to work for me even if the media_player is off

EDIT: It works for TTS but not if you play media for some reason. I hear a little part of the chime but not all of it.

alias: Disable GA chime test
sequence:
  - service: media_player.volume_set
    data:
      volume_level: 0.005
    target:
      entity_id: media_player.sovrum_hogtalare
  - service: tts.google_translate_say
    data:
      entity_id: media_player.sovrum_hogtalare
      message: TEST TEST TEST
      language: sv
  - service: media_player.volume_set
    target:
      entity_id: media_player.sovrum_hogtalare
    data:
      volume_level: 0.3
mode: single

EDIT2: I have this old script used as a wake up radio. Here I don’t here the chime at all even if the entity is off. Maybe if one but some silence in the clip to play and just slowly turns the volume up it would help?

alias: 📻 Wake up radio
sequence:
  - service: media_player.volume_set
    data:
      volume_level: 0.005
    target:
      entity_id: media_player.sovrum_hogtalare
  - service: media_player.play_media
    data:
      media_content_id: https://sverigesradio.se/topsy/direkt/132-hi-mp3.mp3
      media_content_type: music
    target:
      entity_id: media_player.sovrum_hogtalare
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - repeat:
      while:
        - condition: template
          value_template: >-
            {{ state_attr('media_player.sovrum_hogtalare','volume_level') |
            float(0)< 0.10 and
            is_state('media_player.sovrum_hogtalare','playing') }}
      sequence:
        - service: media_player.volume_set
          data:
            volume_level: >
              {{ state_attr('media_player.sovrum_hogtalare',
              'volume_level')|float + 0.005 }}
          target:
            entity_id: media_player.sovrum_hogtalare
        - delay:
            hours: 0
            minutes: 1
            seconds: 30
            milliseconds: 0
  - delay:
      hours: 0
      minutes: 30
      seconds: 0
      milliseconds: 0
  - service: media_player.media_stop
    target:
      entity_id: media_player.sovrum_hogtalare
mode: single

How do you handle the equivalent of wait_template

My trigger that started it was when the speaker goes to idle:
image
I just used the Events: State node.

Its easy mute this sound in Nodered. If you want play sound, do 2 action paralel together.

  1. set up volume to zero and let the sound play.
  2. wait until player status is “playing” and in this moment set uo volume to desired value.

4 Likes

How are you using this? Do you add the script to the start of the actions for any automation casting to a Google speaker? Or is there a way to integrate this more generally you you don’t need to add it to each automation using a Google speaker?

The “wait for idle” step doesn’t progress. Is this still working for others?

THis works pretty well for a single speaker but not when broadcasting to a group.

alias: Disable GA chime test
sequence:
  - service: media_player.volume_set
    data:
      volume_level: 0.005
    target:
      entity_id:
        - media_player.downstairs_speakers
  - service: tts.google_cloud_say
    data:
      entity_id: media_player.downstairs_speakers
      message: helloooooo there.  This is a test of the broadcast.
  - service: media_player.volume_set
    data:
      volume_level: 0.3
    target:
      entity_id: media_player.downstairs_speakers
mode: single

Actually, it may be because of the lawsuit with Sonus and this:

1 Like

This does though. I now mirror my google speaker groups into HA groups (annoying but they don’t change much) and use those to drive the volume changes. Works most of the time. maybe 90%.

alias: TTS No Interrupt
sequence:
  - service: media_player.volume_set
    data:
      volume_level: 0.001
    data_template:
      entity_id: |
        {{ expand(target)| map(attribute='entity_id') | join(', ') }}
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 300
  - service: tts.google_cloud_say
    data:
       message: |
         {{message|default('Test Message',true) }}
    data_template:
      entity_id: |
        {{target.replace('group.','media_player.')}}
  - service: media_player.volume_set
    data:
      volume_level: |
        {{ volume | default('0.5') }}
    data_template:
      entity_id: |
         {{ expand(target)| map(attribute='entity_id') | join(', ') }}
mode: parallel
fields:
  message:
    description: Message to send
    example: This is a message
  target:
    description: The group/entity to broadcast to
    example: group.downstairs_speakers
  volume:
    description: Specify target volume
    example: 0.5
3 Likes

Hi @keithcroshaw,

Where you able to disable chime using a node in node-red? If you did could you share how you did it?

Remind me.

It didn’t really work. Often it would fail to turn the volume back up before TTS. That was a while ago. Used to it now.