TTS message

I’m trying to send a message to my phone via mobile app indicating the name of the wifi I’m connected to using the information stored in my mobile app, sensor.rafo_sm23_wifi_connection. I have tried several different things and I get the message but for the name I get an “unknown”. I know that I am missing something but can’t see it.

service: notify.mobile_app_rafo_sm23
metadata: {}
message: TTS
tts_text: Rafo desconectado de {{ states (" sensor.rafo_sm23_wifi_connection ") }}
language: es-us
priority: high

In future please format your config for the forum: Indentation is important and we can’t see it the way you have posted.

You have spaces where you shouldn’t and you have not quoted your single line template. Try this:

tts_text: "Rafo desconectado de {{ states('sensor.rafo_sm23_wifi_connection') }}"

Yuu can’t put spaces before the parentheses in functions like states()

Good: states('something')

Bad: states ('something')