github Makin-Things/weather-radar-card v3.4.0
v3.4.0 — DWD radar, two-slot crossfade, smooth_overlap

latest release: v3.5.0-beta1
4 hours ago

🙏 DWD radar and the original crossfade fix in this release are contributions from @genericJE — really substantial work and patient iteration through the review cycles. Thank you!

Stable cut of the 3.4 line. Two new radar sources, a rebuilt crossfade engine, and a clean editor experience for the animation timing knobs. Consolidates the 3.4.0-beta and 3.4.0-beta2 prereleases.

Added

  • DWD radar source (#114) — data_source: DWD uses Deutscher Wetterdienst's Niederschlagsradar WMS at maps.dwd.de. 5-minute frame steps (vs. RainViewer's public 10-minute tier), ~3 days of history, +2 hours of forecast available via the Radar_*-product_* layers. Coverage is the German radar network footprint (Germany + immediate neighbours).
  • dwd_layer — DWD-only WMS layer name override. Default Niederschlagsradar (mm/h). Set to Radar_wn-product_1x1km_ger for reflectivity (dBZ) with 2-hour nowcast frames included.
  • dwd_time_override — DWD-only ISO timestamp to anchor frames at a fixed point in time instead of "now". Useful for verifying the overlay renders when current weather is dry.
  • dwd_forecast_hours — DWD-only. Includes this many hours of nowcast forecast in the playback range. Auto-switches to the analysis+nowcast layer that carries +2h frames.
  • DWD-coloured colour bar — uses DWD's Niederschlagsradar palette (15 bands sampled from DWD's official legend), replacing the misleading universal-blue scale used as a fallback before.
  • DWD coverage check — emits a one-shot console.warn when HA's configured location falls outside the bounding box of Germany and its immediate neighbours.
  • smooth_animation (#113) — when true, the crossfade auto-calibrates so the full cycle equals frame_delay; the radar appears to flow continuously instead of stepping. Overrides transition_time.
  • smooth_overlap (0–1) — tunable crossfade overlap when smooth_animation: true. 0 = sequential (no brightness dip; cushion held), 0.5 = 50% overlap, 1 = fully simultaneous (default; brief mid-transition dip). Fade duration auto-calibrates so the full cycle still equals frame_delay regardless of overlap. Exposed in the editor as a 0–1 slider.
  • Editor mutual gating for animation timingtransition_time is disabled when Smooth Animation is on; smooth_overlap is disabled when Smooth Animation is off. Both fields stay visible so the relationship is obvious.

Changed

  • DWD rate limiter raised to 500/min (from the initial conservative 120/min). DWD's maps.dwd.de is fronted by Akamai with no documented per-IP limit; 120 was visibly throttling pan/zoom bursts without ever seeing 429s. 500/min matches RainViewer.
  • DWD tiles requested at 512×512 instead of the default 256×256 — quarters the request count for the same coverage.

Fixed

  • Crossfade no longer pulses against light basemaps (#113). The previous symmetric crossfade animated outgoing 1→0 while incoming 0→1; mid-transition, both at 0.5 alpha-composited to ~0.75 visibility — letting 25% of the basemap show through every transition. Replaced with a two-slot model: new frame snaps to opacity 0 above the previous one, fades to radar_opacity; the previous frame (the cushion) stays fully visible underneath through the fade-in window via CSS transition-delay, then begins its own fade out. At the loop boundary — when the player wraps from the last frame back to the first after the restart pause — transitions snap instead of fading, since a smooth crossfade across the loop reads as "time ran backwards" given the natural pause has already broken perceived continuity.
  • Trail on first cycle after editing animation settings. Changing animation settings used to leave stale CSS-transition state on the radar layers, producing a visible trail on the first cycle after the change. setConfig now does a full teardown + reinit on any structural config change. Exception: when the user pans/zooms the live map in editor mode, the back-propagated center_latitude / center_longitude / zoom_level keys are diffed and skipped — a teardown there would interrupt the user's active interaction. Direct YAML edits to those keys still move the map (via setView), guarded against re-firing as a back-prop bounce.
  • Internal options no longer leak into WMS GetMap URLs. FetchWmsTileLayer was passing its full options object to Leaflet's L.TileLayer.WMS.initialize, which appends any unrecognised option as a query parameter — requests carried tail-ends like &rateLimiter=[object%20Object]&on429=...&animationOwnsOpacity=true. Now strips internal fields before delegating. Affects both NOAA and DWD WMS layers.

Documentation

  • README config table includes smooth_overlap; the Animation section now describes the actual two-slot model with smooth_animation / smooth_overlap semantics, the loop-boundary snap, and the pause-settle behaviour.
  • animation.md rewritten to match the v3.4.0 architecture (two-slot crossfade, _crossfadeTiming() table, _settleVisibility, dynamic tile size, pause behaviour, invariants).

Install

HACS users on the stable channel will see this as the next available update. Manual install: copy dist/weather-radar-card.js into /config/www/community/weather-radar-card/ and hard-refresh.

Bug reports → issues.

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

NewReleases is sending notifications on new releases.