Skip to content

v0.2.0

Choose a tag to compare

@seevee seevee released this 30 Jul 01:47
· 87 commits to main since this release
ac3a66c

First feature release since 0.1.1, centred on Environment and Climate Change Canada: alerts now arrive over NAAD's real-time streaming feed the moment they are issued rather than up to five minutes later, and several ECCC correctness bugs found by live soaking are fixed — most importantly, alerts that end early no longer linger until their expiry time. Location handling is also uniform across providers now: any provider can follow a device tracker.

v0.2.0-rc.1 soaked for six days on live installs before promotion; no integration code changed between the rc and this release.

Added

  • ECCC real-time streaming (#49) — alerts are ingested as NAAD issues them over the TCP streaming feed (streaming.alertready.ca:8443), which the NAADS 2.0 user guide documents as the correct channel for 24/7 automated systems. Enabled by default. The GeoRSS feed is retained as startup/reconnect backfill plus a 30-minute safety resync. A 130 s heartbeat watchdog with exponential backoff handles reconnects, and reconnect backfills are floored at the old poll cadence, so a flapping socket can never cost more traffic than polling did. Turn streaming off to fall back to GeoRSS polling on the scan interval.
  • Stream connectivity sensorbinary_sensor.cap_alerts_eccc_real_time_stream, diagnostic, reports whether the NAAD socket is connected (ECCC with streaming on).
  • Refresh buttonbutton.cap_alerts_<provider>_refresh, diagnostic, forces an off-cycle fetch on any provider.
  • Device-tracker location for every provider (#20) — ECCC, MeteoAlarm, and WMO gained the GPS-tracker location mode NWS already had. MeteoAlarm additionally gets a fully-mobile mode: a tracker for polygon narrowing plus a country-source entity (e.g. sensor.geolocator_country, accepting an ISO-2 code or a country name) so crossing a border re-resolves which national feed to query.
  • Exclude marine alerts (#18) — opt-in per-entry filter that drops alerts carrying a marine zone code (NWS marine UGC area prefixes, ECCC CLC codes beginning 00). Default off; marine alerts that pass carry an is_marine attribute.
  • geocode_clc attribute (#19) — ECCC Canadian Location Codes are surfaced rather than discarded.
  • Typed multi-scheme geocodes (#29) — a new geocodes attribute maps CAP valueName → codes (EMMA_ID, NUTS3, WARNCELLID, …) for feeds that mix schemes across countries.
  • ECCC feed source option (#38) — auto (default), alertready, or pelmorex, selecting which NAAD GeoRSS host serves polling and backfill.

Fixed

  • ECCC: ended alerts lingered until their expiry time (#45) — ECCC publishes one <info> block per area group, each with its own Alert_Location_Status; the provider read the wrong block and so never saw the termination signal. Alert entities now clear when the alert actually ends.
  • ECCC: live alerts could be missing entirely (#38) — rss.alertready.ca persistently omits some live Actual/Public alerts (an Extreme one was observed dropped), while the legacy Pelmorex host retains a shorter window. auto now fetches both hosts and unions their entries by CAP OID, so neither host's gaps can hide an alert.
  • ECCC: feed migrated to alertready.ca (#38) — ahead of the old endpoint's retirement. Province filtering was reworked to key off the CAP body's SGC code instead of feed metadata, with a polygon bbox pre-filter (#43) to keep province mode inside the poll timeout.
  • ECCC: truncated feed downloads dropped alerts (#46) — the ~7 MB chunked feed arrives without a Content-Length, so an early-terminated stream yielded a partial body that failed to parse at a random offset and lost that poll's alerts. Incomplete documents are now detected and retried.
  • MeteoFrance alert entities were recreated every poll (#37) — MeteoFrance embeds the issue timestamp in its CAP identifier, so each re-issue of the same warning minted a new entity and left a stale, unavailable one behind. Identity is now derived from a content key for vigilance@meteo.fr only; every other MeteoAlarm authority is byte-for-byte unchanged. (The remaining outlook-horizon part of #37 is queued for 0.2.1.)

Changed

  • MeteoAlarm area codes moved attribute — MeteoAlarm previously wrote EMMA_ID values into geocode_same (an NWS-scheme field). They now live under geocodes["EMMA_ID"]. Templates or cards reading geocode_same on MeteoAlarm entities need updating; NWS and ECCC entities are unaffected.
  • Minimum Home Assistant is 2026.4.3 (HACS floor); the test matrix runs against 2026.7.3.

Upgrade notes

No reconfiguration required — existing ECCC entries pick up streaming, auto feed source, and the fixes on restart, and the marine filter stays off unless you enable it. Two one-time effects worth knowing:

  • MeteoFrance alert entity IDs are recomputed once; any stale unavailable sensor.cap_alert_* entities left by earlier versions are safe to delete.
  • New options live under Settings → Devices & Services → CAP Alerts → Configure.

Installation

Install via HACS as a custom repository (category Integration), or copy custom_components/cap_alerts/ into your HA config. Then Add Integration → CAP Alerts. See the README for provider modes and options.


0.2.0 — 2026-07-30

Added

  • Surface CLC area geocode as geocode_clc (#19) (abe58f1…)
  • Generalize device-tracker location to all providers (#20) (2fc7b88…)
  • Add opt-in exclude-marine-alerts option (#18) (#23) (ad81b5e…)
  • Resolve region schemes into a typed geocode container (#29) (a872764…)
  • Stream NAAD alerts in real time, GeoRSS as backfill (#49) (f019d08…)

Documentation

  • Add CONTRIBUTING.md with AI-assisted contribution policy (#21) (70e0273…)
  • Extend incident RFC with non-weather grounding and ECCC field findings (#57) (fa44e5a…)

Fixed

  • Reconcile prerelease version bump with commit history (#31) (33d7fa6…)
  • Activate venv before running tests and lint (#32) (f650e9e…)
  • Use git-cliff CLI binary instead of python -m git_cliff (#33) (69ca77b…)
  • Use git-cliff CLI binary and add release workflow (67436dc…)
  • Use --tag flag when regenerating changelog in release workflow (719d475…)
  • Migrate feed to alertready.ca and rework province filter (#38) (#39) (3b5f8b6…)
  • Stabilize MeteoFrance alert entity ids (#37) (#41) (21fd560…)
  • Pre-filter province mode by polygon bbox (#43) (c2560e6…)
  • Guard against truncated NAAD feed downloads (#46) (961c012…)
  • Honor ended area groups so alerts don't linger until expiry (#45) (#51) (f9ecb7c…)
  • Union both NAAD hosts so no live alert is missed (#38) (#52) (3006d56…)

Maintenance

  • Bump actions/checkout from 6 to 7 in the actions group (#17) (71431ac…)
  • Add generated changelog and generalize agent guidance (#22) (aad1fd9…)
  • Regenerate changelog for v0.2.0-alpha.3 (e1cb081…)
  • Remove GitHub Actions publish workflow, add venv activation to publish.sh (#35) (7ff168a…)
  • Bump actions/setup-python from 6 to 7 in the actions group (#50) (68d2019…)
  • Pre-0.2.0 docs, test pins, and HACS floor (#54) (4102659…)
  • Refresh GitHub templates, dependabot pip coverage, agent docs (#55) (c383a57…)

Full Changelog: v0.1.1...v0.2.0