github Makin-Things/weather-radar-card v3.0.0-alpha1
v3.0.0-alpha1 — Native Shadow DOM rewrite

latest release: v3.0.0-alpha2
pre-release6 hours ago

What's New in 3.0

Alpha release — functional and tested but not yet through the full testing matrix. Please report issues.

Added

  • NOAA/NWS radar source — US-only experimental mode using MRMS base reflectivity via mapservices.weather.noaa.gov
  • Show Snow option — includes or excludes snow in RainViewer precipitation tiles
  • Rate-limit banner — visible indicator when the API tile quota is temporarily exhausted
  • Save map center in edit mode — pan/zoom the card while editing and click the overlay button to write center_latitude, center_longitude, and zoom_level back to config without manually entering coordinates
  • Marker icon options — default, entity_picture, and MDI icon types configurable per device (desktop / mobile)

Changed

  • Breaking: Leaflet is now bundled. leaflet.js, leaflet.css, leaflet.toolbar.min.js, and leaflet.toolbar.min.css are no longer distributed as separate files — they are compiled into weather-radar-card.js. Delete the old files from www/community/weather-radar-card/ when upgrading.
  • Breaking: iframe removed. The card is now a native LitElement / Shadow DOM component. No srcdoc, no opaque origin workarounds, proper HA theming integration.
  • Leaflet.Toolbar2 replaced by a native L.Control implementation — removes the external toolbar dependency entirely.
  • Animation engine replaced: frame switching is now driven by JavaScript opacity writes with CSS transition for crossfades, replacing the previous CSS @keyframes engine. More reliable across all browsers in Shadow DOM context.
  • Map auto-selects Light (CARTO) for English-language HA instances and OSM for all other languages.
  • Marker defaults to HA home location (hass.config.latitude/longitude) rather than the card's center_latitude — changing the map center no longer moves the marker.
  • Navigation settle delay reduced from 500 ms to 100 ms.

Fixed

  • Animation flash-on-load caused by duplicate _initRadar runs sharing the same frame generation counter
  • _updateRadar crash when the RainViewer API returns an empty frame list
  • _updateRadar mutations continuing after card teardown (missing generation guard)
  • once('load') callback in _updateRadar running after clear() with no teardown guard
  • resolveCoordinate treating coordinate 0 (equator / Prime Meridian) as falsy and substituting the fallback value
  • Mobile marker icon defaulting to entity_picture when not explicitly configured
  • visibilitychange listener accumulating on document across card reinitializations (never removed)
  • Worker Blob URL never revoked on clear()
  • Editor direct mutation of @state config via delete instead of spreading to a new object

Installation (manual)

Copy these files to www/community/weather-radar-card/ in your HA config directory:

  • weather-radar-card.js
  • home-circle-dark.svg
  • home-circle-light.svg
  • pause.png, play.png, recenter.png, skip-back.png, skip-next.png
  • radar-colour-bar-universalblue.png

Upgrading from v2: delete leaflet.js, leaflet.css, leaflet.toolbar.min.js, and leaflet.toolbar.min.css — they are bundled into weather-radar-card.js and the old files are no longer used.

Add to Lovelace resources:

resources:
  - url: /local/community/weather-radar-card/weather-radar-card.js
    type: module

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

NewReleases is sending notifications on new releases.