Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion zhaquirks/tuya/ts130f.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
PROFILE_ID,
)
from zhaquirks.legacy import CustomDevice
from zhaquirks.tuya import SwitchBackLight, TuyaZBExternalSwitchTypeCluster
from zhaquirks.tuya import (
TUYA_CLUSTER_ID,
SwitchBackLight,
TuyaZBExternalSwitchTypeCluster,
)

ATTR_CURRENT_POSITION_LIFT_PERCENTAGE = 0x0008
CMD_GO_TO_LIFT_PERCENTAGE = 0x0005
Expand Down Expand Up @@ -679,3 +683,60 @@ class TuyaTS130Double_GP_ESTC(CustomDevice):
},
},
}


class TuyaTS130FIdentifyMCUGP(CustomDevice):
"""Tuya smart curtain roller shutter with Identify, Tuya MCU cluster and Green Power."""

signature = {
# SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0x0202, device_version=1, input_clusters=[0x0000, 0x0003, 0x0004, 0x0005, 0x0006, 0x0102, 0xef00], output_clusters=[0x000a, 0x0019]))
MODEL: "TS130F",
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
WindowCovering.cluster_id,
TUYA_CLUSTER_ID,
],
OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
},
242: {
# <SimpleDescriptor endpoint=242 profile=41440 device_type=97
# input_clusters=[]
# output_clusters=[33]
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.WINDOW_COVERING_DEVICE,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaWithBacklightOnOffCluster,
TuyaCoveringCluster,
],
Comment on lines +728 to +732
OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}
Loading