zigbee-herdsman-converters 20.37.0 → 20.39.0

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/devices/amina.d.ts +4 -0
  3. package/devices/amina.d.ts.map +1 -0
  4. package/devices/amina.js +361 -0
  5. package/devices/amina.js.map +1 -0
  6. package/devices/chacon.js +1 -1
  7. package/devices/chacon.js.map +1 -1
  8. package/devices/develco.d.ts.map +1 -1
  9. package/devices/develco.js +13 -10
  10. package/devices/develco.js.map +1 -1
  11. package/devices/easyiot.d.ts.map +1 -1
  12. package/devices/easyiot.js +164 -0
  13. package/devices/easyiot.js.map +1 -1
  14. package/devices/ewelink.d.ts.map +1 -1
  15. package/devices/ewelink.js +0 -14
  16. package/devices/ewelink.js.map +1 -1
  17. package/devices/ikea.js +2 -2
  18. package/devices/ikea.js.map +1 -1
  19. package/devices/index.d.ts.map +1 -1
  20. package/devices/index.js +2 -0
  21. package/devices/index.js.map +1 -1
  22. package/devices/neo.d.ts.map +1 -1
  23. package/devices/neo.js +8 -0
  24. package/devices/neo.js.map +1 -1
  25. package/devices/philips.d.ts.map +1 -1
  26. package/devices/philips.js +38 -1
  27. package/devices/philips.js.map +1 -1
  28. package/devices/radium.d.ts +4 -0
  29. package/devices/radium.d.ts.map +1 -0
  30. package/devices/radium.js +15 -0
  31. package/devices/radium.js.map +1 -0
  32. package/devices/sonoff.d.ts.map +1 -1
  33. package/devices/sonoff.js +10 -1
  34. package/devices/sonoff.js.map +1 -1
  35. package/devices/tuya.d.ts.map +1 -1
  36. package/devices/tuya.js +383 -22
  37. package/devices/tuya.js.map +1 -1
  38. package/devices/zigbeetlc.d.ts.map +1 -1
  39. package/devices/zigbeetlc.js +0 -8
  40. package/devices/zigbeetlc.js.map +1 -1
  41. package/lib/modernExtend.d.ts +1 -0
  42. package/lib/modernExtend.d.ts.map +1 -1
  43. package/lib/modernExtend.js +10 -4
  44. package/lib/modernExtend.js.map +1 -1
  45. package/lib/tuya.d.ts +7 -0
  46. package/lib/tuya.d.ts.map +1 -1
  47. package/lib/tuya.js +40 -2
  48. package/lib/tuya.js.map +1 -1
  49. package/lib/types.d.ts +1 -1
  50. package/lib/types.d.ts.map +1 -1
  51. package/package.json +5 -5
