Yevgenium / weather-chart-card

Custom weather card with charts
MIT License
275 stars 81 forks source link

Bad card margin when title is not used #56

Closed andras-tim closed 2 years ago

andras-tim commented 3 years ago

If I don't want to specify the title, the card will have a bad margin and "merges" with the previous.

Bad behavior w/o title: Screenshot_2021-05-23_11-57-27

Expected behavior: Screenshot_2021-05-23_11-57-35

scstraus commented 3 years ago

Unfortunately the developer isn't really actively maintaining this card and the header has never really worked properly. To adjust the size of the header and region around it, I use custom:card-mod as a workaround for this problem with the style parameter like so. You may need to define an empty title and just adjust it's size down by messing with the padding and line-height parameter. At least that will likely be your best bet for some time to come. If anyone comes up with a real fix, I'd be happy to add it to my fork of the card.

      - type: 'custom:weather-card-chart'
        style: |
          .card-header {
            padding: 20px 16px 10px;
            line-height: 32px;
          }
        title: Weather
        weather: weather.smartweather_home
        sun: sun.sun
        mode: hourly
        temp: sensor.smartweatherudp_temperature
        wind: sensor.smartweather_wind_gust