Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather widget ignores middle class in mobile mode #102

Closed
derkork opened this issue Jul 25, 2024 · 2 comments
Closed

Weather widget ignores middle class in mobile mode #102

derkork opened this issue Jul 25, 2024 · 2 comments

Comments

@derkork
Copy link

derkork commented Jul 25, 2024

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
Copy link
Owner

th3jesta commented Jul 25, 2024

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.
thomasloven/lovelace-card-mod#386

Workarounds are:

type: weather-forecast
entity: weather.home
forecast_type: daily
card_mod:
  style: |
    ha-card {
      background: black !important;
      text-transform: uppercase;
      border-radius: 0px !important;
      border-left: 35.5px solid var(--lcars-card-mid-left-color);
      padding-left: 6px !important;
    }

@derkork
Copy link
Author

derkork commented Jul 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants