Google doesn't say the state

i’m playing with google_tts to let google say something over the home speaker.

I have the following script on my HA

'1591698737022':
  alias: Vertrektijd
  sequence:
  - data:
      language: nl
      message: De trein naar Amsterdam Zuid vertrekt om {{states('sensor.amsterdam_zuid')}}
    entity_id: media_player.home_speaker
    service: tts.google_translate_say

But her respons is: (in english:) The train to amsterdam zuid departs at state sensor amsterdam underscore zuid. So it reads what is says but not the state itself. Do I need to specify it differently? This is the way the google text to speech page of HA tells you to do it.

service: tts.google_translate_say
data_template:
  message: "Temperature is {{states('sensor.temperature')}}."
  cache: false

Have you tried using - data_template: instead of - data:? The quotation marks are also missing from your message but I’m not experienced enough to know if that matters.

Scratch that. It DOES work :slight_smile:

just took a while.

data_template:
without quotations

1 Like