-
Notifications
You must be signed in to change notification settings - Fork 737
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
ts0601_energy_meter quirk for Tuya power meter devices (v2 quirk) #3824
Open
jeverley
wants to merge
14
commits into
zigpy:dev
Choose a base branch
from
jeverley:ts0601_energy_meter_v2_quirk
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
3 tasks
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #3824 +/- ##
========================================
Coverage 90.91% 90.91%
========================================
Files 324 326 +2
Lines 10562 10775 +213
========================================
+ Hits 9602 9796 +194
- Misses 960 979 +19 ☔ View full report in Codecov by Sentry. |
jeverley
force-pushed
the
ts0601_energy_meter_v2_quirk
branch
3 times, most recently
from
February 3, 2025 21:18
9eae2ea
to
724d721
Compare
jeverley
force-pushed
the
ts0601_energy_meter_v2_quirk
branch
from
February 3, 2025 22:51
119c33f
to
9838136
Compare
jeverley
force-pushed
the
ts0601_energy_meter_v2_quirk
branch
from
February 3, 2025 22:56
9838136
to
a6a0eda
Compare
This should be ready for testing once #3643 is merged. |
3 tasks
TheJulianJES
added
Tuya
Request/PR regarding a Tuya device
needs review
This PR should be reviewed soon, as it generally looks good.
needs reviewer answer
An answer from a reviewer is needed (e.g. why a PR isn't acceptable in the current state).
labels
Feb 4, 2025
Energy direction handler improvements Apply pre-commit auto fixes
jeverley
force-pushed
the
ts0601_energy_meter_v2_quirk
branch
from
February 4, 2025 18:13
55847c0
to
b566139
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
needs review
This PR should be reviewed soon, as it generally looks good.
needs reviewer answer
An answer from a reviewer is needed (e.g. why a PR isn't acceptable in the current state).
Tuya
Request/PR regarding a Tuya device
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
Adds support for Tuya Energy Meter devices.
Reimplementation of my original PR #2961 using the v2 Tuya quirk builder.
Uses zigbee2Mqtt https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/tuya.ts as reference for device datapoints (with amendments from community testing in the respective device support issues).
Meter devices providing energy direction will report signed values for their ZCL mapped attributes in accordance with the Zigbee cluster spec (instantaneous demand, active power and reactive power specifically).
To keep the change size manageable this initial PR will not calculate additional power metrics that are not reported by the device (reactive power etc), I can explore re-introducing this if users are keen for the functionality.
Device configuration entities
Supports 1 clamp devices:
Prerequisite PR Add support for Tuya DPs mapped to multiple cluster attributes #3643
Supports 2 clamp devices:
Supports 3 clamp devices:
Additional information
Checklist
pre-commit
checks pass / the code has been formatted using Black