Added a guide on writing V2 quirks
Proposed change
Adding a zero-to-hero guide on writing V2 quirks, as I was asked to in this discussion.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 92.13%. Comparing base (2e2bbd9) to head (45b772b).
Additional details and impacted files
@@ Coverage Diff @@
## dev #4349 +/- ##
=======================================
Coverage 92.13% 92.13%
=======================================
Files 358 358
Lines 11919 11919
=======================================
Hits 10981 10981
Misses 938 938
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Thanks for this! Wondering if the PR supersede this previous not-yet-merged PR with "Initial quirks v2 documentation thoughts"?
- https://github.com/zigpy/zha-device-handlers/pull/3019
Also see the related discussions here which is a request for a complete guide on how to write v2 quirks for ZHA:
- https://github.com/zigpy/zha-device-handlers/discussions/2467
PS: FYI, btw, I submitted a PR for a guide on how-to test custom quirks in zha as a compliment to this howto guide:
- https://github.com/zigpy/zha-device-handlers/pull/4355
Wondering if the PR supersede this previous not-yet-merged PR with "Initial quirks v2 documentation thoughts"?
I don't think so, cuz the PR you linked goes a lot more in depth regarding the actual API - signatures, meaning of arguments and so on. This should definitely be available for people who don't want to or cannot read the actual code to understand what a function does. This PR is about how to write a quirk, whereas the one you linked focuses on how to write a quirk.
@puddly @TheJulianJES Guys, I was wondering what your pull request approval process is. Is this gonna be merged?
I'll check and merge this asap.
I'll check and merge this asap.
@TheJulianJES would it perhaps be best if this PR could maybe just be merged 'as-is' ASAP and any issues with it be fixed later?