Skip to content
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

Support for tze200_ny94onlb (tuya 3-phase passthrough electric meter) #3747

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

kali
Copy link

@kali kali commented Jan 21, 2025

Proposed change

This is quirk for a 3P+N electrical meter from tuya.
See https://www.amazon.fr/dp/B0CG3CDMM7?ref=ppx_yo2ov_dt_b_fed_asin_title

It is a port from:
https://github.com/Koenkk/zigbee-herdsman-converters/blob/b222aebf2c560ebe18d427497fa65c7bc5ddc288/src/devices/tuya.ts#L8964

Additional information

It is somewhat working, but I'm a beginner in the zha space, so I think I could use a bit of help to bring this to the finish line.

  • I decided against hacking on top the existing ts0601_din_power.py because my understanding is that the quirk builder is the preferred way to build new quirks. Additionally, the functional overlap between my device and the one supported by the current file did not feel that big. I hope this was not a mistake, please tell me if it was :)
  • I can not find out how to specify using tuya_sensor that some specific measurement are given for a given phase. The device measure a voltage, a current and a power on each line, but I guess I need to match some i18n from HA or ZHA so they appear as such. With the current code, everything appears with generic names, so I have three currents, three voltages and four powers (as there is also a total). I would appreciate some guidance there...
  • I am not 100% sure the signature guidelines in the main README apply to quirks built with the quick builder.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.10%. Comparing base (6c5fc22) to head (90dcb4e).
Report is 60 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3747   +/-   ##
=======================================
  Coverage   90.09%   90.10%           
=======================================
  Files         320      321    +1     
  Lines       10431    10436    +5     
=======================================
+ Hits         9398     9403    +5     
  Misses       1033     1033           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TheJulianJES TheJulianJES added the Tuya Request/PR regarding a Tuya device label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants