Help with TTS on Google Home

Having discovered that I can use TTS to trigger voice messages on my Google Home speakers, I’m trying to set up a simple automation to do the same.

If I change my config to look like this I lose the ability use TTS to my Google Home speakers from the HA GUI (i.e. nothing happens when I type text and hit the send button):

tts:
  - platform: google_translate
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300
    base_url: http://192.168.0.37:8123
    service_name: google_say

If I have a barebones definition in my config I can send TTS to the Google Home speakers without any problem:

tts:
  - platform: google_translate

I’m running HA 2021.7.4 in a Docker container on a Lubuntu 18.04 VM.

Am I trying to do something which is not possible with Google Home devices?

It’s perfectly possible, but as the barebones config works I would ask why you need the additional info and the url option is not required as it will default to your base ip if excludes.

Also there is limited value to caching the files and if you want to you can set the cache option via the IU each time you use the TTS service

What I want to do is trigger the TTS to Google speakers from an automation - the article below suggested that I needed to define a local base URL in order to achieve this:

Have I misunderstood the advice in that article?

If you are accessing HA using the IP address http://198.xx.xx.x:8123 and not by the hostname http://ha:8123, you do not need to.

tts:
  - platform: google_translate
    language: 'xx'
    cache: false

You can create notify and use it in automation.

notify:
  - platform: tts
    name: google_home
    tts_service: tts.google_translate_say
    media_player: media_player.living_room_display

Thanks for that - I have it working in a basic way now, using the hostname.
I wasn’t aware of the ability to declare a notify: element like that - how would I use that in the action clause of an automation?
Also, what would the syntax be if I wanted to send the notification to two different media_players?

Thank you so much.

I use for one player in automation.
Example of action in automation

  action:
  - service: notify.google_home
    data:
      message: The time now is {{states('sensor.time')}}

For multiple players, you will need to use the Text-to-Speech (TTS) procedure above.