Please read README.md first, if you haven't already.
As this integration is currently not part of Home Assistant Core, you have to download it first into your Home Assistant installation. The recommended way is via the Home Assistant Community Store (HACS), because it makes updates easier, but of course you can also do it manually, if you don't want to use HACS.
The easiest way is by clicking on the following button. It will directly open the download page for this integration in HACS.
If you don't want to use the My Home Assistant button or if it doesn't work in your setup, follow these steps:
- Open "HACS" from the Home Assistant main menu.
- Select "Integrations".
- Select "Explore & Dowload Repositories".
- Search for "Deutscher Wetterdienst (by hg1337)" and select it.
There is another integration named "Deutscher Wetterdienst" available, that's not this one. However, feel free to try out both. ;)
Select "Download" and follow the instructions. To use the newly downloaded integration, you have to restart Home Assistant
For manual download, you need access to the config folder of Home Assistant. This depends on how you have installed Home Assistant. If you are using the Home Assistant Operating System, you may e.g. use the "Samba share" or the "Terminal & SSH" add-on.
These steps are based on the "Samba share" add-on, but other methods are quite similar.
- Create a folder named "custom_components" within the config folder, if it doesn't already exist.
- Optional: If you have Python installed and if you like, you may run tools/generate_stations/generate_stations.py to update the station list. However, it shouldn't change too often, that's why it is "pre-compiled".
- Copy the whole custom_components/dwd folder of this repository into the custom_components folder. I.e. your structure should in the end be /config/custom_components/dwd.
- Restart Home Assistant. If you see a warning "You are using a custom integration dwd which has not been tested by Home Assistant." (and no errors of course) in the log, everything went well.
To add the actual weather device and entities, just add a new instance of the "Deutscher Wetterdienst" integration:
If you don't want to use the My Home Assistant button or if it doesn't work in your setup, follow these steps:
- Open "Settings" from the Home Assistant main menu.
- Select "Devices & Services".
- Select "Add Integration".
- Search for "Deutscher Wetterdienst" and select it.
Follow the instructions, select a different station or enter a custom one if needed. By default, the closest station that provides measurement as well as forcast data is preselected, if it is not more than 20 km away and if the difference in elevation is less than 500 m. Otherwise the closest available station is preselected.
After that, you should have one new service and one new weather entity for the selected station.
You may use these entities with any component that supports weather entities, e.g. the standard Weather Forecast Card:
I really like the custom weather card at https://github.com/bramkragten/weather-card. I started using that a long time ago, because it shows more information and allows more customizations than the standard Weather Forecast Card.
The layout in the screenshot above was created using this configuration:
type: horizontal-stack
cards:
- type: custom:weather-card
entity: weather.stuttgart_echterdingen
current: true
details: true
forecast: false
- type: custom:weather-card
entity: weather.stuttgart_echterdingen
current: false
details: false
forecast: true
forecast_type: hourly
hourly_forecast: true
number_of_forecasts: '5'
- type: custom:weather-card
entity: weather.stuttgart_echterdingen
current: false
details: false
forecast: true
forecast_type: daily
hourly_forecast: false
number_of_forecasts: '5'
This integration also works well with the weather chart card from https://github.com/mlamberts78/weather-chart-card.
This is the configuration I used for the screenshot above:
type: vertical-stack
cards:
- type: custom:weather-chart-card
entity: weather.stuttgart_echterdingen
show_main: true
show_temperature: true
show_current_condition: true
show_attributes: true
show_time: false
show_time_seconds: false
show_day: false
show_date: false
show_humidity: true
show_pressure: true
show_wind_direction: true
show_wind_speed: true
show_sun: true
show_feels_like: false
show_dew_point: true
show_wind_gust_speed: true
show_visibility: true
show_last_changed: false
use_12hour_format: false
icons_size: 25
animated_icons: false
icon_style: style1
forecast:
precipitation_type: rainfall
show_probability: true
labels_font_size: '11'
precip_bar_size: '100'
style: style1
show_wind_forecast: true
condition_icons: true
round_temp: false
type: hourly
number_of_forecasts: '0'
disable_animation: false
units:
pressure: ''
speed: ''
- type: custom:weather-chart-card
entity: weather.stuttgart_echterdingen
show_main: false
show_temperature: false
show_current_condition: false
show_attributes: false
show_time: false
show_time_seconds: false
show_day: false
show_date: false
show_humidity: false
show_pressure: false
show_wind_direction: false
show_wind_speed: false
show_sun: false
show_feels_like: false
show_dew_point: false
show_wind_gust_speed: false
show_visibility: false
show_last_changed: false
use_12hour_format: false
icons_size: 25
animated_icons: false
icon_style: style1
forecast:
precipitation_type: rainfall
show_probability: false
labels_font_size: '11'
precip_bar_size: '100'
style: style1
show_wind_forecast: true
condition_icons: true
round_temp: false
type: daily
number_of_forecasts: '0'
disable_animation: false
units:
pressure: ''
speed: ''