We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Device Support Request] Legrand Dimmer switch w/o neutral for sw_build_id=002e
Hi, guy!

I have Legrand Dimmer switch w/o neutral which is not recognized neither as DimmerWithoutNeutral nor as DimmerWithoutNeutral2.

The device runs this firmware:
```
hw_version = 7
stack_version = 66
sw_build_id = 002e
```

In this firmware Legrand changed the device type for endpoint=242 from 0x0061 to 0x0066, and they also added a few more clusters:
```
endpoint=1: out: 0x0006, 0x0005
endpoint=242: in: 0x0021
```

Here is a complete device signature
```
{
  "node_descriptor": "<NodeDescriptor byte1=17 byte2=64 mac_capability_flags=142 manufacturer_code=4129 maximum_buffer_size=89 maximum_incoming_transfer_size=63 server_mask=10752 maximum_outgoing_transfer_size=63 descriptor_capability_field=0>",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0008",
        "0x000f",
        "0xfc01"
      ],
      "out_clusters": [
        "0x0000",
        "0x0019",
        "0xfc01"
      ]
    }
  },
  "manufacturer": " Legrand",
  "model": " Dimmer switch w/o neutral",
  "class": "zigpy.device.Device"
}
```

I've updated the definition of DimmerWithoutNeutral2 (see below) and now the device is properly recognized.

```
class DimmerWithoutNeutral2(DimmerWithoutNeutral):
    """Dimmer switch w/o neutral 2."""

    signature = {
        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256
        # device_version=1
        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]
        # output_clusters=[0, 64513, 25]>
        MODELS_INFO: [(f" {LEGRAND}", " Dimmer switch w/o neutral")],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    OnOff.cluster_id,
                    LevelControl.cluster_id,
                    Scenes.cluster_id,
                    BinaryInput.cluster_id,
                    MANUFACTURER_SPECIFIC_CLUSTER_ID,
                ],
                OUTPUT_CLUSTERS: [
                    Basic.cluster_id,
                    MANUFACTURER_SPECIFIC_CLUSTER_ID,
                    Ota.cluster_id,
                    OnOff.cluster_id,
                    Scenes.cluster_id,
                ],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 0x0066,
                INPUT_CLUSTERS: [0x0021],
                OUTPUT_CLUSTERS: [0x0021],
            },
        },
    }
```

Please add this quirk to master. 

