Skip to content

🌼 Pollen Levels v3.0.0b4 β€” fixed 5-day forecasts and legacy _d1 / _d2 cleanup

Pre-release
Pre-release

Choose a tag to compare

@eXPerience83 eXPerience83 released this 12 Jun 23:00
ea1c7e6

This is the fourth beta for the upcoming Pollen Levels v3 release.

It is a pre-release validation build for the new Home Assistant config subentries architecture, where one parent config entry stores the Google Pollen API key and each configured location is stored as a location subentry.

Beta 4 focuses on the final forecast model cleanup before the release candidate:

  • Forecast days are now fixed at 5.
  • Optional per-day pollen type forecast sensors ending in _d1 and _d2 have been removed.
  • Legacy stored options and legacy entity registry entries are cleaned up automatically.
  • Home Assistant Repairs now warn users about affected dashboards, automations, templates, and custom cards.

⚠️ This is still a beta pre-release.
Please create a full Home Assistant backup before upgrading.


🚨 Important upgrade notice

Supported upgrade path for this beta

This beta is primarily intended for users upgrading from the latest stable v2 release:

2.3.0 β†’ 3.0.0b4

It can also be used by existing v3 beta testers upgrading from an earlier v3 alpha or beta build.

The v3 migration changes how Pollen Levels stores configuration internally.

Before v3, each location was a separate config entry with its own stored API key.

Starting with v3:

Parent config entry
└── Google Pollen API key
    β”œβ”€β”€ Location subentry: Home
    β”œβ”€β”€ Location subentry: Work
    └── Location subentry: Other location

Legacy entries sharing the same Google API key are consolidated under one parent entry. Each previous location becomes one location subentry.


β›” Downgrade warning

After upgrading to Pollen Levels v3, downgrading back to Pollen Levels 2.x is not supported without restoring a Home Assistant backup.

If you need to go back to 2.x, restore the backup created before installing this beta.

Do not downgrade directly from v3 to v2.x expecting the old config entries to work as before.


⚠️ Breaking change in beta 4

Removed optional _d1 and _d2 pollen type forecast sensors

Beta 4 removes the optional extra per-day pollen type forecast sensors ending in:

_d1
_d2

These were the extra forecast entities created for D+1 and D+2 pollen type forecasts.

Forecast data is still available through attributes on the base pollen type, plant, and summary sensors, including:

forecast
tomorrow_value
tomorrow_category
d2_value
d2_category
trend
expected_peak

For the fixed 5-day forecast model, the forecast attribute can expose future offsets:

offset 1 β†’ tomorrow
offset 2 β†’ D+2
offset 3 β†’ D+3
offset 4 β†’ D+4

Keeping forecast data on the base sensors makes the integration easier to maintain and easier for dashboards, templates, and third-party cards to consume consistently.

Migration example

Before:

{{ states("sensor.example_grass_d1") }}
{{ states("sensor.example_grass_d2") }}

After:

{{ state_attr("sensor.example_grass", "tomorrow_value") }}
{{ state_attr("sensor.example_grass", "d2_value") }}

Or using the forecast list directly:

{% set forecast = state_attr("sensor.example_grass", "forecast") or [] %}
{% set tomorrow = forecast | selectattr("offset", "eq", 1) | first %}
{{ tomorrow.value if tomorrow else none }}

Existing dashboards, automations, templates, and custom cards that still reference sensor.*_d1 or sensor.*_d2 must be updated.


✨ What changed since v2.3.0

🧩 New v3 config subentries architecture

Pollen Levels now uses Home Assistant config subentries:

  • One parent config entry per Google Pollen API key.

  • One location subentry per configured location.

  • Multiple locations can share the same API key.

  • Global options live on the parent entry:

    • update interval
    • API response language
  • Location data lives on each subentry:

    • name
    • latitude
    • longitude

Forecast days are no longer configurable. Pollen Levels now always requests the maximum 5-day forecast horizon supported by the Google Maps Pollen API.

