Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mercator/Tuya Ikuu 5/6-ch switches support #3218

Merged
Merged
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
77 changes: 77 additions & 0 deletions zhaquirks/tuya/ts0601_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,82 @@ class TuyaQuadrupleSwitch_GP(TuyaSwitch):
}


class TuyaQuintupleSwitchTO(TuyaSwitch):
"""Tuya quintuple channel switch time on out cluster device."""

quirk_id = TUYA_PLUG_MANUFACTURER

signature = {
# <SimpleDescriptor endpoint=1 profile=260 device_type=81
# input_clusters=[0x0000,0x0004,0x0005,0xEF00]
# output_clusters=[0x000A,0x0019]>
MODELS_INFO: [
("_TZE200_leaqthqq", "TS0601"),
],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaOnOffManufCluster.cluster_id,
],
OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
}
},
}

replacement = {
ENDPOINTS: {
1: {
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaOnOffManufCluster,
TuyaOnOffNM,
],
OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
},
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
TuyaOnOffNM,
],
OUTPUT_CLUSTERS: [],
},
3: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
TuyaOnOffNM,
],
OUTPUT_CLUSTERS: [],
},
4: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
TuyaOnOffNM,
],
OUTPUT_CLUSTERS: [],
},
5: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
TuyaOnOffNM,
],
OUTPUT_CLUSTERS: [],
},
}
}


class TuyaSextupleSwitchTO(TuyaSwitch):
"""Tuya sextuple channel switch time on out cluster device."""

Expand All @@ -659,6 +735,7 @@ class TuyaSextupleSwitchTO(TuyaSwitch):
# output_clusters=[0x000A,0x0019]>
MODELS_INFO: [
("_TZE200_9mahtqtg", "TS0601"),
("_TZE200_wnp4d4va", "TS0601"),
],
ENDPOINTS: {
1: {
Expand Down
Loading