Skip to content

Commit

Permalink
Merge branch 'release/0.0.65'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey committed Dec 10, 2021
2 parents 829a61a + 0104b32 commit 44c4924
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import find_packages, setup

VERSION = "0.0.64"
VERSION = "0.0.65"


def readme():
Expand Down
1 change: 1 addition & 0 deletions zhaquirks/lidl/cct.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class CCTLight(CustomDevice):
("_TZ3000_rylaozuc", "TS0502A"),
("_TZ3000_el5kt5im", "TS0502A"),
("_TZ3000_oh7jddmx", "TS0502A"),
("_TZ3000_8uaoilu9", "TS0502A"),
],
ENDPOINTS: {
1: {
Expand Down
96 changes: 92 additions & 4 deletions zhaquirks/tuya/ts000x.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Switch_1G_GPP(CustomDevice):
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Expand All @@ -84,6 +84,94 @@ class Switch_1G_GPP(CustomDevice):
}


class Switch_2G_GPP(CustomDevice):
"""Tuya 2 gang switch module with restore power state support."""

signature = {
MODEL: "TS0002",
ENDPOINTS: {
# <SimpleDescriptor endpoint=1 profile=260 device_type=256
# device_version=1
# input_clusters=[0, 3, 4, 5, 6, 57344, 57345]
# output_clusters=[10, 25]>
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: [Time.cluster_id, Ota.cluster_id],
},
# <SimpleDescriptor endpoint=2 profile=260 device_type=256
# device_version=1
# input_clusters=[4, 5, 6, 57345]
# output_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,
TuyaZBExternalSwitchTypeCluster.cluster_id,
],
OUTPUT_CLUSTERS: [],
},
# <SimpleDescriptor endpoint=242 profile=41440 device_type=97
# device_version=0
# input_clusters=[]
# output_clusters=[33]>
242: {
PROFILE_ID: 41440,
DEVICE_TYPE: 97,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}
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,
TuyaZBExternalSwitchTypeCluster,
],
OUTPUT_CLUSTERS: [],
},
242: {
PROFILE_ID: 41440,
DEVICE_TYPE: 97,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}


class Switch_3G_GPP(CustomDevice):
"""Tuya 3 gang switch module with restore power state support."""

Expand Down Expand Up @@ -154,7 +242,7 @@ class Switch_3G_GPP(CustomDevice):
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Expand All @@ -168,7 +256,7 @@ class Switch_3G_GPP(CustomDevice):
},
2: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Groups.cluster_id,
Scenes.cluster_id,
Expand All @@ -179,7 +267,7 @@ class Switch_3G_GPP(CustomDevice):
},
3: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.ON_OFF_PLUG_IN_UNIT,
DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
INPUT_CLUSTERS: [
Groups.cluster_id,
Scenes.cluster_id,
Expand Down
2 changes: 2 additions & 0 deletions zhaquirks/tuya/ts0601_trv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,8 @@ def __init__(self, *args, **kwargs):
("_TZE200_ywdxldoj", "TS0601"),
("_TZE200_cwnjrr72", "TS0601"),
("_TZE200_2atgpdho", "TS0601"),
("_TZE200_pvvbommb", "TS0601"),
("_TZE200_4eeyebrt", "TS0601"),
],
ENDPOINTS: {
1: {
Expand Down

0 comments on commit 44c4924

Please sign in to comment.