This makes the integration cleaner, easier to manage, and better aligned with Home Assistant’s multi-location configuration model.


πŸ“… Fixed 5-day forecast model

Forecast days are now fixed at 5 for all entries and locations.

The setup and options flows no longer expose configuration options for:

  • forecast days
  • separate per-day pollen type forecast sensors

Existing entries with stored forecast_days or create_forecast_sensors options are upgraded automatically.


🧹 Legacy forecast entity cleanup

Legacy _d1 and _d2 entity registry entries owned by Pollen Levels are removed during setup or reload.

This cleanup is intentional in beta 4 so the fixed 5-day forecast model, legacy entity cleanup, and Home Assistant Repair warning can be tested together before the release candidate.


🧰 Home Assistant Repairs

Beta 4 adds Home Assistant Repairs for two important cases:

  • Invalid stored Pollen Levels location data.
  • Legacy per-day forecast sensors or legacy forecast options detected.

If stored location data is invalid, Home Assistant will show guidance to delete and recreate the affected location or restore a backup.

If legacy _d1 / _d2 forecast sensors or options are detected, Home Assistant will warn that dashboards, automations, templates, and custom cards may need to be updated.


🏠 Multi-location migration

When upgrading from v2.3.0, existing locations are migrated automatically.

Expected behavior:

  • Existing locations are converted into location subentries.
  • Entries using the same API key are grouped under one parent entry.
  • Entries using different API keys remain under separate parent entries.
  • Existing entity IDs should be preserved.
  • Existing unique IDs should be preserved.
  • Existing devices, dashboards, automations, and history should continue to match after migration.

Please verify your entities after upgrading, especially if you had multiple locations configured before.


πŸ”˜ Per-location β€œUpdate now” button

Each location now has its own Update now button.

This allows refreshing one location without forcing every configured location to update.

The global Home Assistant action/service still exists:

pollenlevels.force_update

It continues to refresh all active configured locations.


🧹 Safer stale runtime handling

v3 improves behavior when a location subentry is removed.

The integration now avoids refreshing stale runtime locations that may remain temporarily in memory before the parent entry is reloaded.

This affects:

  • sensor setup
  • button setup
  • diagnostics
  • pollenlevels.force_update

If diagnostics report stale runtime data immediately after deleting a location, reload the Pollen Levels parent entry from Home Assistant.


🩺 Improved diagnostics

Diagnostics now include v3 migration support summaries:

registry_summary
runtime_summary

These help verify that migrated entities and devices are correctly associated with their location subentries.

Expected healthy values after reload:

registry_summary.entities.without_subentry = 0
registry_summary.devices.without_subentry = 0
registry_summary.devices.with_legacy_none_association = 0
runtime_summary.stale_location_count = 0

API keys are redacted, and coordinates are only included approximately for support purposes.


πŸ“ˆ Forecast attributes for overall pollen risk

The overall_pollen_risk_today summary sensor now exposes forecast-style attributes, so compatible Lovelace cards and dashboards can render upcoming-day general pollen risk more easily.

This brings the summary sensor closer to the forecast model used by pollen type and plant sensors.


🌱 Better handling of plant-only payloads

Sensor setup now accepts valid current-day plant_ pollen payload keys.

This avoids treating plant-only valid data as missing pollen data.


πŸ”’ Improved cancellation handling

The global pollenlevels.force_update action now correctly propagates asyncio.CancelledError.

This helps Home Assistant shutdown, reload, and task cancellation behave correctly.


πŸ›  Internal cleanup

Some duplicated helper logic was extracted into shared utilities without changing public behavior.

This affects internal handling of:

  • coordinator identity
  • device identifiers
  • API key helpers
  • location unique IDs
  • forecast attributes

No entity IDs, device IDs, diagnostics contract, or migration behavior should change because of this cleanup.


