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`
This commit is contained in:
TheJulianJES 2023-10-17 22:04:03 +02:00 committed by GitHub
parent 29e8814d1b
commit 9dd2f37b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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