Skip to content

v3.1.0: Google Pollen (svenove) + Atmo France robustness

Choose a tag to compare

@krissen krissen released this 19 Apr 12:11
b092a9a

Robustness and a second road into Google Pollen 🌍

This release is mostly about making the card sturdier. Atmo France users running multiple instances will finally see their cards work again, SILAM is noticeably snappier on every HA state update, and a new adapter joins the lineup for people who prefer svenove's take on the Google Pollen API.

With gp in, pollenprognos-card now supports 9 integrations across 15 languages.


What's New

🌍 Google Pollen (svenove) -- a second adapter for Google's API

Added support for home-assistant-google-pollen by @svenove, the gp adapter (#199). It uses the same Google Pollen API as the existing gpl adapter but exposes the data differently: forecasts live as flat attributes (tomorrow, day 3, day 4) and allergens are identified by display_name rather than by a code attribute.

The new adapter understands all 35 languages the Google Pollen API returns. Sensor classification prefers the language-independent unique_id and falls back to a pre-generated display_name lookup (ambrosia, amvrosia_artemisifyllos, bynkeambrosie all resolve to ragweed). Auto-detection, the visual editor, multi-location support and manual mode all work.

If you run both gpl and gp, the autodetect chain prefers gp when both produce sensors -- see docs/integrations.md for the design notes.

🇫🇷 Atmo France, properly this time

Atmo France users with multiple cities saw their cards stop finding sensors after HA started prefixing entity IDs to disambiguate between instances (sensor.toulouse_niveau_bouleau_toulouse instead of sensor.niveau_bouleau_toulouse). The adapter was pattern-matching a single shape of entity ID and missed the prefixed form entirely.

The fix isn't a bigger regex. Discovery now runs in three tiers (#201):

  1. Device registry -- the atmofrance identifier is matched on hass.devices, entities walked via device_id. Entity IDs are opaque; prefixes don't matter.
  2. Entity registry by platform: "atmofrance" for older HA versions without full device info.
  3. Regex fallback for very old HA where neither registry is populated, now also accepting the legacy niveau_alerte_{slug} form.

Each config entry becomes its own location in the editor dropdown with its device label (or name_by_user if the user has renamed it). Legacy slug configs like location: nice keep working; they're mapped to the correct discovered instance transparently.

While we were there, the state text for the special "Indisponible" (level 0) and "Événement" (level 7) sensors now respects the card's locale instead of always showing the French wording that the integration puts in the Libellé attribute. Swedish, German, Spanish and eleven other UIs finally say the right thing.

📖 Troubleshooting guide

A proper docs/troubleshooting.md now covers browser cache quirks, conflicting card installations, how to verify which version is actually running, and integration-specific gotchas. Linked from the README and from the new GitHub issue templates so common problems get self-serve answers (#197, #203).


Improvements

  • SILAM: discovery results are cached across set hass(), the forecast subscription, and fetchForecast(), eliminating the redundant registry scan on every state update. Inverse allergen maps are precomputed once per resolveEntityIds() call. Debug builds now include performance.now() timing.
  • HACS visibility: removed the country filter from hacs.json. Users outside the previously listed countries now find the card in HACS.
  • Slugify: dropped the any-ascii runtime dependency. The GP adapter uses pre-generated display_name maps instead, which are smaller and faster.

Bug Fixes

  • Atmo France: prefixed entity IDs not recognized (#200): the card failed to find sensors for any Atmo France instance where HA had added a disambiguation prefix. Fixed as described above.
  • Atmo France: special states showing French text in non-French UIs: levels 0 (Indisponible) and 7 (Événement) now use the card's localized labels; Libellé is a fallback for locales without a translation.
  • SILAM: invalid empty key in Russian allergen mapping; added empty-slug validation to the generator script so this can't reoccur.

Housekeeping

  • Consolidated three separate auto-detect codepaths (card set hass(), editor set hass(), editor setConfig()) to use the same discovery-based detection for Atmo, removing silent divergences for pollution sensors and prefixed IDs.
  • Removed stale any-ascii references in scripts and docs after the slugify refactor.
  • GP adapter documentation brought up to par with GPL (design decisions, discovery tiers, collision handling, multi-location support).

What's Changed

Full Changelog: v3.0.1...v3.1.0