βœ… Recommended validation after upgrading

After installing 3.0.0b4, please check:

  • Pollen Levels loads successfully.
  • Existing entities keep their entity IDs.
  • Existing dashboards and automations still work, except references to removed _d1 / _d2 forecast sensors.
  • Existing history is preserved.
  • Each location appears as a location subentry.
  • Each location has its own Update now button.
  • pollenlevels.force_update still works.
  • Forecast attributes are available on base pollen type, plant, and summary sensors.
  • The forecast attribute exposes the expected upcoming-day offsets.
  • Legacy sensor.*_d1 and sensor.*_d2 entities owned by Pollen Levels are removed.
  • Adding a new location works.
  • Removing a location works.
  • Reloading the parent entry clears any temporary stale runtime data.
  • Diagnostics show clean registry_summary and runtime_summary values.
  • Home Assistant Repairs appear when legacy forecast options/entities or invalid stored location data are detected.

πŸ§ͺ Beta feedback wanted

Please report issues if you notice:

  • entities renamed unexpectedly
  • duplicated entities
  • missing devices
  • lost history
  • failed migration
  • stale locations still being refreshed
  • force_update refreshing deleted locations
  • diagnostics exposing sensitive information
  • dashboards/cards not reading forecast attributes correctly
  • legacy _d1 or _d2 entities not being removed
  • Repairs not appearing when expected
  • Repairs appearing repeatedly after the issue has been fixed
  • invalid stored location data without a visible Repair issue

When opening an issue, please avoid sharing API keys, full request URLs, or precise coordinates.


πŸ“Œ Summary

Pollen Levels v3.0.0b4 is focused on validating the v3 migration and the final forecast model cleanup before RC1.

Main highlights:

  • New Home Assistant config subentries architecture.
  • One parent entry per API key.
  • One location subentry per location.
  • Migration from v2.3.0 with entity/history preservation.
  • Forecast days fixed at 5.
  • Removed setup/options flow controls for forecast days and per-day type forecast sensors.
  • Removed optional _d1 / _d2 pollen type forecast sensors.
  • Automatic cleanup of legacy _d1 / _d2 entity registry entries owned by Pollen Levels.
  • Home Assistant Repair issue for invalid stored location data.
  • Home Assistant Repair warning for legacy forecast sensors or options.
  • Per-location update buttons.
  • Safer stale runtime handling.
  • Improved diagnostics.
  • Forecast attributes on overall_pollen_risk_today.

Please backup before upgrading, test carefully, and report any migration or forecast cleanup issue before the RC phase.


What's Changed

Changed

  • Forecast days are now fixed at 5 for all entries and locations, so all users get the maximum forecast horizon supported by the Google Maps Pollen API.
  • Removed the configuration options for forecast days and separate per-day pollen type forecast sensors from setup and options flows.
  • Breaking change: removed optional per-day pollen type forecast sensors ending in _d1 and _d2.
  • Forecast data remains available through attributes on the base pollen type, plant, and summary sensors, including forecast, tomorrow_*, d2_*, trend, and expected_peak.
  • This beta intentionally brings the _d1 and _d2 cleanup forward so the fixed 5-day forecast model, legacy entity cleanup, and Repair warning can be tested together before the release candidate.
  • Existing entries with stored forecast_days or create_forecast_sensors options are upgraded automatically.
  • Legacy _d1 and _d2 entity registry entries owned by Pollen Levels are removed during setup/reload.

Fixed

  • Added a Home Assistant Repair issue when stored Pollen Levels location data is invalid, so users get visible guidance to delete/recreate the affected location or restore a backup.
  • Added a Home Assistant Repair warning when legacy per-day forecast sensors or options are detected, so users know to update dashboards, automations, templates, and custom cards that still reference _d1 or _d2 entities.

Changes since beta 3: v3.0.0b3...v3.0.0b4

Full Changelog: v2.3.0...v3.0.0b4

What's Changed