glados: mount ts011f quirks into home-assistant container
This commit is contained in:
parent
658f5c74a3
commit
190db40330
@ -18,6 +18,7 @@ in {
|
||||
extraOptions = ["--net=host" "--device=/dev/zigbee" ];
|
||||
volumes = [
|
||||
"${confdir}:/config"
|
||||
"${./zigbee-quirks}:/quirks"
|
||||
#"${confdir}/docker-run:/etc/services.d/home-assistant/run:"
|
||||
];
|
||||
};
|
||||
|
@ -0,0 +1,104 @@
|
||||
"""TS011F plug."""
|
||||
|
||||
from zigpy.profiles import zgp, zha
|
||||
from zigpy.zcl.clusters.general import (
|
||||
Basic,
|
||||
GreenPowerProxy,
|
||||
Groups,
|
||||
Identify,
|
||||
OnOff,
|
||||
Ota,
|
||||
Scenes,
|
||||
Time,
|
||||
)
|
||||
from zigpy.zcl.clusters.homeautomation import ElectricalMeasurement
|
||||
from zigpy.zcl.clusters.lightlink import LightLink
|
||||
from zigpy.zcl.clusters.smartenergy import Metering
|
||||
|
||||
from zhaquirks.const import (
|
||||
DEVICE_TYPE,
|
||||
ENDPOINTS,
|
||||
INPUT_CLUSTERS,
|
||||
MODEL,
|
||||
MODELS_INFO,
|
||||
OUTPUT_CLUSTERS,
|
||||
PROFILE_ID,
|
||||
)
|
||||
from zhaquirks.tuya import (
|
||||
TuyaZBE000Cluster,
|
||||
TuyaZBElectricalMeasurement,
|
||||
TuyaZBMeteringClusterWithUnit,
|
||||
TuyaZBOnOffAttributeCluster,
|
||||
)
|
||||
from zhaquirks.tuya.mcu import EnchantedDevice
|
||||
|
||||
|
||||
class Plug_v3(EnchantedDevice):
|
||||
"""Tuya TS011F plug. One plug is _Tz3000_0Zfrhq4I."""
|
||||
|
||||
signature = {
|
||||
MODEL: "TS011F",
|
||||
ENDPOINTS: {
|
||||
1: {
|
||||
PROFILE_ID: zha.PROFILE_ID,
|
||||
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
|
||||
INPUT_CLUSTERS: [
|
||||
Basic.cluster_id,
|
||||
Identify.cluster_id,
|
||||
Groups.cluster_id,
|
||||
Scenes.cluster_id,
|
||||
OnOff.cluster_id,
|
||||
Time.cluster_id,
|
||||
Metering.cluster_id,
|
||||
ElectricalMeasurement.cluster_id,
|
||||
LightLink.cluster_id,
|
||||
0x1888,
|
||||
TuyaZBE000Cluster.cluster_id,
|
||||
],
|
||||
OUTPUT_CLUSTERS: [
|
||||
Ota.cluster_id,
|
||||
],
|
||||
},
|
||||
242: {
|
||||
PROFILE_ID: zgp.PROFILE_ID,
|
||||
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
|
||||
INPUT_CLUSTERS: [],
|
||||
OUTPUT_CLUSTERS: [
|
||||
GreenPowerProxy.cluster_id,
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
replacement = {
|
||||
ENDPOINTS: {
|
||||
1: {
|
||||
PROFILE_ID: zha.PROFILE_ID,
|
||||
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
|
||||
INPUT_CLUSTERS: [
|
||||
Basic.cluster_id,
|
||||
Identify.cluster_id,
|
||||
Groups.cluster_id,
|
||||
Scenes.cluster_id,
|
||||
TuyaZBOnOffAttributeCluster,
|
||||
Time.cluster_id,
|
||||
TuyaZBMeteringClusterWithUnit,
|
||||
TuyaZBElectricalMeasurement,
|
||||
LightLink.cluster_id,
|
||||
0x1888,
|
||||
TuyaZBE000Cluster,
|
||||
],
|
||||
OUTPUT_CLUSTERS: [
|
||||
Ota.cluster_id,
|
||||
],
|
||||
},
|
||||
242: {
|
||||
PROFILE_ID: zgp.PROFILE_ID,
|
||||
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
|
||||
INPUT_CLUSTERS: [],
|
||||
OUTPUT_CLUSTERS: [
|
||||
GreenPowerProxy.cluster_id,
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue
Block a user