A very quick note in case this helps anyone else: I have been using the canvas-gauge-card in my setup, but sometimes all I really want to do is display a gauge on a regular card background.
Turns out, since the gauge card itself is transparent (which is nice) there is no background being rendered.
Here is my workaround:
- Install card-mod (https://github.com/thomasloven/lovelace-card-mod) preferably using HACS
- Wrap your gauge in a “mod-card” element ( the one Thomas warns us is roughly the wrong choice 10 out of 10 times ) like so:
- type: custom:mod-card
style: |
ha-card {
background-color: var(--secondary-background-color);
padding: 8px 0px 8px 0px;
}
card:
type: custom:canvas-gauge-card
entity: sensor.snf_2_watts
...
That is all.