"""Quirk for HZC Dimmer-Switch-ZB3.0 (e.g. D688-ZG).""" from zigpy.profiles import zgp, zha from zigpy.quirks import CustomCluster, CustomDevice from zigpy.zcl.clusters.general import ( Basic, GreenPowerProxy, Groups, Identify, LevelControl, OnOff, Ota, Scenes, ) from zigpy.zcl.clusters.homeautomation import Diagnostic from zigpy.zcl.clusters.lightlink import LightLink from zhaquirks import NoReplyMixin from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) class HzcOnOff(NoReplyMixin, CustomCluster, OnOff): """HZC On Off Cluster.""" void_input_commands = {cmd.id for cmd in OnOff.commands_by_name.values()} class DimmerSwitch(CustomDevice): """Dimmer-Switch-ZB3.0 by HZC / Shyugj.""" signature = { MODELS_INFO: [ ("HZC", "Dimmer-Switch-ZB3.0"), ("Shyugj", "Dimmer-Switch-ZB3.0"), ], ENDPOINTS: { 1: { # PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.DIMMABLE_LIGHT, INPUT_CLUSTERS: [ Basic.cluster_id, Identify.cluster_id, Groups.cluster_id, Scenes.cluster_id, OnOff.cluster_id, LevelControl.cluster_id, Diagnostic.cluster_id, LightLink.cluster_id, ], OUTPUT_CLUSTERS: [Ota.cluster_id], }, 242: { #