We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Device Support Request] TS0601 by _TZE200_3ejwxpmu (QOXEZY Zigbee CO2 NDIR Sensor)
**Is your feature request related to a problem? Please describe.**
This is a NDIR CO2 sensor which measures carbon dioxide (additionally humidity and temperature). While I can connect it to ZHA, it generates no entities. Is it possible to integrate?

**Describe the solution you'd like**
I would like to be able to see all available entities.

<details>
<!-- Device signature can be acquired by clicking on the "Zigbee Device Signature" button in the device settings view -->
<summary>Device signature</summary>
{
  "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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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": 260,
      "device_type": "0x0051",
      "in_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "_TZE200_3ejwxpmu",
  "model": "TS0601",
  "class": "zigpy.device.Device"
}

</details>

**Additional context**
Add any other context or screenshots about the feature request here.
![image](https://user-images.githubusercontent.com/34242593/228160040-d74ddf56-3017-4ea0-80f9-15f067a74cc9.png)



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `zhaquirks/tuya/air/ts0601_air_quality.py`
Content:
```
1 """Tuya Air Quality sensor."""
2 
3 from zigpy.profiles import zgp, zha
4 from zigpy.quirks import CustomDevice
5 from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time
6 
7 from zhaquirks.const import (
8     DEVICE_TYPE,
9     ENDPOINTS,
10     INPUT_CLUSTERS,
11     MODELS_INFO,
12     OUTPUT_CLUSTERS,
13     PROFILE_ID,
14 )
15 from zhaquirks.tuya.air import (
16     TuyaAirQualityCO2,
17     TuyaAirQualityFormaldehyde,
18     TuyaAirQualityHumidity,
19     TuyaAirQualityTemperature,
20     TuyaAirQualityVOC,
21     TuyaCO2ManufCluster,
22 )
23 
24 
25 class TuyaCO2Sensor(CustomDevice):
26     """Tuya Air quality device."""
27 
28     signature = {
29         # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 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)]
30         # device_version=1
31         # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,
32         # input_clusters=[0, 4, 5, 61184],
33         # output_clusters=[25, 10])
34         MODELS_INFO: [
35             ("_TZE200_8ygsuhe1", "TS0601"),
36             ("_TZE200_ryfmq5rl", "TS0601"),
37             ("_TZE200_yvx5lh6k", "TS0601"),
38             ("_TZE200_c2fmom5z", "TS0601"),
39         ],
40         ENDPOINTS: {
41             1: {
42                 PROFILE_ID: zha.PROFILE_ID,
43                 DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
44                 INPUT_CLUSTERS: [
45                     Basic.cluster_id,
46                     Groups.cluster_id,
47                     Scenes.cluster_id,
48                     TuyaCO2ManufCluster.cluster_id,
49                 ],
50                 OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
51             }
52         },
53     }
54 
55     replacement = {
56         ENDPOINTS: {
57             1: {
58                 DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
59                 INPUT_CLUSTERS: [
60                     Basic.cluster_id,
61                     Groups.cluster_id,
62                     Scenes.cluster_id,
63                     TuyaCO2ManufCluster,
64                     TuyaAirQualityCO2,
65                     TuyaAirQualityFormaldehyde,
66                     TuyaAirQualityHumidity,
67                     TuyaAirQualityTemperature,
68                     TuyaAirQualityVOC,
69                 ],
70                 OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
71             }
72         }
73     }
74 
75 
76 class TuyaCO2SensorGPP(CustomDevice):
77     """Tuya Air quality device with GPP."""
78 
79     signature = {
80         # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 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)]
81         # device_version=1
82         # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,
83         # input_clusters=[0, 4, 5, 61184],
84         # output_clusters=[25, 10])
85         MODELS_INFO: [
86             ("_TZE200_8ygsuhe1", "TS0601"),
87             ("_TZE200_ryfmq5rl", "TS0601"),
88             ("_TZE200_yvx5lh6k", "TS0601"),
89             ("_TZE200_c2fmom5z", "TS0601"),
90         ],
91         ENDPOINTS: {
92             1: {
93                 PROFILE_ID: zha.PROFILE_ID,
94                 DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
95                 INPUT_CLUSTERS: [
96                     Basic.cluster_id,
97                     Groups.cluster_id,
98                     Scenes.cluster_id,
99                     TuyaCO2ManufCluster.cluster_id,
100                 ],
101                 OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
102             },
103             242: {
104                 # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
105                 # input_clusters=[]
106                 # output_clusters=[33]
107                 PROFILE_ID: zgp.PROFILE_ID,
108                 DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
109                 INPUT_CLUSTERS: [],
110                 OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
111             },
112         },
113     }
114 
115     replacement = {
116         ENDPOINTS: {
117             1: {
118                 DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
119                 INPUT_CLUSTERS: [
120                     Basic.cluster_id,
121                     Groups.cluster_id,
122                     Scenes.cluster_id,
123                     TuyaCO2ManufCluster,
124                     TuyaAirQualityCO2,
125                     TuyaAirQualityFormaldehyde,
126                     TuyaAirQualityHumidity,
127                     TuyaAirQualityTemperature,
128                     TuyaAirQualityVOC,
129                 ],
130                 OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
131             },
132             242: {
133                 PROFILE_ID: zgp.PROFILE_ID,
134                 DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
135                 INPUT_CLUSTERS: [],
136                 OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
137             },
138         }
139     }
140 
141 
142 class TuyaNDIRCO2SensorGPP(CustomDevice):
143     """Tuya NIDR CO2 sensor with GPP."""
144 
145     signature = {
146         # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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)
147         # device_version=1
148         # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,
149         # input_clusters=[0, 4, 5, 61184],
150         # output_clusters=[25, 10])
151         MODELS_INFO: [
152             ("_TZE200_ogkdpgy2", "TS0601"),
153         ],
154         ENDPOINTS: {
155             1: {
156                 PROFILE_ID: zha.PROFILE_ID,
157                 DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
158                 INPUT_CLUSTERS: [
159                     Basic.cluster_id,
160                     Groups.cluster_id,
161                     Scenes.cluster_id,
162                     TuyaCO2ManufCluster.cluster_id,
163                 ],
164                 OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
165             },
166             242: {
167                 # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
168                 # input_clusters=[]
169                 # output_clusters=[33]
170                 PROFILE_ID: zgp.PROFILE_ID,
171                 DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
172                 INPUT_CLUSTERS: [],
173                 OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
174             },
175         },
176     }
177 
178     replacement = {
179         ENDPOINTS: {
180             1: {
181                 DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
182                 INPUT_CLUSTERS: [
183                     Basic.cluster_id,
184                     Groups.cluster_id,
185                     Scenes.cluster_id,
186                     TuyaCO2ManufCluster,
187                     TuyaAirQualityCO2,
188                 ],
189                 OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
190             },
191             242: {
192                 PROFILE_ID: zgp.PROFILE_ID,
193                 DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
194                 INPUT_CLUSTERS: [],
195                 OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
196             },
197         }
198     }
199
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/zhaquirks/tuya/air/ts0601_air_quality.py b/zhaquirks/tuya/air/ts0601_air_quality.py
--- a/zhaquirks/tuya/air/ts0601_air_quality.py
+++ b/zhaquirks/tuya/air/ts0601_air_quality.py
@@ -196,3 +196,64 @@
             },
         }
     }
+
+
+class TuyaNDIRCO2SensorGPP2(CustomDevice):
+    """Tuya NIDR CO2 sensor."""
+
+    signature = {
+        # 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)
+        # device_version=1
+        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,
+        # input_clusters=[0, 4, 5, 61184],
+        # output_clusters=[10, 25])
+        MODELS_INFO: [
+            ("_TZE200_3ejwxpmu", "TS0601"),
+        ],
+        ENDPOINTS: {
+            1: {
+                PROFILE_ID: zha.PROFILE_ID,
+                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
+                INPUT_CLUSTERS: [
+                    Basic.cluster_id,
+                    Groups.cluster_id,
+                    Scenes.cluster_id,
+                    TuyaCO2ManufCluster.cluster_id,
+                ],
+                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
+            },
+            242: {
+                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
+                # input_clusters=[]
+                # output_clusters=[33]
+                PROFILE_ID: zgp.PROFILE_ID,
+                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
+                INPUT_CLUSTERS: [],
+                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
+            },
+        },
+    }
+
+    replacement = {
+        ENDPOINTS: {
+            1: {
+                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
+                INPUT_CLUSTERS: [
+                    Basic.cluster_id,
+                    Groups.cluster_id,
+                    Scenes.cluster_id,
+                    TuyaCO2ManufCluster,
+                    TuyaAirQualityCO2,
+                    TuyaAirQualityHumidity,
+                    TuyaAirQualityTemperature,
+                ],
+                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
+            },
+            242: {
+                PROFILE_ID: zgp.PROFILE_ID,
+                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
+                INPUT_CLUSTERS: [],
+                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
+            },
+        }
+    }

{"golden_diff": "diff --git a/zhaquirks/tuya/air/ts0601_air_quality.py b/zhaquirks/tuya/air/ts0601_air_quality.py\n--- a/zhaquirks/tuya/air/ts0601_air_quality.py\n+++ b/zhaquirks/tuya/air/ts0601_air_quality.py\n@@ -196,3 +196,64 @@\n             },\n         }\n     }\n+\n+\n+class TuyaNDIRCO2SensorGPP2(CustomDevice):\n+    \"\"\"Tuya NIDR CO2 sensor.\"\"\"\n+\n+    signature = {\n+        # 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)\n+        # device_version=1\n+        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n+        # input_clusters=[0, 4, 5, 61184],\n+        # output_clusters=[10, 25])\n+        MODELS_INFO: [\n+            (\"_TZE200_3ejwxpmu\", \"TS0601\"),\n+        ],\n+        ENDPOINTS: {\n+            1: {\n+                PROFILE_ID: zha.PROFILE_ID,\n+                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n+                INPUT_CLUSTERS: [\n+                    Basic.cluster_id,\n+                    Groups.cluster_id,\n+                    Scenes.cluster_id,\n+                    TuyaCO2ManufCluster.cluster_id,\n+                ],\n+                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n+            },\n+            242: {\n+                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97\n+                # input_clusters=[]\n+                # output_clusters=[33]\n+                PROFILE_ID: zgp.PROFILE_ID,\n+                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n+                INPUT_CLUSTERS: [],\n+                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n+            },\n+        },\n+    }\n+\n+    replacement = {\n+        ENDPOINTS: {\n+            1: {\n+                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n+                INPUT_CLUSTERS: [\n+                    Basic.cluster_id,\n+                    Groups.cluster_id,\n+                    Scenes.cluster_id,\n+                    TuyaCO2ManufCluster,\n+                    TuyaAirQualityCO2,\n+                    TuyaAirQualityHumidity,\n+                    TuyaAirQualityTemperature,\n+                ],\n+                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n+            },\n+            242: {\n+                PROFILE_ID: zgp.PROFILE_ID,\n+                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n+                INPUT_CLUSTERS: [],\n+                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n+            },\n+        }\n+    }\n", "issue": "[Device Support Request] TS0601 by _TZE200_3ejwxpmu (QOXEZY Zigbee CO2 NDIR Sensor)\n**Is your feature request related to a problem? Please describe.**\r\nThis is a NDIR CO2 sensor which measures carbon dioxide (additionally humidity and temperature). While I can connect it to ZHA, it generates no entities. Is it possible to integrate?\r\n\r\n**Describe the solution you'd like**\r\nI would like to be able to see all available entities.\r\n\r\n<details>\r\n<!-- Device signature can be acquired by clicking on the \"Zigbee Device Signature\" button in the device settings view -->\r\n<summary>Device signature</summary>\r\n{\r\n  \"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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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)\",\r\n  \"endpoints\": {\r\n    \"1\": {\r\n      \"profile_id\": 260,\r\n      \"device_type\": \"0x0051\",\r\n      \"in_clusters\": [\r\n        \"0x0000\",\r\n        \"0x0004\",\r\n        \"0x0005\",\r\n        \"0xef00\"\r\n      ],\r\n      \"out_clusters\": [\r\n        \"0x000a\",\r\n        \"0x0019\"\r\n      ]\r\n    },\r\n    \"242\": {\r\n      \"profile_id\": 41440,\r\n      \"device_type\": \"0x0061\",\r\n      \"in_clusters\": [],\r\n      \"out_clusters\": [\r\n        \"0x0021\"\r\n      ]\r\n    }\r\n  },\r\n  \"manufacturer\": \"_TZE200_3ejwxpmu\",\r\n  \"model\": \"TS0601\",\r\n  \"class\": \"zigpy.device.Device\"\r\n}\r\n\r\n</details>\r\n\r\n**Additional context**\r\nAdd any other context or screenshots about the feature request here.\r\n![image](https://user-images.githubusercontent.com/34242593/228160040-d74ddf56-3017-4ea0-80f9-15f067a74cc9.png)\r\n\r\n\n", "before_files": [{"content": "\"\"\"Tuya Air Quality sensor.\"\"\"\n\nfrom zigpy.profiles import zgp, zha\nfrom zigpy.quirks import CustomDevice\nfrom zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time\n\nfrom zhaquirks.const import (\n    DEVICE_TYPE,\n    ENDPOINTS,\n    INPUT_CLUSTERS,\n    MODELS_INFO,\n    OUTPUT_CLUSTERS,\n    PROFILE_ID,\n)\nfrom zhaquirks.tuya.air import (\n    TuyaAirQualityCO2,\n    TuyaAirQualityFormaldehyde,\n    TuyaAirQualityHumidity,\n    TuyaAirQualityTemperature,\n    TuyaAirQualityVOC,\n    TuyaCO2ManufCluster,\n)\n\n\nclass TuyaCO2Sensor(CustomDevice):\n    \"\"\"Tuya Air quality device.\"\"\"\n\n    signature = {\n        # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 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)]\n        # device_version=1\n        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n        # input_clusters=[0, 4, 5, 61184],\n        # output_clusters=[25, 10])\n        MODELS_INFO: [\n            (\"_TZE200_8ygsuhe1\", \"TS0601\"),\n            (\"_TZE200_ryfmq5rl\", \"TS0601\"),\n            (\"_TZE200_yvx5lh6k\", \"TS0601\"),\n            (\"_TZE200_c2fmom5z\", \"TS0601\"),\n        ],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster.cluster_id,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            }\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster,\n                    TuyaAirQualityCO2,\n                    TuyaAirQualityFormaldehyde,\n                    TuyaAirQualityHumidity,\n                    TuyaAirQualityTemperature,\n                    TuyaAirQualityVOC,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            }\n        }\n    }\n\n\nclass TuyaCO2SensorGPP(CustomDevice):\n    \"\"\"Tuya Air quality device with GPP.\"\"\"\n\n    signature = {\n        # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 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)]\n        # device_version=1\n        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n        # input_clusters=[0, 4, 5, 61184],\n        # output_clusters=[25, 10])\n        MODELS_INFO: [\n            (\"_TZE200_8ygsuhe1\", \"TS0601\"),\n            (\"_TZE200_ryfmq5rl\", \"TS0601\"),\n            (\"_TZE200_yvx5lh6k\", \"TS0601\"),\n            (\"_TZE200_c2fmom5z\", \"TS0601\"),\n        ],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster.cluster_id,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97\n                # input_clusters=[]\n                # output_clusters=[33]\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster,\n                    TuyaAirQualityCO2,\n                    TuyaAirQualityFormaldehyde,\n                    TuyaAirQualityHumidity,\n                    TuyaAirQualityTemperature,\n                    TuyaAirQualityVOC,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        }\n    }\n\n\nclass TuyaNDIRCO2SensorGPP(CustomDevice):\n    \"\"\"Tuya NIDR CO2 sensor with GPP.\"\"\"\n\n    signature = {\n        # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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)\n        # device_version=1\n        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n        # input_clusters=[0, 4, 5, 61184],\n        # output_clusters=[25, 10])\n        MODELS_INFO: [\n            (\"_TZE200_ogkdpgy2\", \"TS0601\"),\n        ],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster.cluster_id,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97\n                # input_clusters=[]\n                # output_clusters=[33]\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster,\n                    TuyaAirQualityCO2,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        }\n    }\n", "path": "zhaquirks/tuya/air/ts0601_air_quality.py"}], "after_files": [{"content": "\"\"\"Tuya Air Quality sensor.\"\"\"\n\nfrom zigpy.profiles import zgp, zha\nfrom zigpy.quirks import CustomDevice\nfrom zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time\n\nfrom zhaquirks.const import (\n    DEVICE_TYPE,\n    ENDPOINTS,\n    INPUT_CLUSTERS,\n    MODELS_INFO,\n    OUTPUT_CLUSTERS,\n    PROFILE_ID,\n)\nfrom zhaquirks.tuya.air import (\n    TuyaAirQualityCO2,\n    TuyaAirQualityFormaldehyde,\n    TuyaAirQualityHumidity,\n    TuyaAirQualityTemperature,\n    TuyaAirQualityVOC,\n    TuyaCO2ManufCluster,\n)\n\n\nclass TuyaCO2Sensor(CustomDevice):\n    \"\"\"Tuya Air quality device.\"\"\"\n\n    signature = {\n        # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 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)]\n        # device_version=1\n        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n        # input_clusters=[0, 4, 5, 61184],\n        # output_clusters=[25, 10])\n        MODELS_INFO: [\n            (\"_TZE200_8ygsuhe1\", \"TS0601\"),\n            (\"_TZE200_ryfmq5rl\", \"TS0601\"),\n            (\"_TZE200_yvx5lh6k\", \"TS0601\"),\n            (\"_TZE200_c2fmom5z\", \"TS0601\"),\n        ],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster.cluster_id,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            }\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster,\n                    TuyaAirQualityCO2,\n                    TuyaAirQualityFormaldehyde,\n                    TuyaAirQualityHumidity,\n                    TuyaAirQualityTemperature,\n                    TuyaAirQualityVOC,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            }\n        }\n    }\n\n\nclass TuyaCO2SensorGPP(CustomDevice):\n    \"\"\"Tuya Air quality device with GPP.\"\"\"\n\n    signature = {\n        # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 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)]\n        # device_version=1\n        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n        # input_clusters=[0, 4, 5, 61184],\n        # output_clusters=[25, 10])\n        MODELS_INFO: [\n            (\"_TZE200_8ygsuhe1\", \"TS0601\"),\n            (\"_TZE200_ryfmq5rl\", \"TS0601\"),\n            (\"_TZE200_yvx5lh6k\", \"TS0601\"),\n            (\"_TZE200_c2fmom5z\", \"TS0601\"),\n        ],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster.cluster_id,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97\n                # input_clusters=[]\n                # output_clusters=[33]\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster,\n                    TuyaAirQualityCO2,\n                    TuyaAirQualityFormaldehyde,\n                    TuyaAirQualityHumidity,\n                    TuyaAirQualityTemperature,\n                    TuyaAirQualityVOC,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        }\n    }\n\n\nclass TuyaNDIRCO2SensorGPP(CustomDevice):\n    \"\"\"Tuya NIDR CO2 sensor with GPP.\"\"\"\n\n    signature = {\n        # 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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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)\n        # device_version=1\n        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n        # input_clusters=[0, 4, 5, 61184],\n        # output_clusters=[25, 10])\n        MODELS_INFO: [\n            (\"_TZE200_ogkdpgy2\", \"TS0601\"),\n        ],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster.cluster_id,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97\n                # input_clusters=[]\n                # output_clusters=[33]\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster,\n                    TuyaAirQualityCO2,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        }\n    }\n\n\nclass TuyaNDIRCO2SensorGPP2(CustomDevice):\n    \"\"\"Tuya NIDR CO2 sensor.\"\"\"\n\n    signature = {\n        # 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)\n        # device_version=1\n        # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1,\n        # input_clusters=[0, 4, 5, 61184],\n        # output_clusters=[10, 25])\n        MODELS_INFO: [\n            (\"_TZE200_3ejwxpmu\", \"TS0601\"),\n        ],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster.cluster_id,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                # <SimpleDescriptor endpoint=242 profile=41440 device_type=97\n                # input_clusters=[]\n                # output_clusters=[33]\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Groups.cluster_id,\n                    Scenes.cluster_id,\n                    TuyaCO2ManufCluster,\n                    TuyaAirQualityCO2,\n                    TuyaAirQualityHumidity,\n                    TuyaAirQualityTemperature,\n                ],\n                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],\n            },\n            242: {\n                PROFILE_ID: zgp.PROFILE_ID,\n                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],\n            },\n        }\n    }\n", "path": "zhaquirks/tuya/air/ts0601_air_quality.py"}]}