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

Add quirk for TZ3000 #3481

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Add quirk for TZ3000 #3481

wants to merge 3 commits into from

Conversation

hangy
Copy link

@hangy hangy commented Nov 3, 2024

Adds support for UseeLink 302EU-Zigbee, based on #1632 (comment)

hangy and others added 2 commits November 3, 2024 15:35
Adds support for UseeLink 302EU-Zigbee, based onhttps://github.com/zigpy/issues/1632#issuecomment-1627072807

Co-authored-by: ingoratsdorf <[email protected]>
Copy link

codecov bot commented Nov 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.44%. Comparing base (728ee42) to head (f8e2119).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3481   +/-   ##
=======================================
  Coverage   89.44%   89.44%           
=======================================
  Files         311      311           
  Lines       10033    10036    +3     
=======================================
+ Hits         8974     8977    +3     
  Misses       1059     1059           

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

@kender65
Copy link

kender65 commented Nov 5, 2024

Hi!
Based on the description "UseeLink 302EU-Zigbee" I guess this is the device in question.
Wouldn't it be better to name the class "Plug_4AC_4USB_TZ3000_cfnprab5" to make it clear, that it has 4 USB (3 x USB-A, 1 x USB-C) ports?
I got this SM-302Ez-PA20 which looks nearly the same. But I think mine has the ability to set "child_lock" and at least to control the "power_outage_memory" (or "power_on_state") as mentioned here. Initially I integrated this power strip with Z2M on HAOS although not listed as a supported device. Pairing went well but surprisingly it showed up as SM-0306E-2W which caused the wrong picture of the device on the Z2M UI. I was able to toggle the outlets and USB ports like in ZHA and additionally could set the "power_outage_memory" to it's expected values "on", "off", "restore" from the Z2M UI and it worked as expected although I got an error message for an "UNSUPPORTED_ATTRIBUTE". The same goes for the "child_lock". Setting from the UI to both values worked as expected despite an "UNSUPPORTED_ATTRIBUTE" message. I think the behaviour matches the comment from @javicalle as the "power_outage_memory" was only visible for endpoint 1 (and as general attribute which may be forced the error message).

To figure out what was the problem I tried the other way with ZHA, which I haven't used until then.
I got it working with your quirk, thanks for that. Toggling the 4 AC outlets and the USB ports as a group from the ZHA UI and / or from the developer tools works without issues.
image
Further configuration for "power_on_state", "power_outage_memory" or "start_up_on_off", or whatever you would call it, doesn't work so I extended your quirk with "quirk_id = TUYA_PLUG_ONOFF" in the hope of getting "child_lock" and "power_outage_memory" / "power_on_state" working. I got additional attributes in the "TuyaZBOnOffAttributeCluster"
image
but haven't been able to get it working. I couldn't set the value to "on", "off" or "restore". Initially it has the value "None".
The same is for
image
Any idea how to get it working, for at least endpoint 1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants