#Example 1: Play mp3 file stored on LMS server on multiple squeezebox players
automation:
  - alias: "Play kitchen/bedroom alert on gate opened"
    trigger:
      - platform: state
        entity_id: binary_sensor.gate
        to: 'on'
    action:
      - service: hassio.addon_stdin
        data:
          addon: local_squeezebox_alert
          input:
            playlist_name: "kitchen"
            mac: "00:01:02:03:04:05"
            alert_song: "//path//to//mp3//on//lms_server//beep_the_gate_is_open.mp3"
            alert_volume: 65
      - service: hassio.addon_stdin
        data:
          addon: local_squeezebox_alert
          input:
            playlist_name: "bedroom"
            mac: "00:01:02:03:04:06"
            alert_song: "//path//to//mp3//on//lms_server//beep_the_gate_is_open.mp3"
            alert_volume: 65

#Example 2: Play TTS audio alert on squeezebox player
  - alias: "Play tv lamp alert"
    trigger:
      - platform: state
        entity_id: switch.tv_lamp
        to: 'on'
    action:
      - service: homeassistant.turn_on
        entity_id: script.play_light_on_alert_in_kitchen 

media_player:
  - platform: squeezebox
    host: 192.168.1.100
    port: 9000
    username: user 
    password: pass

tts:
  - platform: google
    cache: true
    cache_dir: /config/tts
    time_memory: 300

script:
  play_light_on_alert_in_kitchen:
    alias: "Play light alert"
    sequence:
      - service: hassio.addon_stdin
        data:
          addon: local_squeezebox_alert
          input:
            playlist_name: "kitchen"
            mac: "00:01:02:03:04:05"
            alert_volume: 65
      - delay: 
          milliseconds: 200
      - service: tts.google_say
        entity_id: media_player.kitchen
        data:
           message: 'The TV lamp is on!'
