I’m using the following in an automation to pass ‘speaker’ , ‘message’ and ‘title’ to a script for notifications.
AUTOMATION:
- service: script.notifications
data:
speaker: 'media_player.downstairs'
message: 'The sauna has been turned on. Temperature is {{ states.sensor.sauna_temperature.state }}°C'
title: 'Spa:'
SCRIPT:
notifications:
alias: 'Notifications'
sequence:
- service: tts.google_say
data_template:
entity_id: "{{ speaker }}"
message: "{{ message }}"
- service: notify.lounge_tv
data_template:
message: "{{ message }}"
- service: notify.mobile_app_ash_iphone
data_template:
title: "{{ title }}"
message: "{{ message }}"
This works great for the notification appearing on my phone and TV but google reads the whole thing instead of saying the temperature.
I understand why it is doing this but is there a workaround to have google say the number rather than read out the template?