"""GLEDOPTO GL-C-006P device.""" from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import ( Basic, GreenPowerProxy, Groups, Identify, LevelControl, OnOff, Ota, Scenes, ) from zigpy.zcl.clusters.lighting import Color from zigpy.zcl.clusters.lightlink import LightLink from zhaquirks import CustomCluster from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) class GLC006P(CustomDevice): """Gledopto GL-C-006P (mini) custom device implementation to customize color temperature.""" class CustomColorCluster(CustomCluster, Color): """Color Cluster.""" _CONSTANT_ATTRIBUTES = {0x400B: 154, 0x400C: 370} signature = { MODELS_INFO: [("GLEDOPTO", "GL-C-006P")], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.COLOR_TEMPERATURE_LIGHT, INPUT_CLUSTERS: [ Basic.cluster_id, Identify.cluster_id, Groups.cluster_id, Scenes.cluster_id, OnOff.cluster_id, LevelControl.cluster_id, Color.cluster_id, LightLink.cluster_id, ], OUTPUT_CLUSTERS: [ Ota.cluster_id, ], }, 242: { PROFILE_ID: 41440, DEVICE_TYPE: 0x0061, INPUT_CLUSTERS: [], OUTPUT_CLUSTERS: [ GreenPowerProxy.cluster_id, ], }, }, } replacement = { ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.COLOR_TEMPERATURE_LIGHT, INPUT_CLUSTERS: [ Basic.cluster_id, Identify.cluster_id, Groups.cluster_id, Scenes.cluster_id, OnOff.cluster_id, LevelControl.cluster_id, CustomColorCluster, LightLink.cluster_id, ], OUTPUT_CLUSTERS: [ Ota.cluster_id, ], }, 242: { PROFILE_ID: 41440, DEVICE_TYPE: 0x0061, INPUT_CLUSTERS: [], OUTPUT_CLUSTERS: [ GreenPowerProxy.cluster_id, ], }, } }