I am trying out the sonos_say example script from here. I have copied and pasted the script into my configuration.yaml with the only change is that I am using service: tts.google_translate_say.
In my ui-lovelace.yaml I have added an entity button to be able to call the script.
- type: entity-button
entity: person.emil
tap_action:
action: call-service
service: script.sonos_say
data:
sonos_entity: media_player.kitchen
volume: 0.50
message: 'Testing!'
delay: '00:00:05'
However, when I click on the entity-button in Lovelace, I get a notification in the down left corner saying:
"Failed to call service script/sonos_say. not a valid value for dictionary value @ data['entity_id']"
If I go into the script and change “{{ sonos_entity }}” to media_player.kitchen, the notification instead says
"Failed to call service script/sonos_say. expected float for dictionary value @ data['volume_level']"
So if I in the script change:
"{{ volume }}" to 0.5
"{{ message }}" to "Test"
"{{ delay }}" to '00:00:05'
and then click on the entity-button, it all works! So my guess here is that there is something with the way I pass the arguments to the script.
Can somebody help me to figure out what I am doing wrong?