Help setting up alexa tts card

nope, well i dont notice anything happening anyway, i tried that before and nothing happened

Using the “Run Script” button should generate a debug trace if the script runs at all… Is there a trace available when you click the Trace button or does it say something like “No traces found”?

Also, have you tried it with the selector set to a non-Show device, just a plain Echo or Dot?

1 Like


theres this

image
and still this when i seleced a difrrent device

i also got this for the run command / ask question but i dont think this is important for the tts so i will ignore it for now
image

i had hoped it might be alexa needs to discover them so i did a discovery and it found the scipts but its defiantly within home assistant

Click “Trace timeline” and see if there’s an error and which step it is occurring at.

1 Like

image
i was going to mention in the thing it said it was turned off for some reason could it be that?

nevermind i just realised its on then off

Okay, there’s something weird going on… Here’s what mine looks like:

image

Notice how the entities in yours are missing their underscores and one of them does not match the script configuration you showed alexa_state vs. alexa selection.

I think it might be best to delete the script, restart HA, then re-create the script.

1 Like

ok then did a new script and noticed the id is not right so what evactly should i cangge it too

image

script.send_alexa_announcement

1 Like

ok yep i had a feeling so should i run it to test it through the script? try it through the card?

Either way…i guess through the script editor is more direct.

1 Like

still nothing it seems

and
image

ok an update the top command / ask question works on the card for all devices —the tts works if run manually in the script (but only for the echo show trying to change it to the dot via the card and run tts through the script doesn’t happen at all) but the card is not detecting the tts script still

(i also changed it from announce to tts so no bongs before the announcemnnt)

good news i have gotten it all up and running just to figure out how to gget rid of the “call Alexa script”./ play button on the bottom left

unfortunately i cant manage to sort the buttons the way i like but its cool cause it all works, except it refuses to run any groups i make i have set up a media player group with two Alexa devices but any time i run it with the group selected neither of the devices speak any ideas??

I actually had a slightly different approach: instead of a sensor, I convert an “input_select” helper value to a string:

              target:
                - "{{(states('input_select.alexa_device'))|string}}"

Also I run this via an automation triggered by a button on a dashboard, and specifically checking whether I run it for a group or an individual device: for a group you have to use the “announce” method, while individual ones are fine with “tts”.

And adding a whisper toggle is a nice touch I think

alias: Dashboard - Alexa Says
description: ""
trigger: []
condition: []
action:
  - if:
      - condition: or
        conditions:
          - condition: state
            entity_id: input_select.alexa_device
            state: Downstairs
          - condition: state
            entity_id: input_select.alexa_device
            state: Downstairs and Basement
          - condition: state
            entity_id: input_select.alexa_device
            state: Everywhere
          - condition: state
            entity_id: input_select.alexa_device
            state: Upstairs
    then:
      - if:
          - condition: state
            entity_id: input_boolean.whisper
            state: "on"
        then:
          - service: notify.alexa_media
            data:
              target:
                - "{{(states('input_select.alexa_device'))|string}}"
              message: >-
                "<amazon:effect
                name='whispered'>{{states('input_text.alexa_says')}}</amazon:effect>"
              data:
                type: announce
                method: all
        else:
          - service: notify.alexa_media
            data:
              target:
                - "{{(states('input_select.alexa_device'))|string}}"
              message: "\"{{states('input_text.alexa_says')}}\""
              data:
                type: announce
                method: all
    else:
      - if:
          - condition: state
            entity_id: input_boolean.whisper
            state: "on"
        then:
          - service: notify.alexa_media
            data:
              target:
                - "{{(states('input_select.alexa_device'))|string}}"
              message: >-
                "<amazon:effect
                name='whispered'>{{states('input_text.alexa_says')}}</amazon:effect>"
              data:
                type: tts
                method: all
        else:
          - service: notify.alexa_media
            data:
              target:
                - "{{(states('input_select.alexa_device'))|string}}"
              message: "\"{{states('input_text.alexa_says')}}\""
              data:
                type: tts
                method: all
mode: single

1 Like