-
Notifications
You must be signed in to change notification settings - Fork 675
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
Adding support for Tongou circuit breaker (#2005) #2008
Conversation
Codecov ReportBase: 83.09% // Head: 83.09% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev #2008 +/- ##
=======================================
Coverage 83.09% 83.09%
=======================================
Files 248 248
Lines 7860 7863 +3
=======================================
+ Hits 6531 6534 +3
Misses 1329 1329
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Pull Request Test Coverage Report for Build 3673959930
💛 - Coveralls |
242: { | ||
PROFILE_ID: 41440, | ||
DEVICE_TYPE: 97, | ||
INPUT_CLUSTERS: [], | ||
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont deleting the Zigbee GP endpoint in the replacement is one part of the device function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will keep the 242 endpoint, what confused me was that the "Plug" class does not keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, what is the meaning of the 0x402 cluster, it reports as "temperature" but the value is constant and always "-630" so it has likely some other meaning...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the import at the top of the file and use it |
@javicalle , for me it looks like it doesn't measure the temperature, we really don't have -6.3C all the time. Is there a way to remove this cluster until we understand what is stored inside? 2022-12-12 08:26:10.365 DEBUG (MainThread) [zigpy.zcl] [0x9C67:1:0x0402] Received ZCL frame: b'\x18\x12\n\x00\x00)\x8a\xfd' |
Sure, remove it in the |
If no one have "found" what tuya is using it for i think omitting its the best for not getting complains from users. |
@javicalle @MattWestb Ok, can I do something with the "Power factor" to not be displayed as "Unknown"? |
@@ -95,6 +95,73 @@ class Plug(EnchantedDevice): | |||
} | |||
|
|||
|
|||
class CircuitBreaker(EnchantedDevice): | |||
"""Tuya smart circuit breaker with metering (_TZ3000_qeuvnohg) https://www.aliexpress.com/item/1005004747066832.html.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder, is it a permanent link or it can become inaccessible earlier than the product itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove it and also the _TZ3000_qeuvnohg
reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zleba thanks for your contribution, maybe point to Tongou TO-Q-SY1-JZT rather?
Groups.cluster_id, | ||
Scenes.cluster_id, | ||
OnOff.cluster_id, | ||
0x0402, # unknown meaning, it is not temperature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the from zigpy.zcl.clusters.measurement import TemperatureMeasurement
(between the TemperatureMeasurement
and the Metering
) and use the TemperatureMeasurement.cluster_id
@@ -95,6 +95,73 @@ class Plug(EnchantedDevice): | |||
} | |||
|
|||
|
|||
class CircuitBreaker(EnchantedDevice): | |||
"""Tuya smart circuit breaker with metering (_TZ3000_qeuvnohg) https://www.aliexpress.com/item/1005004747066832.html.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove it and also the _TZ3000_qeuvnohg
reference.
ZHA adds this sensor automatically. A user can disable the entity with UI. But as you correctly pointed out, you can calculate the value, here is my example: |
By the way, ZHA expects this value in permille, which differs from the ZCL specification. |
Hi @zleba thank you this quirk PR to support of ZHA community 🤝 🙇 👍 Tongou TO-Q-SY1-JZT is popular: there were no mentions of it till Q3/22, but now a spike in issues and asks all over community.
|
Thanks for your contribution @zleba. The changes (and more) are included in: |
Related to #2005
The device is the following one
https://zigbee.blakadder.com/Tongou_TO-Q-SY1-JZT.html