Awtrix Spotify NowPlaying
Show the current artist/song title and progress bar.
About this flow
| System | Home Assistant |
|---|---|
| AWTRIX version | AWTRIX 3 |
| Topic | Smarthome |
| Built by | Hank_the_Tank |
| File | PepJd5xeAjWN.yaml · 1.5 KB |
| Icons | — |
| Published | 28 Jul 2023 · updated 20 Aug 2023 |
| Downloads | 30 |
Is this your flow?
If you created this flow, open your saved edit link to add it to your account. You can then manage it whenever you sign in. Adding it to your account replaces the edit link.
For this to work you need the Spotify Integration in HomeAssistant.
You can use other media_player entity_id´s (eg.media_player_sonos) but than the progress bar will not function correctly.
Lametric Icon ID:18207
PepJd5xeAjWN.yaml
alias: Awtrix Spotify NowPlaying 🎹
description:
trigger:
- platform: state
entity_id: media_player.spotify
action:
- choose:
- conditions:
- condition: state
entity_id: media_player.spotify
state: playing
- condition: state
entity_id: media_player.spotify
attribute: media_content_type
state: music
sequence:
- service: mqtt.publish
data:
qos: 0
retain: false
payload: |-
{
"text": "{{ state_attr('media_player.spotify', 'media_artist') }} - {{ state_attr('media_player.spotify', 'media_title') }}",
"icon": "18207",
"rainbow": true,
"repeat": 2,
"pushIcon": 0,
"textCase": 0,
"textOffset": 15,
"progress": {{ ( states.media_player.spotify.attributes.media_position / states.media_player.spotify.attributes.media_duration * 100 ) | round() }},
"progressC": "18B04C"
}
topic: awtrix_a8ba90/custom/spotify
- conditions:
- condition: template
value_template: >-
{{ not states.media_player.spotify.state ==
'playing' }}
sequence:
- service: mqtt.publish
data:
qos: 0
retain: false
topic: awtrix_a8ba90/custom/spotify
More flows for Home Assistant or Smarthome
Something wrong with this flow? Report it.