Hi everybody,
can you please help me fix my template? I am trying to create a card that will allow me to
- Input some text
- select a device
- have the selected device speak this text
This is the code
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_text.helper_ttstext
- entity: input_select.helper_tts_devices
title: Alexa Jonna
show_header_toggle: false
- type: 'custom:button-card'
entity: input_text.helper_ttstext
name: Abschicken
tap_action:
action: call-service
service: notify.alexa_media
service_data:
target: |
[[[
states('input_select.helper_tts_devices').state;
]]]
message: |
[[[
states('input_text.helper_ttstext').state;
]]]
data:
type: tts
Previously I had only one single media_player
entity hard coded into this; this used to work. I also used this instead of the code above
message: "{{ states('input_text.helper_ttstext') }}"
I tried using the same kind of syntax for target
, but no success. So I looked at the button-card
docs and changed to this syntax in the code quoted first.
Can you please help me fix my code so that I can pick text and device and send it from lovelace?
Thank you in advance for your help