Dear Community, I am trying to randomize certain tts announcements and I created the following action in the automation:
service: tts.amazon_polly_say
data:
entity_id: media_player.tv_room_speaker
message: >-
{{[ 'Good morning . temperature outside is '{{states(‘sensor.openweathermap_current_temperature’)| round(0) }}‘degree’,
'Hello there . currently it is ‘{{states(‘sensor.openweathermap_condition’) }}’,
]|random }}
cache: false
But I get this error:
Message malformed: template value should be a string for dictionary value @ data[‘action’][2][‘data’]
The sensors itself work well but not when trying to randomize them. I’m sure I’m missing a quote somewhere or something like this. Read through a couple of posts here but can’t figure it out.