HomeAssistant-DMIPollen
Home Assistant Custom Component showing pollen data from dmi.dk (Danmarks Meteorologiske Institut) by use of the REST response from: https://www.dmi.dk/dmidk_byvejrWS/rest/texts/forecast/pollen/Danmark/
See more screenshots in the image folderInstallation
Manual Installation
- Copy
dmipollen
folder into the custom_components folder of your home assistant configuration directory. - Restart Home Assistant.
- Configure the
dmipollen
sensor in configuration.yaml as explained futher down. - Restart Home Assistant.
Installation via HACS (Home Assistant Community Store)
- Ensure that HACS is installed.
- Open HACS and add
https://github.com/ChristofferG/homeassistant-dmipollen
as a Custom repository, and choose Integration. - Click DMI Pollen and click "Install this repository in HACS".
- Restart Home Assistant.
- Configure the
dmipollen
sensor in configuration.yaml as explained futher down. - Restart Home Assistant.
Configuration
dmipollen
can for now only be configured via configuration.yaml. Working on a Config flow.
# Example configuration.yaml entry
sensor:
- platform: dmipollen
region: viborg
scan_interval: 3600
resources:
- birk
- bynke
- el
- elm
- græs
- hassel
- alternaria
- cladosporium
- forecast
- polleninfo
- lastupdate
CONFIGURATION PARAMETERS
Parameter | Optional | Description |
---|---|---|
region |
No | Measurement spot. københavn , viborg or all is available. all will include both København and Viborg. |
scan_interval |
Yes | How offent the component will poll dmi.dk. The data on dmi.dk is only updated once a day, typical in the afternoon. The default value of the scan_interval is 3600sec (1hour) |
CONFIGURATION RESOURCES
Resources | Optional | Description |
---|---|---|
birk |
Yes | Return state of birk |
bynke |
Yes | Return state of bynke |
el |
Yes | Return state of el |
elm |
Yes | Return state of elm |
græs |
Yes | Return state of græs |
hassel |
Yes | Return state of hassel |
alternaria |
Yes | Return state of alternaria (Measurement only available from København) |
cladosporium |
Yes | Return state of cladosporium (Measurement only available from København) |
forecast |
Yes | Return tomorrows pollen forecast as a danish text string. E.g 'For i morgen, onsdag d. 1. juli 2020, ventes et moderat antal græspollen (mellem 10-50)' |
polleninfo |
Yes | Return information string about how the pollen is measured. |
lastupdate |
Yes | Return the last update timestamp as a string in the format: 'tirsdag den 30. juni 2020' |
States and attributes
Each selected recource will create a sensor the naming syntax:
- E.g.
sensor.pollen_viborg_birk
and a coreponding friendly namePollen Viborg Birk
The unit of the pollen data is ppcm
- Part Per Cubic Meter
Each sensor will have the attributes last_update
timestamp and attribution
with information about where the data comes from.
Future
- As dmi.dk is working on providing free data, the source of the pollen data will properly change during the next years. See https://confluence.govcloud.dk/display/FDAPI
- Add config flow
- Add as HACS original