-
Notifications
You must be signed in to change notification settings - Fork 740
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
base: dev
Are you sure you want to change the base?
Conversation
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. |
9eae2ea
to
724d721
Compare
119c33f
to
9838136
Compare
9838136
to
a6a0eda
Compare
This should be ready for testing once #3643 is merged. |
Energy direction handler improvements Apply pre-commit auto fixes
55847c0
to
b566139
Compare
It might be worth adding support for "_TZE284_81yrt3lo" #3658 (comment) |
I'm going to split this into two separate PRs and files to make it easier to review and add devices moving forward. |
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