custom-cards / bar-card

Customizable Animated Bar card for Home Assistant Lovelace
MIT License
379 stars 54 forks source link

[FR] Hide the card if all bars are hidden #167

Open ildar170975 opened 1 year ago

ildar170975 commented 1 year ago

Consider this card:

  - type: custom:bar-card
    severity:
      - from: '0'
        to: '0'
        hide: true
      - from: '1'
        to: '40'
        color: '#007A00'
      - from: '41'
        to: '90'
        color: '#EA9000'
      - from: '91'
        to: '100'
        color: '#C41400'
    entities:
      - entity: input_number.test_level_1

image

When a bar is hidden - the card still is displayed:

image

This may be solved by card-mod, but I would like to suggest an option: when it is set to true: -- if no bars are displayed - hide the whole card.

mkanet commented 1 year ago

I would love to see this feature. I'm currently using card-mod to do this; but, it would be much nicer to have a builtin feature!