github Makin-Things/weather-radar-card v3.1.0
v3.1.0 — Multi-marker, clustering, icon overhaul

9 hours ago

Major overhaul of the marker system. The card now supports any number of markers, live entity tracking, and map auto-centering — built on top of the v3.0 native LitElement / Shadow DOM architecture.

Highlights

Multi-marker support

The single-marker config (marker_latitude, mobile_marker_*, etc.) is replaced by a markers[] array. Each marker can be a static lat/lon or an entity (device_tracker.*, person.*, zone.*, or anything with latitude / longitude attributes). Positions update live on every Home Assistant state change.

Existing 3.0.x configs continue to work — the card auto-migrates the old fields to a markers[] entry in memory on load and logs a deprecation warning.

Default home marker

If markers is absent from the config, the card automatically synthesises a single zone.home marker so the map always shows your home. Set markers: [] to opt out.

Map tracking

Set track: entity or track: true on a marker to have the map follow it. Priority order:

  1. track: entity on a person.* whose user_id matches the logged-in HA user — "I am this person, follow me"
  2. track: entity on any other entity — viewer-independent tracking
  3. track: true — lowest fallback

The tracking winner always renders on top of every other marker.

Marker clustering

cluster_markers is on by default — nearby markers collapse into a count badge, tap/click to spiderfy out. Clusters that include the home marker render as the home icon with a small superscript count badge instead of a generic pill. The tracked marker is always promoted out of the cluster so panning stays precise.

Icon system overhaul

  • Any MDI icon name works (mdi:car-pickup, mdi:rocket, anything in HA's icon database) — rendered via <ha-icon> rather than a hardcoded path table.
  • The editor's icon field is HA's ha-icon-picker with full autocomplete and live preview.
  • Picking an entity in the editor auto-fills the icon: HA attributes.icondevice_class lookup → source_type for device_trackers (router / bluetooth / gps) → domain default.
  • Person entities get a Use entity picture toggle to switch between photo and MDI icon.
  • Per-marker color field for mdi:* and default icons.

mobile_only markers

A marker with mobile_only: true only renders on mobile devices (HA Companion app, mobile UA, or screen ≤ 768 px). Replaces the old mobile_marker_* fields.

Theme-aware footer

The footer / progress-bar chrome now follows HA's theme setting (or the OS prefers-color-scheme fallback), independent of the map style. A Light map on a dark OS no longer looks mismatched.

NOAA / NWS colour bar

When data_source: NOAA, the card renders the NWS reflectivity colour scale instead of RainViewer's universal-blue scale. NOAA animation playback direction also fixed (was reversed).

Engineering

  • Production builds are minified (terser) — bundle dropped from ~707 kB to ~278 kB (gzip 143 kB → 77 kB).
  • Unit test suite (Vitest, 128 tests) covering migration, position resolution, track priority, icon rendering, rate limiting, and mobile detection. Tests run in CI on every push and PR.
  • CI builds and commits dist/ back to feature branches automatically; bundle marked linguist-generated so PR diffs hide it.

Breaking change

The single-marker config fields (show_marker, marker_latitude, marker_longitude, marker_icon, marker_icon_entity, mobile_marker_*) are deprecated. They still work via auto-migration but will be removed in a future release. The editor only writes the new markers[] format.

Upgrading from 2.x

3.x is a complete rewrite — the card is now a native LitElement / Shadow DOM component with bundled Leaflet (no more iframe, no separate leaflet.js / leaflet.css files). When upgrading, delete the old standalone Leaflet files from www/community/weather-radar-card/. See the 3.0.0 release notes for the full v3 architecture changes.

Full changelog: v3.0.2...v3.1.0

Don't miss a new weather-radar-card release

NewReleases is sending notifications on new releases.