bignumber-card icon indicating copy to clipboard operation
bignumber-card copied to clipboard

Is it possible to style these fields?

Open sddgit opened this issue 2 years ago • 1 comments

I’m trying to find a way to do a couple of things with this card:

  1. Change the background colour, so that the “unfilled” part of the card isn’t plain white or black. I’d like it to be more in keeping with my theme.

  2. Change the size of the font used, which is just too big sometimes if you have a few of the cards in, say, a horizontal stack.

I’ve tried adding card-mod styling by having the following:

type: custom:bignumber-card
entity: sensor.mqtt_consumption
title: Consumption
scale: 40px
min: 0
max: 18000
hideunit: false
from: bottom
severity:
  - value: 2000
    bnStyle: var(--label-badge-green)
  - value: 4000
    bnStyle: var(--label-badge-yellow)
  - value: 18000
    bnStyle: var(--label-badge-red)
    color: '#FFFFFF'
card_mod:
  style: |
    ha-card {
      background: var(--ha-card-background);
      font-size: 15px;
      }

The card is then coloured differently, and according to my theme, but there are no longer any severity bars. And it doesn’t seem to matter what I have for font-size, it doesn’t change. Things like font-weight do work though. Appreciate any pointers.

sddgit avatar Jan 24 '22 10:01 sddgit