Lovelace: Mini Media Player

I’ve partially solved this myself using the Lovelace card-templater card (Jinja2 card templating in Lovelace!). I replaced the name with a template and hid the “Default Media Receiver.” I’d still prefer to be able to replace that element as well. Anyway, my new card’s code is:

type: 'custom:card-templater'
card:
  type: 'custom:mini-media-player'
  entity: media_player.office_speaker
  artwork: material
  hide:
    info: true
  tts:
    platform: google_translate
    entity_id: media_player.office_speaker
  name_template: '{{ states.sensor.kgbi_artist.state }} - {{states.sensor.kgbi_song.state }}'
entities:
  - sensor.kgbi_artist
  - sensor.kgbi_song

Which gets me this:

image

I’m about 90% satisfied with this setup. All that’s left is to nest this inside a conditional that displays this card if I’m actually listening to KGBI, otherwise it will display a basic card. Then if I can capture the album art as I’ve written about here: Scrape Help Needed for Radio Station, I’d like to template the background to be the result of that scrape.