DWD Pollenflug (card)

dwd-pollenprognos-card

A Lovelace custom card for custom component DWD Pollenflug in Home Assistant, based on isabellaalstrom/lovelace-pollenprognos-card

You need to manually move the folder pollen_img directly inside your www
folder for the images to appear, or set the img_path configuration value to
the prefix of the URL where the images are reachable.

Installation:

HACS (Home Assistant Community Store)

  1. Go to HACS page on your Home Assistant instance
  2. Add this repository (GitHub - bhuebschen/dwd-pollenprognos-card) via HACS Custom repositories How to add Custom Repositories
  3. Select Frontend
  4. Press add icon and search for DWD Pollenprognos Card
  5. Select DWD Pollenprognos Card repo and install
  6. Force refresh the Home Assistant page (Ctrl + F5 / (Shift +) + R)
  7. Add dwd-pollenprognos-card to your page

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

Manual

  1. Download the ‘dwd-pollenprognos-card.js’ from the latest [release][release-url] (with right click, save link as)
  2. Place the downloaded file on your Home Assistant machine in the config/www folder (when there is no www folder in the folder where your configuration.yaml file is, create it and place the file there)
  3. In Home Assistant go to Configuration->Lovelace Dashboards->Resources (When there is no resources tag on the Lovelace Dashboard page, enable advanced mode in your account settings, and retry this step)
  4. Add a new resource
    1. Url = /local/dwd-pollenprognos-card.js
    2. Resource type = module
  5. Force refresh the Home Assistant page (Ctrl + F5 / (Shift +) + R)
  6. Add dwd-pollenprognos-card to your page

Example usage

Pick the allergens you want to display.

For ui-mode:

type: 'custom:dwd-pollenprognos-card'
region: 121
allergens:
  - ambrosia
  - beifuss
  - birke
  - erle
  - hasel
  - esche
  - roggen
  - graeser

For yaml-mode:

- type: 'custom:dwd-pollenprognos-card'
  region: 121
  allergens:
    - ambrosia
    - beifuss
    - birke
    - erle
    - hasel
    - esche
    - roggen
    - graeser

Usage in a view:

title: My awesome Lovelace!
resources:
  - url: /local/dwd-pollenprognos-card.js
    type: module
views:
  title: My view
  cards:
    - type: 'custom:dwd-pollenprognos-card'
      region: 121
      allergens:
        - ambrosia
        - beifuss
        - birke
        - erle
        - hasel
        - esche
        - roggen
        - graeser

Options

Name Type Default Description
type string Required custom:dwd-pollenprognos-card
region string Required dwd region from which you have sensors - can be found at the end of the created sensors by the dwd-pollenflug-integration
allergens list Required List of allergens for which you have sensors
title boolean Optional Set to false to remove the heading from the card
show_state boolean Optional Set to false if you don’t want to show the state text under the images.
threshold number Optional Set to a number if you don’t want to show allergens below that number (set to 0 to only exclude unknown or i.u.).
img_path string Optional The URL prefix for where to find the images; defaults to "/local/pollen_img")

Usage:

After installation, you can add the dwd-pollenprognos-card to your Lovelace dashboard using the sample configuration provided above. Customize the card by setting the desired options in your YAML configuration

Issues & Contributions:

If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

1 Like

:+1: Nice addition! Will definitely test, as soon as I find the time :laughing:

BUT, why no screenshots, you know the saying a picture says a thousand words:laughing:

2 Likes

Hey @benedikt.huebschen ,

I think you have to rename the gras_x.svg to graeser_x.svg and roggen_x.svg is missing, right :)?

Bildschirmfoto 2024-06-17 um 19.44.53

EDIT:

And should “hohe belastung” be red?

oh damn, I forgot to copy the files from my development instance to the repository…

the original component used the values ​​0-8 for the intensity of the pollution, but the DWD uses 0-3 (in 0.5 steps) … so “the old 3” is actually the medium pollution, while it should actually be the highest now…

rye (Roggen) was also not part of the swedish pollen component… so I tried to recreate it in the same style

i fixed it now in the release 1.0.1

1 Like

Works now :slight_smile:

@benedikt.huebschen Many thanks for the trigger to think about presenting the pollen information in a nice way.
And even more thanks for your inspiration :slight_smile:

Now I have to decide which presentation to use, yours :smiley: or one of my ideas :slight_smile:

Is there a way to influence the layout? I’ve had a layout with 2 rows and 5 and 3 entries since 1.0.1.
The layout with 4 and 4 looks better.

i’ve modified the “flex-basis”-style: you can set the number of columns in your config, using the new “columns”-property

1 Like

Hey @benedikt.huebschen,

works almost :). If the width is greater than 2150px then I have 5 cols.

Are you writing the version of the map into the browser console?