Multi-Marker Support — Beta
This is a preview release of the new marker system. The config format has changed — see the migration guide below.
What's New
markers[] — multiple map markers
Replace the old show_marker / marker_latitude / marker_longitude fields with a markers list. Each entry is independent and supports its own entity, icon, colour, and tracking settings:
type: custom:weather-radar-card
markers:
- entity: zone.home # always-visible home pin
icon: mdi:home
color: '#4CAF50'
- entity: person.john # follows John when he is the logged-in user
icon: entity_picture
track: entity
- entity: device_tracker.van # always tracks the van for all viewers
icon: mdi:car
color: '#2196F3'
track: entityMarker fields
| Field | Type | Description |
|---|---|---|
entity
| string | device_tracker.*, person.*, or zone.* — position updates live on every HA state change
|
latitude / longitude
| number | Static position (used when entity is not set or unavailable)
|
icon
| string | default (home SVG), entity_picture, or mdi:icon-name
|
icon_entity
| string | Entity ID for the picture when icon: entity_picture — auto-detected from entity if blank
|
color
| string | CSS colour for default and MDI icons (e.g. '#FF5722'). Has no effect on entity pictures.
|
track
| entity / true
| Pan the map to follow this marker |
mobile_only
| boolean | Only show this marker on mobile devices |
home_radius
| number | Metres within which an entity-based marker is hidden when at home. Default 500. Set 0 to always show.
|
Live entity tracking
Markers with an entity field update their position on every HA state change. Works with device_tracker.*, person.*, zone.*, or any entity with latitude/longitude attributes.
Track resolution
Set track on one or more markers to auto-centre the map. When multiple markers have tracking enabled, the card picks one winner using this priority order:
track: entityon aperson.*whoseuser_idmatches the currently logged-in HA user — highest priority. "I am this person, follow me."track: entityon any other entity — viewer-independent tracking (e.g. a shared vehicle).track: true— lowest always-on fallback; overridden by anytrack: entitymatch.
Ties at the same priority level log a console warning and use the first marker in the list.
Home suppression
Entity-based markers (device_tracker.*, person.*) are automatically hidden when the entity is at home:
- If HA reports
state: homefor the entity, the marker is hidden regardless of GPS accuracy. - Otherwise, if the entity is within
home_radiusmetres of the HA home location, it is hidden. - Set
home_radius: 0on a marker to disable suppression and always show it. zone.*entities and static lat/lon markers are never suppressed.
Icon colour
Add color: '#hexvalue' to any marker using a default or mdi:* icon to render it in a custom colour. The default home icon switches to an inline SVG so any CSS colour works without extra asset files.
Auto-migration from old config
If your config uses the old show_marker / marker_latitude / marker_longitude / mobile_marker_* fields and has no markers array, the card automatically converts them in memory on load — your existing YAML continues to work without changes. A deprecation warning is logged to the browser console. When show_marker: true is present with no position specified, a zone.home marker is synthesised automatically.
Other improvements since 3.0.1
disable_scrolloption — disables map pan/drag while keeping pinch-to-zoom activeshow_scalebug fix — was declared but never wired to the Leaflet scale controluseDefineForClassFields: falsetsconfig fix — ES2022 target was silently breaking LitElement's reactive properties, causing the card to produce no DOM at all- 126 unit tests covering migration, position resolution, track priority, home suppression, and icon rendering
Installation
Copy weather-radar-card.js and the accompanying assets to www/community/weather-radar-card/ and clear your browser cache.
This is a beta release. The marker API is stable but the editor UI for markers is still basic. Please report issues on GitHub.