alias: Awtrix Notification Spotify
description: ""
trigger:
  - platform: state
    entity_id:
      - media_player.spotify
    attribute: media_title
condition:
  - condition: not
    conditions:
      - condition: state
        entity_id: media_player.spotify
        state: idle
action:
  - service: mqtt.publish
    data:
      topic: AwtrixLight/notify
      payload: |-
        {"icon": 647,
         "repeat": 1,
         "text": "{{states.media_player.spotify.attributes.media_artist}} - {{states.media_player.spotify.attributes.media_title}}"
        }
mode: single