We need a complete howto about create new quirks #2467
Replies: 6 comments 5 replies
-
Hi, I also want to create quirk for TS0049, and I don't know where to start. I agree with you Miguel, complete process guide is needed. Btw if you'll find out how to deploy quirk please let me know :) I'll also let you know if I make any progress, I really need quirk for this valve working. |
Beta Was this translation helpful? Give feedback.
-
@MiguelAngelLV in case you are still interested in developing this quirk, I've gathered some information from the internet and was able to install custom quirk in HA. I could use some help with development of TS0049. Quirk installation steps:
Now it's the development part. I've read somewhere in docs to remove and add this device, to see in logs device discovery data required for development. It worked for me, my valve describes itself as:
|
Beta Was this translation helpful? Give feedback.
-
@MiguelAngelLV here's my fork I'm working on: https://github.com/salzix/zha-device-handlers/blob/ts0049-tuya-family-valve/zhaquirks/tuya/ts0049_valve.py I've copied code from ts0601_valve.py as starting point and made some cleanup and basic changes. |
Beta Was this translation helpful? Give feedback.
-
Also check out Zigbee2MQTT's documentation on supporting new Tuya devices: https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html it links to that Zigbee Connection Standard (Tuya Smart Documentation) as well: Plus there are Tuya specific tests https://github.com/zigpy/zha-device-handlers/tree/dev/tests That is covered in the readme section about setting up the development environment:
PS: FYI, while off-topic as not meant for only developers but more for end-users, also see PR which at least adds a "guide for installing an already made custom quirk to ZHA" to the readme -> #2419 |
Beta Was this translation helpful? Give feedback.
-
FYI, missed it and just noticed that dmulcahey & TheJulianJES has created a "Quirk Generator for zha-quirks" (quirk-generator project) here: https://github.com/zigpy/quirk-generator UPDTATE: Note! The "Quirk Generator for zha-quirks" (quirk-generator project) currently is only for "Quirks V1" (and not for "Quirks V2").
So be sure to post any related issues and suggestions/requests as issues there -> https://github.com/zigpy/quirk-generator/issues PS: They also have a dedicated community discussion section for that project -> https://github.com/zigpy/quirk-generator/discussions |
Beta Was this translation helpful? Give feedback.
-
FYI, ZHA/zigpy developers have now introduced initial support for what they call ”quirks v2” and dmulcahey begun how-to documentation: Note! That documention only applies to ”quirks v2” (and not to how existing quirks work today, also referred to as ”quirks v1”). This ”quirks v2” is a huge change since will allow quirk developers to add new entities to Home Assistant via quirks alone without having to modify ZHA code in HA core (which is/was a must with the existing quirks the way that the ZHA integration component worked before). For more information about ”quirks v2” (next-generation quirk functionality for ZHA) please see all of these for reference: (also see zigpy/zigpy#1350 and zigpy/zigpy#1362 for related quirks changes added to zigpy after the initial "quirks v2" pull request). This ”quirks v2” was first added to Home Assistant 2023.3 release and significantly changes how ZHA makes use of the entity API in HA: Anyway, that documentation PR above will initially add a separate
So again note that for now the existing tutorial in the zha-device-handlers's README.md will only apply to old "quirks v1" funtionality. PS: Also check out summarized back-story and more links here in the Home Assistant community forum which more targets end-users: |
Beta Was this translation helpful? Give feedback.
-
I think we need a complete guide, with examples for standar and special cases.
Hi, my name is Miguel Ángel. I am developer for ten years (java, kotlin and web mainly). For about five years, I am Home Assistant user.
I have created four Home Assistant components but now I want create a ZHA quirk and I don't know how. I don't find a complete guide about how make it or debug it.
I am triying create a quirk for Tuya TS0049 water valve ( #2377 ) and I have not idea how start.
I can use others quirks as examples, but some things are "magic", as special cluster for tuya for example... what it does? why tuya has a especial cluster?
I think we need a complete guide, with examples for standar and special cases.
Beta Was this translation helpful? Give feedback.
All reactions