custom-cards / bar-card

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

Size problem when stacked (stack: horizontal) #52

Closed Ndrinta closed 4 years ago

Ndrinta commented 4 years ago

I run into a little issue today: image I don't know what to do in order to fix this... Any suggestion?

Gluwc commented 4 years ago

That's not good at all! I'll have a look for the next release.

Gluwc commented 4 years ago

Could you please show your config for this card so I can debug it?

Ndrinta commented 4 years ago

Sure, here you go!

ezgif com-video-to-gif

animation:
  state: 'off'
decimal: 2
direction: up
entities:
  - entity: input_number.power_consuption_mon
    name: Mon
  - entity: input_number.power_consuption_tue
    name: Tue
  - entity: input_number.power_consuption_wed
    name: Wed
  - entity: input_number.power_consuption_thu
    name: Thu
  - entity: input_number.power_consuption_fri
    name: Fri
  - entity: input_number.power_consuption_sat
    name: Sat
  - entity: input_number.power_consuption_sun
    name: Sun
height: 150px
limit_value: false
max: 12
min: 0
positions:
  icon: 'off'
  indicator: inside
  title: outside
severity:
  - color: '#26BF8E'
    from: 0
    to: 5
  - color: '#FFA500'
    from: 5.001
    to: 8
  - color: '#FF6C4D'
    from: 8.001
    to: 100
stack: horizontal
style: |-
  bar-card-targetbar {
    visibility: hidden;
  }
target: 5
type: 'custom:bar-card'
unit_of_measurement: ' '
width: 100%
Gluwc commented 4 years ago

I think this might be because of the bar names being different widths. I'll see if I can do anything about this. For now maybe you would like to try the new 3.1.0b0 beta (you can also enable the beta in HACS)? Your issue isn't fixed yet in this release, however it would be nice to have some beta testers =). Please note some features are still WIP and certain things might be slightly broken.

Ndrinta commented 4 years ago

I just joined the beta and it did not solve the problem... Where do I find "documentation" for the beta features?

Gluwc commented 4 years ago

Sorry this currently isn't fixed in the beta. I'll have to have a look at this after I'm done with all the other bugs the new version is causing.

Ndrinta commented 4 years ago

Oh I'm sorry, wasn't to push you! I just wanted to let you know. Take all the time of this world! :)

Gluwc commented 4 years ago

Actually you can fix this right now by adding this to your style:

3.0.9

  bar-card-title {
    margin: 0px -100%
  }

3.1.0b0

  bar-card-name {
    margin: 0px -100%
  }

I probably won't add this to the card since I feel it's slightly edge-case and will affect the default behaviour.

Ndrinta commented 4 years ago

I'll give it a try. Cheers

On Thu, 16 Apr 2020, 20:00 Lucas Bramlage, notifications@github.com wrote:

Actually you can fix this right now by adding this to your style:

3.0.9

bar-card-title { margin: 0px -100% }

3.1.0b0

bar-card-name { margin: 0px -100% }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/custom-cards/bar-card/issues/52#issuecomment-614837945, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABD4PLD3JXFDHEEQCEPIDB3RM5IWDANCNFSM4MH7CNAQ .