Would you please review the following syntax and tell me how I can make it work? I don’t get any errors on the log when I trigger it but it is not working.
alexa_wakeup:
alias: Alexa Wake Up Message
sequence:
- service: notify.alexa_media
data_template:
target:
-media_player.alexa_dot_bedroom
data:
type: tts
message: ->
{%- set temp = states("sensor.irrigation_temperature") | int -%}
{%- set hum = states("sensor.irrigation_humidity") -%}
{%- if temp > 0 -%}
'{{ ["Buenos dias.","Good morning","Rise and Shine"] | random }} The time is {{ states("sensor.time") }} the temperature outside is {{ temp }} degrees. The humidity is {{ hum }} percent.'
{%- else -%}
'{{ ["Buenos dias","Good morning","Rise and Shine"] | random }} The time is {{ states("sensor.time") }} the temperature outside is {{ state_attr("weather.dark_sky","temperature") }} degrees. The humidity is {{ state_attr("weather.dark_sky","humidity") }} percent.'
{%- endif -%}