-
Notifications
You must be signed in to change notification settings - Fork 728
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 Tuya Dimmer _TZE204_zenj4lxv
variation
#2661
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2661 +/- ##
=======================================
Coverage 86.62% 86.62%
=======================================
Files 279 279
Lines 8551 8551
=======================================
Hits 7407 7407
Misses 1144 1144
☔ View full report in Codecov by Sentry. |
Im not sure how to add the tests and how to test this with the device before merging, any hints? |
Thanks for the PR! You don't need to add any unit tests for this small change. For testing this, download the modified file and put it into a custom quirks folder in your This is what you want in your |
@TheJulianJES I found that it does not work, I get: 2023-10-19 14:19:37.829 DEBUG (MainThread) [zigpy.zcl] [0x3B11:1:0xef00] Received command 0x02 (TSN 121): b'\x00\xd4\x14\x02\x00\x04\xc0\x13\x1b\x0e'
2023-10-19 14:19:37.830 DEBUG (MainThread) [zigpy.zcl] [0x3B11:1:0xef00] No explicit handler for cluster command 0x02: b'\x00\xd4\x14\x02\x00\x04\xc0\x13\x1b\x0e'
2023-10-19 14:19:37.831 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f85d45120>, 'UPDATE devices_v12\n SET last_seen=:ts\n WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1697743177.827209, 'ieee': a4:c1:38:39:9e:1e:3d:0d, 'min_update_delta': 30.0})
2023-10-19 14:19:37.833 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0x7f85d45120>, 'UPDATE devices_v12\n SET last_seen=:ts\n WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1697743177.827209, 'ieee': a4:c1:38:39:9e:1e:3d:0d, 'min_update_delta': 30.0}) completed
2023-10-19 14:19:37.836 DEBUG (Thread-10) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f85d45120>)
2023-10-19 14:19:37.836 DEBUG (Thread-10) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x7f85d45120>) completed
2023-10-19 14:19:38.017 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'74a0b1a9112a15b65894a524ab5593499c26771bfcf59874f0cf1a8bfcaa2ba5ebc91e7c94f1d03c7e'
2023-10-19 14:19:38.018 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8070787e'
2023-10-19 14:19:38.022 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received incomingMessageHandler: [<EmberIncomingMessageType.INCOMING_UNICAST: 0>, EmberApsFrame(profileId=260, clusterId=61184, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_ENABLE_ROUTE_DISCOVERY: 256>, groupId=0, sequence=104), 80, -80, 0x3b11, 255, 255, b'\ty\x02\x00\xd4\x14\x02\x00\x04\xc0\x13\x1b\x0e']
2023-10-19 14:19:38.023 DEBUG (MainThread) [bellows.zigbee.application] Received incomingMessageHandler frame with [<EmberIncomingMessageType.INCOMING_UNICAST: 0>, EmberApsFrame(profileId=260, clusterId=61184, sourceEndpoint=1, destinationEndpoint=1, options=<EmberApsOption.APS_OPTION_ENABLE_ROUTE_DISCOVERY: 256>, groupId=0, sequence=104), 80, -80, 0x3b11, 255, 255, b'\ty\x02\x00\xd4\x14\x02\x00\x04\xc0\x13\x1b\x0e']
2023-10-19 14:19:38.023 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x3B11), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=104, profile_id=260, cluster_id=61184, data=Serialized[b'\ty\x02\x00\xd4\x14\x02\x00\x04\xc0\x13\x1b\x0e'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=80, rssi=-80)
2023-10-19 14:19:38.024 DEBUG (MainThread) [zigpy.zcl] [0x3B11:1:0xef00] Received ZCL frame: b'\ty\x02\x00\xd4\x14\x02\x00\x04\xc0\x13\x1b\x0e'
2023-10-19 14:19:38.025 DEBUG (MainThread) [zigpy.zcl] [0x3B11:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=121, command_id=2, *direction=<Direction.Client_to_Server: 1>)
2023-10-19 14:19:38.025 WARNING (MainThread) [zigpy.zcl] [0x3B11:1:0xef00] Unknown cluster command 2 b'\x00\xd4\x14\x02\x00\x04\xc0\x13\x1b\x0e' I will try to debug it better, thanks for the help |
Does the custom quirk load at least? |
@TheJulianJES can you put this label on the pr? hacktoberfest-accepted It will help me to participate on this https://hacktoberfest.com |
Sure, I plan on doing that for all PRs that aren't merged in time. Yours should be ready for merging now, right? Like, the device works as expected with the changes now? Regarding ZigbeeGreenPower: |
Thanks for the GP explanation :) Yeah, it works, it lets me turn on and off and even dim my lights. One part that I haven't been able to fully test is the dimmer because my lights are not dimerizable. I see that they are put lower and bigger in light, but occasionally, they flash badly, I fear that If I continue in that way it will crush my lights. :P |
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.
LGTM. Thanks again!
_TZE204_zenj4lxv
variation
Proposed change
This dimmer is currently paired but does not expose any entity.
Fix: #2628
Additional information
It does not seems like a breaking change
Checklist
pre-commit
checks pass / the code has been formatted using Black