How to show media player image in picture-elements

Tags: #<Tag:0x00007f32819de828>

Hi,

I am trying to display the image of the currently playing item of my sonos.
When hardcoding the path, it works. But for some reason, I cannot get the template to work …

              - type: picture-elements
                image: "/local/overlay.svg" 
            
                elements:
                  - type: image
                    entity: media_player.keuken
                    image: {{ states.media_player.keuken.attributes.entity_picture }}
                    #image: "[[[ return states['media_player.keuken'].attributes.entity_picture; ]]]"
                    style:
                      top: 50%
                      left: 50%
                      width: 100%
                      height: 100%

What am I doing wrong ?

1 Like

did you ever figure this out?

This worked for me:

- entity: media_player.nestaudio2521
  type: state-icon
  icon: mdi:speaker
  style:
   left: 22%
   top: 19%

If you remove the “icon”, it will show a round image of the album cover of the current song. So I think adding "type: state-icon" did the trick.