github jpettitt/weather-radar-card v4.0.0-alpha4
4.0.0-alpha4

pre-release3 hours ago

4.0 pre-release. This is a test release of 4.0. 4.0 is the first version that can show Home Assistant's vector map under the radar. It is developed on its own branch. 3.13.0 is the current stable release. Bug fixes go to both. Each 4.0 alpha, beta and release candidate starts with this note.

What 4.0 changes. It adds a second file, weather-radar-card-maplibre.js, next to the card. HACS installs it. A manual install must copy it. It also changes what the re-centre button does when a marker is tracked (see Breaking changes). All other new features are off until you turn them on.

How to install a pre-release. In HACS, open the card and turn on Show beta versions. To go back, select 3.13.0 in the same place. Report problems at https://github.com/jpettitt/weather-radar-card/issues.

Fixed

  • An alert popup closed by itself about a second after it opened. When a tall popup moved the map to fit, the next Home Assistant state update redrew the alerts layer and removed the popup with it. The layer now waits until the popup is closed before it redraws, for every kind of update.
  • Expired alerts stayed on the map. NWS keeps an alert in its active list until the hazard's end time, also after the alert message itself has expired. On 17 October, 108 of 492 active alerts were past their expiry time, one of them by five days, and 92 of those were fully replaced by a newer alert of the same event. The card now hides an alert once its expiry time or its end time has passed, also between two refreshes.
  • Overlapping alerts of the same event hid each other. Where two or more alerts of one event cover a zone, for example Small Craft Advisories from successive issues, the card drew the zone once for each alert, so the fill got darker, and a tap opened only the alert on top. On each zone, an alert is now replaced by a later-issued alert of the same event once that alert is in force. A later alert that is not in force yet is shown with the current one until it starts. The zone is drawn once, and its popup lists the alerts that remain, most severe first.
  • Wind streamlines made the page stall every ten seconds. Each animation frame converted every particle's position with Leaflet's point and coordinate objects and took a fresh wind sample for it: about 300,000 short-lived objects a second, and a full garbage collection every ten seconds that took half a second on an iPhone while the alerts layer's data was live. The conversion and the sample now reuse the same objects.
  • Alert outlines at low zooms kept detail they could not show. When simplifying a zone outline would leave fewer than four points, the card kept the whole outline instead. So mid-sized zones kept every point at coarse zooms, and zoom 3 drew more points than zoom 4. Such an outline now keeps four points. Outlines are also drawn with one pixel of detail at the current zoom instead of half a pixel. With every alert category on, the points drawn at zoom 5 went from 31,571 to 14,741, and from 183,247 to 87,510 at zoom 8.
  • Zone shapes cached by older versions were cut down again on every load. Versions before this one stored zone outlines at full precision, or with the four-point fault above. The card now writes such an entry back once, a few at a time when the browser is idle and the map is still, and keeps the entry's original age.

Earlier

4.0.0-alpha3 fixed the iPhone Safari memory crash and made the NWS alerts layer lighter. 4.0.0-alpha1 added the vector map, view presets and layer toggles; its notes list the breaking changes. 3.13.0 is the current stable release. All are included here.

Full Changelog: v4.0.0-alpha3...v4.0.0-alpha4

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

NewReleases is sending notifications on new releases.