Repository: zigpy/zha-device-handlers

Issue:
Tuya switch unsupported TS0601 _TZE204_ptaqh9tk
### Problem description

Has someone manage to get a tuya switch TS0601 _TZE204_ptaqh9tk working with conbee zigbee in Home Assistant? It is a single switch I have bought .
There is no entity for the switch to put it on or off.

### Solution description

A quirk that support the device.

### Screenshots/Video

<img width="689" alt="image" src="https://github.com/zigpy/zha-device-handlers/assets/56642616/038fdbed-9a4f-49d7-9fef-2e7b849db025">


### Device signature

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": "0x0104",
      "device_type": "0x0051",
      "input_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0xef00"
      ],
      "output_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": "0xa1e0",
      "device_type": "0x0061",
      "input_clusters": [],
      "output_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "_TZE204_ptaqh9tk",
  "model": "TS0601",
  "class": "zigpy.device.Device"

### Diagnostic information

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.11.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Amsterdam",
    "os_name": "Linux",
    "os_version": "6.1.59",
    "supervisor": "2023.11.3",
    "host_os": "Home Assistant OS 11.1",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "worlds_air_quality_index": {
      "version": "1.0.4",
      "requirements": []
    },
    "variable": {
      "version": "3.3.7",
      "requirements": [
        "iso4217==1.11.20220401"
      ]
    },
    "scheduler": {
      "version": "v0.0.0",
      "requirements": []
    },
    "solaredge_modbus_multi": {
      "version": "2.4.6",
      "requirements": [
        "pymodbus>=3.5.1"
      ]
    },
    "afvalinfo": {
      "version": "1.3.1",
      "requirements": [
        "Babel==2.8.0",
        "python-dateutil==2.8.1"
      ]
    },
    "mass": {
      "version": "2023.2.2",
      "requirements": []
    },
    "fibaro": {
      "version": "1.0.0",
      "requirements": [
        "pyfibaro==0.7.6"
      ]
    },
    "var": {
      "version": "0.15.0",
      "requirements": []
    },
    "solaredgeoptimizers": {
      "version": "1.2.2",
      "requirements": [
        "solaredgeoptimizers==1.0.12",
        "jsonfinder==0.4.2"
      ]
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "spotcast": {
      "version": "v3.6.30",
      "requirements": []
    },
    "neerslag": {
      "version": "2022.07.07.1",
      "requirements": []
    },
    "browser_mod": {
      "version": "2.3.0",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "after_dependencies": [
      "onboarding",
      "usb"
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "config_flow": true,
    "dependencies": [
      "file_upload"
    ],
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp",
      "universal_silabs_flasher"
    ],
    "requirements": [
      "bellows==0.36.8",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.106",
      "zigpy-deconz==0.21.1",
      "zigpy==0.59.0",
      "zigpy-xbee==0.19.0",
      "zigpy-zigate==0.11.0",
      "zigpy-znp==0.11.6",
      "universal-silabs-flasher==0.0.14",
      "pyserial-asyncio-fast==0.11"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "1A86",
        "pid": "55D4",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus v2"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      },
      {
        "type": "_uzg-01._tcp.local.",
        "name": "uzg-01*"
      },
      {
        "type": "_slzb-06._tcp.local.",
        "name": "slzb-06*"
      }
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 57275,
    "manufacturer": "_TZE204_ptaqh9tk",
    "model": "TS0601",
    "name": "_TZE204_ptaqh9tk TS0601",
    "quirk_applied": false,
    "quirk_class": "zigpy.device.Device",
    "quirk_id": null,
    "manufacturer_code": 4417,
    "power_source": "Mains",
    "lqi": 255,
    "rssi": -45,
    "last_seen": "2023-11-28T18:13:05",
    "available": true,
    "device_type": "Router",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": "0x0104",
          "device_type": "0x0051",
          "input_clusters": [
            "0x0000",
            "0x0004",
            "0x0005",
            "0xef00"
          ],
          "output_clusters": [
            "0x000a",
            "0x0019"
          ]
        },
        "242": {
          "profile_id": "0xa1e0",
          "device_type": "0x0061",
          "input_clusters": [],
          "output_clusters": [
            "0x0021"
          ]
        }
      },
      "manufacturer": "_TZE204_ptaqh9tk",
      "model": "TS0601"
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "sensor.tze204_ptaqh9tk_ts0601_rssi",
        "name": "_TZE204_ptaqh9tk TS0601"
      },
      {
        "entity_id": "sensor.tze204_ptaqh9tk_ts0601_lqi",
        "name": "_TZE204_ptaqh9tk TS0601"
      }
    ],
    "neighbors": [],
    "routes": [],
    "endpoint_names": [
      {
        "name": "SMART_PLUG"
      },
      {
        "name": "PROXY_BASIC"
      }
    ],
    "user_given_name": "Lamp Joop Hobbykamer",
    "device_reg_id": "9cd385b69471da03e5469c365a931e85",
    "area_id": "3f5ce62caf704ef09d01656e21bef2d6",
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "SMART_PLUG",
          "id": 81
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0xef00": {
            "endpoint_attribute": null,
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0001": {
                "attribute_name": "app_version",
                "value": 74
              },
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZE204_ptaqh9tk"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0601"
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      },
      "242": {
        "device_type": {
          "name": "PROXY_BASIC",
          "id": 97
        },
        "profile_id": 41440,
        "in_clusters": {},
        "out_clusters": {
          "0x0021": {
            "endpoint_attribute": "green_power",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}

### Logs

<details><summary>Logs</summary>

```python
[Paste the logs here]
```

</details>


### Custom quirk

<details><summary>Custom quirk</summary>

```python
[Paste your custom quirk here]
```

</details>


### Additional information

_No response_


Discussion:
Logfile

2023-12-05 19:33:19.086 WARNING (MainThread) [zigpy.zcl] [0x1D0B:1:0xef00] Unknown cluster command 2 b'\x00\xe4\x07\x02\x00\x04\x00\x00\x00\x00'
2023-12-05 19:33:19.087 DEBUG (MainThread) [zigpy.zcl] [0x1D0B:1:0xef00] Received command 0x02 (TSN 212): b'\x00\xe4\x07\x02\x00\x04\x00\x00\x00\x00'
2023-12-05 19:33:19.087 DEBUG (MainThread) [zigpy.zcl] [0x1D0B:1:0xef00] No explicit handler for cluster command 0x02: b'\x00\xe4\x07\x02\x00\x04\x00\x00\x00\x00'
2023-12-05 19:33:19.088 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=AddressMode.NWK address=0x1d0b>, ep: 1, profile: 0x0104, cluster_id: 0xef00, data: b'09d40200e40702000400000000'
2023-12-05 19:33:19.093 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, <DataIndicationFlags.Always_Use_NWK_Source_Addr: 1>)
2023-12-05 19:33:19.093 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x1739000800010001
2023-12-05 19:33:19.094 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.094 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.100 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x1739050800010022
2023-12-05 19:33:19.101 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x1DD7:1:0x0702]: async_force_update
2023-12-05 19:33:19.101 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x1DD7:1:0x0702]: Reading attributes in chunks: ['current_summ_delivered', 'status']
2023-12-05 19:33:19.102 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0702] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=168, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>)
2023-12-05 19:33:19.102 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0702] Sending request: Read_Attributes(attribute_ids=[0, 512])
2023-12-05 19:33:19.103 DEBUG (MainThread) [zigpy_deconz.zigbee.application] Sending packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 103155, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x1DD7), dst_ep=1, source_route=None, extended_timeout=False, tsn=168, profile_id=260, cluster_id=1794, data=Serialized[b'\x00\xa8\x00\x00\x00\x00\x02'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-12-05 19:33:19.103 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x1DD7:1:0x0b04]: async_update
2023-12-05 19:33:19.103 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x1DD7:1:0x0b04]: Reading attributes in chunks: ['active_power', 'rms_current', 'rms_voltage']
2023-12-05 19:33:19.104 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0b04] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=170, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>)
2023-12-05 19:33:19.104 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0b04] Sending request: Read_Attributes(attribute_ids=[1291, 1288, 1285])
2023-12-05 19:33:19.104 DEBUG (MainThread) [zigpy_deconz.zigbee.application] Sending packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 104569, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x1DD7), dst_ep=1, source_route=None, extended_timeout=False, tsn=170, profile_id=260, cluster_id=2820, data=Serialized[b'\x00\xaa\x00\x0b\x05\x08\x05\x05\x05'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-12-05 19:33:19.105 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1288, 'value': 147, 'timestamp': 1701801198.881624, 'min_update_delta': 30.0})
2023-12-05 19:33:19.105 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1288, 'value': 147, 'timestamp': 1701801198.881624, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.109 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (22, 169, <DeconzSendDataFlags.NONE: 0>, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0x1dd7 endpoint=1>, 260, 1794, 1, b'\x00\xa8\x00\x00\x00\x00\x02', <DeconzTransmitOptions.USE_NWK_KEY_SECURITY: 2>, 0)
2023-12-05 19:33:19.109 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x123a001d001600a90002d71d010401020701070000a800000000020200
2023-12-05 19:33:19.112 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.112 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.113 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x123a000900020022a9
2023-12-05 19:33:19.113 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_request[2, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, 169]
2023-12-05 19:33:19.113 DEBUG (MainThread) [zigpy_deconz.api] APS data request response: [2, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, 169]
2023-12-05 19:33:19.117 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (24, 171, <DeconzSendDataFlags.NONE: 0>, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0x1dd7 endpoint=1>, 260, 2820, 1, b'\x00\xaa\x00\x0b\x05\x08\x05\x05\x05', <DeconzTransmitOptions.USE_NWK_KEY_SECURITY: 2>, 0)
2023-12-05 19:33:19.117 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x123b001f001800ab0002d71d010401040b01090000aa000b05080505050200
2023-12-05 19:33:19.117 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1285, 'value': 223, 'timestamp': 1701801198.88224, 'min_update_delta': 30.0})
2023-12-05 19:33:19.118 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1285, 'value': 223, 'timestamp': 1701801198.88224, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.124 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e3b000700a600
2023-12-05 19:33:19.124 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 166>, 0]
2023-12-05 19:33:19.124 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 166>, 0]
2023-12-05 19:33:19.124 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x123b000900020026ab
2023-12-05 19:33:19.124 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_request[2, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 38>, 171]
2023-12-05 19:33:19.124 DEBUG (MainThread) [zigpy_deconz.api] APS data request response: [2, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 38>, 171]
2023-12-05 19:33:19.126 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.127 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_confirm (0,)
2023-12-05 19:33:19.127 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x043c0007000000
2023-12-05 19:33:19.127 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.135 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e3c000700a600
2023-12-05 19:33:19.135 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 166>, 0]
2023-12-05 19:33:19.135 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 166>, 0]
2023-12-05 19:33:19.135 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x043c0013000c0026a902d71d01010000000000
2023-12-05 19:33:19.135 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_confirm[12, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 38>, 169, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0x1dd7 endpoint=1>, 1, <TXStatus.SUCCESS: 0>, 0, 0, 0, 0]
2023-12-05 19:33:19.135 DEBUG (MainThread) [zigpy_deconz.api] APS data confirm response for request with id 169: 00
2023-12-05 19:33:19.136 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0xa9 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0x1dd7 endpoint=1>, status: 0x00
2023-12-05 19:33:19.136 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_confirm (0,)
2023-12-05 19:33:19.136 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x043d0007000000
2023-12-05 19:33:19.136 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801198.940106, 'ieee': a4:c1:38:47:2e:12:7b:98, 'min_update_delta': 30.0})
2023-12-05 19:33:19.138 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801198.940106, 'ieee': a4:c1:38:47:2e:12:7b:98, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.141 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x043d0013000c0022ab02d71d01010000000000
2023-12-05 19:33:19.141 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_confirm[12, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, 171, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0x1dd7 endpoint=1>, 1, <TXStatus.SUCCESS: 0>, 0, 0, 0, 0]
2023-12-05 19:33:19.141 DEBUG (MainThread) [zigpy_deconz.api] APS data confirm response for request with id 171: 00
2023-12-05 19:33:19.143 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0xab 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0x1dd7 endpoint=1>, status: 0x00
2023-12-05 19:33:19.143 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.144 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.149 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 1794, 'attrid': 0, 'value': 6357, 'timestamp': 1701801198.949667, 'min_update_delta': 30.0})
2023-12-05 19:33:19.150 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 1794, 'attrid': 0, 'value': 6357, 'timestamp': 1701801198.949667, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.165 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.168 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.173 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e3e000700aa00
2023-12-05 19:33:19.173 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 170>, 0]
2023-12-05 19:33:19.173 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 170>, 0]
2023-12-05 19:33:19.174 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 1794, 'attrid': 512, 'value': <bitmap8: 0>, 'timestamp': 1701801198.950031, 'min_update_delta': 30.0})
2023-12-05 19:33:19.177 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:47:2e:12:7b:98, 'endpoint_id': 1, 'cluster_id': 1794, 'attrid': 512, 'value': <bitmap8: 0>, 'timestamp': 1701801198.950031, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.180 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, <DataIndicationFlags.Always_Use_NWK_Source_Addr: 1>)
2023-12-05 19:33:19.180 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x173e000800010001
2023-12-05 19:33:19.190 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x173e00300029002a0200000102d71d0104010207120018a80100000025850000000000000200180000afff780a7905c9
2023-12-05 19:33:19.190 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_indication[41, <DeviceState.APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 42>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0x1dd7>, 1, 260, 1794, b'\x18\xa8\x01\x00\x00\x00%\x85\x00\x00\x00\x00\x00\x00\x02\x00\x18\x00', 0, 175, 255, 120, 10, 121, 5, -55]
2023-12-05 19:33:19.190 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [41, <DeviceState.APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 42>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0x1dd7>, 1, 260, 1794, b'\x18\xa8\x01\x00\x00\x00%\x85\x00\x00\x00\x00\x00\x00\x02\x00\x18\x00', 0, 175, 255, 120, 10, 121, 5, -55]
2023-12-05 19:33:19.191 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 190977, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x1DD7), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=1794, data=Serialized[b'\x18\xa8\x01\x00\x00\x00%\x85\x00\x00\x00\x00\x00\x00\x02\x00\x18\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=255, rssi=-55)
2023-12-05 19:33:19.191 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0702] Received ZCL frame: b'\x18\xa8\x01\x00\x00\x00%\x85\x00\x00\x00\x00\x00\x00\x02\x00\x18\x00'
2023-12-05 19:33:19.192 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0702] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=168, command_id=1, *direction=<Direction.Client_to_Server: 1>)
2023-12-05 19:33:19.192 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0702] Decoded ZCL frame: TuyaZBMeteringCluster:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0000, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint48_t, value=133)), ReadAttributeRecord(attrid=0x0200, status=<Status.SUCCESS: 0>, value=TypeValue(type=bitmap8, value=<bitmap8: 0>))])
2023-12-05 19:33:19.196 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.197 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.198 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=AddressMode.NWK address=0x1dd7>, ep: 1, profile: 0x0104, cluster_id: 0x0702, data: b'18a801000000258500000000000002001800'
2023-12-05 19:33:19.198 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, <DataIndicationFlags.Always_Use_NWK_Source_Addr: 1>)
2023-12-05 19:33:19.198 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x173f000800010001
2023-12-05 19:33:19.209 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x173f0033002c00220200000102d71d010401040b150018aa010b0500290d00080500213f0005050021d60000afff6a0a7905c9
2023-12-05 19:33:19.210 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_indication[44, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0x1dd7>, 1, 260, 2820, b'\x18\xaa\x01\x0b\x05\x00)\r\x00\x08\x05\x00!?\x00\x05\x05\x00!\xd6\x00', 0, 175, 255, 106, 10, 121, 5, -55]
2023-12-05 19:33:19.210 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [44, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0x1dd7>, 1, 260, 2820, b'\x18\xaa\x01\x0b\x05\x00)\r\x00\x08\x05\x00!?\x00\x05\x05\x00!\xd6\x00', 0, 175, 255, 106, 10, 121, 5, -55]
2023-12-05 19:33:19.210 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 210707, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x1DD7), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=2820, data=Serialized[b'\x18\xaa\x01\x0b\x05\x00)\r\x00\x08\x05\x00!?\x00\x05\x05\x00!\xd6\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=255, rssi=-55)
2023-12-05 19:33:19.211 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0b04] Received ZCL frame: b'\x18\xaa\x01\x0b\x05\x00)\r\x00\x08\x05\x00!?\x00\x05\x05\x00!\xd6\x00'
2023-12-05 19:33:19.212 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0b04] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=170, command_id=1, *direction=<Direction.Client_to_Server: 1>)
2023-12-05 19:33:19.212 DEBUG (MainThread) [zigpy.zcl] [0x1DD7:1:0x0b04] Decoded ZCL frame: TuyaZBElectricalMeasurement:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x050B, status=<Status.SUCCESS: 0>, value=TypeValue(type=int16s, value=13)), ReadAttributeRecord(attrid=0x0508, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint16_t, value=63)), ReadAttributeRecord(attrid=0x0505, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint16_t, value=214))])
2023-12-05 19:33:19.213 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xF186:1:0x0b04]: async_update
2023-12-05 19:33:19.214 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xF186:1:0x0b04]: Reading attributes in chunks: ['active_power', 'rms_current', 'rms_voltage']
2023-12-05 19:33:19.214 DEBUG (MainThread) [zigpy.zcl] [0xF186:1:0x0b04] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=172, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>)
2023-12-05 19:33:19.215 DEBUG (MainThread) [zigpy.zcl] [0xF186:1:0x0b04] Sending request: Read_Attributes(attribute_ids=[1291, 1288, 1285])
2023-12-05 19:33:19.215 DEBUG (MainThread) [zigpy_deconz.zigbee.application] Sending packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 215448, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xF186), dst_ep=1, source_route=None, extended_timeout=False, tsn=172, profile_id=260, cluster_id=2820, data=Serialized[b'\x00\xac\x00\x0b\x05\x08\x05\x05\x05'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-12-05 19:33:19.215 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=AddressMode.NWK address=0x1dd7>, ep: 1, profile: 0x0104, cluster_id: 0x0b04, data: b'18aa010b0500290d00080500213f0005050021d600'
2023-12-05 19:33:19.219 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801198.965238, 'ieee': a4:c1:38:1d:43:99:4e:4f, 'min_update_delta': 30.0})
2023-12-05 19:33:19.220 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (24, 173, <DeconzSendDataFlags.NONE: 0>, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0xf186 endpoint=1>, 260, 2820, 1, b'\x00\xac\x00\x0b\x05\x08\x05\x05\x05', <DeconzTransmitOptions.USE_NWK_KEY_SECURITY: 2>, 0)
2023-12-05 19:33:19.220 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x1240001f001800ad000286f1010401040b01090000ac000b05080505050200
2023-12-05 19:33:19.222 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801198.965238, 'ieee': a4:c1:38:1d:43:99:4e:4f, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.231 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x1240000900020022ad
2023-12-05 19:33:19.231 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_request[2, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, 173]
2023-12-05 19:33:19.232 DEBUG (MainThread) [zigpy_deconz.api] APS data request response: [2, <DeviceState.APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 34>, 173]
2023-12-05 19:33:19.232 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xF186:1:0x0702]: async_force_update
2023-12-05 19:33:19.232 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xF186:1:0x0702]: Reading attributes in chunks: ['current_summ_delivered', 'status']
2023-12-05 19:33:19.233 DEBUG (MainThread) [zigpy.zcl] [0xF186:1:0x0702] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=174, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>)
2023-12-05 19:33:19.234 DEBUG (MainThread) [zigpy.zcl] [0xF186:1:0x0702] Sending request: Read_Attributes(attribute_ids=[0, 512])
2023-12-05 19:33:19.234 DEBUG (MainThread) [zigpy_deconz.zigbee.application] Sending packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 234412, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xF186), dst_ep=1, source_route=None, extended_timeout=False, tsn=174, profile_id=260, cluster_id=1794, data=Serialized[b'\x00\xae\x00\x00\x00\x00\x02'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-12-05 19:33:19.235 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.236 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.242 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e41000700a600
2023-12-05 19:33:19.242 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 166>, 0]
2023-12-05 19:33:19.242 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 166>, 0]
2023-12-05 19:33:19.243 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_request (22, 175, <DeconzSendDataFlags.NONE: 0>, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0xf186 endpoint=1>, 260, 1794, 1, b'\x00\xae\x00\x00\x00\x00\x02', <DeconzTransmitOptions.USE_NWK_KEY_SECURITY: 2>, 0)
2023-12-05 19:33:19.243 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x1241001d001600af000286f1010401020701070000ae00000000020200
2023-12-05 19:33:19.246 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801198.965238, 'ieee': a4:c1:38:1d:43:99:4e:4f, 'min_update_delta': 30.0})
2023-12-05 19:33:19.247 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801198.965238, 'ieee': a4:c1:38:1d:43:99:4e:4f, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.250 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e42000700ae00
2023-12-05 19:33:19.250 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 174>, 0]
2023-12-05 19:33:19.250 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 174>, 0]
2023-12-05 19:33:19.251 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x124100090002002eaf
2023-12-05 19:33:19.251 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_request[2, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 46>, 175]
2023-12-05 19:33:19.251 DEBUG (MainThread) [zigpy_deconz.api] APS data request response: [2, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 46>, 175]
2023-12-05 19:33:19.251 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.252 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.257 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_confirm (0,)
2023-12-05 19:33:19.257 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x04420007000000
2023-12-05 19:33:19.262 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801199.035059, 'ieee': a4:c1:38:cd:ee:05:8b:3b, 'min_update_delta': 30.0})
2023-12-05 19:33:19.263 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, 'UPDATE devices_v12\n                    SET last_seen=:ts\n                    WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1701801199.035059, 'ieee': a4:c1:38:cd:ee:05:8b:3b, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.265 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e42000700ae00
2023-12-05 19:33:19.265 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 174>, 0]
2023-12-05 19:33:19.266 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 174>, 0]
2023-12-05 19:33:19.266 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x04420013000c002ead0286f101010000000000
2023-12-05 19:33:19.266 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_confirm[12, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 46>, 173, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0xf186 endpoint=1>, 1, <TXStatus.SUCCESS: 0>, 0, 0, 0, 0]
2023-12-05 19:33:19.266 DEBUG (MainThread) [zigpy_deconz.api] APS data confirm response for request with id 173: 00
2023-12-05 19:33:19.266 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e43000700ae00
2023-12-05 19:33:19.266 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 174>, 0]
2023-12-05 19:33:19.269 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0xad 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0xf186 endpoint=1>, status: 0x00
2023-12-05 19:33:19.271 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, <DataIndicationFlags.Always_Use_NWK_Source_Addr: 1>)
2023-12-05 19:33:19.271 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x1743000800010001
2023-12-05 19:33:19.272 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.273 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.275 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x0e44000700ae00
2023-12-05 19:33:19.276 DEBUG (MainThread) [zigpy_deconz.api] Received command device_state_changed[<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 174>, 0]
2023-12-05 19:33:19.276 DEBUG (MainThread) [zigpy_deconz.api] Device state changed response: [<DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|130: 174>, 0]
2023-12-05 19:33:19.276 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x17430033002c002e020000010286f1010401040b150018ac010b050029110008050021500005050021d60000afff780a7905c6
2023-12-05 19:33:19.276 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_indication[44, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 46>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0xf186>, 1, 260, 2820, b'\x18\xac\x01\x0b\x05\x00)\x11\x00\x08\x05\x00!P\x00\x05\x05\x00!\xd6\x00', 0, 175, 255, 120, 10, 121, 5, -58]
2023-12-05 19:33:19.276 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [44, <DeviceState.APSDE_DATA_CONFIRM|APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 46>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0xf186>, 1, 260, 2820, b'\x18\xac\x01\x0b\x05\x00)\x11\x00\x08\x05\x00!P\x00\x05\x05\x00!\xd6\x00', 0, 175, 255, 120, 10, 121, 5, -58]
2023-12-05 19:33:19.276 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 276834, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xF186), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=2820, data=Serialized[b'\x18\xac\x01\x0b\x05\x00)\x11\x00\x08\x05\x00!P\x00\x05\x05\x00!\xd6\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=255, rssi=-58)
2023-12-05 19:33:19.277 DEBUG (MainThread) [zigpy.zcl] [0xF186:1:0x0b04] Received ZCL frame: b'\x18\xac\x01\x0b\x05\x00)\x11\x00\x08\x05\x00!P\x00\x05\x05\x00!\xd6\x00'
2023-12-05 19:33:19.277 DEBUG (MainThread) [zigpy.zcl] [0xF186:1:0x0b04] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=172, command_id=1, *direction=<Direction.Client_to_Server: 1>)
2023-12-05 19:33:19.278 DEBUG (MainThread) [zigpy.zcl] [0xF186:1:0x0b04] Decoded ZCL frame: TuyaZBElectricalMeasurement:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x050B, status=<Status.SUCCESS: 0>, value=TypeValue(type=int16s, value=17)), ReadAttributeRecord(attrid=0x0508, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint16_t, value=80)), ReadAttributeRecord(attrid=0x0505, status=<Status.SUCCESS: 0>, value=TypeValue(type=uint16_t, value=214))])
2023-12-05 19:33:19.280 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:cd:ee:05:8b:3b, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1291, 'value': 0, 'timestamp': 1701801199.039562, 'min_update_delta': 30.0})
2023-12-05 19:33:19.282 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:cd:ee:05:8b:3b, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1291, 'value': 0, 'timestamp': 1701801199.039562, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.285 DEBUG (MainThread) [zigpy_deconz.api] 'aps_data_indication' response from <DeconzAddress address_mode=AddressMode.NWK address=0xf186>, ep: 1, profile: 0x0104, cluster_id: 0x0b04, data: b'18ac010b050029110008050021500005050021d600'
2023-12-05 19:33:19.288 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_confirm (0,)
2023-12-05 19:33:19.289 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x04440007000000
2023-12-05 19:33:19.295 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.296 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x04440013000c002aaf0286f101010000000000
2023-12-05 19:33:19.296 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_confirm[12, <DeviceState.APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 42>, 175, <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0xf186 endpoint=1>, 1, <TXStatus.SUCCESS: 0>, 0, 0, 0, 0]
2023-12-05 19:33:19.297 DEBUG (MainThread) [zigpy_deconz.api] APS data confirm response for request with id 175: 00
2023-12-05 19:33:19.297 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.298 DEBUG (MainThread) [zigpy_deconz.api] Request id: 0xaf 'aps_data_confirm' for <DeconzAddressEndpoint address_mode=AddressMode.NWK address=0xf186 endpoint=1>, status: 0x00
2023-12-05 19:33:19.302 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xAB27:1:0x0b04]: async_update
2023-12-05 19:33:19.302 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0xAB27:1:0x0b04]: Reading attributes in chunks: ['active_power', 'rms_current', 'rms_voltage']
2023-12-05 19:33:19.303 DEBUG (MainThread) [zigpy.zcl] [0xAB27:1:0x0b04] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True), tsn=176, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>)
2023-12-05 19:33:19.303 DEBUG (MainThread) [zigpy.zcl] [0xAB27:1:0x0b04] Sending request: Read_Attributes(attribute_ids=[1291, 1288, 1285])
2023-12-05 19:33:19.304 DEBUG (MainThread) [zigpy_deconz.zigbee.application] Sending packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 304282, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xAB27), dst_ep=1, source_route=None, extended_timeout=False, tsn=176, profile_id=260, cluster_id=2820, data=Serialized[b'\x00\xb0\x00\x0b\x05\x08\x05\x05\x05'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=None, rssi=None)
2023-12-05 19:33:19.304 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_confirm (0,)
2023-12-05 19:33:19.304 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x04450007000000
2023-12-05 19:33:19.307 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:cd:ee:05:8b:3b, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1288, 'value': 0, 'timestamp': 1701801199.040208, 'min_update_delta': 30.0})
2023-12-05 19:33:19.309 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method execute of sqlite3.Connection object at 0xffff7fc132e0>, '\n            INSERT INTO attributes_cache_v12\n            VALUES (:ieee, :endpoint_id, :cluster_id, :attrid, :value, :timestamp)\n                ON CONFLICT (ieee, endpoint_id, cluster, attrid) DO UPDATE\n                SET value=excluded.value, last_updated=excluded.last_updated\n                WHERE\n                    value != excluded.value\n                    OR :timestamp - last_updated > :min_update_delta\n            ', {'ieee': a4:c1:38:cd:ee:05:8b:3b, 'endpoint_id': 1, 'cluster_id': 2820, 'attrid': 1288, 'value': 0, 'timestamp': 1701801199.040208, 'min_update_delta': 30.0}) completed
2023-12-05 19:33:19.311 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x044505080001002a
2023-12-05 19:33:19.312 DEBUG (MainThread) [zigpy_deconz.api] Command Command.aps_data_indication (1, <DataIndicationFlags.Always_Use_NWK_Source_Addr: 1>)
2023-12-05 19:33:19.313 DEBUG (MainThread) [zigpy_deconz.uart] Send: 0x1746000800010001
2023-12-05 19:33:19.314 DEBUG (Thread-20) [aiosqlite] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>)
2023-12-05 19:33:19.315 DEBUG (Thread-20) [aiosqlite] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0xffff7fc132e0>) completed
2023-12-05 19:33:19.318 DEBUG (MainThread) [zigpy_deconz.uart] Frame received: 0x1746002b0024002a02000001020b1d01040100ef0d0009d40200e4070200040000000000afff780a7905d3
2023-12-05 19:33:19.318 DEBUG (MainThread) [zigpy_deconz.api] Received command aps_data_indication[36, <DeviceState.APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 42>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0x1d0b>, 1, 260, 61184, b'\t\xd4\x02\x00\xe4\x07\x02\x00\x04\x00\x00\x00\x00', 0, 175, 255, 120, 10, 121, 5, -45]
2023-12-05 19:33:19.319 DEBUG (MainThread) [zigpy_deconz.api] APS data indication response: [36, <DeviceState.APSDE_DATA_INDICATION|APSDE_DATA_REQUEST_SLOTS_AVAILABLE|2: 42>, <DeconzAddress address_mode=AddressMode.NWK address=0x0000>, 1, <DeconzAddress address_mode=AddressMode.NWK address=0x1d0b>, 1, 260, 61184, b'\t\xd4\x02\x00\xe4\x07\x02\x00\x04\x00\x00\x00\x00', 0, 175, 255, 120, 10, 121, 5, -45]
2023-12-05 19:33:19.319 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(timestamp=datetime.datetime(2023, 12, 5, 18, 33, 19, 319588, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x1D0B), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=None, profile_id=260, cluster_id=61184, data=Serialized[b'\t\xd4\x02\x00\xe4\x07\x02\x00\x04\x00\x00\x00\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=255, rssi=-45)
2023-12-05 19:33:19.320 DEBUG (MainThread) [zigpy.zcl] [0x1D0B:1:0xef00] Received ZCL frame: b'\t\xd4\x02\x00\xe4\x07\x02\x00\x04\x00\x00\x00\x00'
2023-12-05 19:33:19.320 DEBUG (MainThread) [zigpy.zcl] [0x1D0B: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=212, command_id=2, *direction=<Direction.Client_to_Server: 1>)

Got it working with custom quirks.

1. [Setup custom quirks in HA](https://community.home-assistant.io/t/how-to-setup-local-zha-quirks/341226/2)
2. Download quirk to custom quirks folder from [here](https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_switch.py)
3. Edit downloaded file and add mapping for `("_TZE204_ptaqh9tk", "TS0601")` in `TuyaSingleSwitch_GP`
Thanks, that works. 
We should leave this open until the fix is PR'ed into the repo.

Resolving patch:
diff --git a/zhaquirks/tuya/ts0601_switch.py b/zhaquirks/tuya/ts0601_switch.py
--- a/zhaquirks/tuya/ts0601_switch.py
+++ b/zhaquirks/tuya/ts0601_switch.py
@@ -128,6 +128,7 @@ class TuyaSingleSwitch_GP(TuyaSwitch):
         MODELS_INFO: [
             ("_TZE200_gbagoilo", "TS0601"),  # reported in #1634
             ("_TZE204_6fk3gewc", "TS0601"),
+            ("_TZE204_ptaqh9tk", "TS0601"),  # reported in #2780
         ],
         ENDPOINTS: {
             # <SimpleDescriptor endpoint=1 profile=260 device_type=51 device_version=1


Test patch: