th3jesta / ha-lcars

LCARS theme for Home Assistant
MIT License
290 stars 22 forks source link

Weather widget ignores `middle` class in mobile mode #102

Closed derkork closed 3 months ago

derkork commented 3 months ago

I have set up a weather widget stack liket this:

type: vertical-stack
cards:
  - type: markdown
    content: '# Planetares Wetter'
    card_mod:
      class: header
  - type: weather-forecast
    show_forecast: false
    show_current: true
    name: AKTUELL
    forecast_type: daily
    entity: weather.home
    card_mod:
      class: middle
  - type: weather-forecast
    show_forecast: true
    show_current: false
    name: AKTUELL
    forecast_type: daily
    entity: weather.home
    card_mod:
      class: middle
  - type: entity
    card_mod:
      class: middle
    entity: sensor.sun_next_dawn
  - type: entity
    entity: sensor.sun_next_dusk
    card_mod:
      class: middle
  - type: markdown
    content: '###   '
    card_mod:
      class: footer

On the desktop this renders nicely to:

image

However in mobile mode the middle class seems to be ignored for the weather widget and I get this:

Screenshot_20240725_094236_Home Assistant

th3jesta commented 3 months ago

This is an issue where Home Assistant overwrites the classes when the viewport is narrow. I have reported the issue to the card-mod developers, as it's not caused by HA-LCARS. https://github.com/thomasloven/lovelace-card-mod/issues/386

Workarounds are:

derkork commented 3 months ago

Thank you very much for investigating this and providing a workaround!