tomvanswam / compass-card

A Lovelace card that shows a directional indicator on a compass for Home Assistant
MIT License
174 stars 19 forks source link

Fontsize Option for a 2nd Value Sensor... #880

Closed tomlahr closed 10 months ago

tomlahr commented 10 months ago

Hello, concerning adding a second sensor I want to resize the Font: CompassCardFontsize

Is there a solution? Thanks In Advance

Cheers!

tomvanswam commented 10 months ago

You could use lovelace card mod and this post as an example.

tomlahr commented 10 months ago

Many thanks for the quick reply and the link to the thread. I have tried to adopt the example in the post nearly 1:1, but without any effect on the display. (card-mod is installed properly) However, there were no error messages either - hmm, strange...

But I will keep tracking on this - keep the good work going..!

UPDATE/EDIT: The following solution worked fine for me :-)

type: custom:compass-card
indicator_sensors:
  - sensor: sensor.dwd_uetersen_windrichtung
    indicator:
      type: arrow_inward
value_sensors:
  - sensor: sensor.dwd_uetersen_windgeschwindigkeit
    state_value:
      color: blue
  - sensor: sensor.dwd_uetersen_windboen
    state_value:
      color: red
header:
  title:
    value: Windrichtung
    color: aqua
compass:
  north:
    show: true
    color: orange
language: de
card_mod:
  style: |
    .sensor-1 .value {
      font-size: 14px !important
      }
    .sensor-1 .measurement {
      font-size: 12px !important; 
    } 

CompassCardFontsize_res

Cheers!