TTS message

In future please format your config for the forum: https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16 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')