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.
HACS (Home Assistant Community Store)
- Go to HACS page on your Home Assistant instance
- Add this repository (https://github.com/bhuebschen/dwd-pollenprognos-card) via HACS Custom repositories How to add Custom Repositories
- Select
Frontend
- Press add icon and search for
DWD Pollenprognos Card
- Select DWD Pollenprognos Card repo and install
- Force refresh the Home Assistant page (Ctrl + F5 / (Shift +) ⌘ + R)
- Add dwd-pollenprognos-card to your page
- Download the 'dwd-pollenprognos-card.js' from the latest [release][release-url] (with right click, save link as)
- Place the downloaded file on your Home Assistant machine in the
config/www
folder (when there is nowww
folder in the folder where yourconfiguration.yaml
file is, create it and place the file there) - In Home Assistant go to
Configuration->Lovelace Dashboards->Resources
(When there is noresources
tag on theLovelace Dashboard
page, enable advanced mode in your account settings, and retry this step) - Add a new resource
- Url =
/local/dwd-pollenprognos-card.js
- Resource type =
module
- Url =
- Force refresh the Home Assistant page (Ctrl + F5 / (Shift +) ⌘ + R)
- Add dwd-pollenprognos-card to your page
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
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 |
columns | number | Optional | Define the number of columns per row |
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" ) |
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
If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.