A custom Home Assistant integration for displaying Norwegian pollen forecasts from NAAF (Norwegian Asthma and Allergy Association), based on Yr's location codes.
- Go to HACS > Integrations
- Click the menu (⋮) and select "Custom repositories"
- Add
https://github.com/kahera/pollenvarslingas a Custom Repository - Select the category "Integration"
- Find "NAAF/Yr Pollen Forecast" and install
Copy the custom_components/pollenvarsel_naaf_yr folder to your custom_components directory in Home Assistant.
Configuration is done through the Home Assistant UI — no configuration.yaml editing required.
- Go to Settings > Devices & Services
- Click + Add Integration
- Search for Pollenvarsel and select it
- Fill in the form:
-
Location ID (required): The Yr location ID. The code can be found in the URL of the location on yr.no (see Finding Location IDs below).
ℹ️: Only locations in mainland Norway will work.
-
Location Name (optional): Override the name shown in sensor names. Leave empty to use the region name from the NAAF data.
-
Pollen Types (required): Select which pollen types to create sensors for. Available types:
- Hazel (Hassel)
- Alder (Or)
- Salix (Salix)
- Birch (Bjørk)
- Grass (Gress)
- Mugwort (Burot)
-
Update Frequency (optional): How often to fetch a new forecast, in hours. Default:
3 -
Language (optional): Language used for sensor names and API data. Default: Norwegian bokmål
- Norwegian bokmål
- Norwegian nynorsk
- English
Visit https://www.yr.no/nb and search for your location. The location ID is in the URL, located after daglig-tabell:
https://www.yr.no/nb/værvarsel/daglig-tabell/{locationID}/Norge/{otherNonRelevantLocationInfo}
Example:
https://www.yr.no/nb/værvarsel/daglig-tabell/1-189277/Norge/Møre%20og%20Romsdal/Molde/Moldewhere
1-189277is the ID.
For each pollen type and location, the integration creates two sensors:
sensor.pollen_{pollen_type}_{location_name}_todayorsensor.pollen_{pollen_type}_{region_name}_todaysensor.pollen_{pollen_type}_{location_name}_tomorroworsensor.pollen_{pollen_type}_{region_name}_tomorrow
none- Pollen type not forecast for that daylow- Low pollen levelmoderate- Moderate pollen levelhigh- High pollen levelextreme- Extreme pollen level
ℹ️ The integration was set up before anything was highly in bloom - these values need to be verified as the season progresses.
pollen_name- Localized name of the pollen type (e.g., "Hassel" in nb, "Hazel" in en)level_name- Localized distribution level name (e.g., "Beskjeden", "Moderat")date- Forecast dateregion_name- Region name fetched from the APIlocation_name- Custom name as set in the configuration, if presentlast_updated- Date & time for when the sensor was last updated
automation:
- alias: "High Pollen Alert"
trigger:
- platform: state
entity_id: sensor.pollen_birch_molde_today
to: "high"
- platform: state
entity_id: sensor.pollen_birch_molde_today
to: "extreme"
action:
- service: notify.mobile_app_phone
data:
message: "High birch pollen today!"If sensors don't appear:
- Restart Home Assistant after installing the integration
- Check that the location ID is correct (see Finding Location IDs)
- Check Home Assistant logs for errors

