zigbee-herdsman-converters 14.0.341 → 14.0.345

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.
@@ -1644,7 +1644,7 @@ const converters = {
1644
1644
  },
1645
1645
  moes_105_dimmer: {
1646
1646
  cluster: 'manuSpecificTuya',
1647
- type: ['commandGetData', 'commandSetDataResponse'],
1647
+ type: ['commandDataResponse', 'commandDataReport'],
1648
1648
  convert: (model, msg, publish, options, meta) => {
1649
1649
  const multiEndpoint = model.meta && model.meta.multiEndpoint;
1650
1650
  const dp = msg.data.dp;
@@ -1738,7 +1738,7 @@ const converters = {
1738
1738
  },
1739
1739
  tuya_temperature_humidity_sensor: {
1740
1740
  cluster: 'manuSpecificTuya',
1741
- type: ['commandSetDataResponse', 'commandGetData'],
1741
+ type: ['commandDataReport', 'commandDataResponse'],
1742
1742
  options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
1743
1743
  exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
1744
1744
  convert: (model, msg, publish, options, meta) => {
@@ -1757,9 +1757,40 @@ const converters = {
1757
1757
  }
1758
1758
  },
1759
1759
  },
1760
+ nous_lcd_temperature_humidity_sensor: {
1761
+ cluster: 'manuSpecificTuya',
1762
+ type: ['commandGetData'],
1763
+ options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
1764
+ exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
1765
+ convert: (model, msg, publish, options, meta) => {
1766
+ const dp = msg.data.dp;
1767
+ const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
1768
+ switch (dp) {
1769
+ case tuya.dataPoints.nousTemperature:
1770
+ return {temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
1771
+ case tuya.dataPoints.nousHumidity:
1772
+ return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
1773
+ case tuya.dataPoints.nousBattery:
1774
+ return {battery: value};
1775
+ case tuya.dataPoints.nousTempUnitConvert:
1776
+ return {temperature_unit_convert: {0x00: '°C', 0x01: '°F'}[value]};
1777
+ case tuya.dataPoints.nousMaxTemp:
1778
+ return {max_temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
1779
+ case tuya.dataPoints.nousMinTemp:
1780
+ return {min_temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
1781
+ case tuya.dataPoints.nousTempAlarm:
1782
+ return {temperature_alarm: {0x00: 'canceled', 0x01: 'lower_alarm', 0x02: 'upper_alarm'}[value]};
1783
+ case tuya.dataPoints.nousTempSensitivity:
1784
+ return {temperature_sensitivity: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
1785
+ default:
1786
+ meta.logger.warn(`zigbee-herdsman-converters:nous_lcd_temperature_humidity_sensor: NOT RECOGNIZED ` +
1787
+ `DP #${dp} with data ${JSON.stringify(msg.data)}`);
1788
+ }
1789
+ },
1790
+ },
1760
1791
  tuya_illuminance_temperature_humidity_sensor: {
1761
1792
  cluster: 'manuSpecificTuya',
1762
- type: ['commandSetDataResponse', 'commandGetData'],
1793
+ type: ['commandDataReport', 'commandDataResponse'],
1763
1794
  options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
1764
1795
  exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
1765
1796
  convert: (model, msg, publish, options, meta) => {
@@ -1811,7 +1842,7 @@ const converters = {
1811
1842
  },
1812
1843
  tuya_thermostat_weekly_schedule: {
1813
1844
  cluster: 'manuSpecificTuya',
1814
- type: ['commandGetData', 'commandSetDataResponse'],
1845
+ type: ['commandDataResponse', 'commandDataReport'],
1815
1846
  convert: (model, msg, publish, options, meta) => {
1816
1847
  const dp = msg.data.dp;
1817
1848
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -1860,7 +1891,7 @@ const converters = {
1860
1891
  },
1861
1892
  hy_thermostat: {
1862
1893
  cluster: 'manuSpecificTuya',
1863
- type: ['commandSetDataResponse', 'commandGetData'],
1894
+ type: ['commandDataReport', 'commandDataResponse'],
1864
1895
  convert: (model, msg, publish, options, meta) => {
1865
1896
  const dp = msg.data.dp;
1866
1897
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -1990,7 +2021,7 @@ const converters = {
1990
2021
  },
1991
2022
  tuya_cover: {
1992
2023
  cluster: 'manuSpecificTuya',
1993
- type: ['commandSetDataResponse', 'commandGetData'],
2024
+ type: ['commandDataReport', 'commandDataResponse'],
1994
2025
  options: [exposes.options.invert_cover()],
1995
2026
  convert: (model, msg, publish, options, meta) => {
1996
2027
  // Protocol description
@@ -2313,7 +2344,7 @@ const converters = {
2313
2344
  },
2314
2345
  neo_nas_pd07: {
2315
2346
  cluster: 'manuSpecificTuya',
2316
- type: ['commandSetDataResponse', 'commandGetData'],
2347
+ type: ['commandDataReport', 'commandDataResponse'],
2317
2348
  options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
2318
2349
  exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
2319
2350
  convert: (model, msg, publish, options, meta) => {
@@ -2339,7 +2370,7 @@ const converters = {
2339
2370
  },
2340
2371
  neo_t_h_alarm: {
2341
2372
  cluster: 'manuSpecificTuya',
2342
- type: ['commandSetDataResponse', 'commandGetData'],
2373
+ type: ['commandDataReport', 'commandDataResponse'],
2343
2374
  convert: (model, msg, publish, options, meta) => {
2344
2375
  const dp = msg.data.dp;
2345
2376
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -2484,7 +2515,7 @@ const converters = {
2484
2515
  },
2485
2516
  tuya_water_leak: {
2486
2517
  cluster: 'manuSpecificTuya',
2487
- type: 'commandSetDataResponse',
2518
+ type: 'commandDataReport',
2488
2519
  convert: (model, msg, publish, options, meta) => {
2489
2520
  if (msg.data.dp === tuya.dataPoints.waterLeak) {
2490
2521
  return {water_leak: tuya.getDataValue(msg.data.datatype, msg.data.data)};
@@ -2727,25 +2758,6 @@ const converters = {
2727
2758
  }
2728
2759
  },
2729
2760
  },
2730
- hy_set_time_request: {
2731
- cluster: 'manuSpecificTuya',
2732
- type: ['commandSetTimeRequest'],
2733
- convert: async (model, msg, publish, options, meta) => {
2734
- const OneJanuary2000 = new Date('January 01, 2000 00:00:00 UTC+00:00').getTime();
2735
- const currentTime = new Date().getTime();
2736
- const utcTime = Math.round((currentTime - OneJanuary2000) / 1000);
2737
- const localTime = Math.round(currentTime / 1000) - (new Date()).getTimezoneOffset() * 60;
2738
- const endpoint = msg.endpoint;
2739
- const payload = {
2740
- payloadSize: 8,
2741
- payload: [
2742
- ...tuya.convertDecimalValueTo4ByteHexArray(utcTime),
2743
- ...tuya.convertDecimalValueTo4ByteHexArray(localTime),
2744
- ],
2745
- };
2746
- await endpoint.command('manuSpecificTuya', 'setTime', payload, {});
2747
- },
2748
- },
2749
2761
  ptvo_switch_uart: {
2750
2762
  cluster: 'genMultistateValue',
2751
2763
  type: ['attributeReport', 'readResponse'],
@@ -2867,7 +2879,7 @@ const converters = {
2867
2879
  },
2868
2880
  silvercrest_smart_led_string: {
2869
2881
  cluster: 'manuSpecificTuya',
2870
- type: ['commandGetData', 'commandSetDataResponse'],
2882
+ type: ['commandDataResponse', 'commandDataReport'],
2871
2883
  convert: (model, msg, publish, options, meta) => {
2872
2884
  const dp = msg.data.dp;
2873
2885
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -3487,7 +3499,7 @@ const converters = {
3487
3499
  },
3488
3500
  moes_thermostat: {
3489
3501
  cluster: 'manuSpecificTuya',
3490
- type: ['commandGetData', 'commandSetDataResponse'],
3502
+ type: ['commandDataResponse', 'commandDataReport'],
3491
3503
  convert: (model, msg, publish, options, meta) => {
3492
3504
  const dp = msg.data.dp;
3493
3505
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -3560,7 +3572,7 @@ const converters = {
3560
3572
  },
3561
3573
  moesS_thermostat: {
3562
3574
  cluster: 'manuSpecificTuya',
3563
- type: ['commandGetData', 'commandSetDataResponse'],
3575
+ type: ['commandDataResponse', 'commandDataReport'],
3564
3576
  convert: (model, msg, publish, options, meta) => {
3565
3577
  const dp = msg.data.dp; // First we get the data point ID
3566
3578
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -3620,7 +3632,7 @@ const converters = {
3620
3632
  },
3621
3633
  tvtwo_thermostat: {
3622
3634
  cluster: 'manuSpecificTuya',
3623
- type: ['commandGetData', 'commandSetDataResponse'],
3635
+ type: ['commandDataResponse', 'commandDataReport'],
3624
3636
  convert: (model, msg, publish, options, meta) => {
3625
3637
  const dp = msg.data.dp;
3626
3638
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -3771,7 +3783,7 @@ const converters = {
3771
3783
  },
3772
3784
  haozee_thermostat: {
3773
3785
  cluster: 'manuSpecificTuya',
3774
- type: ['commandGetData', 'commandSetDataResponse'],
3786
+ type: ['commandDataResponse', 'commandDataReport'],
3775
3787
  convert: (model, msg, publish, options, meta) => {
3776
3788
  const dp = msg.data.dp; // First we get the data point ID
3777
3789
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -3886,7 +3898,7 @@ const converters = {
3886
3898
  },
3887
3899
  tuya_air_quality: {
3888
3900
  cluster: 'manuSpecificTuya',
3889
- type: ['commandSetDataResponse', 'commandGetData'],
3901
+ type: ['commandDataReport', 'commandDataResponse'],
3890
3902
  options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
3891
3903
  exposes.options.precision('humidity'), exposes.options.calibration('humidity'),
3892
3904
  exposes.options.precision('co2'), exposes.options.calibration('co2'),
@@ -3915,7 +3927,7 @@ const converters = {
3915
3927
  },
3916
3928
  saswell_thermostat: {
3917
3929
  cluster: 'manuSpecificTuya',
3918
- type: ['commandGetData', 'commandSetDataResponse'],
3930
+ type: ['commandDataResponse', 'commandDataReport'],
3919
3931
  convert: (model, msg, publish, options, meta) => {
3920
3932
  const dp = msg.data.dp;
3921
3933
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -4036,7 +4048,7 @@ const converters = {
4036
4048
  },
4037
4049
  etop_thermostat: {
4038
4050
  cluster: 'manuSpecificTuya',
4039
- type: ['commandGetData', 'commandSetDataResponse'],
4051
+ type: ['commandDataResponse', 'commandDataReport'],
4040
4052
  convert: (model, msg, publish, options, meta) => {
4041
4053
  const dp = msg.data.dp;
4042
4054
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -4085,7 +4097,7 @@ const converters = {
4085
4097
  },
4086
4098
  tuya_thermostat: {
4087
4099
  cluster: 'manuSpecificTuya',
4088
- type: ['commandGetData', 'commandSetDataResponse'],
4100
+ type: ['commandDataResponse', 'commandDataReport'],
4089
4101
  convert: (model, msg, publish, options, meta) => {
4090
4102
  const dp = msg.data.dp;
4091
4103
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -4191,7 +4203,7 @@ const converters = {
4191
4203
  },
4192
4204
  tuya_dimmer: {
4193
4205
  cluster: 'manuSpecificTuya',
4194
- type: ['commandGetData', 'commandSetDataResponse'],
4206
+ type: ['commandDataResponse', 'commandDataReport'],
4195
4207
  convert: (model, msg, publish, options, meta) => {
4196
4208
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
4197
4209
  if (msg.data.dp === tuya.dataPoints.state) {
@@ -4208,7 +4220,7 @@ const converters = {
4208
4220
  },
4209
4221
  tuya_data_point_dump: {
4210
4222
  cluster: 'manuSpecificTuya',
4211
- type: ['commandGetData', 'commandSetDataResponse', 'commandActiveStatusReport'],
4223
+ type: ['commandDataResponse', 'commandDataReport', 'commandActiveStatusReport'],
4212
4224
  convert: (model, msg, publis, options, meta) => {
4213
4225
  // Don't use in production!
4214
4226
  // Used in: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_tuya_devices.html
@@ -4222,8 +4234,7 @@ const converters = {
4222
4234
  let dataStr =
4223
4235
  Date.now().toString() + ' ' +
4224
4236
  meta.device.ieeeAddr + ' ' +
4225
- getHex(msg.data.status) + ' ' +
4226
- getHex(msg.data.transid) + ' ' +
4237
+ getHex(msg.data.seq) + ' ' +
4227
4238
  getHex(msg.data.dp) + ' ' +
4228
4239
  getHex(msg.data.datatype) + ' ' +
4229
4240
  getHex(msg.data.fn);
@@ -4274,7 +4285,7 @@ const converters = {
4274
4285
  },
4275
4286
  blitzwolf_occupancy_with_timeout: {
4276
4287
  cluster: 'manuSpecificTuya',
4277
- type: 'commandGetData',
4288
+ type: 'commandDataResponse',
4278
4289
  convert: (model, msg, publish, options, meta) => {
4279
4290
  msg.data.occupancy = msg.data.dp === tuya.dataPoints.occupancy ? 1 : 0;
4280
4291
  return converters.occupancy_with_timeout.convert(model, msg, publish, options, meta);
@@ -4568,7 +4579,7 @@ const converters = {
4568
4579
  },
4569
4580
  frankever_valve: {
4570
4581
  cluster: 'manuSpecificTuya',
4571
- type: ['commandGetData', 'commandSetDataResponse', 'commandActiveStatusReport'],
4582
+ type: ['commandDataResponse', 'commandDataReport', 'commandActiveStatusReport'],
4572
4583
  convert: (model, msg, publish, options, meta) => {
4573
4584
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
4574
4585
  const dp = msg.data.dp;
@@ -4591,7 +4602,7 @@ const converters = {
4591
4602
  },
4592
4603
  tuya_smoke: {
4593
4604
  cluster: 'manuSpecificTuya',
4594
- type: ['commandGetData'],
4605
+ type: ['commandDataResponse'],
4595
4606
  convert: (model, msg, publish, options, meta) => {
4596
4607
  const dp = msg.data.dp;
4597
4608
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -4605,7 +4616,7 @@ const converters = {
4605
4616
  },
4606
4617
  tuya_woox_smoke: {
4607
4618
  cluster: 'manuSpecificTuya',
4608
- type: ['commandGetData'],
4619
+ type: ['commandDataResponse'],
4609
4620
  convert: (model, msg, publish, options, meta) => {
4610
4621
  const dp = msg.data.dp;
4611
4622
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -4623,7 +4634,7 @@ const converters = {
4623
4634
  },
4624
4635
  tuya_switch: {
4625
4636
  cluster: 'manuSpecificTuya',
4626
- type: ['commandSetDataResponse', 'commandGetData', 'commandActiveStatusReport'],
4637
+ type: ['commandDataReport', 'commandDataResponse', 'commandActiveStatusReport'],
4627
4638
  convert: (model, msg, publish, options, meta) => {
4628
4639
  const multiEndpoint = model.meta && model.meta.multiEndpoint;
4629
4640
  const dp = msg.data.dp;
@@ -4643,7 +4654,7 @@ const converters = {
4643
4654
  },
4644
4655
  tuya_dinrail_switch: {
4645
4656
  cluster: 'manuSpecificTuya',
4646
- type: ['commandSetDataResponse', 'commandGetData', 'commandActiveStatusReport'],
4657
+ type: ['commandDataReport', 'commandDataResponse', 'commandActiveStatusReport'],
4647
4658
  convert: (model, msg, publish, options, meta) => {
4648
4659
  const dp = msg.data.dp;
4649
4660
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -4975,8 +4986,19 @@ const converters = {
4975
4986
  payload.voltage = value;
4976
4987
  payload.battery = batteryVoltageToPercentage(value, '3V_2100');
4977
4988
  } else if (index === 3) payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
4978
- else if (index === 100) payload.state = value === 1 ? 'ON' : 'OFF'; // 0x64
4979
- else if (index === 149) {
4989
+ else if (index === 100) {
4990
+ if (['QBKG19LM', 'QBKG20LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
4991
+ const mapping = model.model === 'QBCZ15LM' ? 'relay' : 'left';
4992
+ payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
4993
+ } else {
4994
+ payload.state = value === 1 ? 'ON' : 'OFF';
4995
+ }
4996
+ } else if (index === 101) {
4997
+ if (['QBKG19LM', 'QBKG20LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
4998
+ const mapping = model.model === 'QBCZ15LM' ? 'usb' : 'right';
4999
+ payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
5000
+ }
5001
+ } else if (index === 149) {
4980
5002
  payload.energy = precisionRound(value, 2); // 0x95
4981
5003
  // Consumption is deprecated
4982
5004
  payload.consumption = payload.energy;
@@ -5997,7 +6019,7 @@ const converters = {
5997
6019
  },
5998
6020
  javis_microwave_sensor: {
5999
6021
  cluster: 'manuSpecificTuya',
6000
- type: ['commandSetDataResponse', 'commandGetData'],
6022
+ type: ['commandDataReport', 'commandDataResponse'],
6001
6023
  convert: (model, msg, publish, options, meta) => {
6002
6024
  const dp = msg.data.dp;
6003
6025
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -6204,7 +6226,7 @@ const converters = {
6204
6226
  },
6205
6227
  ZVG1: {
6206
6228
  cluster: 'manuSpecificTuya',
6207
- type: 'commandGetData',
6229
+ type: 'commandDataResponse',
6208
6230
  convert: (model, msg, publish, options, meta) => {
6209
6231
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
6210
6232
  const dp = msg.data.dp;
@@ -6768,7 +6790,7 @@ const converters = {
6768
6790
  },
6769
6791
  SLUXZB: {
6770
6792
  cluster: 'manuSpecificTuya',
6771
- type: ['commandGetData', 'commandSetDataResponse'],
6793
+ type: ['commandDataResponse', 'commandDataReport'],
6772
6794
  convert: (model, msg, publish, options, meta) => {
6773
6795
  const dp = msg.data.dp;
6774
6796
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -6851,7 +6873,7 @@ const converters = {
6851
6873
  },
6852
6874
  tuya_gas: {
6853
6875
  cluster: 'manuSpecificTuya',
6854
- type: ['commandGetData'],
6876
+ type: ['commandDataResponse'],
6855
6877
  convert: (model, msg, publish, options, meta) => {
6856
6878
  const dp = msg.data.dp;
6857
6879
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -7221,7 +7243,7 @@ const converters = {
7221
7243
  },
7222
7244
  tuya_motion_sensor: {
7223
7245
  cluster: 'manuSpecificTuya',
7224
- type: ['commandGetData'],
7246
+ type: ['commandDataResponse'],
7225
7247
  convert: (model, msg, publish, options, meta) => {
7226
7248
  const dp = msg.data.dp;
7227
7249
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -7269,7 +7291,7 @@ const converters = {
7269
7291
  },
7270
7292
  tuya_radar_sensor: {
7271
7293
  cluster: 'manuSpecificTuya',
7272
- type: ['commandGetData', 'commandSetDataResponse'],
7294
+ type: ['commandDataResponse', 'commandDataReport'],
7273
7295
  convert: (model, msg, publish, options, meta) => {
7274
7296
  const dp = msg.data.dp;
7275
7297
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -7293,7 +7315,7 @@ const converters = {
7293
7315
  },
7294
7316
  moes_thermostat_tv: {
7295
7317
  cluster: 'manuSpecificTuya',
7296
- type: ['commandGetData', 'commandSetDataResponse', 'raw'],
7318
+ type: ['commandDataResponse', 'commandDataReport', 'raw'],
7297
7319
  convert: (model, msg, publish, options, meta) => {
7298
7320
  const dp = msg.data.dp;
7299
7321
  let value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -7402,7 +7424,7 @@ const converters = {
7402
7424
  },
7403
7425
  hoch_din: {
7404
7426
  cluster: 'manuSpecificTuya',
7405
- type: ['commandGetData', 'commandSetDataResponse'],
7427
+ type: ['commandDataResponse', 'commandDataReport'],
7406
7428
  convert: (model, msg, publish, options, meta) => {
7407
7429
  const dp = msg.data.dp;
7408
7430
  const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
@@ -7703,7 +7725,7 @@ const converters = {
7703
7725
  },
7704
7726
  ignore_tuya_set_time: {
7705
7727
  cluster: 'manuSpecificTuya',
7706
- type: ['commandSetTimeRequest'],
7728
+ type: ['commandMcuSyncTime'],
7707
7729
  convert: (model, msg, publish, options, meta) => null,
7708
7730
  },
7709
7731
  // #endregion
@@ -3155,7 +3155,7 @@ const converters = {
3155
3155
  key: ['state'],
3156
3156
  convertSet: async (entity, key, value, meta) => {
3157
3157
  // Always use same transid as tuya_dimmer_level (https://github.com/Koenkk/zigbee2mqtt/issues/6366)
3158
- await tuya.sendDataPointBool(entity, tuya.dataPoints.state, value === 'ON', 'setData', 1);
3158
+ await tuya.sendDataPointBool(entity, tuya.dataPoints.state, value === 'ON', 'dataRequest', 1);
3159
3159
  },
3160
3160
  },
3161
3161
  tuya_dimmer_level: {
@@ -3194,7 +3194,7 @@ const converters = {
3194
3194
  }
3195
3195
  }
3196
3196
  // Always use same transid as tuya_dimmer_state (https://github.com/Koenkk/zigbee2mqtt/issues/6366)
3197
- await tuya.sendDataPointValue(entity, dp, newValue, 'setData', 1);
3197
+ await tuya.sendDataPointValue(entity, dp, newValue, 'dataRequest', 1);
3198
3198
  },
3199
3199
  },
3200
3200
  tuya_switch_state: {
@@ -3239,7 +3239,7 @@ const converters = {
3239
3239
  convertSet: async (entity, key, value, meta) => {
3240
3240
  // input to multiple of 10 with max value of 100
3241
3241
  const thresh = Math.abs(Math.min(10 * (Math.floor(value / 10)), 100));
3242
- await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTreshold, thresh, 'setData', 1);
3242
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTreshold, thresh, 'dataRequest', 1);
3243
3243
  return {state: {threshold: value}};
3244
3244
  },
3245
3245
  },
@@ -3249,7 +3249,7 @@ const converters = {
3249
3249
  // input in minutes with maximum of 600 minutes (equals 10 hours)
3250
3250
  const timer = 60 * Math.abs(Math.min(value, 600));
3251
3251
  // sendTuyaDataPoint* functions take care of converting the data to proper format
3252
- await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTimer, timer, 'setData', 1);
3252
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.frankEverTimer, timer, 'dataRequest', 1);
3253
3253
  return {state: {timer: value}};
3254
3254
  },
3255
3255
  },
@@ -3318,7 +3318,7 @@ const converters = {
3318
3318
  // input in minutes with maximum of 600 minutes (equals 10 hours)
3319
3319
  const timer = 60 * Math.abs(Math.min(value, 600));
3320
3320
  // sendTuyaDataPoint* functions take care of converting the data to proper format
3321
- await tuya.sendDataPointValue(entity, 11, timer, 'setData', 1);
3321
+ await tuya.sendDataPointValue(entity, 11, timer, 'dataRequest', 1);
3322
3322
  return {state: {timer: value}};
3323
3323
  },
3324
3324
  },
@@ -3328,7 +3328,7 @@ const converters = {
3328
3328
  let timerState = 2;
3329
3329
  if (value === 'disabled') timerState = 0;
3330
3330
  else if (value === 'active') timerState = 1;
3331
- await tuya.sendDataPointValue(entity, 11, timerState, 'setData', 1);
3331
+ await tuya.sendDataPointValue(entity, 11, timerState, 'dataRequest', 1);
3332
3332
  return {state: {timer_state: value}};
3333
3333
  },
3334
3334
  },
@@ -4973,6 +4973,27 @@ const converters = {
4973
4973
  }
4974
4974
  },
4975
4975
  },
4976
+ nous_lcd_temperature_humidity_sensor: {
4977
+ key: ['min_temperature', 'max_temperature', 'temperature_sensitivity', 'temperature_unit_convert'],
4978
+ convertSet: async (entity, key, value, meta) => {
4979
+ switch (key) {
4980
+ case 'temperature_unit_convert':
4981
+ await tuya.sendDataPointEnum(entity, tuya.dataPoints.nousTempUnitConvert, ['°C', '°F'].indexOf(value));
4982
+ break;
4983
+ case 'min_temperature':
4984
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMinTemp, Math.round(value * 10));
4985
+ break;
4986
+ case 'max_temperature':
4987
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMaxTemp, Math.round(value * 10));
4988
+ break;
4989
+ case 'temperature_sensitivity':
4990
+ await tuya.sendDataPointValue(entity, tuya.dataPoints.nousTempSensitivity, Math.round(value * 10));
4991
+ break;
4992
+ default: // Unknown key
4993
+ meta.logger.warn(`Unhandled key ${key}`);
4994
+ }
4995
+ },
4996
+ },
4976
4997
  heiman_ir_remote: {
4977
4998
  key: ['send_key', 'create', 'learn', 'delete', 'get_list'],
4978
4999
  convertSet: async (entity, key, value, meta) => {
@@ -6110,18 +6131,18 @@ const converters = {
6110
6131
 
6111
6132
  switch (key) {
6112
6133
  case 'state':
6113
- await tuya.sendDataPointBool(entity, stateKeyId, value === 'ON', 'setData', 1);
6134
+ await tuya.sendDataPointBool(entity, stateKeyId, value === 'ON', 'dataRequest', 1);
6114
6135
  break;
6115
6136
 
6116
6137
  case 'brightness':
6117
6138
  if (value >= 0 && value <= 254) {
6118
6139
  const newValue = utils.mapNumberRange(value, 0, 254, 0, 1000);
6119
6140
  if (newValue === 0) {
6120
- await tuya.sendDataPointBool(entity, stateKeyId, false, 'setData', 1);
6141
+ await tuya.sendDataPointBool(entity, stateKeyId, false, 'dataRequest', 1);
6121
6142
  } else {
6122
- await tuya.sendDataPointBool(entity, stateKeyId, true, 'setData', 1);
6143
+ await tuya.sendDataPointBool(entity, stateKeyId, true, 'dataRequest', 1);
6123
6144
  }
6124
- await tuya.sendDataPointValue(entity, brightnessKeyId, newValue, 'setData', 1);
6145
+ await tuya.sendDataPointValue(entity, brightnessKeyId, newValue, 'dataRequest', 1);
6125
6146
  break;
6126
6147
  } else {
6127
6148
  throw new Error('Dimmer brightness is out of range 0..254');
package/devices/bitron.js CHANGED
@@ -190,7 +190,7 @@ module.exports = [
190
190
  tz.thermostat_running_state, tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode],
191
191
  exposes: [e.battery(), exposes.climate().withSetpoint('occupied_heating_setpoint', 7, 30, 0.5).withLocalTemperature()
192
192
  .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat', 'cool'])
193
- .withLocalTemperatureCalibration(-20, 20, 1), e.keypad_lockout()],
193
+ .withLocalTemperatureCalibration(-30, 30, 0.1), e.keypad_lockout()],
194
194
  meta: {battery: {voltageToPercentage: '3V_2500_3200'}},
195
195
  configure: async (device, coordinatorEndpoint, logger) => {
196
196
  const endpoint = device.getEndpoint(1);
@@ -175,7 +175,7 @@ module.exports = [
175
175
  .withSystemMode(['off', 'heat', 'cool', 'emergency_heating'])
176
176
  .withRunningState(['idle', 'heat', 'cool', 'fan_only']).withFanMode(['auto', 'on'])
177
177
  .withSetpoint('occupied_cooling_setpoint', 10, 30, 1)
178
- .withLocalTemperatureCalibration(-20, 20, 1)],
178
+ .withLocalTemperatureCalibration(-30, 30, 0.1)],
179
179
  meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
180
180
  configure: async (device, coordinatorEndpoint, logger) => {
181
181
  const endpoint = device.getEndpoint(1);
@@ -201,7 +201,7 @@ module.exports = [
201
201
  .withSystemMode(['off', 'heat', 'cool', 'emergency_heating'])
202
202
  .withRunningState(['idle', 'heat', 'cool', 'fan_only']).withFanMode(['auto', 'on'])
203
203
  .withSetpoint('occupied_cooling_setpoint', 10, 30, 1)
204
- .withLocalTemperatureCalibration(-20, 20, 1)],
204
+ .withLocalTemperatureCalibration(-30, 30, 0.1)],
205
205
  meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
206
206
  configure: async (device, coordinatorEndpoint, logger) => {
207
207
  const endpoint = device.getEndpoint(1);
@@ -269,4 +269,46 @@ module.exports = [
269
269
  },
270
270
  exposes: [e.soil_moisture(), e.battery()],
271
271
  },
272
+ {
273
+ zigbeeModel: ['EFEKTA_eON213wz'],
274
+ model: 'EFEKTA_eON213wz',
275
+ vendor: 'Custom devices (DiY)',
276
+ description: '[Mini weather station, digital barometer, forecast, charts, temperature, humidity](http://efektalab.com/eON213wz)',
277
+ fromZigbee: [fz.temperature, fz.humidity, fz.pressure, fz.battery],
278
+ toZigbee: [tz.factory_reset],
279
+ configure: async (device, coordinatorEndpoint, logger) => {
280
+ const endpoint = device.getEndpoint(1);
281
+ await reporting.bind(endpoint, coordinatorEndpoint, [
282
+ 'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement']);
283
+ const overides = {min: 0, max: 21600, change: 0};
284
+ await reporting.batteryVoltage(endpoint, overides);
285
+ await reporting.batteryPercentageRemaining(endpoint, overides);
286
+ await reporting.temperature(endpoint, overides);
287
+ await reporting.humidity(endpoint, overides);
288
+ await reporting.pressureExtended(endpoint, overides);
289
+ await endpoint.read('msPressureMeasurement', ['scale']);
290
+ },
291
+ exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure()],
292
+ },
293
+ {
294
+ zigbeeModel: ['EFEKTA_THP'],
295
+ model: 'EFEKTA_THP',
296
+ vendor: 'Custom devices (DiY)',
297
+ description: '[DIY temperature, humidity and atmospheric pressure sensor, long battery life](http://efektalab.com/eON_THP)',
298
+ fromZigbee: [fz.temperature, fz.humidity, fz.pressure, fz.battery],
299
+ toZigbee: [tz.factory_reset],
300
+ configure: async (device, coordinatorEndpoint, logger) => {
301
+ const endpoint = device.getEndpoint(1);
302
+ await reporting.bind(endpoint, coordinatorEndpoint, [
303
+ 'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement']);
304
+ const overides = {min: 0, max: 21600, change: 0};
305
+ await reporting.batteryVoltage(endpoint, overides);
306
+ await reporting.batteryPercentageRemaining(endpoint, overides);
307
+ await reporting.temperature(endpoint, overides);
308
+ await reporting.humidity(endpoint, overides);
309
+ await reporting.pressureExtended(endpoint, overides);
310
+ await endpoint.read('msPressureMeasurement', ['scale']);
311
+ },
312
+ exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure()],
313
+ },
272
314
  ];
package/devices/ecozy.js CHANGED
@@ -19,7 +19,7 @@ module.exports = [
19
19
  tz.thermostat_pi_heating_demand, tz.thermostat_running_state],
20
20
  exposes: [e.battery(), exposes.climate().withSetpoint('occupied_heating_setpoint', 7, 30, 1).withLocalTemperature()
21
21
  .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])
22
- .withLocalTemperatureCalibration(-20, 20, 1)
22
+ .withLocalTemperatureCalibration(-30, 30, 0.1)
23
23
  .withPiHeatingDemand(ea.STATE_GET)],
24
24
  configure: async (device, coordinatorEndpoint, logger) => {
25
25
  const endpoint = device.getEndpoint(3);
package/devices/elko.js CHANGED
@@ -45,7 +45,7 @@ module.exports = [
45
45
  '(quick) wooden floors.'),
46
46
  exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 50, 1)
47
47
  .withLocalTemperature(ea.STATE)
48
- .withLocalTemperatureCalibration(-20, 20, 1)
48
+ .withLocalTemperatureCalibration(-30, 30, 0.1)
49
49
  .withSystemMode(['off', 'heat']).withRunningState(['idle', 'heat'])
50
50
  .withSensor(['air', 'floor', 'supervisor_floor']),
51
51
  exposes.numeric('floor_temp', ea.STATE_GET).withUnit('°C')
@@ -20,7 +20,7 @@ module.exports = [
20
20
  tz.eurotronic_current_heating_setpoint, tz.eurotronic_trv_mode, tz.eurotronic_valve_position],
21
21
  exposes: [e.battery(), exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
22
22
  .withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])
23
- .withLocalTemperatureCalibration(-20, 20, 1)
23
+ .withLocalTemperatureCalibration(-30, 30, 0.1)
24
24
  .withPiHeatingDemand(),
25
25
  exposes.enum('trv_mode', exposes.access.ALL, [1, 2])
26
26
  .withDescription('Select between direct control of the valve via the `valve_position` or automatic control of the '+
@@ -20,6 +20,21 @@ module.exports = [
20
20
  device.skipDefaultResponse = true;
21
21
  },
22
22
  },
23
+ {
24
+ zigbeeModel: ['SWITCH-ZR02'],
25
+ model: 'SWITCH-ZR02',
26
+ vendor: 'eWeLink',
27
+ description: 'Zigbee smart switch',
28
+ extend: extend.switch(),
29
+ fromZigbee: [fz.on_off_skip_duplicate_transaction],
30
+ configure: async (device, coordinatorEndpoint, logger) => {
31
+ const endpoint = device.getEndpoint(1);
32
+ await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
33
+ },
34
+ onEvent: async (type, data, device) => {
35
+ device.skipDefaultResponse = true;
36
+ },
37
+ },
23
38
  {
24
39
  zigbeeModel: ['ZB-SW01'],
25
40
  model: 'ZB-SW01',
package/devices/hgkg.js CHANGED
@@ -17,7 +17,7 @@ module.exports = [
17
17
  tz.moes_thermostat_deadzone_temperature, tz.moes_thermostat_max_temperature_limit],
18
18
  exposes: [e.child_lock(), e.deadzone_temperature(), e.max_temperature_limit(),
19
19
  exposes.climate().withSetpoint('current_heating_setpoint', 5, 30, 1, ea.STATE_SET)
20
- .withLocalTemperature(ea.STATE).withLocalTemperatureCalibration(-20, 20, 1, ea.STATE_SET)
20
+ .withLocalTemperature(ea.STATE).withLocalTemperatureCalibration(-30, 30, 0.1, ea.STATE_SET)
21
21
  .withSystemMode(['off', 'cool'], ea.STATE_SET).withRunningState(['idle', 'heat', 'cool'], ea.STATE)
22
22
  .withPreset(['hold', 'program']).withSensor(['IN', 'AL', 'OU'], ea.STATE_SET)],
23
23
  onEvent: tuya.onEventSetLocalTime,