mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
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:
parent
29e8814d1b
commit
9dd2f37b11
@ -25,9 +25,6 @@ class ColorClientClusterHandler(ClientClusterHandler):
|
|||||||
class ColorClusterHandler(ClusterHandler):
|
class ColorClusterHandler(ClusterHandler):
|
||||||
"""Color cluster handler."""
|
"""Color cluster handler."""
|
||||||
|
|
||||||
CAPABILITIES_COLOR_XY = 0x08
|
|
||||||
CAPABILITIES_COLOR_TEMP = 0x10
|
|
||||||
UNSUPPORTED_ATTRIBUTE = 0x86
|
|
||||||
REPORT_CONFIG = (
|
REPORT_CONFIG = (
|
||||||
AttrReportConfig(attr="current_x", config=REPORT_CONFIG_DEFAULT),
|
AttrReportConfig(attr="current_x", config=REPORT_CONFIG_DEFAULT),
|
||||||
AttrReportConfig(attr="current_y", 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."""
|
"""Return ZCL color capabilities of the light."""
|
||||||
color_capabilities = self.cluster.get("color_capabilities")
|
color_capabilities = self.cluster.get("color_capabilities")
|
||||||
if color_capabilities is None:
|
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)
|
return lighting.Color.ColorCapabilities(color_capabilities)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user