Skip to content

Commit

Permalink
Add TuyaTripleGang_var05 for TS0013 devices (#2207)
Browse files Browse the repository at this point in the history
* Add `TuyaTripleGang_var05` for `TS0013` devices

New `TS0013` quirk variation.

Fixes: #2200
  • Loading branch information
javicalle committed Feb 18, 2023
1 parent 8122e92 commit f5ed78d
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions zhaquirks/tuya/ts001x.py
Expand Up @@ -948,3 +948,101 @@ class Tuya_Triple_No_N_Plus(EnchantedDevice, TuyaSwitch):
},
},
}


class TuyaTripleGang_var05(EnchantedDevice, TuyaSwitch):
"""Tuya 3 gang light switch (variation 05)."""

signature = {
# "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0,
# user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>,
# mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66,
# maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66,
# descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False,
# *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False,
# *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
MODEL: "TS0013",
ENDPOINTS: {
# "profile_id": 260, "device_type": "0x0100",
# "in_clusters": ["0x0000","0x0003","0x0004","0x0005","0x0006","0xe000","0xe001"],
# "out_clusters": ["0x000a","0x0019"]
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
TuyaZBE000Cluster.cluster_id,
TuyaZBExternalSwitchTypeCluster.cluster_id,
],
OUTPUT_CLUSTERS: [Ota.cluster_id, Time.cluster_id],
},
# "profile_id": 260, "device_type": "0x0100",
# "in_clusters": ["0x0004","0x0005","0x0006"],
# "out_clusters": []
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
# "profile_id": 260, "device_type": "0x0100",
# "in_clusters": ["0x0004","0x0005","0x0006"],
# "out_clusters": []
3: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaZBOnOffAttributeCluster,
TuyaZBE000Cluster,
TuyaZBExternalSwitchTypeCluster,
],
OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
},
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Groups.cluster_id,
Scenes.cluster_id,
TuyaZBOnOffAttributeCluster,
],
OUTPUT_CLUSTERS: [],
},
3: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Groups.cluster_id,
Scenes.cluster_id,
TuyaZBOnOffAttributeCluster,
],
OUTPUT_CLUSTERS: [],
},
},
}

0 comments on commit f5ed78d

Please sign in to comment.