package/devices/tuya.js CHANGED
@@ -555,7 +555,10 @@ const fzLocal = {
555
555
  type: ['attributeReport', 'readResponse'],
556
556
  convert: (model, msg, publish, options, meta) => {
557
557
  // https://github.com/Koenkk/zigbee2mqtt/issues/11470
558
- if (msg.data.batteryPercentageRemaining == 200 && msg.data.batteryVoltage < 30)
558
+ // https://github.com/Koenkk/zigbee-herdsman-converters/pull/8246
559
+ if (msg.data.batteryPercentageRemaining == 200 &&
560
+ msg.data.batteryVoltage < 30 &&
561
+ !['_TZ3000_lqmvrwa2'].includes(meta.device.manufacturerName))
559
562
  return;
560
563
  return fromZigbee_1.default.battery.convert(model, msg, publish, options, meta);
561
564
  },
@@ -781,6 +784,47 @@ const definitions = [
781
784
  toZigbee: [],
782
785
  exposes: [e.gas(), e.tamper()],
783
786
  },
787
+ {
788
+ fingerprint: [
789
+ {
790
+ modelID: 'TS0601',
791
+ manufacturerName: '_TZE204_wktrysab',
792
+ },
793
+ ],
794
+ model: 'WLS098-ZIGBEE',
795
+ vendor: 'Tuya',
796
+ description: '8 gang wall touch switch board',
797
+ fromZigbee: [tuya.fz.datapoints],
798
+ toZigbee: [tuya.tz.datapoints],
799
+ onEvent: tuya.onEventSetTime,
800
+ configure: tuya.configureMagicPacket,
801
+ exposes: [...Array.from({ length: 8 }, (_, i) => tuya.exposes.switch().withEndpoint(`l${i + 1}`))],
802
+ endpoint: (device) => {
803
+ return {
804
+ l1: 1,
805
+ l2: 1,
806
+ l3: 1,
807
+ l4: 1,
808
+ l5: 1,
809
+ l6: 1,
810
+ l7: 1,
811
+ l8: 1,
812
+ };
813
+ },
814
+ meta: {
815
+ multiEndpoint: true,
816
+ tuyaDatapoints: [
817
+ [1, 'state_l1', tuya.valueConverter.onOff],
818
+ [2, 'state_l2', tuya.valueConverter.onOff],
819
+ [3, 'state_l3', tuya.valueConverter.onOff],
820
+ [4, 'state_l4', tuya.valueConverter.onOff],
821
+ [5, 'state_l5', tuya.valueConverter.onOff],
822
+ [6, 'state_l6', tuya.valueConverter.onOff],
823
+ [0x65, 'state_l7', tuya.valueConverter.onOff],
824
+ [0x66, 'state_l8', tuya.valueConverter.onOff],
825
+ ],
826
+ },
827
+ },
784
828
  {
785
829
  zigbeeModel: ['TS0205'],
786
830
  model: 'TS0205',
@@ -3015,6 +3059,7 @@ const definitions = [
3015
3059
  { vendor: 'BlitzWolf', model: 'BW-IS4' },
3016
3060
  tuya.whitelabel('Tuya', 'TS0201_1', 'Zigbee 3.0 temperature humidity sensor with display', ['_TZ3210_alxkwn0h']),
3017
3061
  tuya.whitelabel('Tuya', 'ZTH01/ZTH02', 'Temperature and humidity sensor', ['_TZ3000_0s1izerx']),
3062
+ tuya.whitelabel('SEDEA', 'eTH730', 'Temperature and humidity sensor', ['_TZ3000_lqmvrwa2']),
3018
3063
  ],
3019
3064
  },
3020
3065
  {
@@ -4423,6 +4468,7 @@ const definitions = [
4423
4468
  '_TZE200_7yoranx2' /* model: 'TV01-ZB', vendor: 'Moes' */,
4424
4469
  '_TZE200_kds0pmmv',
4425
4470
  '_TZE200_py4cm3he' /* model: 'TV06-Zigbee', vendor: 'Tuya' */,
4471
+ '_TZE200_wsbfwodu' /* model: 'HA-08 THERMO', vendor: 'AlecoAir' */,
4426
4472
  ]),
4427
4473
  model: 'TV02-Zigbee',
4428
4474
  vendor: 'Tuya',
@@ -4435,6 +4481,7 @@ const definitions = [
4435
4481
  { vendor: 'Unknown/id3.pl', model: 'GTZ08' },
4436
4482
  tuya.whitelabel('Moes', 'ZTRV-ZX-TV01-MS', 'Thermostat radiator valve', ['_TZE200_7yoranx2']),
4437
4483
  tuya.whitelabel('Moes', 'TV01-ZB', 'Thermostat radiator valve', ['_TZE200_e9ba97vf']),
4484
+ tuya.whitelabel('AlecoAir', 'HA-08_THERMO', 'Thermostat radiator valve', ['_TZE200_wsbfwodu']),
4438
4485
  ],
4439
4486
  ota: ota.zigbeeOTA,
4440
4487
  fromZigbee: [tuya.fz.datapoints],
@@ -5601,6 +5648,131 @@ const definitions = [
5601
5648
  ]),
