Alexa TTS not working

I 'm trying to get Alexa TTS working in a script. I use the same lines of code in the services tab, but when placed in the scrip it does not work. Any help work be nice, Thx. See examples below.

Service tab:

message: Hello dear friends from around the World!,
data:
type: tts
target: media_player.kitchen

Script:

alias: 'Send notification when alarm triggered'
trigger:
  - platform: state
    entity_id: alarm_control_panel.home_alarm
    to: 'triggered'
action:
  - service: notify.mobile_app_daves_new_iphone
    data:
      message: "ALARM! ALARM! The alarm has been triggered"
  - service: notify.alexa_media
    message: Hello dear friends from around the World!,
    data:
      type: tts
    target: media_player.kitchen

This is the code of the automation I use to announce someone ringing the doorbell.

Hope it helps.

alias: Suoneria Citofono
description: ''
trigger:
  - device_id: 3c63c79617fd138533bd5fe7472a18f7
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: button_1
condition: []
action:
  - device_id: f54a02af11b8f01662c0a8fd8c095540
    domain: mobile_app
    type: notify
    message: C'è qualcuno al citofono...
    title: Doorbell DB1
  - service: media_player.volume_set
    data:
      entity_id:
        - media_player.echo_cucina
        - media_player.echo_camera_genitori
        - media_player.echo_bagno_genitori
        - media_player.echo_camera_bimbe
        - media_player.echo_portico
        - media_player.echo_locale_caldaia
        - media_player.echo_mansarda
      volume_level: 0.6
  - service: notify.alexa_media
    data:
      target:
        - media_player.echo_cucina
        - media_player.echo_camera_genitori
        - media_player.echo_bagno_genitori
        - media_player.echo_camera_bimbe
        - media_player.echo_portico
        - media_player.echo_locale_caldaia
        - media_player.echo_mansarda
      data:
        type: tts
        volume_level: 3
      message: C'è qualcuno al citofono...
  - service: media_player.play_media
    data:
      entity_id: media_player.echo_cucina
      media_content_id: mostra video citofono
      media_content_type: custom
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
mode: single
2 Likes