Repository: zigpy/zha-device-handlers

Issue:
Remove Eventable from OnOff and LevelControl output clusters



Discussion:

Resolving patch:
diff --git a/zhaquirks/centralite/3130.py b/zhaquirks/centralite/3130.py
--- a/zhaquirks/centralite/3130.py
+++ b/zhaquirks/centralite/3130.py
@@ -3,7 +3,6 @@
     PollControl, Ota, LevelControl
 from zhaquirks.centralite import PowerConfigurationCluster
 from zigpy.zcl.clusters.measurement import TemperatureMeasurement
-from zhaquirks import EventableCluster
 from zigpy.quirks import CustomDevice
 
 
@@ -12,18 +11,6 @@
 
 class CentraLite3130(CustomDevice):
 
-    class EventableOnOffCluster(EventableCluster, OnOff):
-        cluster_id = OnOff.cluster_id
-
-        def __init__(self, *args, **kwargs):
-            super().__init__(*args, **kwargs)
-
-    class EventableLevelControlCluster(EventableCluster, LevelControl):
-        cluster_id = LevelControl.cluster_id
-
-        def __init__(self, *args, **kwargs):
-            super().__init__(*args, **kwargs)
-
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
 
@@ -45,8 +32,8 @@ def __init__(self, *args, **kwargs):
             ],
             'output_clusters': [
                 Identify.cluster_id,
-                EventableOnOffCluster.cluster_id,
-                EventableLevelControlCluster.cluster_id,
+                OnOff.cluster_id,
+                LevelControl.cluster_id,
                 Ota.cluster_id
             ],
         },
@@ -66,8 +53,8 @@ def __init__(self, *args, **kwargs):
                 ],
                 'output_clusters': [
                     Identify.cluster_id,
-                    EventableOnOffCluster,
-                    EventableLevelControlCluster,
+                    OnOff.cluster_id,
+                    LevelControl.cluster_id,
                     Ota.cluster_id
                 ],
             }
diff --git a/zhaquirks/philips/rwl021.py b/zhaquirks/philips/rwl021.py
--- a/zhaquirks/philips/rwl021.py
+++ b/zhaquirks/philips/rwl021.py
@@ -2,7 +2,6 @@
 from zigpy.zcl.clusters.general import Basic, OnOff, Identify,\
     Ota, LevelControl, PowerConfiguration, Scenes, BinaryInput,\
     Groups
-from zhaquirks import EventableCluster
 from zigpy.quirks import CustomDevice
 
 
@@ -11,18 +10,6 @@
 
 class PhilipsRWL021(CustomDevice):
 
-    class EventableOnOffCluster(EventableCluster, OnOff):
-        cluster_id = OnOff.cluster_id
-
-        def __init__(self, *args, **kwargs):
-            super().__init__(*args, **kwargs)
-
-    class EventableLevelControlCluster(EventableCluster, LevelControl):
-        cluster_id = LevelControl.cluster_id
-
-        def __init__(self, *args, **kwargs):
-            super().__init__(*args, **kwargs)
-
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
 
@@ -41,8 +28,8 @@ def __init__(self, *args, **kwargs):
                 Basic.cluster_id,
                 Identify.cluster_id,
                 Groups.cluster_id,
-                EventableOnOffCluster.cluster_id,
-                EventableLevelControlCluster.cluster_id,
+                OnOff.cluster_id,
+                LevelControl.cluster_id,
                 Scenes.cluster_id
             ],
         },
@@ -78,8 +65,8 @@ def __init__(self, *args, **kwargs):
                     Basic.cluster_id,
                     Identify.cluster_id,
                     Groups.cluster_id,
-                    EventableOnOffCluster,
-                    EventableLevelControlCluster,
+                    OnOff.cluster_id,
+                    LevelControl.cluster_id,
                     Scenes.cluster_id
                 ],
             },
diff --git a/zhaquirks/xiaomi/aqara_button.py b/zhaquirks/xiaomi/aqara_button.py
--- a/zhaquirks/xiaomi/aqara_button.py
+++ b/zhaquirks/xiaomi/aqara_button.py
@@ -4,7 +4,6 @@
 from zigpy.zcl.clusters.general import Basic, Groups, OnOff, PowerConfiguration
 from zhaquirks.xiaomi import BasicCluster, PowerConfigurationCluster,\
     TemperatureMeasurementCluster, XiaomiCustomDevice
-from zhaquirks import EventableCluster
 
 BUTTON_DEVICE_TYPE = 0x5F01
 BUTTON_DEVICE_TYPE_REPLACEMENT = 0x6FF1
@@ -32,12 +31,6 @@
 
 class AqaraButton(XiaomiCustomDevice):
 
-    class EventableOnOffCluster(EventableCluster, OnOff):
-        cluster_id = OnOff.cluster_id
-
-        def __init__(self, *args, **kwargs):
-            super().__init__(*args, **kwargs)
-
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
 
@@ -72,7 +65,7 @@ def __init__(self, *args, **kwargs):
                     BasicCluster,
                     PowerConfigurationCluster,
                     TemperatureMeasurementCluster,
-                    EventableOnOffCluster
+                    OnOff.cluster_id
                 ],
                 'output_clusters': [
                     Basic.cluster_id,


Test patch: