{"id":26224158,"url":"https://github.com/danishru/silam_pollen","last_synced_at":"2026-01-31T19:03:02.497Z","repository":{"id":281871332,"uuid":"942591577","full_name":"danishru/silam_pollen","owner":"danishru","description":"SILAM Pollen is a Home Assistant integration that delivers pollen level forecasts and sensor data for your location.","archived":false,"fork":false,"pushed_at":"2026-01-22T14:02:53.000Z","size":2516,"stargazers_count":34,"open_issues_count":3,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-23T06:19:52.073Z","etag":null,"topics":["allergy","hacs","hacs-integration","home-assistant","homeassistant","homeassistant-custom-component","pollen"],"latest_commit_sha":null,"homepage":"https://community.home-assistant.io/t/silam-pollen-allergy-proof-your-home-assistant","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danishru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-04T10:51:23.000Z","updated_at":"2026-01-22T13:58:52.000Z","dependencies_parsed_at":"2025-03-11T16:20:26.392Z","dependency_job_id":"4765faf2-69f7-4687-95e6-65c1dcfe63ae","html_url":"https://github.com/danishru/silam_pollen","commit_stats":null,"previous_names":["danishru/silam_pollen"],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/danishru/silam_pollen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danishru%2Fsilam_pollen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danishru%2Fsilam_pollen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danishru%2Fsilam_pollen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danishru%2Fsilam_pollen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danishru","download_url":"https://codeload.github.com/danishru/silam_pollen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danishru%2Fsilam_pollen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28950279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allergy","hacs","hacs-integration","home-assistant","homeassistant","homeassistant-custom-component","pollen"],"created_at":"2025-03-12T18:18:29.692Z","updated_at":"2026-01-31T19:02:57.486Z","avatar_url":"https://github.com/danishru.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![GitHub Release][releases-shield]][releases]\n[![Downloads][download-shield]][Downloads]\n[![HACS Custom][hacsbadge]][hacs]\n[![GitHub Activity][commits-shield]][commits]\n[![License][license-shield]][license]\n\n# SILAM Pollen Allergy Sensor for Home Assistant\n\n[README на русском тут 👈](https://github.com/danishru/silam_pollen/blob/main/README_ru.md)\n\nIntegration for Home Assistant using the dataset “Best time series obtained from the latest available run” from the SILAM Thredds server to create a service with pollen level sensors for a specific location. The forecast calculation is carried out by the Finnish Meteorological Institute taking into account aerobiological, phenological, and meteorological observations.\n\nData source: [https://silam.fmi.fi/pollen.html](https://silam.fmi.fi/pollen.html)\n\n\u003e [!CAUTION]  \n\u003e The provided data are unverified model forecasts created for scientific use only.  \n\u003e Neither the quality nor completeness of the information is guaranteed, and the data producers assume no responsibility for its accuracy or timeliness.\n\n\u003e [!IMPORTANT]  \n\u003e This integration was created using the ChatGPT edition for collaborative code writing, debugging, and editing.  \n\u003e If you hold a different ethical viewpoint, I apologize. However, I consider this use to be morally acceptable, as the integration is non-commercial, free, and open-source, and its purpose is to promote openness and collaboration.\n\n## Description\n\nThe **SILAM Pollen** integration provides a service consisting of sensors that dynamically build the URL for requesting pollen data. The data are requested from the SILAM server via HTTP, then parsed and updated in Home Assistant. You can create multiple services for different locations, and you can also choose the types of pollen you need.\n\n\u003e [!NOTE]  \n\u003e Please note: the coverage area is limited and depends on the selected dataset.  \n\u003e 🟩 **Green** — coverage zone of **SILAM Regional (v5.9.1)** (more detailed).  \n\u003e 🟨 **Yellow** — coverage zone of **SILAM Europe (v6.0)** (more general).  \n\u003e  \n\u003e To evaluate coverage and choose the appropriate region, use the interactive map below.\n\n[![Interactive pollen coverage map](https://danishru.github.io/silam_pollen/pollen_area.webp)](https://danishru.github.io/silam_pollen/)\n\n## 🆕 What’s new\n\n### v0.3.1 🧠 Smarter data updates.\n\nVersion v0.3.1 introduces a major internal improvement in how SILAM Pollen **detects and updates forecast data**.\n\n![image](https://github.com/user-attachments/assets/b5e654e7-77b6-43e5-a082-3dec4457a80f)\n\nThe integration is now **run-aware** and checks the SILAM **runs catalog** before fetching data. This allows it to reliably determine whether a **new model run is actually available**, instead of blindly re-downloading the same dataset.\n\nIf the current run hasn’t changed:\n- cached data is safely reused,\n- full XML downloads are skipped,\n- and only genuinely missing forecast hours are fetched when the forecast window moves forward.\n\nThis results in:\n- significantly fewer unnecessary network requests,\n- faster and more predictable updates,\n- reduced load on both Home Assistant and the SILAM data infrastructure.\n\nThese changes are especially important ahead of the pollen season, ensuring timely updates while keeping the integration efficient and robust.\n\n[![More in release v0.3.1](https://img.shields.io/badge/More--in--release-v0.3.1-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.3.1)\n\n### v0.3.0 🚀 One glance — the full picture of weather and pollen.\nv0.3.0 delivers a cohesive experience: one card brings together weather and pollen with a familiar look, fast response, and clear presentation. The integration now ships **with the dashboard card included**: a local JS module is bundled — no CDN or external dependencies (you only need to add it once under “Resources”). The Basic panel preserves the simplicity of the stock Weather card, while the Extended panel unfolds all forecast and allergen layers — tidy, informative, and straight to the point.\n\n![image](https://github.com/user-attachments/assets/2ccdf8ff-5afe-446f-a775-9c842e5c5060)\n\n- 💠 **Experimental Lovelace card (local build)**  \n  - Self-contained JS bundle, **no CDN**, works offline.  \n  - Built-in visual editor (**LitElement**) — configure right in the UI.  \n  - **Live WebSocket updates** — no polling delays.  \n  - **Automatic i18n**: language, formats, and units from Home Assistant.  \n  - **Native MDI icons** and theme support.  \n  - **Compatible with any `weather.*`**, shines with `weather.silam_pollen_*_forecast`.\n\n- 🖼 **Basic panel**  \n  - Mirrors the stock Home Assistant Weather card for maximum visual consistency.  \n  - For current weather, shows current conditions and **one primary attribute of your choice** — just like the stock card — and additionally lets you select **an unlimited number of draggable** attributes (toggle **row** or **column** layout).  \n  - When forecast is enabled for **SILAM**, the **forecast row** shows the **pollen index icon and state** instead of weather condition and temperature; for other weather integrations, behavior is **identical to the stock card**.  \n  - Supports a **scrollable list of forecast slots** if they don’t fit horizontally.  \n  - **Number of slots** is configurable in the editor: up to **12** via slider or **unlimited** via manual input.  \n  - Selecting attributes in the **additional block** unlocks wide possibilities to visualize weather data the way you like.\n\n- 📊 **Extended forecast panel**  \n  - Modes: **Standard**, **Focus**, **Minimal**.\n  - 🌿 **Allergen-level forecasts**\n    ![image](https://github.com/user-attachments/assets/15a81dae-7c99-4418-9525-08411045bd56)\n    \n    - **A dedicated forecast line** for each selected allergen.  \n    - **Peak concentrations** highlighted in 12-hour and daily views.  \n    - **Show details on tap** on pollen blocks: opens the sensor card for the tapped allergen; behavior is configurable in the editor.  \n    - **Trend logic + icon** — clear up/down indication.\n  - ⛅ **Full forecast layers**\n    ![image](https://github.com/user-attachments/assets/b3d2b70a-fec7-4d37-b6b9-add38f4119a8)\n    \n    - **Temperature** and **apparent temperature**, **precipitation** (probability and amount), **UV index**, **wind** (speed, gust, direction), **cloud coverage**, **humidity**, **dew point**, **pressure**.  \n    - **Meteo risk strip (experimental)**: fog (radiation/advection), dew, frost, icing/freezing rain, heavy rain/snow, heat, wind chill, strong/storm wind, “barometric saw”.  \n    - Slim strips for **humidity** and **dew point**, clear labels, refined typography.  \n    - **Gestures**: **tap** / **hold** / **double tap** (navigate, link, call service, perform action).  \n\n\u003e [!IMPORTANT]  \n\u003e **After updating**, add the module manually:\n\u003e \n\u003e [![Open your Home Assistant instance and show your dashboard resources.](https://my.home-assistant.io/badges/lovelace_resources.svg)](https://my.home-assistant.io/redirect/lovelace_resources/)  \n\u003e **Settings → Dashboards → Resources → Add** → URL: `/local/absolute-forecast-card.js` → **Resource type: JavaScript Module**.\n\n---\n\n### 🌿 Updated pollen sensor model\n- 🌸 **Pollen Forecast Sensor — now primary and out of beta**  \n- 🗂️ **Pollen Index — deprecated**  \n  - Marked as **deprecated**.  \n  - Available only via the **Legacy** toggle (**off by default** for new installs).  \n  - **Migration** preserves compatibility: existing entries get `legacy=true`.\n\n\u003e [!NOTE]  \n\u003e If you relied on the previous index or legacy allergen aggregation, review and adjust thresholds in your automations and scripts.\n\n[![More in release v0.3.0](https://img.shields.io/badge/More--in--release-v0.3.0-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.3.0)\n\n## Previous updates\n\u003cdetails\u003e\n\u003csummary\u003eShow\u003c/summary\u003e\n\n### v0.2.7 🚀 Major update of the \"Pollen Forecast BETA\" sensor!\nAfter its beta period, the forecast sensor is heading for a stable release—bringing more accuracy, data and possibilities for your dashboards.\n\n- 🔄 **Re-worked algorithms in \"Pollen Forecast BETA\"**  \n  - The `state` now reflects the **current** pollen index from the *now* block, not the first hourly step.  \n  - Hourly forecasts aggregate the index and allergen levels by **maximum** within each three-hour window (was median).  \n  - Daily and 12-hour values are calculated using an **observational percentile** (no interpolation):  \n    ≥ 18 points → 80th percentile · 12–17 points → 70th · \u003c 12 points → maximum.\n\n- 🌸 **Forecast sensor is always created**  \n  Sensor `weather.silam_pollen_{Zone Name}_forecast` is present regardless of options—*now* data are always available; **hourly**, **twice-daily (12 h)** and **daily** forecasts appear **only when the forecast option is enabled**.\n\n- 🌅 **Daily forecast \u0026 allergen peaks**  \n  The sensor now includes a **daily forecast** (up to five days) based on the observational percentile.  \n  New attribute `allergen_peaks` reports **peak allergen concentrations** for both daily and twice-daily windows—shown when specific allergens are enabled.\n\n- ➕ **New attributes for \"Pollen Forecast BETA\"**  \n  `next_condition`, `pollen_\u003callergen\u003e`, `altitude`, `date`, `responsible_elevated`—extra context for automations and dashboards.\n\n- ⏱️ **Diagnostic sensor “Forecast Horizon”**  \n  The new `sensor.silam_pollen_{Zone Name}_forecast_horizon` shows how many hours the current forecast (`state`) actually covers and what forecast length (`forecast_duration`) you asked for.\n\n- 🖼️ **Supported in pollenprognos-card v2.4.1+**  \n  The card now renders the daily forecast via `weather.get_forecasts`.  \n  \u003e **Version compatibility**  \n  \u003e • pollenprognos-card ≥ **v2.4.1** requires **silam_pollen ≥ v0.2.7**  \n  \u003e • Older card versions (≤ v2.4.0) remain compatible with silam_pollen ≥ v0.2.5.\n\n\u003e [!IMPORTANT]  \n\u003e These new algorithms may affect automations that relied on the old index or allergen-level values. Review your scripts and adjust thresholds or conditions if needed.\n\n[![More in release v0.2.7](https://img.shields.io/badge/More--in--release-v0.2.7-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.7)\n\n### v0.2.6\n\n- 🆕 **`native_name` Attribute**  \n  All allergen sensors now include a `native_name` attribute that reflects the original SILAM API key (e.g. `alder_m22`, `grass_m32`, etc.), ensuring better compatibility with external tools and visualizations.\n\n- 🔧 **Unified `entity_id` Naming**  \n  Entity IDs (including defaults and resets) now correspond exactly to the keys in the localization files. For example, `sensor.silam_pollen_{Zone Name}_grass` remains identical across all languages and for every sensor in the integration.\n\n\u003e [!IMPORTANT]  \n\u003e To revert your entities to the new default names, follow the [device customization guide](https://www.home-assistant.io/docs/configuration/customizing-devices/) in the Home Assistant documentation.\n\n\u003e [!NOTE]  \n\u003e If you’ve already created automations or scripts, remember to update the referenced `entity_id` values.  \n\u003e \u003e If your Home Assistant system language is English or Russian, you can ignore this notice — entity IDs will remain unchanged for these languages.\n\n[![More in release v0.2.6](https://img.shields.io/badge/More--in--release-v0.2.6-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.6)\n\n### v0.2.5 🌟\n\nThis is a truly significant update for **SILAM Pollen**!\n\n- 🎉 **Default HACS integration**  \n  Congratulations to us all — the integration is now included in the official HACS repository by default, making installation easier than ever!  \n\n- 🖼️ **Beautiful dashboards**  \n  Great news for dashboard lovers: [@krissen](https://github.com/krissen) has added **SILAM Pollen** support to the [pollenprognos-card](https://github.com/krissen/pollenprognos-card) (since v2.3.0) — now current conditions and pollen forecasts are available right on your dashboard!  \n  [Learn more here 👈](#dashboard-card)  \n\n- 📈 **Long-term statistics**  \n  Pollen sensors and the new diagnostic sensor now collect and display historical data.\n\n[![More in release v0.2.5](https://img.shields.io/badge/More--in--release-v0.2.5-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.5)\n  \n### v0.2.4\n\n- **📖 Default README in English**  \n  The README file is now presented in English by default.\n\n[![More in release v0.2.4](https://img.shields.io/badge/More--in--release-v0.2.4-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.4)\n\n### v0.2.3\n\n- **📦 Prepared for HACS publication**  \n  Changes made to host the integration in the default HACS catalog.\n- **🌐 Added Slovak translation**  \n  Thanks to [@misa1515](https://github.com/misa1515) for implementing the Slovak localization!\n- **🌐 Added Dutch translation**  \n  Thanks to [@rubdos](https://github.com/rubdos) for implementing the Dutch localization!\n\n[![More in release v0.2.3](https://img.shields.io/badge/More--in--release-v0.2.3-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.3)\n\n### v0.2.2\n\n- **⏱️ Forecast duration setting**  \n  When creating or modifying an entry, you can now choose the forecast duration from 36 to 120 hours (default is 36 h). As the hours increase, the number of forecast points twice a day increases proportionally.\n- **🛠️ Diagnostic sensor “fetch_duration”**  \n  A sensor to display the data update execution time (API requests, processing, calculations). Disabled by default.\n- **🌐 Added Czech translation**  \n  Thanks to [@kasparmir](https://github.com/kasparmir) for the first implementation of the Czech localization!\n\n[![More in release v0.2.2](https://img.shields.io/badge/More--in--release-v0.2.2-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.2)\n\n### v0.2.1\n\n**🌸 Pollen Forecast (BETA)**  \n- Hourly and twice-daily pollen forecasts now include values for selected allergens.  \n- For each pollen sensor, there is now an attribute with the forecast for the next day, showing the daily forecast for the next day, just like for the pollen index.\n\n[![More in release v0.2.1](https://img.shields.io/badge/More--in--release-v0.2.1-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.1)\n\n### v0.2.0\n  \n- **🌍 Support for two SILAM versions**  \n  Ability to choose between `SILAM Europe (v6.0)` and `SILAM Regional (v5.9.1)` — with an automatic availability check.  \n  `SILAM Regional (v5.9.1)` provides more **detailed and accurate forecasts** for Northern and Northwestern Europe.\n\n- **🌸 Pollen Forecast (BETA)**  \n  New weather sensor with hourly and twice-daily pollen forecasts via `weather.get_forecasts`.\n\n- **📊 Unified data handler + update service**  \n  All data are cached through `data_processing.py`.  \n  Added service `SILAM Pollen monitor: Manual Update` — can be called manually or in automations.\n\n- **🎨 Icons for integration and sensors**  \n  Visual indicators are clearer: each allergen now has its own icon.\n\n- **🌐 Localization (in 8 languages)**  \n  The interface is translated into: Russian, English, Finnish, Italian, Swedish, Norwegian, Danish, and German.\n\n[![More in release v0.2.0](https://img.shields.io/badge/More--in--release-v0.2.0-blue?style=flat)](https://github.com/danishru/silam_pollen/releases/tag/v0.2.0)\n\n\u003c/details\u003e\n\n## Installation  \n\n### Installation via HACS (recommended)\n\n**Ensure HACS is installed:**  \nIf HACS is not yet installed, follow the [official HACS installation guide](https://hacs.xyz/docs/use/).\n\n#### One-click installation\n\nTo install the **SILAM Pollen** integration, click the link below and select **Download**:\n\n[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=danishru\u0026repository=silam_pollen)\n\n#### Regular installation via HACS\n\n1. Open Home Assistant and go to HACS.  \n2. In the search bar, type `SILAM Pollen` and click **Download** next to the integration.\n\nNow your integration is installed and ready to use via HACS!\n\n### Manual installation\n\n1. Copy the `silam_pollen` folder into the `custom_components` directory of your Home Assistant configuration.  \n2. Restart Home Assistant.  \n3. Add the integration via the web interface:  \n   - Go to **Settings → Integrations**.  \n   - Click **Add Integration** and select **SILAM Pollen**.  \n   - Fill in the required fields (name, coordinates, altitude, pollen type selection, polling interval).  \n\n## Configuration\n\nFollow the setup wizard for **SILAM Pollen** at the link below:\n\n[![Open your Home Assistant instance and show an integration.](https://my.home-assistant.io/badges/integration.svg)](https://my.home-assistant.io/redirect/integration/?domain=silam_pollen)\n\nOr open **Settings → Integrations** in Home Assistant, find `SILAM Pollen`, and follow the setup wizard.\n\nHere you can set the parameters for the proper operation of the integration:\n\n- **Observation Zone** – allows you to choose a configured zone in your Home Assistant. By default, the zone `\"Home\"` is selected.  \n- **Pollen Type** – select the pollen to monitor. You can leave it empty or select multiple types from the list.  \n- **Update Interval** – the interval for loading data from the SILAM Thredds server in minutes (default is 60, minimum is 30).  \n- **Pollen Forecast (BETA)** – enables an additional weather sensor with pollen level forecasts. May increase API response time.  \n- **Desired forecast duration** — the forecast horizon you’d like to retrieve (36–120 h, default 36 h).  \n  The actual horizon may be shorter if the SILAM server currently provides fewer hours of data.\n- **Zone Name** – by default, the name from the selected zone is used. This name is applied to the service and sensor names. You can override it.  \n- **Altitude above Sea Level** – the altitude used for data sampling. If the `\"Home\"` zone is selected, the value from the general settings (`config/general`) is used; otherwise, the default is 275 m. You can override it.  \n- **Location** – shows the selected coordinates on the map. You can change the zone using the map or manually set the latitude, longitude, and radius. The specified radius reflects the approximate spatial resolution of the pollen data (about 10 km).\n\n![image](https://github.com/user-attachments/assets/bd8358ab-3892-417d-bfd1-fb509c0fa1a6)\n\n## Usage\n\nAfter installing the integration in Home Assistant, a service named `SILAM Pollen - {Zone Name}` is created. The service description shows the observation location coordinates and the dataset version used.\n\n![image](https://github.com/user-attachments/assets/568a723a-e9e5-4045-9e6d-a6b99e015b9b)\n\n\nWithin the service a weather entity called **Pollen Forecast** is created. Its `state` shows the pollen-index value for the *nearest* forecast, calculated from hourly mean concentrations and the threshold levels defined in Mikhail Sofiev’s table ([link](https://www.researchgate.net/profile/Mikhail-Sofiev)).\n\n**Possible index values:**  \n- `very_low` — Very Low  \n- `low` — Low  \n- `moderate` — Moderate  \n- `high` — High  \n- `very_high` — Very High  \n- `unknown` — Unknown  \n\n### \"Pollen Forecast\" sensor attributes\n\n- **Next index** (`next_condition`) — expected condition from the first 3-hour window (shown only when forecasting is enabled).  \n- **Pollen \u003callergen\u003e** (`pollen_\u003callergen\u003e`) — modelled numeric concentration of each selected allergen in the nearest forecast, grains/m³.  \n- **Altitude (above sea level)** (`altitude`) — closest available grid height used for sampling.  \n- **Forecast date/time** (`date`) — ISO 8601 timestamp for which the forecast is valid.  \n- **Primary allergen** (`responsible_elevated`) — allergen that contributed most to the index value.  \n- **Data source** (`attribution`) — `Powered by silam.fmi.fi`.\n\nIf **Pollen Forecast** is enabled, three additional forecast types become available:\n\n1. **Hourly forecast** for the next 24 h (3-hour steps).  \n2. **Twice-daily forecast** across the chosen horizon (default 36 h, up to 120 h) with the index and peak values for each allergen.  \n3. **Daily forecast** for the coming days (default 36 h, up to 120 h) with the index and peak values for each allergen.\n\n\u003e [!IMPORTANT]  \n\u003e **Important:** the *actual* forecast horizon depends on data currently available on the SILAM Thredds server.  \n\u003e Even if you request up to 120 hours, the model might return a shorter span (e.g. 48 hours) depending on the latest run time.  \n\u003e  \n\u003e The diagnostic sensor **Forecast Horizon** helps track this: it shows the real (available) horizon, while its attribute **`forecast_duration`** displays the duration you requested in the integration settings.\n\n![image](https://github.com/user-attachments/assets/b5ff0507-fe13-48eb-a891-910df2c03707)\n\nThis data is available via the standard `weather.get_forecasts` service.\n\n![image](https://github.com/user-attachments/assets/def0ba1d-73f9-4aec-9a3d-7bf3013c5ab8)\n\n\u003cdetails\u003e\n\u003csummary\u003eShow \"Hourly\" response example\u003c/summary\u003e\n\n```yaml\nweather.silam_pollen_home_assistant_forecast:\n  forecast:\n    - datetime: \"2025-07-09T16:00:00+00:00\"\n      condition: low\n      native_temperature_unit: °C\n      pollen_index: 2\n      temperature: 28.8\n      pollen_birch: 0\n      pollen_grass: 17\n    - datetime: \"2025-07-09T19:00:00+00:00\"\n      condition: low\n      native_temperature_unit: °C\n      pollen_index: 2\n      temperature: 24.7\n      pollen_birch: 0\n      pollen_grass: 13\n    - datetime: \"2025-07-09T22:00:00+00:00\"\n      condition: low\n      native_temperature_unit: °C\n      pollen_index: 2\n      temperature: 23.5\n      pollen_birch: 0\n      pollen_grass: 12\n    - datetime: \"2025-07-10T01:00:00+00:00\"\n      condition: moderate\n      native_temperature_unit: °C\n      pollen_index: 3\n      temperature: 22.8\n      pollen_birch: 0\n      pollen_grass: 27\n    - datetime: \"2025-07-10T04:00:00+00:00\"\n      condition: moderate\n      native_temperature_unit: °C\n      pollen_index: 3\n      temperature: 24.4\n      pollen_birch: 0\n      pollen_grass: 46\n    - datetime: \"2025-07-10T07:00:00+00:00\"\n      condition: moderate\n      native_temperature_unit: °C\n      pollen_index: 3\n      temperature: 29.4\n      pollen_birch: 0\n      pollen_grass: 35\n    - datetime: \"2025-07-10T10:00:00+00:00\"\n      condition: low\n      native_temperature_unit: °C\n      pollen_index: 2\n      temperature: 33.4\n      pollen_birch: 0\n      pollen_grass: 19\n    - datetime: \"2025-07-10T13:00:00+00:00\"\n      condition: low\n      native_temperature_unit: °C\n      pollen_index: 2\n      temperature: 33.4\n      pollen_birch: 0\n      pollen_grass: 12\n```\n\u003c/details\u003e  \n\n\u003cdetails\u003e\n\u003csummary\u003eShow \"Twice-daily\" response example\u003c/summary\u003e\n\n```yaml\nweather.silam_pollen_home_assistant_forecast:\n  forecast:\n    - datetime: \"2025-07-09T21:00:00+00:00\"\n      is_daytime: false\n      condition: low\n      pollen_index: 2\n      temperature: 28.8\n      allergen_peaks:\n        grass:\n          peak: 27\n          time: \"2025-07-10T02:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 13\n      templow: 22.5\n    - datetime: \"2025-07-10T09:00:00+00:00\"\n      is_daytime: true\n      condition: moderate\n      pollen_index: 3\n      temperature: 33.4\n      allergen_peaks:\n        grass:\n          peak: 46\n          time: \"2025-07-10T05:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 35\n      templow: 22.6\n    - datetime: \"2025-07-10T21:00:00+00:00\"\n      is_daytime: false\n      condition: low\n      pollen_index: 2\n      temperature: 32.9\n      allergen_peaks:\n        grass:\n          peak: 21\n          time: \"2025-07-10T19:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 14\n      templow: 23\n    - datetime: \"2025-07-11T09:00:00+00:00\"\n      is_daytime: true\n      condition: low\n      pollen_index: 2\n      temperature: 35.2\n      allergen_peaks:\n        grass:\n          peak: 20\n          time: \"2025-07-11T08:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 16\n      templow: 23.3\n    - datetime: \"2025-07-11T21:00:00+00:00\"\n      is_daytime: false\n      condition: low\n      pollen_index: 2\n      temperature: 35.1\n      allergen_peaks:\n        grass:\n          peak: 22\n          time: \"2025-07-11T19:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 15\n      templow: 23.3\n    - datetime: \"2025-07-12T09:00:00+00:00\"\n      is_daytime: true\n      condition: low\n      pollen_index: 2\n      temperature: 35.1\n      allergen_peaks:\n        grass:\n          peak: 16\n          time: \"2025-07-12T06:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 14\n      templow: 23.3\n    - datetime: \"2025-07-12T21:00:00+00:00\"\n      is_daytime: false\n      condition: low\n      pollen_index: 2\n      temperature: 34.8\n      allergen_peaks:\n        grass:\n          peak: 16\n          time: \"2025-07-12T20:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 15\n      templow: 24\n    - datetime: \"2025-07-13T09:00:00+00:00\"\n      is_daytime: true\n      condition: low\n      pollen_index: 2\n      temperature: 31.9\n      allergen_peaks:\n        grass:\n          peak: 19\n          time: \"2025-07-13T09:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 14\n      templow: 23.7\n    - datetime: \"2025-07-13T21:00:00+00:00\"\n      is_daytime: false\n      condition: low\n      pollen_index: 2\n      temperature: 29\n      allergen_peaks:\n        grass:\n          peak: 14\n          time: \"2025-07-13T18:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 14\n      templow: 21.5\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eShow \"Daily\" response example\u003c/summary\u003e\n\n```yaml\nweather.silam_pollen_home_assistant_forecast:\n  forecast:\n    - datetime: \"2025-07-10T09:00:00+00:00\"\n      condition: moderate\n      pollen_index: 3\n      temperature: 33.4\n      allergen_peaks:\n        grass:\n          peak: 46\n          time: \"2025-07-10T05:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 34\n      templow: 22.5\n    - datetime: \"2025-07-11T09:00:00+00:00\"\n      condition: low\n      pollen_index: 2\n      temperature: 35.2\n      allergen_peaks:\n        grass:\n          peak: 22\n          time: \"2025-07-11T19:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 18\n      templow: 23\n    - datetime: \"2025-07-12T09:00:00+00:00\"\n      condition: low\n      pollen_index: 2\n      temperature: 35.1\n      allergen_peaks:\n        grass:\n          peak: 16\n          time: \"2025-07-12T06:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 15\n      templow: 23.3\n    - datetime: \"2025-07-13T09:00:00+00:00\"\n      condition: low\n      pollen_index: 2\n      temperature: 31.9\n      allergen_peaks:\n        grass:\n          peak: 19\n          time: \"2025-07-13T09:00:00+00:00\"\n      pollen_birch: 0\n      pollen_grass: 14\n      templow: 21.5\n```\n\u003c/details\u003e\n\n### How the forecast is calculated\n\nIn **SILAM Pollen**, SILAM‐model XML responses are parsed, merged by the `date` field, and then aggregated into three forecast types:\n\n#### Hourly forecast (24 h)\n* Built in 3-hour steps.  \n* For each 3-hour window we compute:  \n  * Maximum temperature.  \n  * Pollen index — the maximum value (captures the true peak).  \n  * Maximum value for every selected allergen.  \n* The forecast timestamp is the midpoint of the 3-hour window (local time).  \n* Uses “today + 24 h” as the time span.\n\n#### Twice-daily forecast (12-hour windows, 36 – 120 h)\n* Two windows per day: 06:00–18:00 and 18:00–06:00 local time.  \n* For each 12-hour window we calculate:  \n  * Maximum and minimum temperature.  \n  * **Pollen index** and **allergen levels**, smoothed by an *observational percentile*:  \n    * ≥ 18 points → 80th percentile  \n    * 12 – 17 points → 70th percentile  \n    * \u003c 12 points → maximum  \n    * No interpolation is used — the actual value at the percentile (ceil-index) is taken.  \n  * **Allergen peaks** (`allergen_peaks`) — the maximum concentration and the time it occurs within the window.  \n* Forecast timestamps are placed at 00:00 and 12:00 local time.\n\n#### Daily forecast (24-hour windows, 36 – 120 h)\n* 24-hour windows starting \"tomorrow.\"  \n* For each day we compute:  \n  * Maximum and minimum temperature.  \n  * **Pollen index** and **allergen levels** using the same observational-percentile method.  \n  * **Allergen peaks** for the day.  \n* Forecast timestamp is 12:00 local time.\n\n#### Aggregation technique\n* SILAM XML is parsed and merged by `date`.  \n* Aggregations use `max`, `min`, and a custom *observational percentile* function (ceil-index, no interpolation).  \n* All forecasts are cached in `merged_data` and served via `weather.get_forecasts`.\n\nIf one or more pollen types are selected, a separate **{Pollen Type}** sensor is created for each, displaying the modeled pollen grain concentration (grains/m³).\n\n**Attributes of the \"{Pollen Type}\" sensors:**  \n- **Altitude (sea level)** — the nearest available altitude used for data sampling.  \n- **Forecast for Tomorrow** — the aggregated pollen level forecast value for the next day (shown if the forecast is enabled).\n\n**Attributes of the \"Pollen Index\" sensor:**  \n- **Forecast Date \u0026 Time** — the timestamp for which the index is calculated (ISO 8601).  \n- **Primary Allergen** — the allergen that had the greatest impact on the index calculation.  \n- **Forecast for Tomorrow** — the daily pollen level forecast for the next day (shown if the forecast is enabled).\n\n**Fetch duration (`fetch_duration`)** — a sensor (disabled by default) that shows the total time spent refreshing the data (API call, parsing, calculations).  \n\n**Forecast horizon (`forecast_horizon`)** — a sensor (disabled by default) that displays the *actual* forecast span in hours (the gap between the “now” timestamp and the last forecast point).  \nIts attribute **`forecast_duration`** reveals the *requested* forecast length in hours, as set in the integration options.\n\n|  ![image](https://github.com/user-attachments/assets/ae513967-6ddc-43be-8b7b-c8076f6155a5) | ![image](https://github.com/user-attachments/assets/06fc40d5-32e6-4332-8696-0e7ff970a48c)  | ![image](https://github.com/user-attachments/assets/8307c335-6de9-4517-8ded-f5923f66b6da) |\n| ------------- | ------------- | ------------- |\n\n## Dashboard Card\n\nGreat news for dashboard enthusiasts — you can now display the pollen forecast with a beautiful card!  \nThe [pollenprognos-card](https://github.com/krissen/pollenprognos-card) has supported **SILAM Pollen** integration since [v2.3.0](https://github.com/krissen/pollenprognos-card/releases/tag/v2.3.0), and in [v2.3.3](https://github.com/krissen/pollenprognos-card/releases/tag/v2.3.3) it added:\n\n- hourly and twice-a-day forecasts;  \n- localization in multiple languages;  \n- other useful enhancements.  \n\nStarting with [v2.4.1](https://github.com/krissen/pollenprognos-card/releases/tag/v2.4.1):\n\n- added **daily-forecast support** (via `weather.get_forecasts`) — up to 5 days ahead.\n\n\u003e [!IMPORTANT]  \n\u003e **Version compatibility:**  \n\u003e pollenprognos-card **≥ v2.4.1** requires silam_pollen **≥ v0.2.7** (older card versions work with silam_pollen ≥ v0.2.5).\n\nHuge thanks to [@krissen](https://github.com/krissen) for this work!\n\nThe card is available in the **default HACS repository**.  \nTo install, click **Download** in the card’s menu:\n\n[![HACS Repository Badge](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=krissen\u0026repository=pollenprognos-card)\n\n### See it in action:\n\n![pollenprognos-card preview](https://github.com/user-attachments/assets/0bfb5c3e-7e85-474e-9aa6-fe8282a23520)\n\nFor more information and documentation, visit the repository. If you enjoy the card, don’t forget to give it a ⭐ and open an issue for bugs or feature requests:  \nhttps://github.com/krissen/pollenprognos-card  \n\n## Additional Resources\n\nFor more detailed information on pollen and its distribution zones, we recommend the following projects:\n\n- **SILAM Pollen (FMI)**  \n  [https://silam.fmi.fi/pollen.html](https://silam.fmi.fi/pollen.html)  \n  Official source of pollen forecasts from the Finnish Meteorological Institute. Provides 5-day pollen distribution forecasts for Europe and Northern Europe (birch, grasses, olive, ragweed) in cooperation with the European Allergy Network (EAN).\n\n## Publications on the SILAM Model\n\nBelow are key papers detailing the main modules and validation of the SILAM pollen dispersion model, ordered by publication date:\n\n- **A numerical model of birch pollen emission and dispersion in the atmosphere. Description of the emission module** (Mikhail Sofiev et al., 2012)  \n  Detailed description of the SILAM birch pollen emission module. Published 13 March 2012.  \n  \u003chttps://link.springer.com/article/10.1007/s00484-012-0532-z\u003e\n\n- **Variation of the group 5 grass pollen allergen content of airborne pollen in relation to geographic location and time in season** (Jeroen Buters et al., 2015)  \n  Study of seasonal and geographic variability in group 5 grass pollen allergen content. Published online 6 May 2015.  \n  \u003chttps://www.jacionline.org/article/S0091-6749(15)00412-1/fulltext\u003e\n\n- **On impact of transport conditions on variability of the seasonal pollen index** (Mikhail Sofiev, 2016)  \n  Investigation of how atmospheric transport affects seasonal pollen index variability. Published 24 October 2016.  \n  \u003chttps://link.springer.com/article/10.1007/s10453-016-9459-x\u003e\n\n- **Bioaerosols in the atmosphere at two sites in Northern Europe in spring 2021: Outline of an experimental campaign** (Mikhail Sofiev et al., 2022)  \n  Overview of an experimental campaign studying bioaerosols at two sites in Northern Europe in spring 2021. Published 7 July 2022.  \n  \u003chttps://www.sciencedirect.com/science/article/pii/S0013935122011252\u003e\n\n- **European pollen reanalysis, 1980–2022, for alder, birch, and olive** (Mikhail Sofiev et al., 2024)  \n  A reanalysis of European pollen data for alder, birch, and olive from 1980 to 2022. Published 3 October 2024.  \n  \u003chttps://www.nature.com/articles/s41597-024-03686-2\u003e\n\n## Thanks\n\nThanks to all the people who have contributed!\n\n[![contributors](https://contributors-img.web.app/image?repo=danishru/silam_pollen)](https://github.com/danishru/silam_pollen/graphs/contributors)\n\n## License\n\n[MIT License](LICENSE)\n\n## Support\n\nIf you have questions or issues, create an issue in the [repository](https://github.com/danishru/silam_pollen/issues).  \n\n![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fanalytics.home-assistant.io%2Fcustom_integrations.json\u0026query=%24.silam_pollen.total\u0026style=flat-square\u0026label=use\u0026cacheSeconds=15600)\n\n\n\u003c!-- Badge link definitions --\u003e\n[releases-shield]: https://img.shields.io/github/release/danishru/silam_pollen.svg?style=for-the-badge\n[releases]: https://github.com/danishru/silam_pollen/releases\n[commits-shield]: https://img.shields.io/github/commit-activity/m/danishru/silam_pollen.svg?style=for-the-badge\n[commits]: https://github.com/danishru/silam_pollen/commits\n[download-shield]: https://img.shields.io/github/downloads/danishru/silam_pollen/total.svg?style=for-the-badge\n[downloads]: https://github.com/danishru/silam_pollen/releases\n[license-shield]: https://img.shields.io/github/license/danishru/silam_pollen.svg?style=for-the-badge\n[license]: https://github.com/danishru/silam_pollen/blob/master/LICENSE\n[hacsbadge]: https://img.shields.io/badge/HACS-Default-41BDF5.svg?style=for-the-badge\n[hacs]: https://hacs.xyz/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanishru%2Fsilam_pollen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanishru%2Fsilam_pollen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanishru%2Fsilam_pollen/lists"}