-
Notifications
You must be signed in to change notification settings - Fork 876
Initial quirks v2 documentation thoughts #3019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3019 +/- ##
=======================================
Coverage 87.85% 87.85%
=======================================
Files 301 301
Lines 9217 9217
=======================================
Hits 8098 8098
Misses 1119 1119 ☔ View full report in Codecov by Sentry. |
FYI, this PR is also linked from this old discussion thread which is asking for a how-to guide on create new quirks for ZHA: Maybe include reference to "quirk-generator" (stub quirk generator for zha-quirks)? -> https://github.com/zigpy/quirk-generator Update; new (quirk v2) TuyaQuirkBuilder ("Tuya QuirkBuilder) is in the main zha-device-handlers repo here: |
No, that was only relevant for generating "v1" quirks. (
add_to_registry_v2("IKEA of Sweden", "TRADFRI remote control")
.replaces(PowerConfig1CRCluster)
.replaces(ScenesCluster, cluster_type=ClusterType.Client)
) I'll update the docs for the quirk generator later to mention it doesn't generate v2 quirks. It's still useful in certain scenarios though, as long as we have v1 quirks too. |
I think I've got a working quirk v2 for a Zigbee/Tuya device ZG-204ZS ("_TZE200_3towulqd", "TS0601") following this documentation here.
(tried this on HA Green 2024.5.5) |
Probalby the DeviceType from IAS_ZONE to OCCUPANCY_SENSOR conversion is not required at all. Still learning. :) i've implemented another one with quirk v2: https://gist.github.com/vinzent/2cd645b848fd3b6a0c3e5762956ec89f Looks like this in HA 2024.6.1: Issues:
|
@TheJulianJES wondering if you would consider merging this PR as-is? Having some documentation merged that others can then add to + build upon is usually better than having to start from writting documentation scratch (even if not complete or outdated). PS: This was also indirectly mentioned by yourself in this other discussion: Originally posted by @TheJulianJES in #14
|
FYI, @CalamityDeadshot has now written a guide on how to write a quirk which includes very detailed step-by-step instructions: PS: Also see the two related discussions here: |
Proposed change
Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black