Dashboards

How to Show Device Locations on a Map Card in Home Assistant

Show family phones, people and zones on a Home Assistant map card. Covers map card YAML, movement trails, show_all, hidden entities and missing markers.

On this page
  1. Quick answer
  2. Before you start
  3. Add a map card
  4. Show everyone automatically
  5. Show movement history
  6. The Map dashboard
  7. Other options worth knowing
  8. When a marker doesn’t appear
  9. Privacy on shared screens
  10. Community alternatives
  11. Related guides

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 latitude and longitude attributes. Without them, the card has nothing to place.
  • Add zones for reference points. A zone such as zone.home shows 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

  1. Check the state. In Developer tools, look for latitude and longitude on the entity.
  2. Check whether it’s hidden. With show_all, the card skips hidden entities. Unhide the entity if you want it on the map.
  3. Check conditions. If the card has conditions, an entity that fails them won’t show.
  4. 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.

The complete guide to dashboards

Home Assistant Dashboards: Building a Beautiful Lovelace UI
Read the guide

Keep exploring

Guides from other topics

All topics →