#"Message malformed" for automation yaml

1 messages · Page 1 of 1 (latest)

stiff atlas
#

I am trying to set up text-to-speech for my alexa integration. I have the following code which should work according to me and according to ChatGPT:

action:
  - service: notify.alexa_media
    data:
      target:
        - media_player.my_echo_dot
      message: "Hello! This is a test message from Home Assistant."
      data:
        type: "tts"

But upon saving the automation I get Message malformed: value should be a string for dictionary value @ data['actions'][0]['action'] and Error in describing action: n.action.split is not a function or its return value is not iterable
Am I just blind for not seeing something obvious that is wrong with my code?

dense halo
#

Can you share the whole automation?

south sluice
#

And do you have the Alexa Media Player custom integration installed already?

stiff atlas
stiff atlas
# dense halo Can you share the whole automation?

thank you, this message solved it. I put the block above into the action yaml, not the automation yaml. So the automation yaml looked like

action:
  - action:
      - service: 
....```
which obviously doesn't work