Media player - pictureelements card - show status

I am trying to put my sonos media players on my floorplan. Ideally I would like the players to show one icon if paused or dim and another state when playing.
So far the only way I have been able to do this is the following:

      - type: conditional
        conditions:
          - entity: media_player.repos_sonos
            state_not: paused
        elements:
          - type: state-icon
            entity: media_player.repos_sonos
            tap-action:
              action: call_service
              service: media_player.media_play_pause
              service_data:
                entity_id: media_player.repos_sonos
            hold-action:
              action: call_service
              service: media_player.media_play_pause
              service_data:
                entity_id: media_player.repos_sonos
            double_tap_action:
              action: more-info
            style:
              top: 26%
              left: 57.5%
      - type: conditional
        conditions:
          - entity: media_player.repos_sonos
            state: paused
        elements:
          - type: icon
            icon: 'mdi:speaker'
            hold-action:
              action: call_service
              service: media_player.media_play_pause
              service_data:
                entity_id: media_player.repos_sonos
            entity: media_player.repos_sonos
            style:
              top: 23%
              left: 59.5%

However when I click the icon the player does not play/pause but instead the detail view of the media player pops up. Any suggestions? How do you have your media player configured?

it’s call-service, not call_service

          - type: state-icon
            entity: media_player.repos_sonos
            tap-action:
              action: call-service
              service: media_player.media_play_pause
              service_data:
                entity_id: media_player.repos_sonos

Still shows the detail view when clicking instead of pausing

lol, tap_action instead of tap-action. It’s a pain :wink:

Same with hold-action. Needs the underscore instead of dash.

Maybe it would be great if it could be either - or _ all around :rofl:

Works now.

Has anyone found a way to visualize whether a speaker is playing or paused without having to add the speaker twice as I have done?

Keys are always _ and values typically have the -.

this_is_a_key: this-is-the-value