FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
173 stars 11 forks source link

Maximum temperatur of current day? #80

Closed jmerifjKriwe closed 10 months ago

jmerifjKriwe commented 10 months ago

How can I get the maximum forecast temperatur for the current day? Before the update I used

{{ state_attr('weather.myforecast', 'forecast')[0].temperature }}

But how can I get this after the update?

jmerifjKriwe commented 10 months ago

Ok, found myself. I don't think it's easier now, but that's not an issue of dwd_weather.

Have a look in this thread for ideas: https://community.home-assistant.io/t/petition-dont-delete-the-forecast-attribute/609298

heikone commented 10 months ago

The forecast attribute was a very useful feature for me. I've used this by the following code:

template:
  - sensor:
      - name: "Temperatur DWD Waltrop Heute Min"
        unique_id: temperatur_dwd_waltrop_forecast_0_temp_min
        state: "{{state_attr('weather.waltrop_abdinghof','forecast')[0]['templow'] | float(0) }}"
        unit_of_measurement: "°C"
        device_class: temperature

Could anybody supply a code example, how to get current day's min and max expected temperature from DWD prediction?

Greetings Heiko

Qhilm commented 10 months ago

In case anyone is watching this issue still, I'm trying to refactor the code using the new version of the integration, but I'm struggling.