From 9dd2f37b1195cf5303556740e8ac2b3d370cb256 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Tue, 17 Oct 2023 22:04:03 +0200 Subject: [PATCH] Remove unused variables in ZHA lighting cluster handler (#102138) * Remove unused `UNSUPPORTED_ATTRIBUTE` * Remove unused `CAPABILITIES_COLOR_TEMP` * Use zigpy `ColorCapabilities` and remove `CAPABILITIES_COLOR_XY` --- .../components/zha/core/cluster_handlers/lighting.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/zha/core/cluster_handlers/lighting.py b/homeassistant/components/zha/core/cluster_handlers/lighting.py index 5f54ce381cc..830edfcf1c9 100644 --- a/homeassistant/components/zha/core/cluster_handlers/lighting.py +++ b/homeassistant/components/zha/core/cluster_handlers/lighting.py @@ -25,9 +25,6 @@ class ColorClientClusterHandler(ClientClusterHandler): class ColorClusterHandler(ClusterHandler): """Color cluster handler.""" - CAPABILITIES_COLOR_XY = 0x08 - CAPABILITIES_COLOR_TEMP = 0x10 - UNSUPPORTED_ATTRIBUTE = 0x86 REPORT_CONFIG = ( AttrReportConfig(attr="current_x", config=REPORT_CONFIG_DEFAULT), AttrReportConfig(attr="current_y", config=REPORT_CONFIG_DEFAULT), @@ -53,7 +50,7 @@ class ColorClusterHandler(ClusterHandler): """Return ZCL color capabilities of the light.""" color_capabilities = self.cluster.get("color_capabilities") if color_capabilities is None: - return lighting.Color.ColorCapabilities(self.CAPABILITIES_COLOR_XY) + return lighting.Color.ColorCapabilities.XY_attributes return lighting.Color.ColorCapabilities(color_capabilities) @property