Zigbee2mqtt paired devices to entity's in HA

Hi,
I Am trying to get Zigbee2mqtt working but am getting something other than expected.

When I pair my device in Zigbee2mqtt all is fine and the device shows up and all works

however when i Check the device in HA I find only one entity: just the switch and not the electrical measurements.

this is consistent for all devices I add. all the measurements that are collected in the State.json file are not turning up as an entity as I expected.

How does one make entity’s for this, Is that all manual labor done in the configuration.yaml or is it supposed to be auto detected(what I expected) ?

It should happen automatic through discovery.

That is indeed what I expected to see!.

Any idea why the discovery isn’t working? Strange thing is that it does show up in HA but only partly.

Try restarting your MQTT add-on and Z2M addon. Also, why is an entity disabled, what’s under there if you press it?

did you rename originally paired device name to something else?
Half year ago there was confirmed bug in discovery which renders in renaming only few sensors. others were keeping original names until z2m restart.
Check if other sensors you are expecting to exist, appear on entity list under original names.

The mentioned bug was supposed to be fixed in 2021.2. Maybe there are another issues related to assigning to single device

That is a select entity. Don’t know why it is standard disabled, it let’s you choose what state your plug is in case after power-loss.

I have restarted all services several times, but it doesn’t change.

I have been using the mqtt broker for half a year now with node red, and had no issues with that.

I used ZHA before and am now converting to Zigbee2mqtt, so the same devices have been used in HA before, perhaps that causes the issue?

the disabled entity is the restart state of the device.

Try pairing it again, very close to the coordinator.

And check if all the discovery messages are sent :

For sensor :

image

for switch:
image

Where do I find these discovery messages as in your example?

A very nice and useful stand-alone mqtt debugging tool :

Look under the topic homeassistant

1 Like

Thanks!

yes I found the same behaviour there as per your example:

Sensor

Switch

So I assume that the MQTT broker is doing its job?

Still not clear what is going wrong here, I have added 20 devices in Zigbee2mqtt and it is the same for all. I took one new out of the box device and that also reacted in the same way. (paired next to the coördinator)

Zigbee2MQTT is sending the discovery messages, so it must be on the HA side.

The switch appeared without doing anything ? So discovery is working. :thinking:

if you go to configuration → entities, with all checkboxes checked
image
you still don’t see them ?

Oh, what version of HA are you on ?

image

Version 1.21 added new attributes. If the MQTT attribute is added to the autodiscovery topic, and isn’t one of the allowed ones, Home Assistant autodiscovery won’t set it up.

Thanks so much!..

I was on 2021.5.x
updating to 2021.8.8 made all the entity’s appear!!

Please consider marking my last post above with the Solution tag so that users experiencing a similar problem are directed to the appropriate post.

1 Like