Quick answer
Use the built-in map card. Add a card with type: map and list the entities you want to see: people, device trackers, zones, or any entity that has latitude and longitude attributes. Each one that reports a location appears as a marker.
Before you start
- Give each device a location. Phones usually appear as device trackers after you allow location access in the Home Assistant Companion app. The mobile setup guide covers that step.
- Check the coordinates. Go to Developer tools, then States, and open the entity. You should see numeric
latitudeandlongitudeattributes. Without them, the card has nothing to place. - Add zones for reference points. A zone such as
zone.homeshows as a labelled area on the map.
Add a map card
Open your dashboard, select Edit, add a card, and choose Map. To use YAML instead, open the raw configuration editor and paste something like this, replacing the entity IDs with your own:
type: map
title: Family locations
entities:
- person.alex
- person.sam
- device_tracker.alex_phone
- zone.home
default_zoom: 14
default_zoom sets the starting zoom level. The card uses 14 if you leave it out.
Show everyone automatically
If you don’t want to list entities by hand, use show_all:
type: map
show_all: true
With show_all, the card includes person and device tracker entities and zones. You can’t combine show_all with entities or geo_location_sources. The card rejects that combination with an error.
Show movement history
To draw recent paths, add hours_to_show:
type: map
entities:
- person.alex
hours_to_show: 24
The default is 0, which shows no path. Paths come from the recorder’s history, which keeps data for 10 days by default, so trails can’t reach further back unless you change the recorder settings. Longer windows mean more points to draw, so start with a short window on older hardware.
The Map dashboard
Home Assistant also includes a ready-made Map dashboard. In Settings, go to Dashboards, add a dashboard, and pick the Map template. Use it if you want a full-screen map without building a layout yourself.
Other options worth knowing
The card’s options include cluster, which groups nearby markers and is on by default. A button on the card turns grouping on or off. Other options include auto_fit, fit_zones, theme_mode and scale_ruler. The card’s visual editor lists the full set for your version.
When a marker doesn’t appear
- Check the state. In Developer tools, look for
latitudeandlongitudeon the entity. - Check whether it’s hidden. With
show_all, the card skips hidden entities. Unhide the entity if you want it on the map. - Check conditions. If the card has
conditions, an entity that fails them won’t show. - Check that it’s updating. A marker in the wrong place can mean the tracker hasn’t reported in a while.
Privacy on shared screens
Anyone who can see a wall display can see where the people on it are. Keep location dashboards on screens you control, and make sure everyone in the household agrees to what’s shown. A screen left on in a shared room is visible to anyone who walks past, so either keep it out of view or use a different dashboard for it.
Community alternatives
If the built-in card doesn’t do what you need, community cards are available through HACS. ha-map-card is a Leaflet-based card that supports custom tile layers and WMS overlays. Google Map card offers Google map styles and history trails. Both have their own options, so check their documentation before you switch.
Related guides
- Home Assistant dashboards covers how dashboards, views and cards fit together.
- Floorplan dashboards show devices on a drawing of your home instead of a map.