#Problem with Buttoncard and tapaction

1 messages · Page 1 of 1 (latest)

waxen sphinx
#

Doen anyone know why my tap_action just echos whats written inside the brackets and not what the template returns?
btw: it works fine in devtools

type: button
show_name: true
show_icon: true
tap_action:
action: perform-action
perform_action: tts.speak
target:
entity_id: tts.home_assistant_cloud
data:
cache: false
media_player_entity_id: media_player.nestaudio1262
message: >-
{{
state_attr('sensor.saalfeld_wetterbericht_2', 'data') | replace('*', '') |
replace('#', '')
}}
name: Wetterbericht
icon: mdi:play
icon_height: 48px
show_state: false

chilly shell
#

Core cards don't use templates

hidden crystalBOT
#

@waxen sphinx To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

chilly shell
#

If you wrap that action in a script, and then execute the script, it will work that way.