Help: showing attribute in picture element state badge?

Hi,
I’m curious if this is in any way possible? (The below doesn’t work…)

  - type: state-badge
    entity: climate.badkamer
  	attribute: temperature

I need it to be within Picture Elements Card along with many other things…

Thanks if anybody knows!

I suspect it’s not possible. I manage a workaround by “decorating” a state-label with CSS. A tip here: the prefix you see below is this simple character “:thermometer:” - yes, there is a character for a thermometer symbol… It shows well on chrome - not sure on other platforms. Have a look here.

  - type: state-label
    entity: climate.zolder
    attribute: temperature
    prefix: "\U0001F321"
    style:
      top: 18.5%
      left: 60.5%
      height: 9%
      font-size: 265%
      text-shadow: 3px 3px 2px black
      border: 5px ridge lightgray
      line-height: 180%
      padding-right: 0.5%
      border-radius: 50%
      color: lightgray
      background-color: 'rgba(0,0,0,0.7)'

This looks like this on a picture-element card (the 16degree in a circle)
image

1 Like

Came here to find an easy solution, ended up finding an easier one myself :smiley:

I created a template helper for my thermostat. Now I have an entity just for the temperature.

{{ state_attr('climate.thermostat_og_thermostat', 'current_temperature') }}