Repository navigation
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 set it up.
All five belong to a Z2M Device Tracker service device. The coordinator isn't counted.
| 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.
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.
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.
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.
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.
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.
The integration adds these actions for automations and scripts. Pick the device by name with device_id (any Zigbee2MQTT device in Home Assistant). In YAML, ieee takes an IEEE address instead.
| 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 Battery brands) |
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 including late, router_hopping and slow_router); duration (default until you unmute it in the app) |
z2m_tracker.run_network_scan |
Starts a routing scan. |
base_topic (default every network) |
z2m_tracker.reconfigure |
Reconfigures a 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 Importing older history. Returns devices_found, new_devices and new_events. |
none |
Wrong input, such as a device that isn't from Zigbee2MQTT, stops the action with a message that says what was wrong.
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.
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: Panasonicbrand 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.
actions:
- action: z2m_tracker.mute_device
data:
device_id: 4f1c9e0a7b2d4c6e8f01a2b3c4d5e6f7
checks:
- offline
duration:
days: 2Turn 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_alertsThe 4-hour limit means alerts come back even if you forget to turn the helper off.
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 sidebar page they link to. Only set it if the link is wrong.
The cards follow your Home Assistant profile language, in the same languages as the sidebar (see Language). 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.
Picker name: Zigbee Tracker summary.
type: custom:z2m-tracker-card
title: Zigbee devices
max_items: 5| Option | Default | What it does |
|---|---|---|
title |
Zigbee devices |
The card's heading. |
max_items |
5 |
How many problems to list before "and N more". |
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;
- a link to open the Zigbee Tracker. Clicking a count opens it too.
It updates on its own when anything changes.
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". |
show_all |
false |
List every battery device and ignore max_items. |
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". |
show_info |
true |
Include "worth a look" items. Off lists only devices that need attention. |
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. |
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 is off in the app. When a router goes offline, the devices behind it are grouped under the router's issue, the same as in the app. See Router outages.
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.
Network-wide problems, such as Network offline, have no Fix button. Fix them in the app.
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.
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, Zigbee2MQTT panel links, the PAN ID, and the host part of the app's address.
The integration finds the app automatically. If you need to change the address (for example, after reinstalling the app from a fork), go to Settings → Devices & services → Z2M Device Tracker → Configure. The address looks like http://<app hostname>:8099; the default is http://local-z2m-tracker:8099.
The app only answers Home Assistant itself and the sidebar, so the integration must run on the same Home Assistant as the app.
Start
Using it
- Devices and history
- Health checks
- Alerts and notifications
- Network map
- Firmware updates
- Pairing and moving devices
- Replacing a device
- Batteries
- Community ratings
Home Assistant
Help