Mini-media shortcuts show state of receiver

I am trying to add the state (off or on) of the receiver when I toggle it. Or change the color of the receiver button.


I know I can get the state like this:

{{ states('media_player.denon_avr_s700w') }}

But I have no idea how put that in the label or change the icon color.

Here is my current script:

entity: media_player.living_room
volume_stateless: true
artwork: material
  columns: 1
    - icon: mdi:audio-video
      type: service
      id: media_player.toggle
        entity_id: media_player.denon_avr_s700w

Any ideas?

I’m not sure of the context of your script snippet so it is difficult to provide a specific solution. This is only a guess, but perhaps the section on “how-to-use-state_image” will help: Picture Elements Card - Home Assistant