"""Device handler for hivehome.com MOT003 sensors.""" from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import ( Basic, Identify, Ota, PollControl, PowerConfiguration, ) from zigpy.zcl.clusters.measurement import ( IlluminanceMeasurement, TemperatureMeasurement, ) from zigpy.zcl.clusters.security import IasZone from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.hivehome import HIVEHOME, MotionCluster class MOT003(CustomDevice): """hivehome.com MOT003.""" signature = { # MODELS_INFO: [(HIVEHOME, "MOT003")], ENDPOINTS: { 6: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.IAS_ZONE, INPUT_CLUSTERS: [ Basic.cluster_id, PowerConfiguration.cluster_id, Identify.cluster_id, PollControl.cluster_id, TemperatureMeasurement.cluster_id, IlluminanceMeasurement.cluster_id, IasZone.cluster_id, ], OUTPUT_CLUSTERS: [Ota.cluster_id], } }, } replacement = { ENDPOINTS: { 6: { INPUT_CLUSTERS: [ Basic.cluster_id, PowerConfiguration.cluster_id, Identify.cluster_id, PollControl.cluster_id, TemperatureMeasurement.cluster_id, IlluminanceMeasurement.cluster_id, MotionCluster, ], OUTPUT_CLUSTERS: [Ota.cluster_id], } } }