Note! If there is not already a quirk (ZHA Device Handler) for your specific Zigbee device in the ZHA integration and/or there already is a quirk there but it is still not exposing all expected attributes as entities inside ZHA UI in Home Assistant you need to then begin by submitting a new device support request as an issue to the ZHA Device Handlers repository on GitHub,requesting a new custom quirk (ZHA Device Handler) in that new issue by filling out the template there with requested information to open a dialogue custom ZHA Device Handler developers with the ZHA quirks community → https://www.home-assistant.io/integrations/zha/#how-to-add-support-for-new-and-unsupported-devices
HOW TO ADD SUPPORT FOR NEW AND UNSUPPORTED DEVICES
If your Zigbee device pairs/joins successfully with the ZHA integration but does not show all of the expected entities
- Try to re-pair/re-join the device several times.
- Checkout the troubleshooting section.
- Still not working? You may need a custom device handler. This handler will have exception handling code to work around device-specific issues.
For devices that do not follow the standard defined in the CSA’s ZCL (Zigbee Cluster Library), the ZHA integration relies on a project called “ZHA Device Handlers (also known as “zha-quirk”)”. It contains device-specific Python scripts called “quirks”. These scripts can resolve compliance and interoperability issues by implementing on-the-fly conversion of custom Zigbee configurations or by implementing manufacturer-specific features for specific devices.
People familiar with other Zigbee gateway solutions for home automation may know similar concepts of using custom Zigbee device handlers/converters for non-standard devices. For example, Zigbee2MQTT (and IoBroker) uses zigbee-herdsman converters and SmartThings Classics (Legacy) platform has Hub Connected Device Handlers.
If you do not want to develop such a “quirk” Python script yourself, you can submit a “device support request” as a new issue to the ZHA Device Handlers project repository on GitHub.
What the heck is a quirk
In human terms you can think of a quirk like Google Translate. I know it’s a weird comparison but let’s dig in a bit. You may only speak one language but there is an interesting article written in another language that you really want to read. Google Translate takes the original article and displays it in a format (language) that you understand. A quirk is a file that translates device functionality from the format that the manufacturer chose to implement it in to a format that Zigpy and in turn ZHA understand. The main purpose of a quirk is to serve as a translator. A quirk comprises several parts:
- Signature - To identify and apply the correct quirk
- Replacement - To allow Zigpy and ZHA to correctly work with the device
- device_automation_triggers - To let the Home Assistant Device Automation engine and users interact with the device
Note! Best to first search existing issues with device signature and track open device support requests:
Note that submitting a new “device support request” does not guarantee that someone else will develop a custom “quirk” for ZHA. The project relies on volunteering developers. However, without “device support requests”, the developers may not be aware that your specific Zigbee device is not working correctly in ZHA.
PS: Fow information on how-to actually code/write your own Zigbee Device Hanler quirks see this related development discussion meant for quirk developers here: