Skip to content

Commit de3643c

Browse files
authored
Add ZLinky variant for firmware v14.0 (#3448)
1 parent 1a23d3e commit de3643c

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

zhaquirks/lixee/zlinky.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
Identify,
1212
Ota,
1313
PowerConfiguration,
14+
Time,
1415
)
1516
from zigpy.zcl.clusters.homeautomation import ElectricalMeasurement, MeterIdentification
1617
from zigpy.zcl.clusters.smartenergy import Metering
@@ -24,6 +25,7 @@
2425
PROFILE_ID,
2526
)
2627
from zhaquirks.lixee import LIXEE, ZLINKY_MANUFACTURER_CLUSTER_ID
28+
from zhaquirks.tuya import TuyaManufCluster
2729

2830

2931
class ZLinkyTICManufacturerCluster(CustomCluster):
@@ -200,9 +202,25 @@ class ZLinkyTIC(CustomDevice):
200202

201203

202204
class ZLinkyTICFWV12(ZLinkyTIC):
203-
"""ZLinky_TIC from LiXee with firmware v12.0+."""
205+
"""ZLinky_TIC from LiXee with firmware v12.0 & v13.0."""
204206

205207
signature = deepcopy(ZLinkyTIC.signature)
206208

207-
# Insert PowerConfiguration cluster in signature for devices with firmware v12.0+
209+
# Insert PowerConfiguration cluster in signature for devices with firmware v12.0 & v13.0
208210
signature[ENDPOINTS][1][INPUT_CLUSTERS].insert(1, PowerConfiguration.cluster_id)
211+
212+
213+
class ZLinkyTICFWV14(ZLinkyTICFWV12):
214+
"""ZLinky_TIC from LiXee with firmware v14.0+."""
215+
216+
signature = deepcopy(ZLinkyTICFWV12.signature)
217+
replacement = deepcopy(ZLinkyTICFWV12.replacement)
218+
219+
# Insert Time configuration cluster in signature for devices with firmware v14.0+
220+
signature[ENDPOINTS][1][INPUT_CLUSTERS].insert(1, Time.cluster_id)
221+
222+
# Insert Tuya cluster in signature for devices with firmware v14.0+
223+
signature[ENDPOINTS][1][INPUT_CLUSTERS].insert(7, TuyaManufCluster.cluster_id)
224+
signature[ENDPOINTS][1][OUTPUT_CLUSTERS].insert(1, TuyaManufCluster.cluster_id)
225+
226+
replacement[ENDPOINTS][1][INPUT_CLUSTERS].insert(1, Time.cluster_id)

0 commit comments

Comments
 (0)