Can somebody help me how to get my widget functioning with a variable
When i leave out variable ‘zin’ the script works and speaks the default sentence this is a test
When i add a variable for the sentence in the widget it does not work
When i choose to directly call the service with script.id it also works…
My widget
service.turn_on
entity ID script.spraak
i added a field 'zin'
with content: 'this is my speech sentence'
My script
alias: test
variables:
zin: "{{ zin if zin is defined else \"dit is een test\" }}"
mplayer: "{{ mplayer if mplayer is defined else \"media_player.alarmspraakbeep\" }}"
sequence:
- service: tts.google_translate_say
data:
entity_id: '{{mplayer}}'
message: '{{zin}}'
cache: true
language: nl
icon: mdi:home
mode: single
logbook
poLogger: homeassistant.components.mobile_app.webhook
Source: components/mobile_app/webhook.py:292
Integration: Mobiele app (documentation, issues)
First occurred: 16:33:08 (19 occurrences)
Last logged: 17:40:06
Error when calling service during mobile_app webhook (device name: SM-S901B): expected a dictionary for dictionary value @ data['variables']
Error when calling service during mobile_app webhook (device name: SM-S901B): extra keys not allowed @ data['zin']