battery-state-card icon indicating copy to clipboard operation
battery-state-card copied to clipboard

name and battery percentage status unde icon

Open Hadatko opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe. Hi i am using grid panel. In that i want 4 columns. Each column will contains several battery states. I would like to have any text information bellow icon.

Describe the solution you'd like I would like to have any text information bellow icon. I would also like to hide value, as icon is good enough representative.

Additional context Currently it looks terrible and i don't see name as there no space left on a side: image

Hadatko avatar Oct 25 '24 05:10 Hadatko

This is what i know how to do. As you can see this is one panel contains 4xbatery status cards. If i could hide value and move name under icon it would be top ;)

image

Hadatko avatar Oct 25 '24 05:10 Hadatko

You can kind of hide the percentage but it's hideous

state_map:
  - from: "100"
    to: "100"
    display: " "
  - from: "99"
    to: "99"
    display: " "
   ...

obviously this gets very silly very quickly as this feature is designed for exact matches rather than regex or wildcard searches

hilburn avatar Oct 31 '24 11:10 hilburn

Hopefully some simpler and nicer solution will show up. But thank you for your idea. For example with custom-button-card i can have this: image

Hadatko avatar Oct 31 '24 12:10 Hadatko

You can get them to display vertically rather than horizontally with card-mod:

card_mod:
  style: |
    battery-state-entity {
      flex-direction: column;
    }

image

I'm not good enough with card-mod to work out how to hide the state using that - iirc it should be something like battery-state-entity$:.state {display: none;} but I wasn't able to make it work

hilburn avatar Oct 31 '24 13:10 hilburn

Thank you for these hints. I thought that i cannot work with CSS as image I will play with this.

Hadatko avatar Oct 31 '24 13:10 Hadatko

you can with card-mod from HACS

hilburn avatar Oct 31 '24 13:10 hilburn

I will take a look if i can simplify it by PR to made this with yaml key settings

Hadatko avatar Oct 31 '24 13:10 Hadatko