I use a template sensor to show the number of lights on in custom button …but would also like to be able to add that template as a badge icon in a (mushroom) template card
this particular line of code
{{ states(‘sensor.number_lights_on’) }}
currently presents itself as this
so no number details at all…even though a number of lights are reported on this custom button card
and when I place the same template code into the Dev Tools template sections, it returns the correct number
The Mushroom Template Car only supports badge icons. A (obviously poor, because limited to 9 lights on) workaround would be to use mdi:numeric-1 - mdi:numeric-9 based on the states of your sensor.
starting to think not possible…and not the end of the world as I have it showing fine on custom button cards…just thought there might be a way around it
that did it…amazing how much different two little characters can have…both your suggestions now worked but of course can only mark one as the solution…thank you so much…you sir are a genius…