zigbee-herdsman-converters 23.51.0 → 23.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -265,6 +265,60 @@ const convLocal = {
265
265
  },
266
266
  };
267
267
  },
268
+ sceneCubeAction: () => {
269
+ const lookup = ["side_1", "side_2", "side_3", "side_4", "knock", "shake"];
270
+ const expose = e.action(lookup);
271
+ return [
272
+ tuya.modernExtend.dpEnumLookup({
273
+ dp: 0x01,
274
+ name: "action",
275
+ type: tuya.dataTypes.bool,
276
+ readOnly: true,
277
+ expose: expose,
278
+ lookup: { side_1: 0 },
279
+ }),
280
+ tuya.modernExtend.dpEnumLookup({
281
+ dp: 0x02,
282
+ name: "action",
283
+ type: tuya.dataTypes.bool,
284
+ readOnly: true,
285
+ expose: expose,
286
+ lookup: { side_2: 0 },
287
+ }),
288
+ tuya.modernExtend.dpEnumLookup({
289
+ dp: 0x03,
290
+ name: "action",
291
+ type: tuya.dataTypes.bool,
292
+ readOnly: true,
293
+ expose: expose,
294
+ lookup: { side_3: 0 },
295
+ }),
296
+ tuya.modernExtend.dpEnumLookup({
297
+ dp: 0x04,
298
+ name: "action",
299
+ type: tuya.dataTypes.bool,
300
+ readOnly: true,
301
+ expose: expose,
302
+ lookup: { side_4: 0 },
303
+ }),
304
+ tuya.modernExtend.dpEnumLookup({
305
+ dp: 0x05,
306
+ name: "action",
307
+ type: tuya.dataTypes.bool,
308
+ readOnly: true,
309
+ expose: expose,
310
+ lookup: { knock: 0 },
311
+ }),
312
+ tuya.modernExtend.dpEnumLookup({
313
+ dp: 0x06,
314
+ name: "action",
315
+ type: tuya.dataTypes.bool,
316
+ readOnly: true,
317
+ expose: expose,
318
+ lookup: { shake: 0 },
319
+ }),
320
+ ];
321
+ },
268
322
  };
269
323
  const tzLocal = {
270
324
  ts110eCountdown: {
@@ -1482,7 +1536,11 @@ exports.definitions = [
1482
1536
  vendor: "Tuya",
1483
1537
  whiteLabel: [
1484
1538
  { vendor: "Tuya", model: "iHSW02" },
1485
- { vendor: "HOBEIAN", model: "ZG-301Z", fingerprint: [{ modelID: "ZG-301Z" }] },
1539
+ {
1540
+ vendor: "HOBEIAN",
1541
+ model: "ZG-301Z",
1542
+ fingerprint: [{ modelID: "ZG-301Z" }],
1543
+ },
1486
1544
  tuya.whitelabel("Tuya", "QS-zigbee-S08-16A-RF", "Wall switch module", ["_TZ3000_dlhhrhs8"]),
1487
1545
  ],
1488
1546
  description: "Wall switch module",
@@ -1544,6 +1602,7 @@ exports.definitions = [
1544
1602
  "_TZ3000_h8ngtlxy",
1545
1603
  "_TZ3000_w0ypwa1f",
1546
1604
  "_TZ3000_wpueorev",
1605
+ "_TZ3000_cmcjbqup",
1547
1606
  ]),
1548
1607
  ...tuya.fingerprint("TS0011", ["_TYZB01_rifa0wlb"]),
1549
1608
  ],
@@ -1926,7 +1985,11 @@ exports.definitions = [
1926
1985
  await reporting.batteryVoltage(endpoint);
1927
1986
  },
1928
1987
  whiteLabel: [
1929
- { vendor: "HOBEIAN", model: "ZG-204Z", fingerprint: [{ modelID: "ZG-204Z" }] },
1988
+ {
1989
+ vendor: "HOBEIAN",
1990
+ model: "ZG-204Z",
1991
+ fingerprint: [{ modelID: "ZG-204Z" }],
1992
+ },
1930
1993
  tuya.whitelabel("Tuya", "ZMS-102", "Motion sensor", ["_TZ3000_msl6wxk9"]),
1931
1994
  ],
1932
1995
  },
