Bring Zigbee2mqtt and ZHA together

Zigbee2mqtt provides much better device support, while ZHA has much nicer and seamless integration in Home Assistant. Could we bring these projects together and get the best of both?

Merging the projects would be an insane amount of work with little to no motivation to anyone. That is not the way. However, there is one thing that the projects could share: the device database.

So, could we somehow extract zigbee2mqtt-herdsman-converters and ZHA’s quirks into one place, so that the both projects could use them?

Being decoupled from Home Assistant is actually an advantage. When Home Assistant is restarted Z2M keeps running.

Difficult, because ZHA and Z2M take such different approaches. Z2M is device by device - it provides a handler for each one (which is why they can list them). ZHA is generic - the integration should work with any device that implements Zigbee properly, making a list impossible. Actually, I think the number of devices they support is probably about the same.

Also, the Z2M gateway is widely used by other systems - what we see is just the HA integration.

The new roadmap mentions a “device database” which should provide some of what you want.

PS. Don’t forget to vote for your own feature request.

The device database seems to be intended for the users. Zigbee2mqtt already has something like that. It is great and I found it very useful many times; however, it is not what I have in mind here.

The essential feature of such a database is that it must be machine-friendly. The implementation (i.e., converters or quirks) shall take this database and compile the knowledge into an executable code to handle the devices. In other words, the user shall see such a knowledge as an overview of what the device can do and provide; the implementation shall use the same knowledge to actually access the device and make it work.