Skip to content

Commit

Permalink
Add Mercator/Tuya Ikuu 5/6-ch switches support (#3218)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielp370 authored Jun 26, 2024
1 parent a7f4859 commit 37eb2b1
Showing 1 changed file with 77 additions and 0 deletions.
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

0 comments on commit 37eb2b1

Please sign in to comment.