Media player picture switch

Hi!

I just started using HA and cant figure out how to change the picture when my Sonos is playing or paused. I got my lights to change picture when they are on/off, but doing the same for my Sonos doesn’t work.

Lights are working with the following code:

          - type: image
            tap_action:
              action: toggle
            entity: light.bedroom
            state_image:
              'off': /local/Light icons/Lights-OFF.svg
              'on': /local/Light icons/Lights-ON.svg
            style:
              top: 36%
              left: 48%
              width: 7%

But doing the same with my Sonos doesn’t work:

          - type: image
            entity: media_player.bedroom
            tap_action:
              action: call-service
              service: media_player.media_play_pause
              service_data:
                entity_id: media_player.bedroom
            state_image:
              'off': /local/Sonos icons/Play fat.svg
              'on': /local/Sonos icons/Pause fat.svg
            style:
              top: 10%
              left: 10%
              width: 7%

Ovewrview of my whole floorplan:
PNG

Kind regards
Daniel

When a media player is playing it’s state is ‘playing’. When it is paused, it’s state is ‘paused’. But it might also be ‘off’.

Also you have spaces in your icon file names. Best avoided, or use quotes.

Feels like I have tried every combination of playing, idle, paused and so on. But apparently not playing and paused since it works now…
Good point about the spaces, will change that.

Many thanks!