Qortora · Search · Indexed page

community.home-assistant.ioFetched 2026-08-13T19:12:19Z

ZHA Device Handlers version 2 (ZHA-Quirks V2) architectural design developer discussion - Zigbee - Home Assistant Community

FYI, just want to raise awareness to any ZHA Device Handler (a.k.a. quirk) developers here that you might be interested in following this architectural proposal and developers discussion about changing how to decouple en…

Open original source · Full cached text

ZHA Device Handlers version 2 (ZHA-Quirks V2) architectural design developer discussion - Zigbee - Home Assistant Community = 40rem)" rel="stylesheet" data-target="desktop" /> = 40rem)" rel="stylesheet" data-target="chat_desktop" /> = 40rem)" rel="stylesheet" data-target="discourse-ai_desktop" /> = 40rem)" rel="stylesheet" data-target="discourse-reactions_desktop" /> = 40rem)" rel="stylesheet" data-target="poll_desktop" /> = 40rem)" rel="stylesheet" data-target="desktop_theme" data-theme-id="19" data-theme-name="scroll to top"/> ZHA Device Handlers version 2 (ZHA-Quirks V2) architectural design developer discussion Configuration Zigbee Hedda (Hedda) January 4, 2024, 2:17pm 1 FYI, just want to raise awareness to any ZHA Device Handler (a.k.a. quirk) developers here that you might be interested in following this architectural proposal and developers discussion about changing how to decouple entities exposed in Home Assistant’s built-in Zigbee Home Automation (ZHA) integration from underlying zigpy devices, clusters, and endpoints to make it easier to develop ZHA Device Handlers (a.k.a. quirks). So if interested please see: Summary; the discussion includes a new API concept that will allow ZHA-quirks developers to add support for a new device that uses non-standard Zigbee clusters and attributes without having to both create a quirk and modify both the codebase of the ZHA component in the Home Assistant code. The proposed idea was raised now by puddly with a suggestion on how to make quirks easier and less complicated to create and edit by new ZHA-quirks developers. For further reference on what this is about read: https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices and https://www.home-assistant.io/integrations/zha#knowing-which-devices-are-supported plus https://github.com/zigpy/zha-device-handlers/blob/dev/README.md#what-the-heck-is-a-quirk “ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices. Zigbee devices that deviate from or do not fully conform to the standard specifications set by the Zigbee Alliance may require the development of custom ZHA Device Handlers (ZHA custom quirks handler implementation) to for all their functions to work properly with the ZHA component in Home Assistant.” "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." WTH - Bring ZHA closer to Z2M ZHA integration support for ZGP (Zigbee Green Power) batteryless devices via zigpy to work with Philips Hue Click, Philips Hue Tap, and “other Friends of Hue” switches? ZHA and Analog In clusters ZHA, and Extended attributes for the Pressure cluster ZHA, and Extended attributes for the Pressure cluster Nimly lock, with Zigbee module Sonoff SWV-ZF2 Question: Overwrite MACCapabilityFlags ZHA custom quirk to work with Tuya TS0601 TZE204_laokfqwu occupancy sensor Hedda (Hedda) March 3, 2024, 12:07pm 2 FYI, while ”quirks v2” is still being worked on the initial support for it has been implemented so you can now expose some entities via a new quirk without having to modify ZHA component code in HA core, see: Add support for ZHA entities exposed by Zigpy quirks by dmulcahey · Pull Request #111176 · home-assistant/core · GitHub and Quirks V2 by dmulcahey · Pull Request #1329 · zigpy/zigpy · GitHub Hedda (Hedda) March 4, 2024, 3:05pm 3 FYI, ZHA/zigpy developers have now introduced initial support for what they call ”quirks v2 ” and dmulcahey begun documentation for quirk development in zha-device-handlers (zha-quirks) here: Again, ”quirks v2” allow quirk developers to expose attributes as entities under ZHA in Home Assistant to automatically create switches, sensors, etc. without having to modify the ZHA component code inside Home Assistant core. That PR with new docs will initially add a separate quirks_v2.md file to difference v1 from quirks v2: # Quirks v2 ## Introduction Quirks v2 use a fluent interface style. While this isn't common in python it was done to improve the readability of the source code and to make it human-friendly for non developers. The amount of boilerplate code has been significantly reduced and the need to specify a signature dictionary and a replacement dictionary has been removed. This should make it much easier for the community to contribute quirks. ## Goals - Significantly reduce the amount of boilerplate code required to write a quirk - Make it easier for the community to contribute quirks - Make it easier to read and understand quirks - Make it easier to maintain quirks - Expose entities from a quirk - Allow custom logic to determine if a quirk should be applied to a device - Allow custom binding, reporting configuration or any sort of initialization logic without hacking the bind or configure_reporting methods ## Breakdown of a minimal example ... Tuya ZG-204ZS (_TZE200_3towulqd) Luminance Motion Sensor Quirk v2 EnzoTim June 12, 2024, 8:08am 4 if using custom quirks v2, the ZHA integration can’t be reloaded. Manual HA core restart required to fix it.