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?
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?
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:
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%.
FYI the original didn’t work for me as it still made the “wakeup” chime sound after the choose action. I had to add 1 second long delay after the second mute in the sequence and then it works (you could still hear the chime sound very little when waiting just 800ms).
It looks like you probably didn’t use the script as an action in an automation. When you do that, you select the target and the media file. I Tested it and it works ok, I still hear a little tone if the speaker was idle. There is a little delay but not too bad. I wish there was a way to just directly play an audio file using the Google Assistant SDK instead of casting.
I know this is an older thread, but I’m wondering if anyone has figured out how to mute the beep from the Nest Mini when the volume gets adjusted. OP’s script for muting the power-on chime worked perfectly, but I’m still left with the volume blip.
Hello! Thanks for the script. I put in a silent mp3 and it plays, but you can still hear a volume adjustment sound, a small beep sound. How else could this be turned off?
As far as I know, this is native to the Nest mini speaker, as it’s the same sound when manually adjusting the volume using the touch buttons on the speaker.
If there were any hope of disabling that, I’d look at native solutions in the speaker to do so, or search for info regarding the Nest mini speaker, completely outside of Home Assistant. At a glance from the speaker settings itself, I’m not able to find anything. But I’d be curious to know if someone else is able to dig up any info on this.
I wasn’t sure of the issue at first but taking another look at this I think I may know what’s going on. It appears as if you are filling out the script from the script edit page. The script is meant to be used within other automations or scripts and the fields are filled out within the automation. Doing so should ensure the fields are filled out correctly.
I did notice a bug which I’ve edited. volume: required should be set to true, not false, as all fields need to be filled out.