UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.63k stars 430 forks source link

Weather Popup doesn't work with Germany DWD Weather Integration #1466

Closed idominiki closed 7 months ago

idominiki commented 7 months ago

H guys!

The Weather Popup doesn't work with weather data for Germany via DWD Integration (https://github.com/FL550/dwd_weather) as well as (https://github.com/hg1337/homeassistant-dwd).

Error: Bildschirmfoto 2024-02-27 um 14 10 26

Code for the card:

# Weather Chip
          - type: "custom:button-card"
            template: custom_chip_temperature
            variables:
              ulm_chip_temperature_inside: sensor.wetterstation_luftfeuchtigkeit
              ulm_chip_temperature_outside: sensor.wetterstation_temperatur
              ulm_chip_temperature_weather: weather.soest
              ulm_custom_popup:
                template: "popup_weather_forecast"
                entity: weather.soest
                popup_variables:
                  ulm_weather_popup_surpress_first_forecast: false
            tap_action:
              action: navigate
              navigation_path: /adaptive-dash/wetter
            triggers_update: all
            # Bugs: https://github.com/bramkragten/swipe-card/issues/51
            card_mod:
              style: |
                ha-card {
                  margin-bottom:2px;
                }

Has anyone a tipp for me how to get this working again?

Thanks Dominik

idominiki commented 7 months ago

Got it working with this template sensor which is compatible with the new weather forecast method coming in HA 2024.3

- trigger:
      - platform: time_pattern
        minutes: /1
    action:
      - service: weather.get_forecasts
        target:
          entity_id:
            - weather.XXXX
        data:
            type: daily
        response_variable: tagesvorhersage
    sensor:
      - name: Wettervorhersage
        unique_id: weather_forecast
        state: "{{ tagesvorhersage['weather.XXXX'].forecast[0].condition }}"
        icon: mdi:hours-24
        attributes:
          temperature: "{{ tagesvorhersage['weather.XXXX'].forecast[0].temperature }}" 
          forecast: "{{ tagesvorhersage['weather.XXXX'].forecast }}"

Code for Weather Chip:

- type: "custom:button-card"
  template: custom_chip_temperature
  variables:
    ulm_chip_temperature_inside: sensor.XXX
    ulm_chip_temperature_outside: sensor.luxtronik_320615_0461_outdoor_temperature
    ulm_chip_temperature_weather: weather.XXX
    ulm_custom_popup:
      template: "popup_weather_forecast"
      entity: sensor.wettervorhersage
      popup_variables:
        ulm_weather_popup_surpress_first_forecast: false
  tap_action:
    action: navigate
    navigation_path: /adaptive-dash/wetter