Home Assistant entities
The app adds a few entities to each Zigbee2MQTT device Home Assistant already knows, so they appear on that device's page and can be used in automations. They're created through MQTT discovery, so you don't need the integration for them.
Turn them on or off with Settings → Home Assistant entities → Add entities to Zigbee devices (ha_entities). Turning it off removes them.
Which devices get them
The entities attach to the device Zigbee2MQTT created in Home Assistant, so only Zigbee2MQTT devices get them. These don't:
- ZHA and Matter devices. They have no Zigbee2MQTT device in Home Assistant to attach to. If the app reads ZHA only, the Home Assistant entities setting is hidden. The first time the app starts that way, it removes the entities it made while it read Zigbee2MQTT, so they don't stay behind as unavailable. See ZHA and Matter.
- Devices marked Not listened to, from a network the app no longer reads (a base topic you removed from
base_topics, or the other Zigbee stack after a switch). Their entities are removed. If the app listens to that network again, they come back. - The coordinator and removed devices.
A stored device keeps its entities. Its checks are off, so Needs attention stays off while it's stored.
Per-device entities
| Entity | Type | Enabled by default | For |
|---|---|---|---|
| Needs attention | Binary sensor (problem) | Yes | All devices. On when the device has a warning. The issues attribute lists every current problem, warnings and info. |
| Reading frozen | Binary sensor (problem) | Yes | Devices with monitored readings (temperature, humidity and so on). On when a reading is frozen. |
| Reconfigure | Button | Yes | All devices. Same as Reconfigure in the tracker. |
| Battery replaced | Button | Yes | Battery devices. Records a battery replacement dated today. |
| Battery last replaced | Sensor (date) | Yes | Battery devices. |
| Signal (24 h avg) | Sensor | No | All devices. Average link quality over the last 24 hours. |
| Uptime (30 days) | Sensor (%) | No | All devices. See Health checks. |
| Battery days left | Sensor (days) | No | Battery devices. See Batteries. Unknown until there's enough data. |
| Battery type | Sensor | No | Battery devices. |
| Connected via | Sensor | No | End devices. The router it connected through in the last routing scan. |
Enable the ones that are off by default from the device's page, under the entity's settings. Settings → Home Assistant entities shows how many entities are published.
The entities become unavailable when the app stops, and come back when it starts.
Mesh score sensor
Each Zigbee2MQTT network also gets a Mesh score sensor (0 to 100), on a device named after its base topic. The first network's is sensor.zigbee2mqtt_mesh_score. Its attributes hold the parts of the score: devices_online, devices, average_link_quality, devices_with_backup_route, devices_in_routing_scan, open_problems and score_a_week_ago. See Health checks for how the score is worked out.
Examples
Notify when anything needs attention in one room
triggers:
- trigger: state
entity_id:
- binary_sensor.kitchen_motion_needs_attention
- binary_sensor.kitchen_door_needs_attention
to: "on"
actions:
- action: notify.mobile_app_your_phone
data:
message: >
{{ state_attr(trigger.entity_id, 'friendly_name') }}:
{{ state_attr(trigger.entity_id, 'issues') | join(', ') }}
Reconfigure a sensor automatically when its reading freezes
triggers:
- trigger: state
entity_id: binary_sensor.bedroom_climate_reading_frozen
to: "on"
actions:
- action: button.press
target:
entity_id: button.bedroom_climate_reconfigure
Entity IDs follow your device names, so check the real ones on the device's page.
Leftover devices
A device removed from Zigbee2MQTT can stay in Home Assistant with all its entities unavailable. The app lists these under Leftover in Home Assistant and can remove them for you. It uses Home Assistant's newer remove command when only the MQTT integration owns the device, and the older one on older Home Assistant versions. See Health checks.
How it works
The app publishes discovery messages under homeassistant/<component>/z2m_tracker/<ieee>_<key>/config, and each device's state as JSON on z2m_tracker/<ieee>. The entities attach to the existing device using Zigbee2MQTT's own identifier (zigbee2mqtt_<ieee>). Each network's mesh score is on z2m_tracker/network/<base topic>. Availability is on z2m_tracker/status. The buttons send PRESS to z2m_tracker/<ieee>/reconfigure and z2m_tracker/<ieee>/battery_replaced.
State is refreshed every minute. Nothing is sent while the broker is away; everything is published again when the app reconnects.