@@ -68,7 +68,7 @@ class Switch_1G_GPP(CustomDevice):
6868 ENDPOINTS : {
6969 1 : {
7070 PROFILE_ID : zha .PROFILE_ID ,
71- DEVICE_TYPE : zha .DeviceType .ON_OFF_PLUG_IN_UNIT ,
71+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
7272 INPUT_CLUSTERS : [
7373 Basic .cluster_id ,
7474 Identify .cluster_id ,
@@ -84,6 +84,94 @@ class Switch_1G_GPP(CustomDevice):
8484 }
8585
8686
87+ class Switch_2G_GPP (CustomDevice ):
88+ """Tuya 2 gang switch module with restore power state support."""
89+
90+ signature = {
91+ MODEL : "TS0002" ,
92+ ENDPOINTS : {
93+ # <SimpleDescriptor endpoint=1 profile=260 device_type=256
94+ # device_version=1
95+ # input_clusters=[0, 3, 4, 5, 6, 57344, 57345]
96+ # output_clusters=[10, 25]>
97+ 1 : {
98+ PROFILE_ID : zha .PROFILE_ID ,
99+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
100+ INPUT_CLUSTERS : [
101+ Basic .cluster_id ,
102+ Identify .cluster_id ,
103+ Groups .cluster_id ,
104+ Scenes .cluster_id ,
105+ OnOff .cluster_id ,
106+ TuyaZBE000Cluster .cluster_id ,
107+ TuyaZBExternalSwitchTypeCluster .cluster_id ,
108+ ],
109+ OUTPUT_CLUSTERS : [Time .cluster_id , Ota .cluster_id ],
110+ },
111+ # <SimpleDescriptor endpoint=2 profile=260 device_type=256
112+ # device_version=1
113+ # input_clusters=[4, 5, 6, 57345]
114+ # output_clusters=[]>
115+ 2 : {
116+ PROFILE_ID : zha .PROFILE_ID ,
117+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
118+ INPUT_CLUSTERS : [
119+ Groups .cluster_id ,
120+ Scenes .cluster_id ,
121+ OnOff .cluster_id ,
122+ TuyaZBExternalSwitchTypeCluster .cluster_id ,
123+ ],
124+ OUTPUT_CLUSTERS : [],
125+ },
126+ # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
127+ # device_version=0
128+ # input_clusters=[]
129+ # output_clusters=[33]>
130+ 242 : {
131+ PROFILE_ID : 41440 ,
132+ DEVICE_TYPE : 97 ,
133+ INPUT_CLUSTERS : [],
134+ OUTPUT_CLUSTERS : [GreenPowerProxy .cluster_id ],
135+ },
136+ },
137+ }
138+ replacement = {
139+ ENDPOINTS : {
140+ 1 : {
141+ PROFILE_ID : zha .PROFILE_ID ,
142+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
143+ INPUT_CLUSTERS : [
144+ Basic .cluster_id ,
145+ Identify .cluster_id ,
146+ Groups .cluster_id ,
147+ Scenes .cluster_id ,
148+ TuyaZBOnOffAttributeCluster ,
149+ TuyaZBE000Cluster ,
150+ TuyaZBExternalSwitchTypeCluster ,
151+ ],
152+ OUTPUT_CLUSTERS : [Time .cluster_id , Ota .cluster_id ],
153+ },
154+ 2 : {
155+ PROFILE_ID : zha .PROFILE_ID ,
156+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
157+ INPUT_CLUSTERS : [
158+ Groups .cluster_id ,
159+ Scenes .cluster_id ,
160+ TuyaZBOnOffAttributeCluster ,
161+ TuyaZBExternalSwitchTypeCluster ,
162+ ],
163+ OUTPUT_CLUSTERS : [],
164+ },
165+ 242 : {
166+ PROFILE_ID : 41440 ,
167+ DEVICE_TYPE : 97 ,
168+ INPUT_CLUSTERS : [],
169+ OUTPUT_CLUSTERS : [GreenPowerProxy .cluster_id ],
170+ },
171+ },
172+ }
173+
174+
87175class Switch_3G_GPP (CustomDevice ):
88176 """Tuya 3 gang switch module with restore power state support."""
89177
@@ -154,7 +242,7 @@ class Switch_3G_GPP(CustomDevice):
154242 ENDPOINTS : {
155243 1 : {
156244 PROFILE_ID : zha .PROFILE_ID ,
157- DEVICE_TYPE : zha .DeviceType .ON_OFF_PLUG_IN_UNIT ,
245+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
158246 INPUT_CLUSTERS : [
159247 Basic .cluster_id ,
160248 Identify .cluster_id ,
@@ -168,7 +256,7 @@ class Switch_3G_GPP(CustomDevice):
168256 },
169257 2 : {
170258 PROFILE_ID : zha .PROFILE_ID ,
171- DEVICE_TYPE : zha .DeviceType .ON_OFF_PLUG_IN_UNIT ,
259+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
172260 INPUT_CLUSTERS : [
173261 Groups .cluster_id ,
174262 Scenes .cluster_id ,
@@ -179,7 +267,7 @@ class Switch_3G_GPP(CustomDevice):
179267 },
180268 3 : {
181269 PROFILE_ID : zha .PROFILE_ID ,
182- DEVICE_TYPE : zha .DeviceType .ON_OFF_PLUG_IN_UNIT ,
270+ DEVICE_TYPE : zha .DeviceType .ON_OFF_LIGHT ,
183271 INPUT_CLUSTERS : [
184272 Groups .cluster_id ,
185273 Scenes .cluster_id ,
0 commit comments