TTS to announce in 2 different languages in one script

Is it possible to have Ha play 2 different messages to 2 different alexa devices in one script? This is my current script. I wish to have ai_3 to play a different message in a different language.

  bedtime_notify:
    alias: Bedtime Notify
    sequence:
      - service: notify.alexa_media
        data_template:
          data:
            type: tts
          target:
          - media_player.ai_1
          - media_player.ai_3
          message: "The time is {{ now().hour }} {{ now().minute }}, she on go to bed."

just create two services, the first targets the ai_1 in one language and the second with ai_3 in the other language.

Ah. Thanks. That works too.

  bedtime_notify:
    alias: Bedtime Notify
    sequence:
      - service: notify.alexa_media
        data_template:
          data:
            type: tts
          target:
          - media_player.ai_1
          message: "<audio src='soundbank://soundlibrary/alarms/beeps_and_bloops/buzz_01'/>The time is {{ now().hour }} {{ now().minute }}, she on go to bed."
      - service: notify.alexa_media
        data_template:
          data:
            type: tts
          target:
          - media_player.ai_3
          message: "<audio src='soundbank://soundlibrary/alarms/beeps_and_bloops/buzz_01'/>ๆ™‚้–“ใฏ {{ now().hour }} {{ now().minute }}ใงใ™, ็ดซ่‹‘ใฏไปŠๅฏใ‚‹."
1 Like