@@ -1988,7 +2051,11 @@ exports.definitions = [
1988
2051
  fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery, fz.ignore_basic_report],
1989
2052
  whiteLabel: [
1990
2053
  { vendor: "CR Smart Home", model: "TS0207" },
1991
- { vendor: "HOBEIAN", model: "ZG-222Z", fingerprint: [{ modelID: "ZG-222Z" }] },
2054
+ {
2055
+ vendor: "HOBEIAN",
2056
+ model: "ZG-222Z",
2057
+ fingerprint: [{ modelID: "ZG-222Z" }],
2058
+ },
1992
2059
  tuya.whitelabel("Meian", "SW02", "Water leak sensor", ["_TZ3000_kyb656no"]),
1993
2060
  tuya.whitelabel("Aubess", "IH-K665", "Water leak sensor", ["_TZ3000_kstbkt6a"]),
1994
2061
  tuya.whitelabel("HOBEIAN", "ZG-222ZA", "Water leak sensor", ["_TZ3000_k4ej3ww2"]),
@@ -4752,13 +4819,50 @@ exports.definitions = [
4752
4819
  ],
4753
4820
  meta: {
4754
4821
  tuyaDatapoints: [
4755
- [1, "state", tuya.valueConverterBasic.lookup({ CLOSE: tuya.enum(2), STOP: tuya.enum(1), OPEN: tuya.enum(0) })],
4822
+ [
4823
+ 1,
4824
+ "state",
4825
+ tuya.valueConverterBasic.lookup({
4826
+ CLOSE: tuya.enum(2),
4827
+ STOP: tuya.enum(1),
4828
+ OPEN: tuya.enum(0),
4829
+ }),
4830
+ ],
4756
4831
  [2, "position", tuya.valueConverter.coverPositionInverted],
4757
4832
  [3, "position", tuya.valueConverter.coverPositionInverted],
4758
- [4, "opening_mode", tuya.valueConverterBasic.lookup({ tilt: tuya.enum(0), lift: tuya.enum(1) })],
4759
- [7, "work_state", tuya.valueConverterBasic.lookup({ standby: tuya.enum(0), success: tuya.enum(1), learning: tuya.enum(2) })],
4760
- [101, "motor_direction", tuya.valueConverterBasic.lookup({ left: tuya.enum(0), right: tuya.enum(1) })],
4761
- [102, "set_upper_limit", tuya.valueConverterBasic.lookup({ start: tuya.enum(1), stop: tuya.enum(0) })],
4833
+ [
4834
+ 4,
4835
+ "opening_mode",
4836
+ tuya.valueConverterBasic.lookup({
4837
+ tilt: tuya.enum(0),
4838
+ lift: tuya.enum(1),
4839
+ }),
4840
+ ],
4841
+ [
4842
+ 7,
4843
+ "work_state",
4844
+ tuya.valueConverterBasic.lookup({
4845
+ standby: tuya.enum(0),
4846
+ success: tuya.enum(1),
4847
+ learning: tuya.enum(2),
4848
+ }),
4849
+ ],
4850
+ [
4851
+ 101,
4852
+ "motor_direction",
4853
+ tuya.valueConverterBasic.lookup({
4854
+ left: tuya.enum(0),
4855
+ right: tuya.enum(1),
4856
+ }),
4857
+ ],
4858
+ [
4859
+ 102,
4860
+ "set_upper_limit",
4861
+ tuya.valueConverterBasic.lookup({
4862
+ start: tuya.enum(1),
4863
+ stop: tuya.enum(0),
4864
+ }),
4865
+ ],
4762
4866
  [107, "factory_reset", tuya.valueConverter.setLimit],
4763
4867
  ],
4764
4868
  },
@@ -8927,6 +9031,7 @@ exports.definitions = [
8927
9031
  {
8928
9032
  // Only the ones with applicationVersion 145 should be detected as this, e.g. applicationVersion 66 should be detected as ERS-10TZBVK-AA.
8929
9033
  // https://github.com/Koenkk/zigbee2mqtt/issues/25053
9034
+ zigbeeModel: ["ZG-101ZD"],
8930
9035
  fingerprint: [
8931
9036
  {
8932
9037
  modelID: "TS004F",
@@ -8938,6 +9043,7 @@ exports.definitions = [
8938
9043
  model: "ZG-101Z/D",
8939
9044
  vendor: "Tuya",
8940
9045
  description: "Smart knob",
9046
+ whiteLabel: [{ vendor: "COOLO", model: "ZG-101ZD" }],
8941
9047
  fromZigbee: [fz.tuya_multi_action, fz.battery, fz.tuya_operation_mode],
8942
9048
  exposes: [
8943
9049
  e.action(["rotate_left", "rotate_right"]),
@@ -9333,6 +9439,7 @@ exports.definitions = [
9333
9439
  },
9334
9440
  },
9335
9441
  {
9442
+ zigbeeModel: ["ZG-205ZL"],
9336
9443
  fingerprint: tuya.fingerprint("TS0225", ["_TZE200_hl0ss9oa"]),
9337
9444
  model: "ZG-205ZL",
9338
9445
  vendor: "Tuya",
@@ -10051,6 +10158,7 @@ exports.definitions = [
10051
10158
  },
10052
10159
  },
10053
10160
  {
10161
+ zigbeeModel: ["ZG-204ZM"],
10054
10162
  fingerprint: tuya.fingerprint("TS0601", ["_TZE200_2aaelwxk", "_TZE200_kb5noeto"]),
10055
10163
  model: "ZG-204ZM",
10056
10164
  vendor: "Tuya",
@@ -10979,6 +11087,7 @@ exports.definitions = [
10979
11087
  model: "SPM01",
10980
11088
  vendor: "Tuya",
10981
11089
  description: "Smart energy monitor for 1P+N system",
11090
+ ota: true,
10982
11091
  fromZigbee: [tuya.fz.datapoints],
10983
11092
  toZigbee: [tuya.tz.datapoints],
10984
11093
  configure: tuya.configureMagicPacket,
@@ -15199,6 +15308,7 @@ exports.definitions = [
15199
15308
  },
15200
15309
  },
15201
15310
  {
15311
+ zigbeeModel: ["ZG-103Z"],
15202
15312
  fingerprint: tuya.fingerprint("TS0601", ["_TZE200_iba1ckek", "_TZE200_hggxgsjj"]),
15203
15313
  model: "ZG-103Z",
15204
15314
  vendor: "Tuya",
@@ -17298,6 +17408,7 @@ exports.definitions = [
17298
17408
  },
17299
17409
  },
17300
17410
  {
17411
+ zigbeeModel: ["ZG-102ZM"],
17301
17412
  fingerprint: tuya.fingerprint("TS0601", ["_TZE200_wzk0x7fq"]),
17302
17413
  model: "ZG-102ZM",
17303
17414
  vendor: "HOBEIAN",
@@ -17327,6 +17438,7 @@ exports.definitions = [
17327
17438
  },
17328
17439
  },
17329
17440
  {
17441
+ zigbeeModel: ["ZG-204ZV"],
17330
17442
  fingerprint: tuya.fingerprint("TS0601", ["_TZE200_uli8wasj", "_TZE200_grgol3xp"]),
17331
17443
  model: "ZG-204ZV",
17332
17444
  vendor: "HOBEIAN",
@@ -17383,6 +17495,7 @@ exports.definitions = [
17383
17495
  },
17384
17496
  },
17385
17497
  {
17498
+ zigbeeModel: ["ZG-223Z"],
17386
17499
  fingerprint: tuya.fingerprint("TS0601", ["_TZE200_jsaqgakf"]),
17387
17500
  model: "ZG-223Z",
17388
17501
  vendor: "HOBEIAN",
@@ -17461,7 +17574,15 @@ exports.definitions = [
17461
17574
  ],
17462
17575
  meta: {
17463
17576
  tuyaDatapoints: [
17464
- [1, "presence_state", tuya.valueConverterBasic.lookup({ none: 0, motion: 1, stationary: 2 })],
17577
+ [
17578
+ 1,
17579
+ "presence_state",
17580
+ tuya.valueConverterBasic.lookup({
17581
+ none: 0,
17582
+ motion: 1,
17583
+ stationary: 2,
17584
+ }),
17585
+ ],
17465
17586
  [3, "near_detection", tuya.valueConverter.divideBy100],
17466
17587
  [4, "far_detection", tuya.valueConverter.divideBy100],
17467
17588
  [9, "target_distance_closest", tuya.valueConverter.divideBy100],
@@ -17487,9 +17608,24 @@ exports.definitions = [
17487
17608
  ],
17488
17609
  meta: {
17489
17610
  tuyaDatapoints: [
17490
- [1, "state", tuya.valueConverterBasic.lookup({ OPEN: tuya.enum(0), STOP: tuya.enum(1), CLOSE: tuya.enum(2) })],
17611
+ [
17612
+ 1,
17613
+ "state",
17614
+ tuya.valueConverterBasic.lookup({
17615
+ OPEN: tuya.enum(0),
17616
+ STOP: tuya.enum(1),
17617
+ CLOSE: tuya.enum(2),
17618
+ }),
17619
+ ],
17491
17620
  [2, "position", tuya.valueConverter.coverPositionInverted],
17492
- [5, "motor_direction", tuya.valueConverterBasic.lookup({ forward: tuya.enum(0), back: tuya.enum(1) })],
17621
+ [
17622
+ 5,
17623
+ "motor_direction",
17624
+ tuya.valueConverterBasic.lookup({
17625
+ forward: tuya.enum(0),
17626
+ back: tuya.enum(1),
17627
+ }),
17628
+ ],
17493
17629
  [
17494
17630
  16,
17495
17631
  "border",
@@ -17504,5 +17640,145 @@ exports.definitions = [
17504
17640
  ],
17505
17641
  },
17506
17642
  },
17643
+ {
17644
+ zigbeeModel: ["ZG-303Z"],
17645
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE200_npj9bug3"]),
17646
+ model: "CS-201Z",
17647
+ vendor: "COOLO",
17648
+ description: "Soil moisture sensor",
17649
+ fromZigbee: [tuya.fz.datapoints],
17650
+ toZigbee: [tuya.tz.datapoints],
17651
+ configure: tuya.configureMagicPacket,
17652
+ exposes: [
17653
+ e.enum("water_warning", ea.STATE, ["none", "alarm"]).withDescription("Water shortage warning"),
17654
+ e.temperature(),
17655
+ e.humidity(),
17656
+ e.soil_moisture(),
17657
+ tuya.exposes.temperatureUnit(),
17658
+ tuya.exposes.temperatureCalibration(),
17659
+ tuya.exposes.humidityCalibration(),
17660
+ tuya.exposes.soilCalibration(),
17661
+ tuya.exposes.temperatureSampling(),
17662
+ tuya.exposes.soilSampling(),
17663
+ tuya.exposes.soilWarning(),
17664
+ e.battery(),
17665
+ ],
17666
+ meta: {
17667
+ tuyaDatapoints: [
17668
+ [
17669
+ 106,
17670
+ "water_warning",
17671
+ tuya.valueConverterBasic.lookup({
17672
+ none: tuya.enum(0),
17673
+ alarm: tuya.enum(1),
17674
+ }),
17675
+ ],
17676
+ [5, "temperature", tuya.valueConverter.divideBy10],
17677
+ [109, "humidity", tuya.valueConverter.raw],
17678
+ [3, "soil_moisture", tuya.valueConverter.raw],
17679
+ [15, "battery", tuya.valueConverter.raw],
17680
+ [9, "temperature_unit", tuya.valueConverter.temperatureUnit],
17681
+ [104, "temperature_calibration", tuya.valueConverter.divideBy10],
17682
+ [105, "humidity_calibration", tuya.valueConverter.raw],
17683
+ [102, "soil_calibration", tuya.valueConverter.raw],
17684
+ [111, "temperature_sampling", tuya.valueConverter.raw],
17685
+ [112, "soil_sampling", tuya.valueConverter.raw],
17686
+ [110, "soil_warning", tuya.valueConverter.raw],
17687
+ ],
17688
+ },
17689
+ },
17690
+ {
17691
+ fingerprint: tuya.fingerprint("TS0001", ["_TZE21C_dohbhb5k"]),
17692
+ model: "TYONOFFTS",
17693
+ vendor: "Scimagic",
17694
+ description: "Smart switch with temperature sensor",
17695
+ extend: [
17696
+ tuya.modernExtend.tuyaMagicPacket(),
17697
+ tuya.modernExtend.dpOnOff({
17698
+ dp: 0x02,
17699
+ }),
17700
+ tuya.modernExtend.dpTemperature({ dp: 0x1b }),
17701
+ tuya.modernExtend.dpNumeric({
17702
+ dp: 0x1e,
17703
+ name: "temperature_calibration",
17704
+ type: tuya.dataTypes.number,
17705
+ valueMin: -10,
17706
+ valueMax: 10,
17707
+ valueStep: 0.5,
17708
+ unit: "°C",
17709
+ scale: 2,
17710
+ description: "Temperature calibration",
17711
+ }),
17712
+ tuya.modernExtend.dpNumeric({
17713
+ dp: 0x1d,
17714
+ name: "temperature_range",
17715
+ type: tuya.dataTypes.number,
17716
+ valueMin: 1,
17717
+ valueMax: 10,
17718
+ valueStep: 0.1,
17719
+ unit: "°C",
17720
+ scale: 10,
17721
+ description: "Keep the temperature in a range",
17722
+ }),
17723
+ tuya.modernExtend.dpBinary({
17724
+ name: "auto_work",
17725
+ dp: 0x09,
17726
+ type: tuya.dataTypes.bool,
17727
+ valueOn: ["ON", true],
17728
+ valueOff: ["OFF", false],
17729
+ description: "Auto work mode",
17730
+ }),
17731
+ tuya.modernExtend.dpNumeric({
17732
+ dp: 0x16,
17733
+ name: "temperature_target",
17734
+ type: tuya.dataTypes.number,
17735
+ valueMin: -100,
17736
+ valueMax: 100,
17737
+ valueStep: 0.5,
17738
+ unit: "°C",
17739
+ scale: 10,
17740
+ description: "Temperature target",
17741
+ }),
17742
+ tuya.modernExtend.dpEnumLookup({
17743
+ dp: 0x08,
17744
+ name: "mode",
17745
+ type: tuya.dataTypes.enum,
17746
+ lookup: { Heating: 0, Cooling: 2 },
17747
+ description: "Work mode",
17748
+ }),
17749
+ tuya.modernExtend.dpBinary({
17750
+ name: "delay",
17751
+ dp: 0x38,
17752
+ type: tuya.dataTypes.bool,
17753
+ valueOn: ["ON", 1],
17754
+ valueOff: ["OFF", 0],
17755
+ description: "Switch delay time mode",
17756
+ }),
17757
+ tuya.modernExtend.dpNumeric({
17758
+ dp: 0x37,
17759
+ name: "delay_time",
17760
+ type: tuya.dataTypes.number,
17761
+ valueMin: 0,
17762
+ valueMax: 10,
17763
+ valueStep: 1,
17764
+ unit: "minute",
17765
+ scale: 1,
17766
+ description: "Switch delay time",
17767
+ }),
17768
+ ],
17769
+ },
17770
+ {
17771
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE284_5ys44kzo"]),
17772
+ model: "TYSCENECUBE",
17773
+ vendor: "iHseno",
17774
+ description: "Scene cube",
17775
+ extend: [
17776
+ tuya.modernExtend.tuyaMagicPacket(),
17777
+ ...convLocal.sceneCubeAction(),
17778
+ tuya.modernExtend.dpBattery({
17779
+ dp: 0x0a,
17780
+ }),
17781
+ ],
17782
+ },
17507
17783
  ];
17508
17784
  //# sourceMappingURL=tuya.js.map