How can I change the font/font size for the units?

Need Help :slight_smile:

I just want to reduce the font size of the displayed unit in a custom:button-card


type: custom:button-card

My configuration:

entity: sensor.total_dc_power
layout: icon_name_state2nd
name: Solar
icon: kuf:weather_sun
show_state: true
units: W
styles:
card:
- height: null
- border-radius: 0%
- background-color: transparent
name:
- font-family: kanit-thin
- font-size: 25px
- font-weight: bold
- color: grey
icon:
- color: grey
state:
- font-family: next-art
- font-size: 50px
- font-weight: bold
- color: grey
- size: 10px

Welcome to the forum. A couple of points…

Please post your code using the community standards. See #11, but please read the other points as well.

There is large thread for custom:button-card here

This is controlling the font size of the state

image

reduce it to something like - font-size: 20px

Hello
and thank you
for your reply.
I have already used this solution, but it changes the entire display.
I just want to change the size of the unit.
I don’t have an idea for that yet

Thanks anyway !