#Speak content of input_text

1 messages · Page 1 of 1 (latest)

tough nymph
#

I'm trying to make what I think should be a simple horizontal-stack card with one box for entering some text, and the other a button to say the entered text. This is what I have.

type: horizontal-stack
cards:

  • type: entity
    entity: input_text.say_what
  • show_name: true
    show_icon: true
    type: button
    tap_action:
    action: perform-action
    perform_action: tts.speak
    target:
    entity_id: tts.piper
    data:
    cache: true
    media_player_entity_id: media_player.vlc_telnet
    message: "{{ input_text.say_what }}"
    entity: input_button.say_it
    layout_options:
    grid_columns: 4
    grid_rows: auto
    title: What to say?

I have helpers for the button and the input text, and it works except it says "input_text.say_what " instead of speaking the contents of input_text.say_what. Please help.

glacial lance
#

"{{ states('input_text.say_what') }}"

tough nymph
#

Ooh, I'll give that a try when I get the chance, thank you!

foggy scroll
#

Card actions almost never accept templates. Put the templated action in a script and call the script from the card action.

robust vessel
#

That is what I use to accomplish what I belive you're asking