Repository: zigpy/zha-device-handlers

Issue:
AQARA switch  WXKG03LM 2016 no events
There is a problem with the AQARA WXKG03LM 2016 switch that is identified as lumi.sensor_86sw1. He registers without problems and uses the Quirk zhaquirks.xiaomi.aqara.remote_b186acn01.
But when I press it I can't get him to detect anything. I have observed that this interrupt uses cluster 6 OnOff to notify that it has been pressed. And the following messages appear:

[zigpy_deconz.uart] Frame received: 0x17a10031002a00220200000104a7823dca8301008d150001040106000b00182f0a000010010000100000afefa3000102c3
[zigpy_deconz.api] APS data indication response: [42, 34, <DeconzAddress address_mode = ADDRESS_MODE.NWK address = 0x0000>, 1, <DeconzAddress address_mode = ADDRESS_MODE.NWK_AND_IEEE address = 0x82a7>, b, 260, 6, 1, 260, 6, 6 x18 / \ n \ x00 \ x00 \ x10 \ x01 \ x00 \ x00 \ x10 \ x00 ', 0, 175, 239, 163, 0, 1, 2, -61]
[zigpy.device] Ignoring message (b'182f0a0000100100001000 ') on cluster 6: unknown endpoint or cluster id:' No cluster ID 0x0006 on (00: 15: 8d: 00: 01: 83: ca: 3d, 1) '
[zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode = ADDRESS_MODE.NWK_AND_IEEE address = 0x82a7>, ep: 1, profile: 0x0104, cluster_id: 0x0006, data: b'182f0a0000100100001000
I tried to add the cluster 6 OnOff to the Quirk but I have not succeeded.


Discussion:
Hi! I seem to have the same problem, no events under zha_event. The same thing also happens with the double switch WXKG02LM.

For my WXKG03LM I see this in the logs:
`Ignoring message (b'182a0a0000100100001000') on cluster 6: unknown endpoint or cluster id: 'No cluster ID 0x0006 on (00:15:8d:00:01:83:1a:7d, 1)'`

And for my WXKG02LM I see these in the logs:
`Ignoring message (b'18290a0000100100001000') on cluster 6: unknown endpoint or cluster id: 'No cluster ID 0x0006 on (00:15:8d:00:01:e0:69:ec, 2)'`

`Ignoring message (b'182a0a0000100100001000') on cluster 6: unknown endpoint or cluster id: 'No cluster ID 0x0006 on (00:15:8d:00:01:e0:69:ec, 1)'`


Resolving patch:
diff --git a/zhaquirks/xiaomi/aqara/remote_b186acn01.py b/zhaquirks/xiaomi/aqara/remote_b186acn01.py
--- a/zhaquirks/xiaomi/aqara/remote_b186acn01.py
+++ b/zhaquirks/xiaomi/aqara/remote_b186acn01.py
@@ -8,6 +8,7 @@
     Groups,
     Identify,
     MultistateInput,
+    OnOff,
     Ota,
     Scenes,
 )
@@ -138,7 +139,7 @@ def _update_attribute(self, attrid, value):
         SKIP_CONFIGURATION: True,
         ENDPOINTS: {
             1: {
-                DEVICE_TYPE: XIAOMI_DEVICE_TYPE,
+                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                 INPUT_CLUSTERS: [
                     BasicCluster,
                     PowerConfigurationCluster,
@@ -155,10 +156,11 @@ def _update_attribute(self, attrid, value):
                     Ota.cluster_id,
                     XIAOMI_CLUSTER_ID,
                     MultistateInputCluster,
+                    OnOff.cluster_id,
                 ],
             },
             2: {
-                DEVICE_TYPE: XIAOMI_DEVICE_TYPE2,
+                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                 INPUT_CLUSTERS: [Identify.cluster_id, MultistateInputCluster],
                 OUTPUT_CLUSTERS: [
                     Identify.cluster_id,
@@ -168,7 +170,7 @@ def _update_attribute(self, attrid, value):
                 ],
             },
             3: {
-                DEVICE_TYPE: XIAOMI_DEVICE_TYPE3,
+                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                 INPUT_CLUSTERS: [Identify.cluster_id, MultistateInputCluster],
                 OUTPUT_CLUSTERS: [
                     Identify.cluster_id,
diff --git a/zhaquirks/xiaomi/aqara/remote_b286acn01.py b/zhaquirks/xiaomi/aqara/remote_b286acn01.py
--- a/zhaquirks/xiaomi/aqara/remote_b286acn01.py
+++ b/zhaquirks/xiaomi/aqara/remote_b286acn01.py
@@ -8,6 +8,7 @@
     Groups,
     Identify,
     MultistateInput,
+    OnOff,
     Ota,
     Scenes,
 )
@@ -153,7 +154,7 @@ def _update_attribute(self, attrid, value):
         SKIP_CONFIGURATION: True,
         ENDPOINTS: {
             1: {
-                DEVICE_TYPE: XIAOMI_DEVICE_TYPE,
+                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                 INPUT_CLUSTERS: [
                     BasicCluster,
                     PowerConfigurationCluster,
@@ -170,20 +171,22 @@ def _update_attribute(self, attrid, value):
                     Ota.cluster_id,
                     XIAOMI_CLUSTER_ID,
                     MultistateInputCluster,
+                    OnOff.cluster_id,
                 ],
             },
             2: {
-                DEVICE_TYPE: XIAOMI_DEVICE_TYPE2,
+                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                 INPUT_CLUSTERS: [Identify.cluster_id, MultistateInputCluster],
                 OUTPUT_CLUSTERS: [
                     Identify.cluster_id,
                     Groups.cluster_id,
                     Scenes.cluster_id,
                     MultistateInputCluster,
+                    OnOff.cluster_id,
                 ],
             },
             3: {
-                DEVICE_TYPE: XIAOMI_DEVICE_TYPE3,
+                DEVICE_TYPE: zha.DeviceType.REMOTE_CONTROL,
                 INPUT_CLUSTERS: [Identify.cluster_id, MultistateInputCluster],
                 OUTPUT_CLUSTERS: [
                     Identify.cluster_id,
@@ -191,6 +194,7 @@ def _update_attribute(self, attrid, value):
                     Scenes.cluster_id,
                     AnalogInput.cluster_id,
                     MultistateInputCluster,
+                    OnOff.cluster_id,
                 ],
             },
         },


Test patch: