I currently have Zigbee2mqtt set up for all my Zigbee devices. It works quite well for me, except when it comes to exposing the battery level of certain devices like the IKEA sensors that use CR2032 batteries. Most of the time, the battery level always shows 100% even after several months, or it gets stuck at a fixed percentage (e.g., 87%) even though the battery is actually dead and needs replacing.
My question is: Would I see any improvement in battery level reporting with ZHA (Zigbee Home Automation)? Does anyone with experience in both systems know if ZHA provides better battery level exposure? If ZHA handles this aspect better, I would consider switching immediately.
Not really, at least not unless someone written a custom device handler that specicially deals with that issue on your specific device model. It is the device manufacturer that provides the data via their firmware configuration by the manufacturer’s firmware developers, so both ZHA and Zigbee2MQTT get the same data. However where it will differ is when the manufacturer does not follow the standard Zigbee specifications then ZHA and Zigbee2MQTT developers will add a translation in custom device handlers to fix the conversion between the device a the Zigbee gateway host application. ZHA call their custom device handlers for “quirks” and are added to the “ZHA Device Handlers” (zha-device-handlers) library, while Zigbee2MQTT can those their custom device handlers “converters” and those are added to their “Zigbee Herdsman Converters” (zigbee-herdsman-converters) library. As the translation is done manually they can obviously be different translations of how to convert and handle the data. You can create your own device handlers or modify existing device handlers if there already is a quirk/converter available for your device, (but be aware that it is not possible to automatically migrate a custom zha-device-handler to a custom zigbee-herdsman-converter or vice versa, such migrations need to be done manually by developers if possivle). For more information about those read these.
Shorter answer would be to just blame the manufacturer for not following the standard Zigbee specifications or making poorly written device firmware that does not provide accurate data in an proper way.