--- 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/legrand/dimmer.py`
Content:
```
1 """Device handler for Legrand Dimmer switch w/o neutral."""
2 from zigpy.profiles import zha
3 from zigpy.quirks import CustomCluster, CustomDevice
4 import zigpy.types as t
5 from zigpy.zcl.clusters.general import (
6     Basic,
7     BinaryInput,
8     Groups,
9     Identify,
10     LevelControl,
11     OnOff,
12     Ota,
13     Scenes,
14 )
15 from zigpy.zcl.clusters.manufacturer_specific import ManufacturerSpecificCluster
16 
17 from zhaquirks.const import (
18     DEVICE_TYPE,
19     ENDPOINTS,
20     INPUT_CLUSTERS,
21     MODELS_INFO,
22     OUTPUT_CLUSTERS,
23     PROFILE_ID,
24 )
25 from zhaquirks.legrand import LEGRAND
26 
27 MANUFACTURER_SPECIFIC_CLUSTER_ID = 0xFC01  # decimal = 64513
28 
29 
30 class LegrandCluster(CustomCluster, ManufacturerSpecificCluster):
31     """LegrandCluster."""
32 
33     cluster_id = MANUFACTURER_SPECIFIC_CLUSTER_ID
34     name = "LegrandCluster"
35     ep_attribute = "legrand_cluster"
36     manufacturer_attributes = {
37         0x0000: ("dimmer", t.data16),
38         0x0001: ("led_dark", t.Bool),
39         0x0002: ("led_on", t.Bool),
40     }
41 
42 
43 class DimmerWithoutNeutral(CustomDevice):
44     """Dimmer switch w/o neutral."""
45 
46     signature = {
47         #  <SimpleDescriptor endpoint=1 profile=260 device_type=256
48         # device_version=1
49         # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]
50         # output_clusters=[0, 64513, 25]>
51         MODELS_INFO: [(f" {LEGRAND}", " Dimmer switch w/o neutral")],
52         ENDPOINTS: {
53             1: {
54                 PROFILE_ID: zha.PROFILE_ID,
55                 DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
56                 INPUT_CLUSTERS: [
57                     Basic.cluster_id,
58                     Identify.cluster_id,
59                     Groups.cluster_id,
60                     OnOff.cluster_id,
61                     LevelControl.cluster_id,
62                     Scenes.cluster_id,
63                     BinaryInput.cluster_id,
64                     MANUFACTURER_SPECIFIC_CLUSTER_ID,
65                 ],
66                 OUTPUT_CLUSTERS: [
67                     Basic.cluster_id,
68                     MANUFACTURER_SPECIFIC_CLUSTER_ID,
69                     Ota.cluster_id,
70                 ],
71             }
72         },
73     }
74 
75     replacement = {
76         ENDPOINTS: {
77             1: {
78                 PROFILE_ID: zha.PROFILE_ID,
79                 DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
80                 INPUT_CLUSTERS: [
81                     Basic.cluster_id,
82                     Identify.cluster_id,
83                     Groups.cluster_id,
84                     OnOff.cluster_id,
85                     LevelControl.cluster_id,
86                     Scenes.cluster_id,
87                     BinaryInput.cluster_id,
88                     LegrandCluster,
89                 ],
90                 OUTPUT_CLUSTERS: [Basic.cluster_id, LegrandCluster, Ota.cluster_id],
91             }
92         }
93     }
94 
95 
96 class DimmerWithoutNeutral2(DimmerWithoutNeutral):
97     """Dimmer switch w/o neutral 2."""
98 
99     signature = {
100         #  <SimpleDescriptor endpoint=1 profile=260 device_type=256
101         # device_version=1
102         # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]
103         # output_clusters=[0, 64513, 25]>
104         MODELS_INFO: [(f" {LEGRAND}", " Dimmer switch w/o neutral")],
105         ENDPOINTS: {
106             1: {
107                 PROFILE_ID: zha.PROFILE_ID,
108                 DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
109                 INPUT_CLUSTERS: [
110                     Basic.cluster_id,
111                     Identify.cluster_id,
112                     Groups.cluster_id,
113                     OnOff.cluster_id,
114                     LevelControl.cluster_id,
115                     Scenes.cluster_id,
116                     BinaryInput.cluster_id,
117                     MANUFACTURER_SPECIFIC_CLUSTER_ID,
118                 ],
119                 OUTPUT_CLUSTERS: [
120                     Basic.cluster_id,
121                     MANUFACTURER_SPECIFIC_CLUSTER_ID,
122                     Ota.cluster_id,
123                 ],
124             },
125             242: {
126                 PROFILE_ID: 41440,
127                 DEVICE_TYPE: 0x0061,
128                 INPUT_CLUSTERS: [],
129                 OUTPUT_CLUSTERS: [0x0021],
130             },
131         },
132     }
133 
134 
135 class DimmerWithNeutral(DimmerWithoutNeutral):
136     """Dimmer switch with neutral."""
137 
138     signature = {
139         #  <SimpleDescriptor endpoint=1 profile=260 device_type=256
140         # device_version=1
141         # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]
142         # output_clusters=[0, 25, 64513]>
143         MODELS_INFO: [(f" {LEGRAND}", " Dimmer switch with neutral")],
144         ENDPOINTS: {
145             1: {
146                 PROFILE_ID: zha.PROFILE_ID,
147                 DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
148                 INPUT_CLUSTERS: [
149                     Basic.cluster_id,
150                     Identify.cluster_id,
151                     Groups.cluster_id,
152                     OnOff.cluster_id,
153                     LevelControl.cluster_id,
154                     Scenes.cluster_id,
155                     BinaryInput.cluster_id,
156                     MANUFACTURER_SPECIFIC_CLUSTER_ID,
157                 ],
158                 OUTPUT_CLUSTERS: [
159                     Basic.cluster_id,
160                     MANUFACTURER_SPECIFIC_CLUSTER_ID,
161                     Ota.cluster_id,
162                 ],
163             },
164             242: {
165                 PROFILE_ID: 41440,
166                 DEVICE_TYPE: 0x0066,
167                 INPUT_CLUSTERS: [0x0021],
168                 OUTPUT_CLUSTERS: [0x0021],
169             },
170         },
171     }
172
```
--- 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/legrand/dimmer.py b/zhaquirks/legrand/dimmer.py
--- a/zhaquirks/legrand/dimmer.py
+++ b/zhaquirks/legrand/dimmer.py
@@ -132,6 +132,47 @@
     }
 
 
+class DimmerWithoutNeutral3(DimmerWithoutNeutral):
+    """Dimmer switch w/o neutral (at least for firmware 0x2e3)."""
+
+    signature = {
+        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256
+        # device_version=1
+        # input_clusters=[0, 3, 4, 5, 6, 8, 15, 64513]
+        # output_clusters=[0, 5, 6, 25, 64513]>
+        MODELS_INFO: [(f" {LEGRAND}", " Dimmer switch w/o neutral")],
+        ENDPOINTS: {
+            1: {
+                PROFILE_ID: zha.PROFILE_ID,
+                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
+                INPUT_CLUSTERS: [
+                    Basic.cluster_id,
+                    Identify.cluster_id,
+                    Groups.cluster_id,
+                    OnOff.cluster_id,
+                    LevelControl.cluster_id,
+                    Scenes.cluster_id,
+                    BinaryInput.cluster_id,
+                    MANUFACTURER_SPECIFIC_CLUSTER_ID,
+                ],
+                OUTPUT_CLUSTERS: [
+                    Basic.cluster_id,
+                    MANUFACTURER_SPECIFIC_CLUSTER_ID,
+                    Ota.cluster_id,
+                    OnOff.cluster_id,
+                    Scenes.cluster_id,
+                ],
+            },
+            242: {
+                PROFILE_ID: 41440,
+                DEVICE_TYPE: 0x0066,
+                INPUT_CLUSTERS: [0x0021],
+                OUTPUT_CLUSTERS: [0x0021],
+            },
+        },
+    }
+
+
 class DimmerWithNeutral(DimmerWithoutNeutral):
     """Dimmer switch with neutral."""

{"golden_diff": "diff --git a/zhaquirks/legrand/dimmer.py b/zhaquirks/legrand/dimmer.py\n--- a/zhaquirks/legrand/dimmer.py\n+++ b/zhaquirks/legrand/dimmer.py\n@@ -132,6 +132,47 @@\n     }\n \n \n+class DimmerWithoutNeutral3(DimmerWithoutNeutral):\n+    \"\"\"Dimmer switch w/o neutral (at least for firmware 0x2e3).\"\"\"\n+\n+    signature = {\n+        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n+        # device_version=1\n+        # input_clusters=[0, 3, 4, 5, 6, 8, 15, 64513]\n+        # output_clusters=[0, 5, 6, 25, 64513]>\n+        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch w/o neutral\")],\n+        ENDPOINTS: {\n+            1: {\n+                PROFILE_ID: zha.PROFILE_ID,\n+                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n+                INPUT_CLUSTERS: [\n+                    Basic.cluster_id,\n+                    Identify.cluster_id,\n+                    Groups.cluster_id,\n+                    OnOff.cluster_id,\n+                    LevelControl.cluster_id,\n+                    Scenes.cluster_id,\n+                    BinaryInput.cluster_id,\n+                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n+                ],\n+                OUTPUT_CLUSTERS: [\n+                    Basic.cluster_id,\n+                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n+                    Ota.cluster_id,\n+                    OnOff.cluster_id,\n+                    Scenes.cluster_id,\n+                ],\n+            },\n+            242: {\n+                PROFILE_ID: 41440,\n+                DEVICE_TYPE: 0x0066,\n+                INPUT_CLUSTERS: [0x0021],\n+                OUTPUT_CLUSTERS: [0x0021],\n+            },\n+        },\n+    }\n+\n+\n class DimmerWithNeutral(DimmerWithoutNeutral):\n     \"\"\"Dimmer switch with neutral.\"\"\"\n", "issue": "[Device Support Request] Legrand Dimmer switch w/o neutral for sw_build_id=002e\nHi, guy!\r\n\r\nI have Legrand Dimmer switch w/o neutral which is not recognized neither as DimmerWithoutNeutral nor as DimmerWithoutNeutral2.\r\n\r\nThe device runs this firmware:\r\n```\r\nhw_version = 7\r\nstack_version = 66\r\nsw_build_id = 002e\r\n```\r\n\r\nIn this firmware Legrand changed the device type for endpoint=242 from 0x0061 to 0x0066, and they also added a few more clusters:\r\n```\r\nendpoint=1: out: 0x0006, 0x0005\r\nendpoint=242: in: 0x0021\r\n```\r\n\r\nHere is a complete device signature\r\n```\r\n{\r\n  \"node_descriptor\": \"<NodeDescriptor byte1=17 byte2=64 mac_capability_flags=142 manufacturer_code=4129 maximum_buffer_size=89 maximum_incoming_transfer_size=63 server_mask=10752 maximum_outgoing_transfer_size=63 descriptor_capability_field=0>\",\r\n  \"endpoints\": {\r\n    \"1\": {\r\n      \"profile_id\": 260,\r\n      \"device_type\": \"0x0100\",\r\n      \"in_clusters\": [\r\n        \"0x0000\",\r\n        \"0x0003\",\r\n        \"0x0004\",\r\n        \"0x0005\",\r\n        \"0x0006\",\r\n        \"0x0008\",\r\n        \"0x000f\",\r\n        \"0xfc01\"\r\n      ],\r\n      \"out_clusters\": [\r\n        \"0x0000\",\r\n        \"0x0019\",\r\n        \"0xfc01\"\r\n      ]\r\n    }\r\n  },\r\n  \"manufacturer\": \" Legrand\",\r\n  \"model\": \" Dimmer switch w/o neutral\",\r\n  \"class\": \"zigpy.device.Device\"\r\n}\r\n```\r\n\r\nI've updated the definition of DimmerWithoutNeutral2 (see below) and now the device is properly recognized.\r\n\r\n```\r\nclass DimmerWithoutNeutral2(DimmerWithoutNeutral):\r\n    \"\"\"Dimmer switch w/o neutral 2.\"\"\"\r\n\r\n    signature = {\r\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\r\n        # device_version=1\r\n        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]\r\n        # output_clusters=[0, 64513, 25]>\r\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch w/o neutral\")],\r\n        ENDPOINTS: {\r\n            1: {\r\n                PROFILE_ID: zha.PROFILE_ID,\r\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\r\n                INPUT_CLUSTERS: [\r\n                    Basic.cluster_id,\r\n                    Identify.cluster_id,\r\n                    Groups.cluster_id,\r\n                    OnOff.cluster_id,\r\n                    LevelControl.cluster_id,\r\n                    Scenes.cluster_id,\r\n                    BinaryInput.cluster_id,\r\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\r\n                ],\r\n                OUTPUT_CLUSTERS: [\r\n                    Basic.cluster_id,\r\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\r\n                    Ota.cluster_id,\r\n                    OnOff.cluster_id,\r\n                    Scenes.cluster_id,\r\n                ],\r\n            },\r\n            242: {\r\n                PROFILE_ID: 41440,\r\n                DEVICE_TYPE: 0x0066,\r\n                INPUT_CLUSTERS: [0x0021],\r\n                OUTPUT_CLUSTERS: [0x0021],\r\n            },\r\n        },\r\n    }\r\n```\r\n\r\nPlease add this quirk to master. \n", "before_files": [{"content": "\"\"\"Device handler for Legrand Dimmer switch w/o neutral.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl.clusters.general import (\n    Basic,\n    BinaryInput,\n    Groups,\n    Identify,\n    LevelControl,\n    OnOff,\n    Ota,\n    Scenes,\n)\nfrom zigpy.zcl.clusters.manufacturer_specific import ManufacturerSpecificCluster\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.legrand import LEGRAND\n\nMANUFACTURER_SPECIFIC_CLUSTER_ID = 0xFC01  # decimal = 64513\n\n\nclass LegrandCluster(CustomCluster, ManufacturerSpecificCluster):\n    \"\"\"LegrandCluster.\"\"\"\n\n    cluster_id = MANUFACTURER_SPECIFIC_CLUSTER_ID\n    name = \"LegrandCluster\"\n    ep_attribute = \"legrand_cluster\"\n    manufacturer_attributes = {\n        0x0000: (\"dimmer\", t.data16),\n        0x0001: (\"led_dark\", t.Bool),\n        0x0002: (\"led_on\", t.Bool),\n    }\n\n\nclass DimmerWithoutNeutral(CustomDevice):\n    \"\"\"Dimmer switch w/o neutral.\"\"\"\n\n    signature = {\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n        # device_version=1\n        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]\n        # output_clusters=[0, 64513, 25]>\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch w/o neutral\")],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                ],\n                OUTPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                    Ota.cluster_id,\n                ],\n            }\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    LegrandCluster,\n                ],\n                OUTPUT_CLUSTERS: [Basic.cluster_id, LegrandCluster, Ota.cluster_id],\n            }\n        }\n    }\n\n\nclass DimmerWithoutNeutral2(DimmerWithoutNeutral):\n    \"\"\"Dimmer switch w/o neutral 2.\"\"\"\n\n    signature = {\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n        # device_version=1\n        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]\n        # output_clusters=[0, 64513, 25]>\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch w/o neutral\")],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                ],\n                OUTPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                    Ota.cluster_id,\n                ],\n            },\n            242: {\n                PROFILE_ID: 41440,\n                DEVICE_TYPE: 0x0061,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [0x0021],\n            },\n        },\n    }\n\n\nclass DimmerWithNeutral(DimmerWithoutNeutral):\n    \"\"\"Dimmer switch with neutral.\"\"\"\n\n    signature = {\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n        # device_version=1\n        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]\n        # output_clusters=[0, 25, 64513]>\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch with neutral\")],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                ],\n                OUTPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                    Ota.cluster_id,\n                ],\n            },\n            242: {\n                PROFILE_ID: 41440,\n                DEVICE_TYPE: 0x0066,\n                INPUT_CLUSTERS: [0x0021],\n                OUTPUT_CLUSTERS: [0x0021],\n            },\n        },\n    }\n", "path": "zhaquirks/legrand/dimmer.py"}], "after_files": [{"content": "\"\"\"Device handler for Legrand Dimmer switch w/o neutral.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl.clusters.general import (\n    Basic,\n    BinaryInput,\n    Groups,\n    Identify,\n    LevelControl,\n    OnOff,\n    Ota,\n    Scenes,\n)\nfrom zigpy.zcl.clusters.manufacturer_specific import ManufacturerSpecificCluster\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.legrand import LEGRAND\n\nMANUFACTURER_SPECIFIC_CLUSTER_ID = 0xFC01  # decimal = 64513\n\n\nclass LegrandCluster(CustomCluster, ManufacturerSpecificCluster):\n    \"\"\"LegrandCluster.\"\"\"\n\n    cluster_id = MANUFACTURER_SPECIFIC_CLUSTER_ID\n    name = \"LegrandCluster\"\n    ep_attribute = \"legrand_cluster\"\n    manufacturer_attributes = {\n        0x0000: (\"dimmer\", t.data16),\n        0x0001: (\"led_dark\", t.Bool),\n        0x0002: (\"led_on\", t.Bool),\n    }\n\n\nclass DimmerWithoutNeutral(CustomDevice):\n    \"\"\"Dimmer switch w/o neutral.\"\"\"\n\n    signature = {\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n        # device_version=1\n        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]\n        # output_clusters=[0, 64513, 25]>\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch w/o neutral\")],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                ],\n                OUTPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                    Ota.cluster_id,\n                ],\n            }\n        },\n    }\n\n    replacement = {\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    LegrandCluster,\n                ],\n                OUTPUT_CLUSTERS: [Basic.cluster_id, LegrandCluster, Ota.cluster_id],\n            }\n        }\n    }\n\n\nclass DimmerWithoutNeutral2(DimmerWithoutNeutral):\n    \"\"\"Dimmer switch w/o neutral 2.\"\"\"\n\n    signature = {\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n        # device_version=1\n        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]\n        # output_clusters=[0, 64513, 25]>\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch w/o neutral\")],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                ],\n                OUTPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                    Ota.cluster_id,\n                ],\n            },\n            242: {\n                PROFILE_ID: 41440,\n                DEVICE_TYPE: 0x0061,\n                INPUT_CLUSTERS: [],\n                OUTPUT_CLUSTERS: [0x0021],\n            },\n        },\n    }\n\n\nclass DimmerWithoutNeutral3(DimmerWithoutNeutral):\n    \"\"\"Dimmer switch w/o neutral (at least for firmware 0x2e3).\"\"\"\n\n    signature = {\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n        # device_version=1\n        # input_clusters=[0, 3, 4, 5, 6, 8, 15, 64513]\n        # output_clusters=[0, 5, 6, 25, 64513]>\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch w/o neutral\")],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                ],\n                OUTPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                    Ota.cluster_id,\n                    OnOff.cluster_id,\n                    Scenes.cluster_id,\n                ],\n            },\n            242: {\n                PROFILE_ID: 41440,\n                DEVICE_TYPE: 0x0066,\n                INPUT_CLUSTERS: [0x0021],\n                OUTPUT_CLUSTERS: [0x0021],\n            },\n        },\n    }\n\n\nclass DimmerWithNeutral(DimmerWithoutNeutral):\n    \"\"\"Dimmer switch with neutral.\"\"\"\n\n    signature = {\n        #  <SimpleDescriptor endpoint=1 profile=260 device_type=256\n        # device_version=1\n        # input_clusters=[0, 3, 4, 8, 6, 5, 15, 64513]\n        # output_clusters=[0, 25, 64513]>\n        MODELS_INFO: [(f\" {LEGRAND}\", \" Dimmer switch with neutral\")],\n        ENDPOINTS: {\n            1: {\n                PROFILE_ID: zha.PROFILE_ID,\n                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,\n                INPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    Identify.cluster_id,\n                    Groups.cluster_id,\n                    OnOff.cluster_id,\n                    LevelControl.cluster_id,\n                    Scenes.cluster_id,\n                    BinaryInput.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                ],\n                OUTPUT_CLUSTERS: [\n                    Basic.cluster_id,\n                    MANUFACTURER_SPECIFIC_CLUSTER_ID,\n                    Ota.cluster_id,\n                ],\n            },\n            242: {\n                PROFILE_ID: 41440,\n                DEVICE_TYPE: 0x0066,\n                INPUT_CLUSTERS: [0x0021],\n                OUTPUT_CLUSTERS: [0x0021],\n            },\n        },\n    }\n", "path": "zhaquirks/legrand/dimmer.py"}]}