Integration and card
The integration is optional. It reads from the app every 15 seconds and adds summary sensors, battery and maintenance to-do lists and calendars, actions for automations, four dashboard cards and Repairs issues. The app keeps working, and keeps sending alerts, without it. See Installation to install it.
Connecting to the app
When you add the integration, it fills in the app's address for you if the app is installed from the App store. Leave API token empty.
The integration asks the app before it saves anything. A wrong address or token shows an error on the form:
- The app did not answer at that address. Check the app is started and the address is right.
- The app refused the API token. Leave the token empty, unless the app runs in plain Docker.
- Enter an http:// or https:// address without a user name or password.
Home Assistant Container (Docker)
Without the App store, the integration can't find the app by itself. Enter:
- App URL: the app's address, for example
http://192.168.1.10:8099. - API token: the contents of
/data/api_tokenin the app's container. Rundocker exec z2m-tracker cat /data/api_tokenand paste the result.
The cards link to the app at /app/..., which only exists with the App store. Set each card's panel option to the path of the Webpage dashboard that shows the app, for example /z2m-tracker. See The cards.
Changing the address or token
Go to Settings → Devices & services → Z2M Device Tracker → ⋮ → Reconfigure. The app is asked before the new address is saved, and the integration reloads. You can also change both under Configure.
The address looks like http://<app hostname>:8099; the default is http://local-z2m-tracker:8099. You might need to change it after reinstalling the app from a fork, for example.
With the App store, the app only answers Home Assistant itself and the sidebar, so the integration must run on the same Home Assistant as the app.
Options
Settings → Devices & services → Z2M Device Tracker → Configure has:
| Option | Default | What it does |
|---|---|---|
| App URL | found for you | The app's address. |
| API token | empty | Only for the app in plain Docker. |
| Show problems in Settings > Repairs | on | See Repairs. |
| Battery and maintenance calendars and to-do lists | on | See Turning the calendars and lists off. |
The cards pick up option changes without a page reload.
Sensors
All five belong to a Z2M Device Tracker service device. They count Zigbee2MQTT, ZHA and Matter devices. The coordinator isn't counted, and neither are devices marked Not listened to.
| Sensor | State | Attributes |
|---|---|---|
| Active devices | Devices on a network | |
| Offline devices | Active devices Zigbee2MQTT reports unavailable | devices: their names |
| Removed devices | Devices no longer on any network | |
| Issues | Number of warnings | warnings: up to 25, each with device, issue and detail; info_count: number of info items |
| Last event | The latest event, for example joined: Hall motion | The full event: time, kind, ieee, name, instance, detail |
They go unavailable if the app can't be reached.
The sensor names follow your Home Assistant language where a translation exists. The entity IDs stay the English ones, so automations keep working.
Example: a daily nudge if anything needs attention
triggers:
- trigger: time
at: "18:00:00"
conditions:
- condition: numeric_state
entity_id: sensor.z2m_device_tracker_issues
above: 0
actions:
- action: notify.mobile_app_your_phone
data:
title: "Zigbee: {{ states('sensor.z2m_device_tracker_issues') }} need attention"
message: >
{% for w in state_attr('sensor.z2m_device_tracker_issues', 'warnings') %}
{{ w.device }}: {{ w.issue }}
{% endfor %}
Check the sensor's real entity ID under the service device.
Battery to-do list
Zigbee batteries (todo.z2m_tracker_batteries) is the app's shopping list as a Home Assistant to-do list. Open it from To-do lists in the sidebar.
- Each open item is one battery type, with how many you need, for example
CR2032 × 3. - The item's due date is the soonest any of its devices is expected to need one.
- The description lists the devices, each with its battery level and roughly how many days it has left.
Tick an item when you've changed those batteries. That records a replacement, dated today, for every device in the item, the same as recording it on each device's Battery tab. The devices leave the list until they next report a battery level.
Replacements from the last 30 days show as completed items. To undo one, remove it from the device's Battery tab in the app; unticking it on the list doesn't work.
Battery calendar
Zigbee batteries (calendar.z2m_tracker_batteries) has an all-day event:
- Replace battery: … on each device's predicted replacement date, from its battery estimate. The date moves as new readings come in.
- Battery replaced: … on each recorded replacement, with where it was recorded and any note.
Use it in the calendar view, or as a calendar trigger in automations.
Installs from before 1.1.0 keep whatever entity IDs Home Assistant gave the list and calendar. Check them under the service device.
Maintenance to-do list
Zigbee maintenance (todo.z2m_tracker_maintenance) lists the maintenance tasks you've set on your devices.
- Each open item is a task that is overdue or due in the next 14 days, titled
<task>: <device>, for exampleTest smoke alarm: Hall smoke. - The item's due date is the task's next due date. The description says how often it repeats, when it was last done and any note.
- Tick an item when you've done the job. That marks the task done today, the same as Mark done in the app, and moves its due date on.
- Tasks done in the last 30 days show as completed items.
Maintenance calendar
Zigbee maintenance (calendar.z2m_tracker_maintenance) has an all-day event on each task's next due date, and a Done: … event on the day it was last done.
The maintenance list and calendar need app 1.5.0 or newer.
Turning the calendars and lists off
Home Assistant adds Calendar and To-do lists to its sidebar while any integration provides them. If you don't use the tracker's, turn off Battery and maintenance calendars and to-do lists under Settings → Devices & services → Z2M Device Tracker → Configure.
That removes all four entities. Restart Home Assistant to remove the sidebar items too, unless another integration still provides a calendar or to-do list. Turning the option back on brings the entities back with the same IDs.
To keep the lists and only hide the sidebar items, long-press the Home Assistant title at the top of the sidebar.
Actions
The integration adds these actions for automations and scripts. Pick the device by name with device_id. In YAML, ieee takes an IEEE address instead.
Battery replaced, Mute device and Add note take Zigbee2MQTT, ZHA and Matter devices. Reconfigure and Firmware update list only Zigbee2MQTT devices, and say so if given another. See ZHA and Matter.
| Action | What it does | Fields |
|---|---|---|
z2m_tracker.battery_replaced | Records a battery change. Also updates Battery Notes when it tracks the device. | device_id; date (default today); battery_type, to save the type at the same time; brand, the brand of the new batteries (see Batteries) |
z2m_tracker.mute_device | Stops the tracker flagging problems with a device, the same as Ignore in the app. | device_id; checks (default all; any device check, such as late, lqi_stuck or router_hopping); duration (default until you unmute it in the app) |
z2m_tracker.run_network_scan | Starts a routing scan on a Zigbee2MQTT network. | base_topic (default every network) |
z2m_tracker.reconfigure | Reconfigures a Zigbee2MQTT device. Wake a battery device first. | device_id |
z2m_tracker.ota_update | Installs a firmware update. Leave out the device to install every available update. Returns which devices were queued and which failed. | device_id |
z2m_tracker.add_note | Adds a line to the end of a device's note. | device_id; text |
z2m_tracker.pause_alerts | Pauses alerts, the same as ⋮ → Pause alerts in the app. Health still lists problems; those still there when the pause ends are sent once. | minutes (1–43200; leave empty to pause until you resume) |
z2m_tracker.resume_alerts | Ends a pause now. Problems found during the pause that are still there are sent. | none |
z2m_tracker.import_history | Scans Zigbee2MQTT's files and Home Assistant's registries again for older devices and names. The same as Settings → Import history in the app. See Backup and data. Returns devices_found, new_devices and new_events. | none |
Wrong input, such as a device the tracker doesn't know, stops the action with a message that says what was wrong. The actions are ready as soon as the integration starts, even while the app is slow to answer.
From 1.4.0 these actions, and ticking items on the battery to-do list, are for administrators. Automations and scripts can still call them. A user who isn't an administrator gets Unauthorized, and the cards show them the devices without notes or asset details.
Example: record a battery change by scanning a tag
Stick an NFC tag on the device, and scan it after changing the battery:
triggers:
- trigger: tag
tag_id: hall-motion
actions:
- action: z2m_tracker.battery_replaced
data:
device_id: 4f1c9e0a7b2d4c6e8f01a2b3c4d5e6f7
brand: Panasonic
brand is optional, and needs app 1.5.0 or newer. A brand that isn't on your list in the app yet is added to it.
Example: mute a device while it's unplugged
actions:
- action: z2m_tracker.mute_device
data:
device_id: 4f1c9e0a7b2d4c6e8f01a2b3c4d5e6f7
checks:
- offline
duration:
days: 2
Example: pause alerts during Zigbee work
Turn a helper on before you work on Zigbee2MQTT, and off when you're done:
triggers:
- trigger: state
entity_id: input_boolean.zigbee_maintenance
to: "on"
id: start
- trigger: state
entity_id: input_boolean.zigbee_maintenance
to: "off"
id: stop
actions:
- choose:
- conditions:
- condition: trigger
id: start
sequence:
- action: z2m_tracker.pause_alerts
data:
minutes: 240
- conditions:
- condition: trigger
id: stop
sequence:
- action: z2m_tracker.resume_alerts
The 4-hour limit means alerts come back even if you forget to turn the helper off.
The cards
The integration loads the cards for you; there's no dashboard resource to add. Add them from the card picker or in YAML. Each one has a visual editor. Tapping a device opens it in the Zigbee Tracker sidebar.
All four take an optional panel option, the page they link to. With the App store, leave it out: the cards find the sidebar page themselves. With the app in Docker, set it to the path of your Webpage dashboard, for example panel: /z2m-tracker. Only a path inside Home Assistant works, not a full web address.
The cards update on their own when anything changes, and after you change the integration's options.
The cards follow your Home Assistant profile language, in the same languages as the sidebar (see Configuration). They fill in issue text the same way the sidebar does. Where a language file lacks a piece, that piece shows in English. They read the app's translation files through the integration, so they need app 1.2.0 or newer as well. With an older app they stay in English.
Cards added before 1.2.0 saved an English title in their settings. To get the translated title, open the card's editor and clear the Title field. The defaults in the tables below are the English titles.
Summary card
Picker name: Zigbee Tracker summary.
type: custom:z2m-tracker-card
title: Zigbee devices
max_items: 5
show_community: false
| Option | Default | What it does |
|---|---|---|
title | Zigbee devices | The card's heading. |
max_items | 5 | How many problems to list before "and N more" (1 to 50). |
show_community | false | Show community ratings: lists your models that other users rate Avoid or Mixed. See Community ratings. |
The card shows:
- four counts: Active, Offline, Need attention and Batteries due;
- the devices that need attention, with the problem and the area;
- the batteries to buy for devices running low in the next 60 days;
- with
show_communityon, your models other users rate Avoid or Mixed; - a link to open the Zigbee Tracker. Clicking a count opens it too.
Battery card
Picker name: Zigbee Tracker batteries. Battery devices, lowest first, each with its battery type, the days left and its area. Bars turn red at the app's low-battery threshold (battery_alert_percent), and amber below twice that (or 30%, whichever is higher).
type: custom:z2m-tracker-battery-card
title: Batteries
max_items: 8
show_all: false
| Option | Default | What it does |
|---|---|---|
title | Batteries | The card's heading. |
max_items | 8 | How many devices to list before "and N more" (1 to 50). |
show_all | false | List every battery device and ignore max_items. |
Health card
Picker name: Zigbee Tracker health. How many devices need attention, are worth a look or are fine, then the top issues.
type: custom:z2m-tracker-health-card
title: Zigbee health
max_items: 5
show_info: true
| Option | Default | What it does |
|---|---|---|
title | Zigbee health | The card's heading. |
max_items | 5 | How many issues to list before "and N more" (1 to 50). |
show_info | true | Include "worth a look" items. Off lists only devices that need attention. |
Network card
Picker name: Zigbee Tracker network. Devices, routers, offline devices and weak spots (single-point-of-failure routers), then for each network its channel and whether it overlaps your Wi-Fi, the coordinator backup's age and the last routing scan.
type: custom:z2m-tracker-network-card
title: Zigbee network
show_weak_spots: true
| Option | Default | What it does |
|---|---|---|
title | Zigbee network | The card's heading. |
show_weak_spots | true | List each single point of failure under the counts. |
Repairs
The integration copies the app's warnings, and every check you've set to Show and notify, into Settings → Repairs, next to the rest of your system's issues. Each one is titled Zigbee: <device> - <problem> and links to the Zigbee Tracker. It clears itself when the problem is fixed.
Repairs stays empty while Send alerts or Show problems in HA Repairs is off in the app's settings. When a router goes offline, the devices behind it are grouped under the router's issue, the same as in the app. See Alerts and notifications.
A critical device that goes offline gets its own issue, <device> is offline (critical device). It closes itself when the device comes back.
Fixing a problem from Repairs
A device's problem has a Fix button. It offers the fixes that suit the problem:
| Problem | Fixes offered |
|---|---|
| Binding lost | Restore the binding, or The binding was removed on purpose |
| Low battery, Battery running down, Battery draining fast | Battery replaced today |
| Frozen reading | Reconfigure the device |
| Firmware update | Install the firmware update |
| Every device problem | Mute this check for 24 hours, or Mute this check until I unmute it |
Muting only affects that check on that device. Restore the binding lists the bindings it will re-create; wake a battery device first.
After a battery change or a binding restore, the problem stays out of Repairs for a while (a day for a battery, 10 minutes for bindings), so it doesn't come straight back before the device reports again.
A critical device's offline issue offers only the two mute fixes.
Network-wide problems, such as Zigbee2MQTT offline or Coordinator backup problem, have no Fix button. They close themselves when the problem is fixed.
Turning Repairs off
It's on by default. To turn it off, go to Settings → Devices & services → Z2M Device Tracker → Configure and turn off Show problems in Settings > Repairs. Turning it off removes the issues it created.
Diagnostics
If you report a problem, attach the integration's diagnostics: Settings → Devices & services → Z2M Device Tracker → ⋮ → Download diagnostics.
The file has the integration and app versions, the app's settings, a summary of each network (Zigbee2MQTT and coordinator versions, channel, and device, router and offline counts), problem counts by type, the last 25 event types, and a line per device (model, signal, battery, status and problems). It reads fresh data from the app, or the last data it had if the app can't be reached.
These are removed from the file: IEEE addresses, device names (Zigbee2MQTT and Home Assistant), notes, asset details, problem details, your notify action, your MQTT broker's host and user, Zigbee2MQTT panel links, the PAN ID, the API token, and the host part of the app's address.