Hello everyone, I would like to send TTS to Alexa directly on the dashboard text input field. Does somebody has any idea? something like in the photo
here’s an automation that will play what’s in an input_text.
just create a card that points to your input_text helper.
i’m using the alexa media hacs extension:
alias: test alexa say input_text
description: ""
trigger:
- platform: state
entity_id:
- input_text.test_alexa_text
condition: []
action:
- service: notify.alexa_media_study_2
metadata: {}
data:
data:
type: announce
message: "{{ trigger.to_state.state }}"
mode: single
thanks, strange I get the following error message
Configuration errors detected:
No type provided.
that’s an automation, not a frontend card.
sorry @axl2000 maybe i presumed too much knowledge about it…for the front end i said:
but here’s the card yaml if you need.
type: entities
entities:
- input_text.test_alexa_text
be sure to create the input_text helper (i called it test_alexa_text )
then create an automation and put the code from my first post in the automation.
I have something like that using the custom Text-input-row, a few helpers, and some scripts. The setup details can be found in this gist
All of the scripts could be combined, but I have kept them separate in case people wanted to use just the TTS part or just the command part.
Thank you very much, I actually should have known it myself
Do you also have a solution??
I would like to make the tts_text also with an Input.boolean text field.
tts_text: >- The alarm has been triggered
service: notify.mobile_app_sm_g998b
data:
message: TTS
data:
ttl: 0
priority: high
media_stream: alarm_stream_max
tts_text: >-
Der Vor Alarm wurde ausgelöst
sorry i don’t understand.
can you modify your code to indicate what you would want it to do? (even if it doesn’t work, i may be able to better understand what you’re trying to do)
I would like to replace this part with an input.boolean text field
tts_text: >-
Are you inquiring about actionable notifications on your phone…
Or are you asking how to get the state of the input_boolean
into the spoken message?
you mean like this?
service: notify.mobile_app_sm_g998b
data:
message: TTS
data:
ttl: 0
priority: high
media_stream: alarm_stream_max
tts_text: >-
{% if states('input_boolean.testbool') == 'on' %}
Der Vor Alarm wurde ausgelöst
{% else %}
Der Vor Alarm wurde gelöst
{% endif %}
i would like to get the state of the input_boolean into the spoken message
I would like to have an input text field on the dashboard that I can use to send loud messages to my mobile.
tts_text: HERE THE INPUT.TEXT HELPER
Then you need to use a template like @armedad showed, but with the appropriate entity information.
service: notify.mobile_app_sm_g998b
data:
message: TTS
data:
ttl: 0
priority: high
media_stream: alarm_stream_max
tts_text: >-
{{ states('input_text.YOUR_ENTITY') }}
Oh… ok. You had said input_boolean instead of input_text above. That confused me
genau
Thank you very much, that’s exactly what I meant
sorry, I expressed myself incorrectly. thank you too