blueprint:
  name: Announce
  description: A script that announces a message on a media player using text-to-speech.
  domain: script
  input:
    text_to_speech_engine:
      selector:
        entity:
          domain:
          - tts
          multiple: false
      name: Text-to-Speech engine
    media_player:
      selector:
        entity:
          domain:
          - media_player
          multiple: true
      name: Media Player
  source_url: https://community.home-assistant.io/t/announce-text-to-speech-on-media-player/699186
mode: queued
fields:
  message:
    selector:
      text:
        multiline: true
    name: Message
    description: The message to broadcast
    required: true
sequence:
- service: tts.speak
  data:
    media_player_entity_id: !input media_player
    message: '{{ message }}'
  target:
    entity_id: !input text_to_speech_engine
