Split SONOFF SNZB-02DR2 into a dedicated quirk with external sensor entities - #5271
Open
viys wants to merge 13 commits into
Open
Split SONOFF SNZB-02DR2 into a dedicated quirk with external sensor entities#5271viys wants to merge 13 commits into
viys wants to merge 13 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #5271 +/- ##
==========================================
+ Coverage 92.60% 92.73% +0.13%
==========================================
Files 424 425 +1
Lines 14667 14940 +273
==========================================
+ Hits 13582 13855 +273
Misses 1085 1085 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
viys
marked this pull request as ready for review
August 21, 2026 05:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Add dedicated ZHA support for the SONOFF SNZB-02DR2 temperature and humidity sensor.
The quirk replaces the former shared model match, exposes the sensor controls and configuration reminder, supports minimum/maximum-record resets, and maps remote temperature and humidity readings to the two firmware-defined sensor slots. It includes behavior coverage for quirk registration, entity configuration, packet handling, and remote sensor writes.
Additional information
The remote sensor entities retain their existing attribute and translation identifiers; this change only clarifies their user-facing labels as slots 1 and 2.
Device diagnostics
Diagnostic dump: SONOFF SNZB-02DR2
Checklist
Full pre-commit run passed: uv run pre-commit run --all-files.