Setting Volume level for Google Home in Automation announcement

I have the following action as part of an automation but it’s doesn’t seem to be bumping up the volume properly (50% max is what I am after). What am I doing wrong?

  action:
    - service: media_player.volume_set
      data:
        entity_id: media_player.master_bedroom_home
        volume_level: '0.5'
    - service: tts.google_say
      entity_id: media_player.master_bedroom_home
      data_template:
        message: >
          it's time to get up!  Wake up! wake up! wake up!

Try it like this, with data_template: instead of data:, and volume_level: value without quotes.

  action:
    - service: media_player.volume_set
      data_template:
        entity_id: media_player.master_bedroom_home
        volume_level: 0.5
    - service: tts.google_say
      entity_id: media_player.master_bedroom_home
      data_template:
        message: >
          it's time to get up!  Wake up! wake up! wake up!
12 Likes

BINGO!!! That did it! Thank you!

Great, anytime, cheers!

1 Like

This worked for me too but I can’t seem to make it go to a high volume for the notifications and then drop the volume after to a comfortable level. It keeps the volume at 0.9 which is what the announcement should be at. O

Are you able to resume the previous playing media after the TTS Message?

Can you post your config?

Only asking, because, I use Sonos which has the snapshot service available.

Try out the google notification from node-red. You can choose your announcement volume and it restores after announcement the original volume.


You can setup cache mode, thus each announcement is cached and no internet connection is needed for the same announcement.
2 Likes

Hi @OM_luxbg , i like your suggestion. I would like to use an announcement when the doorbell is pressed. This needs to be at a higher volume then the regular volume. I can’t seem to find this option in my node red. I am running home assistant in supervisor mode. Do i need to add this specific function to node red? And if so, how can i do that? BTW i’m running in a docker in Raspbian.

you have to setup a variable “emitVolume” on the msg.

here you can find the detailed setup instructions. github link

You can also import to nodered this code section as a sample

[{"id":"2a4252c0.5c4fce","type":"subflow","name":"GoogleHomeNotification","info":"","in":[{"x":50,"y":30,"wires":[{"id":"2e760d93.791962"}]}],"out":[]},{"id":"5ae262d6.e988ac","type":"switch","z":"2a4252c0.5c4fce","name":"GoogleNotifyDestination","property":"destination","propertyType":"msg","rules":[{"t":"eq","v":"living","vt":"str"},{"t":"eq","v":"bureau","vt":"str"},{"t":"eq","v":"all","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":450,"y":260,"wires":[["d4c7c0cb.b476e"],["33e2797c.5b5606"],["d4c7c0cb.b476e","33e2797c.5b5606"]],"outputLabels":["Google Home","Google Home mini",""]},{"id":"d4c7c0cb.b476e","type":"googlehome-notifier-offline","z":"2a4252c0.5c4fce","server":"da212a5d.597b08","name":"Google Home","x":800,"y":180,"wires":[]},{"id":"33e2797c.5b5606","type":"googlehome-notifier-offline","z":"2a4252c0.5c4fce","server":"ebe165de.892128","name":"Google Home Mini","x":790,"y":320,"wires":[]},{"id":"2e760d93.791962","type":"change","z":"2a4252c0.5c4fce","name":"","rules":[{"t":"set","p":"cacheFolder","pt":"msg","to":"d:\\tmp\\GHCache","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":260,"wires":[["5ae262d6.e988ac"]]},{"id":"da212a5d.597b08","type":"googlehome-config-node-offline","z":"2a4252c0.5c4fce","ipaddress":"192.168.20.194","name":"Google Home","language":"fr"},{"id":"ebe165de.892128","type":"googlehome-config-node-offline","z":"2a4252c0.5c4fce","ipaddress":"192.168.20.197","name":"Google Home Mini","language":"fr"},{"id":"3f60aa46.aa4026","type":"subflow:2a4252c0.5c4fce","z":"c348d271.07631","name":"","env":[],"x":910,"y":360,"wires":[]},{"id":"8c73b93b.3db918","type":"change","z":"c348d271.07631","name":"","rules":[{"t":"set","p":"destination","pt":"msg","to":"all","tot":"str"},{"t":"set","p":"emitVolume","pt":"msg","to":"50","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":360,"wires":[["3f60aa46.aa4026"]]},{"id":"fb06ce90.3001b","type":"inject","z":"c348d271.07631","name":"","topic":"","payload":"ceci est un test","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":360,"wires":[["8c73b93b.3db918"]]},{"id":"4a281a.8a2917e8","type":"inject","z":"c348d271.07631","name":"","topic":"","payload":"ceci est un test","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":540,"wires":[["ccef16e8.5ee2d8"]]},{"id":"ccef16e8.5ee2d8","type":"change","z":"c348d271.07631","name":"","rules":[{"t":"set","p":"emitVolume","pt":"msg","to":"50","tot":"str"},{"t":"set","p":"cacheFolder","pt":"msg","to":"D:\\tmp\\GHCache","tot":"str"},{"t":"set","p":"fileServerPort","pt":"msg","to":"8098","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":540,"wires":[["429d4f1d.2d91c"]]},{"id":"429d4f1d.2d91c","type":"googlehome-notifier-offline","z":"c348d271.07631","server":"b8b08a71.387228","name":"","x":900,"y":540,"wires":[]},{"id":"9f10712d.fc031","type":"comment","z":"c348d271.07631","name":"direct notification flow to a single google device","info":"","x":340,"y":500,"wires":[]},{"id":"1a676c3c.0a0bc4","type":"comment","z":"c348d271.07631","name":"indirect notification flow using a node red subflow \"Google Home Notification\" addressing multiple google devices at the same time","info":"","x":590,"y":320,"wires":[]},{"id":"b8b08a71.387228","type":"googlehome-config-node-offline","z":"","ipaddress":"192.168.20.194","name":"","language":"fr"}]

Thanks, will try that. I am still waiting on my smart doorbell hardware i ordered on Ali. :roll_eyes:
Will try this when i receive it!