Skip to content

Custom component for Home Assistant that integrates weather data (measurements and forecasts) of Deutscher Wetterdienst (DWD).

License

Notifications You must be signed in to change notification settings

Kimotu/homeassistant-dwd

 
 

Repository files navigation

Release Hassfest Workflow Status License Donation
Open your Home Assistant instance and open this repository inside the Home Assistant Community Store. Open your Home Assistant instance and start setting up this integration.

Deutscher Wetterdienst (DWD) Integration for Home Assistant

Screenshot Weather Forecast

Introduction

This custom component for Home Assistant integrates weather data (measurements and forecasts) from the Deutscher Wetterdienst Open Data server into Home Assistant via weather entities.

Legal Information

Deutscher Wetterdienst (DWD) is not affiliated in any way with this project.

The conditions from Deutscher Wetterdienst (DWD) for using their data and accessing their servers apply.

stations.md and custom_components/dwd/stations.json are generated from data from Deutscher Wetterdienst (DWD) with the Python script at tools/generate_stations/generate_stations.py.

Main Features

  • Current measurement data from the weather stations from https://opendata.dwd.de/weather/weather_reports/poi/ as state attributes of a weather entity.
    • condition
    • temperature
    • humidity
    • pressure
    • wind_bearing
    • wind_speed
    • visibility
  • Hourly forecast data from the weather stations from https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/ in the forecast list of a weather entity.
    • datetime
    • condition
    • temperature
    • cloud_cover
    • precipitation
    • precipitation_probability
    • pressure
    • wind_bearing
    • wind_speed
  • Daily forecast data calculated by the component from the hourly forecast data. This is the most tricky part. I have compared the result of this with what the official Warnwetter app displays and the results seems to be very close.
    • datetime
    • condition
    • temperature (the maximum temperature for the day)
    • templow (the minimum temperature for the day)
    • cloud_cover
    • precipitation
    • pressure
  • Uses the HTTP ETag mechanism to only download new data if the data has changed. This allows more frequent polling (currently about every 10 minutes) while still keeping the load low.
  • Configuration via UI

Screenshot Hourly Screenshot Daily

Please notice that as usual, the "9 hours ago" in the screenshot refers to the last change of the state value of the entity, in this case when the condition (which is the state of weather entities) changed from "Party Cloudy" to "Sunny". Of course the values are updated much more often, but that's not reflected there. This has nothing to do with this integration but this is how it generally works, because only the state value is currently reflected in the entity history.

Screenshot History

Quick Setup

This quick setup guide is based on My Home Assistant links and the Home Assistant Community Store (HACS). For more details and other setup methods, see setup.md.

As this integration is currently not part of Home Assistant Core, you have to download it first into your Home Assistant installation. To download it via HACS, click the following button to open the download page for this integration in HACS.

Open your Home Assistant instance and open this repository inside the Home Assistant Community Store.

After a restart of Home Assistant, this integration is configurable by via "Add Integration" at "Devices & Services" like any core integration. Select "Deutscher Wetterdienst" and follow the instructions.

Screenshot Search Integration

To get there in one click, use this button:

Open your Home Assistant instance and start setting up this integration.

This adds one device and two entities (one with hourly forecast and one with daily forceast) for the selected station. To add more stations, just repeat the "Add Integration" step.

Questions & Answers

If you have questions, they might already be answered at questions_and_answers.md.

Bug Reports

It's always worth reporting bugs, if they haven't been reported yet and after having at look at Questions & Answers.

When reporting a bug, please follow these guidelines.

Issues with Measurements

For issues with measurement data (current condition, current temperature, ...), please include the following items in your bug report.

  • Always include the station ID.
  • When the problem occurs, go to the Developer Tools and copy immediately the state value + all state attributes (YAML) of entity where the issue occurs. You could skip the forecast part, but to be safe, just copy the whole YAML.
  • When the problem occurs, download immediately https://opendata.dwd.de/weather/weather_reports/poi/{station_id}-BEOB.csv. Replace {station_id} with your actual station ID. If your station ID has less than 5 characters, it has to be padded with trailing underscores, so e.g. "A191" becomes "A191_" here.

Issues with Hourly Forecasts

For issues with hourly forecasts (i.e. the forecasts of the entity ending with "_hourly"), please include the following items in your bug report.

  • Always include the station ID.
  • When the problem occurs, go to the Developer Tools and copy immediately all state attributes (YAML) of the hourly entity (the entity ending with "_hourly").
  • When the problem occurs, download immediately https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/{station_id}/kml/MOSMIX_L_LATEST_{station_id}.kmz. Replace {station_id} with your actual station ID. No padding needed here.

Issues with Daily Forecasts

For issues with daily forecasts (i.e. the forecasts of the entity ending with "_daily"), please include the following items in your bug report.

  • Always include the station ID.
  • When the problem occurs, go to the Developer Tools and copy immediately all state attributes (YAML) of the hourly entity (the entity ending with "_hourly"). This is important, because the daily forecasts are calculated from hourly forecasts.
  • When the problem occurs, go to the Developer Tools and copy immediately all state attributes (YAML) of the daily entity (the entity ending with "_daily").
  • When the problem occurs, download immediately https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/{station_id}/kml/MOSMIX_L_LATEST_{station_id}.kmz. Replace {station_id} with your actual station ID. No padding needed here.

References

Unfortunately, most of the following documentation is only available in German.

General

Measurements

Forecasts

Station Lists

For more information about stations see also stations.md.

About

Custom component for Home Assistant that integrates weather data (measurements and forecasts) of Deutscher Wetterdienst (DWD).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%