Skip to content

v1.9.3

Choose a tag to compare

@eXPerience83 eXPerience83 released this 23 Feb 08:55
200a248

🌼 Pollen Levels v1.9.3

🛠️ Stability + correctness release focused on stricter setup validation, safer coordinator parsing, deterministic entity creation, better test isolation, and more robust rate-limit handling.


🚀 Highlights

  • Setup validation now matches runtime behavior

    • Config-flow API validation now requires dailyInfo to be a non-empty list of objects, aligning setup checks with runtime parsing.
    • Whitespace-only API keys are rejected up front with a clearer “Invalid API key” error, and API key inputs are now masked (password selector).
  • 🧩 More resilient coordinator & sensor setup

    • Malformed dailyInfo payloads (non-list / non-dict structures) are treated as invalid and the integration preserves the last successful dataset when available, avoiding empty entities after bad responses.
    • Forecast-day parsing is hardened across coordinator and sensor setup to tolerate malformed stored values without crashing.
    • Disabled per-day sensors are no longer re-created: _d1/_d2 keys are skipped when effective options disable those sensors.
    • Entry runtime_data is cleared if platform forwarding fails, preventing partially initialized states.
  • 🔁 Deterministic sensor creation

    • Current-day plant sensors are now created in a deterministic order by sorting plant codes.
    • Stored forecast sensor mode values are normalized during setup so legacy / whitespace-padded values don’t silently degrade to "none".
  • 🧪 Better test isolation

    • Setup tests now use scoped monkeypatching rather than persistent module reassignment, avoiding cross-test contamination.
    • The global aiohttp stub is no longer replaced unconditionally, improving isolation in mixed environments.
  • Stronger HTTP 429 backoff

    • Retry-After parsing is validated (rejects non-finite, negative, and stale date-based delays) and retry sleeps are clamped to a safe bounded range.

🔧 Detailed changes

[1.9.3] – 2026-02-14

Fixed

  • Aligned config-flow API validation with runtime parsing by requiring dailyInfo to be a non-empty list of objects during setup validation.
  • Prevented test cross-contamination in setup tests by using scoped monkeypatching for coordinator/client stubs instead of persistent module reassignment.
  • Prevented disabled per-day sensors from being re-created during sensor setup by skipping *_d1 / *_d2 keys when effective forecast options disable them.
  • Hardened coordinator parsing for malformed dailyInfo payloads by treating non-list/non-dict structures as invalid and preserving the last successful dataset when available.
  • Normalized stored forecast sensor mode values during integration setup so legacy or whitespace-padded values no longer degrade silently to none.
  • Ensured deterministic current-day plant sensor creation by sorting plant codes.
  • Reject whitespace-only API keys at setup (defensive validation) and raise ConfigEntryAuthFailed with a clearer “Invalid API key” message.
  • Mask API key input fields in config flow (password selector).
  • Cleared entry runtime data when platform forwarding fails to avoid leaving a partially initialized state.
  • Hardened forecast_days parsing during coordinator and sensor setup to tolerate malformed stored values without crashing.
  • Improved test isolation by avoiding unconditional replacement of the global aiohttp module stub.
  • Accepted numeric-string RGB channels from API color payloads via shared channel normalization, while still ignoring non-numeric strings.
  • Hardened HTTP 429 backoff by validating Retry-After values (rejecting non-finite, negative, and stale date-based delays) and clamping retry sleep to a safe bounded range.

Changed

  • Switched sensor setup iteration to use a validated local data snapshot for clearer and more consistent entity creation flow.
  • Preserved legacy 4-decimal coordinate unique-id formatting to keep existing duplicate-location detection behavior stable across upgrades.
  • Expanded regression coverage for disabled per-day sensor creation, malformed dailyInfo handling, setup mode normalization, and legacy duplicate detection behavior for coordinate-based unique IDs.
  • Simplified plant parsing by removing redundant code checks (non-empty by construction).
  • Deduplicated defensive integer parsing into a shared utility and aligned diagnostics with runtime/config-flow rules to reject non-finite or decimal values consistently.
  • Clarified the per-day TYPE sensor range option text (D+2 creates both D+1 and D+2 sensors) across translations.

If you’re upgrading from 1.9.2, pay special attention to:

  • Setup behavior when the API returns partial/malformed payloads (entities should no longer go empty if last-good data exists).
  • Per-day sensors staying disabled when options disable them.
  • Rate-limit scenarios (HTTP 429) and whether retries feel sensible and bounded.

What's Changed

Full Changelog: v1.9.2...v1.9.3