5602
5649
  ],
5603
5650
  },
5651
+ {
5652
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE204_m64smti7']),
5653
+ model: 'RMDZB-1PNL63',
5654
+ vendor: 'TNCE',
5655
+ description: 'Zigbee DIN single phase energy meter',
5656
+ fromZigbee: [tuya.fz.datapoints],
5657
+ toZigbee: [tuya.tz.datapoints],
5658
+ configure: tuya.configureMagicPacket,
5659
+ exposes: [
5660
+ tuya.exposes.switch(),
5661
+ e.energy(),
5662
+ e
5663
+ .enum('fault', ea.STATE, [
5664
+ 'clear',
5665
+ 'short_circuit_alarm',
5666
+ 'surge_alarm',
5667
+ 'overload_alarm',
5668
+ 'leakagecurr_alarm',
5669
+ 'temp_dif_fault',
5670
+ 'fire_alarm',
5671
+ 'high_power_alarm',
5672
+ 'self_test_alarm',
5673
+ 'ov_cr',
5674
+ 'unbalance_alarm',
5675
+ 'ov_vol',
5676
+ 'undervoltage_alarm',
5677
+ 'miss_phase_alarm',
5678
+ 'outage_alarm',
5679
+ 'magnetism_alarm',
5680
+ 'credit_alarm',
5681
+ 'no_balance_alarm',
5682
+ ])
5683
+ .withDescription('Fault status of the device (clear = nothing)'),
5684
+ tuya.exposes.voltageWithPhase('a'),
5685
+ tuya.exposes.powerWithPhase('a'),
5686
+ tuya.exposes.currentWithPhase('a'),
5687
+ e.temperature(),
5688
+ e
5689
+ .binary('over_current_breaker', ea.STATE_SET, 'ON', 'OFF')
5690
+ .withDescription('OFF - alarm only, ON - relay will turn off when threshold reached'),
5691
+ e
5692
+ .numeric('over_current_threshold', ea.STATE_SET)
5693
+ .withUnit('A')
5694
+ .withDescription('Setup the value on the device')
5695
+ .withValueMin(1)
5696
+ .withValueMax(63),
5697
+ e
5698
+ .binary('over_voltage_breaker', ea.STATE_SET, 'ON', 'OFF')
5699
+ .withDescription('OFF - alarm only, ON - relay will turn off when threshold reached'),
5700
+ e
5701
+ .numeric('over_voltage_threshold', ea.STATE_SET)
5702
+ .withUnit('V')
5703
+ .withDescription('Setup value on the device')
5704
+ .withValueMin(250)
5705
+ .withValueMax(300),
5706
+ e
5707
+ .binary('under_voltage_breaker', ea.STATE_SET, 'ON', 'OFF')
5708
+ .withDescription('OFF - alarm only, ON - relay will turn off when threshold reached'),
5709
+ e
5710
+ .numeric('under_voltage_threshold', ea.STATE_SET)
5711
+ .withUnit('V')
5712
+ .withDescription('Setup value on the device')
5713
+ .withValueMin(150)
5714
+ .withValueMax(200),
5715
+ e
5716
+ .binary('high_temperature_breaker', ea.STATE_SET, 'ON', 'OFF')
5717
+ .withDescription('OFF - alarm only, ON - relay will turn off when threshold reached'),
5718
+ e
5719
+ .numeric('high_temperature_threshold', ea.STATE_SET)
5720
+ .withUnit('°C')
5721
+ .withDescription('Setup value on the device')
5722
+ .withValueMin(40)
5723
+ .withValueMax(100),
5724
+ ],
5725
+ meta: {
5726
+ tuyaDatapoints: [
5727
+ [1, 'energy', tuya.valueConverter.divideBy100],
5728
+ [6, null, tuya.valueConverter.phaseVariant2WithPhase('a')],
5729
+ [
5730
+ 9,
5731
+ 'fault',
5732
+ tuya.valueConverterBasic.lookup({
5733
+ clear: 0,
5734
+ short_circuit_alarm: 1,
5735
+ surge_alarm: 2,
5736
+ overload_alarm: 4,
5737
+ leakagecurr_alarm: 8,
5738
+ temp_dif_fault: 16,
5739
+ fire_alarm: 32,
5740
+ high_power_alarm: 64,
5741
+ self_test_alarm: 128,
5742
+ ov_cr: 256,
5743
+ unbalance_alarm: 512,
5744
+ ov_vol: 1024,
5745
+ undervoltage_alarm: 2048,
5746
+ miss_phase_alarm: 4096,
5747
+ outage_alarm: 8192,
5748
+ magnetism_alarm: 16384,
5749
+ credit_alarm: 32768,
5750
+ no_balance_alarm: 65536,
5751
+ }),
5752
+ ],
5753
+ [16, 'state', tuya.valueConverter.onOff],
5754
+ [17, null, tuya.valueConverter.threshold_2],
5755
+ [17, 'high_temperature_threshold', tuya.valueConverter.threshold_2],
5756
+ [17, 'high_temperature_breaker', tuya.valueConverter.threshold_2],
5757
+ [18, null, tuya.valueConverter.threshold_3],
5758
+ [18, 'over_current_threshold', tuya.valueConverter.threshold_3],
5759
+ [18, 'over_current_breaker', tuya.valueConverter.threshold_3],
5760
+ [18, 'over_voltage_threshold', tuya.valueConverter.threshold_3],
5761
+ [18, 'over_voltage_breaker', tuya.valueConverter.threshold_3],
5762
+ [18, 'under_voltage_threshold', tuya.valueConverter.threshold_3],
5763
+ [18, 'under_voltage_breaker', tuya.valueConverter.threshold_3],
5764
+ [103, 'temperature', tuya.valueConverter.raw],
5765
+ // Ignored for now; we don't know what the values mean
5766
+ [11, null, null], // Switch prepayment
5767
+ [12, null, null], // Energy reset
5768
+ [13, null, null], // Balance enertgy
5769
+ [14, null, null], // Charge energy
5770
+ [105, null, null], // Countdown
5771
+ [106, null, null], // Cycle time
5772
+ ],
5773
+ },
5774
+ whiteLabel: [{ vendor: 'TNCE', model: 'RMDZB-1PNL63' }],
5775
+ },
5604
5776
  {
5605
5777
  fingerprint: tuya.fingerprint('TS0601', ['_TZE204_wbhaespm']),
5606
5778
  model: 'STB3L-125-ZJ',
@@ -6750,7 +6922,7 @@ const definitions = [
6750
6922
  whiteLabel: [tuya.whitelabel('Tuya', 'QT-07S', 'Soil sensor', ['_TZE204_myd45weu'])],
6751
6923
  },
6752
6924
  {
6753
- fingerprint: tuya.fingerprint('TS0222', ['_TZ3000_8uxxzz4b']),
6925
+ fingerprint: tuya.fingerprint('TS0222', ['_TZ3000_8uxxzz4b', '_TZ3000_hy6ncvmw']),
6754
6926
  model: 'TS0222_light',
6755
6927
  vendor: 'Tuya',
6756
6928
  description: 'Light sensor',
@@ -6869,7 +7041,7 @@ const definitions = [
6869
7041
  ],
6870
7042
  },
6871
7043
  {
6872
- fingerprint: [{ modelID: 'TS011F', manufacturerName: '_TZ3000_qeuvnohg' }],
7044
+ fingerprint: tuya.fingerprint('TS011F', ['_TZ3000_qeuvnohg', '_TZ3000_6l1pjfqe']),
6873
7045
  model: 'TS011F_din_smart_relay_polling',
6874
7046
  description: 'Din smart relay (with power monitoring via polling)',
6875
7047
  vendor: 'Tuya',
@@ -8400,10 +8572,7 @@ const definitions = [
8400
8572
  },
8401
8573
  },
8402
8574
  {
8403
- fingerprint: [
8404
- { modelID: 'TS110E', manufacturerName: '_TZ3210_wdexaypg' },
8405
- { modelID: 'TS110E', manufacturerName: '_TZ3210_3mpwqzuu' },
8406
- ],
8575
+ fingerprint: [{ modelID: 'TS110E', manufacturerName: '_TZ3210_wdexaypg' }],
8407
8576
  model: 'TS110E_2gang_1',
8408
8577
  vendor: 'Tuya',
8409
8578
  description: '2 channel dimmer',
@@ -8425,7 +8594,7 @@ const definitions = [
8425
8594
  ],
8426
8595
  },
8427
8596
  {
8428
- fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_pagajpog', '_TZ3210_4ubylghk', '_TZ3210_vfwhhldz']),
8597
+ fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_pagajpog', '_TZ3210_4ubylghk', '_TZ3210_vfwhhldz', '_TZ3210_3mpwqzuu']),
8429
8598
  model: 'TS110E_2gang_2',
8430
8599
  vendor: 'Tuya',
8431
8600
  description: '2 channel dimmer',
@@ -10281,36 +10450,49 @@ const definitions = [
10281
10450
  toZigbee: [tuya.tz.datapoints],
10282
10451
  configure: tuya.configureMagicPacket,
10283
10452
  exposes: [
10284
- e.enum('state', ea.STATE, ['none', 'presence', 'move']).withDescription('Presence state sensor'),
10285
- e.presence().withDescription('Occupancy'),
10286
- e.numeric('distance', ea.STATE).withDescription('Target distance'),
10287
- e.illuminance_lux().withDescription('Illuminance sensor'),
10288
- e.numeric('move_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Motion sensitivity'),
10289
- e.numeric('presence_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Presence sensitivity'),
10453
+ e.enum('state', ea.STATE, ['none', 'presence', 'move']).withDescription('Presence state'),
10454
+ e.occupancy(),
10455
+ e.numeric('distance', ea.STATE).withUnit('m').withDescription('Target distance'),
10456
+ e.illuminance_lux(),
10290
10457
  e
10291
- .numeric('radar_range', ea.STATE_SET)
10458
+ .numeric('motion_sensitivity', ea.STATE_SET)
10459
+ .withValueMin(1)
10460
+ .withValueMax(10)
10461
+ .withValueStep(1)
10462
+ .withCategory('config')
10463
+ .withDescription('Motion sensitivity'),
10464
+ e
10465
+ .numeric('occupancy_sensitivity', ea.STATE_SET)
10466
+ .withValueMin(1)
10467
+ .withValueMax(10)
10468
+ .withValueStep(1)
10469
+ .withCategory('config')
10470
+ .withDescription('Occupancy sensitivity'),
10471
+ e
10472
+ .numeric('max_range', ea.STATE_SET)
10292
10473
  .withValueMin(1.5)
10293
10474
  .withValueMax(5.5)
10294
10475
  .withValueStep(1)
10295
10476
  .withUnit('m')
10477
+ .withCategory('config')
10296
10478
  .withDescription('Maximum range'),
10297
10479
  e
10298
- .numeric('presence_timeout', ea.STATE_SET)
10480
+ .numeric('occupancy_timeout', ea.STATE_SET)
10299
10481
  .withValueMin(1)
10300
10482
  .withValueMax(1500)
10301
10483
  .withValueStep(1)
10302
10484
  .withUnit('s')
10303
- .withDescription('Fade time'),
10485
+ .withDescription('Occupancy timeout'),
10304
10486
  ],
10305
10487
  meta: {
10306
10488
  multiEndpoint: true,
10307
10489
  tuyaDatapoints: [
10308
- [112, 'presence', tuya.valueConverter.trueFalse1],
10309
- [106, 'move_sensitivity', tuya.valueConverter.divideBy10FromOnly],
10310
- [111, 'presence_sensitivity', tuya.valueConverter.divideBy10FromOnly],
10311
- [107, 'radar_range', tuya.valueConverter.divideBy100],
10490
+ [112, 'occupancy', tuya.valueConverter.trueFalse1],
10491
+ [106, 'motion_sensitivity', tuya.valueConverter.raw],
10492
+ [111, 'occupancy_sensitivity', tuya.valueConverter.raw],
10493
+ [107, 'max_range', tuya.valueConverter.divideBy100],
10312
10494
  [109, 'distance', tuya.valueConverter.divideBy100],
10313
- [110, 'presence_timeout', tuya.valueConverter.raw],
10495
+ [110, 'occupancy_timeout', tuya.valueConverter.raw],
10314
10496
  [104, 'illuminance_lux', tuya.valueConverter.raw],
10315
10497
  [102, 'illuminance_treshold_max', tuya.valueConverter.raw],
10316
10498
  [103, 'illuminance_treshold_min', tuya.valueConverter.raw],
@@ -12371,6 +12553,185 @@ const definitions = [
12371
12553
  ],
12372
12554
  },
12373
12555
  },
12556
+ {
12557
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE200_pbo8cj0z']),
12558
+ model: 'TS0601_GTZ10',
12559
+ vendor: 'Tuya',
12560
+ description: 'Thermostat radiator valve',
12561
+ fromZigbee: [tuya.fz.datapoints],
12562
+ toZigbee: [tuya.tz.datapoints],
12563
+ onEvent: tuya.onEventSetLocalTime,
12564
+ configure: tuya.configureMagicPacket,
12565
+ ota: ota.zigbeeOTA,
12566
+ exposes: [
12567
+ e.battery(),
12568
+ e.child_lock(),
12569
+ e.window_detection(),
12570
+ e.window_open(),
12571
+ e.open_window_temperature().withValueMin(5).withValueMax(30),
12572
+ e.max_temperature().withValueMin(15).withValueMax(45),
12573
+ e.min_temperature().withValueMin(5).withValueMax(15),
12574
+ e
12575
+ .climate()
12576
+ .withPreset(['manual', 'auto', 'holiday', 'comfort', 'eco', 'off'])
12577
+ .withSetpoint('current_heating_setpoint', 5, 40, 0.5, ea.STATE_SET)
12578
+ .withLocalTemperature(ea.STATE)
12579
+ .withLocalTemperatureCalibration(-9, 9, 0.5, ea.STATE_SET)
12580
+ .withSystemMode(['off', 'heat', 'auto'], ea.STATE_SET, 'Only for Homeassistant')
12581
+ .withRunningState(['idle', 'heat'], ea.STATE),
12582
+ ...tuya.exposes.scheduleAllDays(ea.STATE_SET, 'HH:MM/C HH:MM/C HH:MM/C HH:MM/C'),
12583
+ tuya.exposes
12584
+ .errorStatus()
12585
+ .withDescription('Error status. Possible codes: E1 - builtin sensor error, E2 - external sensor error, E3 - valve not installed, E4 - motor error.'),
12586
+ e
12587
+ .binary('frost_protection', ea.STATE_SET, 'ON', 'OFF')
12588
+ .withDescription('When the room temperature is lower than 5 °C, the valve opens; when the temperature rises to 8 °C, the valve closes.'),
12589
+ e.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF').withDescription('Boost Heating: the device will enter the boost heating mode.'),
12590
+ e
12591
+ .numeric('boost_timeset_countdown', ea.STATE_SET)
12592
+ .withUnit('m')
12593
+ .withDescription('Setting ' +
12594
+ 'minimum 0 - maximum 90 minutes boost time. The boost function is activated. The remaining ' +
12595
+ 'time for the function will be counted down in minutes ( 90 to 0 ).')
12596
+ .withValueMin(0)
12597
+ .withValueMax(90),
12598
+ e.binary('switch_type', ea.STATE_SET, 'ON', 'OFF').withDescription('Enables/disables valve switch'),
12599
+ e.numeric('position', ea.STATE).withUnit('%').withValueMin(0).withValueMax(100).withDescription('Position'), // set actually not working
12600
+ e.enum('screen_orientation', ea.STATE_SET, ['up', 'right', 'down', 'left']).withDescription('Screen orientation'),
12601
+ ],
12602
+ meta: {
12603
+ tuyaDatapoints: [
12604
+ [2, null, tuya.valueConverter.thermostatGtz10SystemModeAndPreset(null)],
12605
+ [2, 'preset', tuya.valueConverter.thermostatGtz10SystemModeAndPreset('preset')],
12606
+ [2, 'system_mode', tuya.valueConverter.thermostatGtz10SystemModeAndPreset('system_mode')],
12607
+ [4, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
12608
+ [5, 'local_temperature', tuya.valueConverter.divideBy10],
12609
+ [6, 'battery', tuya.valueConverter.raw],
12610
+ [7, 'child_lock', tuya.valueConverter.lockUnlock],
12611
+ [9, 'max_temperature', tuya.valueConverter.divideBy10],
12612
+ [10, 'min_temperature', tuya.valueConverter.divideBy10],
12613
+ [14, 'window_detection', tuya.valueConverter.onOff],
12614
+ [15, 'window_open', tuya.valueConverter.onOff],
12615
+ [16, 'open_window_temperature', tuya.valueConverter.divideBy10],
12616
+ [28, 'schedule_monday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(1)],
12617
+ [29, 'schedule_tuesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(2)],
12618
+ [30, 'schedule_wednesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(3)],
12619
+ [31, 'schedule_thursday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(4)],
12620
+ [32, 'schedule_friday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(5)],
12621
+ [33, 'schedule_saturday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(6)],
12622
+ [34, 'schedule_sunday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(7)],
12623
+ [35, 'error_status', tuya.valueConverter.raw],
12624
+ [36, 'frost_protection', tuya.valueConverter.onOff],
12625
+ [37, 'boost_heating', tuya.valueConverter.onOff],
12626
+ [38, 'boost_timeset_countdown', tuya.valueConverter.raw],
12627
+ [47, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration1],
12628
+ [
12629
+ 49, //valve_state
12630
+ 'running_state',
12631
+ tuya.valueConverterBasic.lookup({
12632
+ idle: tuya.enum(0),
12633
+ heat: tuya.enum(1),
12634
+ closing: tuya.enum(2),
12635
+ opening: tuya.enum(3),
12636
+ }),
12637
+ ],
12638
+ [113, 'switch_type', tuya.valueConverter.onOff], // valve_switch
12639
+ [115, 'position', tuya.valueConverter.raw], // valve_opening
12640
+ [
12641
+ 119,
12642
+ 'screen_orientation',
12643
+ tuya.valueConverterBasic.lookup({
12644
+ up: tuya.enum(0),
12645
+ down: tuya.enum(1),
12646
+ left: tuya.enum(2),
12647
+ right: tuya.enum(3),
12648
+ }),
12649
+ ],
12650
+ // Exposed but not used DPs
12651
+ [1, 'preheat', tuya.valueConverter.raw],
12652
+ [3, 'working_status', tuya.valueConverter.raw],
12653
+ [8, 'temperature_scale', tuya.valueConverter.raw],
12654
+ [11, 'max_temperature_f', tuya.valueConverter.divideBy10],
12655
+ [12, 'min_temperature_f', tuya.valueConverter.divideBy10],
12656
+ [17, 'open_window_time', tuya.valueConverter.raw],
12657
+ [18, 'backlight', tuya.valueConverter.raw],
12658
+ [39, 'switch_scale', tuya.valueConverter.raw],
12659
+ [40, 'local_temperature_f', tuya.valueConverter.divideBy10],
12660
+ [41, 'current_heating_setpoint_f', tuya.valueConverter.divideBy10],
12661
+ [46, 'open_window_temperature_f', tuya.valueConverter.divideBy10],
12662
+ [48, 'valve_testing', tuya.valueConverter.raw],
12663
+ [112, 'local_temperature_calibration_f', tuya.valueConverter.localTempCalibration1],
12664
+ [114, 'valve_control_type', tuya.valueConverterBasic.lookup({ PID: 0, ONOFF: 1 })],
12665
+ [116, 'frost_temperature', tuya.valueConverter.raw],
12666
+ [117, 'frost_temperature_f', tuya.valueConverter.raw],
12667
+ [118, 'auto_time', tuya.valueConverter.raw],
12668
+ [120, 'multi_control_link', tuya.valueConverter.raw],
12669
+ [121, 'holiday_time', tuya.valueConverter.raw],
12670
+ ],
12671
+ },
12672
+ },
12673
+ {
12674
+ fingerprint: tuya.fingerprint('TS0601', ['_TZE284_kyyu8rbj']),
12675
+ model: 'ME201WZ',
12676
+ vendor: 'Tuya',
12677
+ description: 'Water level sensor',
12678
+ fromZigbee: [tuya.fz.datapoints],
12679
+ toZigbee: [tuya.tz.datapoints],
12680
+ onEvent: tuya.onEventSetLocalTime,
12681
+ configure: tuya.configureMagicPacket,
12682
+ exposes: [
12683
+ e.numeric('liquid_level_percent', ea.STATE).withUnit('%').withDescription('Liquid level ratio'),
12684
+ e.numeric('liquid_depth', ea.STATE).withUnit('m').withDescription('Liquid Depth'),
12685
+ e.enum('liquid_state', ea.STATE, ['low', 'normal', 'high']).withDescription('Liquid level status'),
12686
+ e
12687
+ .numeric('max_set', ea.STATE_SET)
12688
+ .withUnit('%')
12689
+ .withDescription('Liquid max percentage')
12690
+ .withValueMin(0)
12691
+ .withValueMax(100)
12692
+ .withValueStep(1),
12693
+ e
12694
+ .numeric('mini_set', ea.STATE_SET)
12695
+ .withUnit('%')
12696
+ .withDescription('Liquid minimal percentage')
12697
+ .withValueMin(0)
12698
+ .withValueMax(100)
12699
+ .withValueStep(1),
12700
+ e
12701
+ .numeric('installation_height', ea.STATE_SET)
12702
+ .withUnit('mm')
12703
+ .withDescription('Height from sensor to tank bottom')
12704
+ .withValueMin(100)
12705
+ .withValueMax(4000)
12706
+ .withValueStep(1),
12707
+ e
12708
+ .numeric('liquid_depth_max', ea.STATE_SET)
12709
+ .withUnit('mm')
12710
+ .withDescription('Height from sensor to liquid level')
12711
+ .withValueMin(100)
12712
+ .withValueMax(2000)
12713
+ .withValueStep(1),
12714
+ ],
12715
+ meta: {
12716
+ tuyaDatapoints: [
12717
+ [
12718
+ 1,
12719
+ 'liquid_state',
12720
+ tuya.valueConverterBasic.lookup({
12721
+ low: tuya.enum(1),
12722
+ normal: tuya.enum(0),
12723
+ high: tuya.enum(2),
12724
+ }),
12725
+ ],
12726
+ [2, 'liquid_depth', tuya.valueConverter.divideBy1000],
12727
+ [22, 'liquid_level_percent', tuya.valueConverter.raw],
12728
+ [7, 'max_set', tuya.valueConverter.raw],
12729
+ [8, 'mini_set', tuya.valueConverter.raw],
12730
+ [19, 'installation_height', tuya.valueConverter.raw],
12731
+ [21, 'liquid_depth_max', tuya.valueConverter.raw],
12732
+ ],
12733
+ },
12734
+ },
12374
12735
  ];
12375
12736
  exports.default = definitions;
12376
12737
  module.exports = definitions;