diff --git a/zhaquirks/tuya/ts1001.py b/zhaquirks/tuya/ts1001.py index ce0f62c59c..74bc102b79 100644 --- a/zhaquirks/tuya/ts1001.py +++ b/zhaquirks/tuya/ts1001.py @@ -23,13 +23,13 @@ ENDPOINTS, INPUT_CLUSTERS, LONG_PRESS, - MODELS_INFO, + MODEL, OUTPUT_CLUSTERS, PROFILE_ID, SHORT_PRESS, ZHA_SEND_EVENT, ) -from zhaquirks.tuya import TuyaManufClusterAttributes, TuyaOnOff, TuyaSmartRemoteOnOffCluster, TuyaSwitch +from zhaquirks.tuya import TuyaManufClusterAttributes, TuyaOnOff, TuyaSmartRemoteOnOffCluster, TuyaSwitch, TuyaNewManufCluster class TuyaRemote1001OnOffCluster(TuyaSmartRemoteOnOffCluster): name = "TS1001_cluster" @@ -67,11 +67,13 @@ def handle_cluster_request( ZHA_SEND_EVENT, "remote_button_short_press", [] ) -class TuyaDimRemote1001(TuyaSwitch): +class TuyaDimRemote1001(CustomDevice): """Tuya 4-button remote device.""" signature = { - MODELS_INFO: [("_TZ3000_ztrfrcsu", "TS1001")], + # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 1, 3, 4, 4096], + # output_clusters=[25, 10, 3, 4, 5, 6, 8, 4096] + MODEL: "TS1001", ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, @@ -105,14 +107,15 @@ class TuyaDimRemote1001(TuyaSwitch): Basic.cluster_id, PowerConfiguration.cluster_id, Identify.cluster_id, - Groups.cluster_id, + TuyaNewManufCluster , # Groups.cluster_id, LightLink.cluster_id, ], OUTPUT_CLUSTERS: [ Identify.cluster_id, - TuyaRemote1001OnOffCluster, + Groups.cluster_id, # TuyaRemote1001OnOffCluster, Scenes.cluster_id, TuyaSmartRemoteOnOffCluster, + #OnOff.cluster_id, # TuyaSmartRemoteOnOffCluster, LevelControl.cluster_id, Time.cluster_id, Ota.cluster_id, @@ -155,3 +158,17 @@ class TuyaDimRemote1001(TuyaSwitch): # Dim down button # [bellows.ezsp.protocol] Application frame 84 (customFrameHandler) received: b'1200100c00000800040101be01030201330a00' # [bellows.zigbee.application] Received customFrameHandler frame with [b'\x00\x10\x0c\x00\x00\x08\x00\x04\x01\x01\xbe\x01\x03\x02\x013\n\x00'] + + +# Dim up +# [bellows.zigbee.application] Received messageSentHandler frame with [, 65533, EmberApsFrame(profileId=260, clusterId=8, sourceEndpoint=1, destinationEndpoint=255, options=, groupId=0, sequence=63), 0, , b''] + + +# OFF button 16/01/22 + +# [bellows.zigbee.application] Received incomingMessageHandler frame with [, EmberApsFrame(profileId=260, clusterId=1026, sourceEndpoint=1, destinationEndpoint=1, options=, groupId=0, sequence=192), 172, -57, 0xaf97, 255, 255, b'\x18\xd5\n\x00\x00)\x8d\x08'] +# [zigpy.zcl] [0xaf97:1:0x0402] ZCL deserialize: manufacturer=None tsn=213 command_id=Command.Report_Attributes> +# [zigpy.zcl] [0xaf97:1:0x0402] ZCL request 0x000a: [[Attribute(attrid=0, value=)]] +# [zigpy.zcl] [0xaf97:1:0x0402] Attribute report received: measured_value=2189 +# [bellows.zigbee.application] Received messageSentHandler frame with [, 65533, EmberApsFrame(profileId=260, clusterId=6, sourceEndpoint=1, destinationEndpoint=255, options=, groupId=0, sequence=130), 0, , b''] +# [bellows.zigbee.application] Unexpected message send notification tag: 0