zigbee-herdsman-converters 14.0.500 → 14.0.501
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.
- package/converters/fromZigbee.js +32 -18
- package/converters/toZigbee.js +12 -3
- package/devices/neo.js +20 -11
- package/devices/nue_3a.js +1 -1
- package/devices/tuya.js +3 -2
- package/devices/xiaomi.js +4 -2
- package/lib/tuya.js +4 -0
- package/lib/xiaomi.js +8 -3
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -2562,42 +2562,51 @@ const converters = {
|
|
|
2562
2562
|
const dpValue = tuya.firstDpValue(msg, meta, 'neo_nas_pd07');
|
|
2563
2563
|
const dp = dpValue.dp;
|
|
2564
2564
|
const value = tuya.getDataValue(dpValue);
|
|
2565
|
-
|
|
2566
|
-
|
|
2565
|
+
switch (dp) {
|
|
2566
|
+
case tuya.dataPoints.neoOccupancy:
|
|
2567
|
+
return {occupancy: value > 0 ? true : false};
|
|
2568
|
+
case 102:
|
|
2567
2569
|
return {
|
|
2568
2570
|
power_type: {0: 'battery_full', 1: 'battery_high', 2: 'battery_medium', 3: 'battery_low', 4: 'usb'}[value],
|
|
2569
2571
|
battery_low: value === 3,
|
|
2570
2572
|
};
|
|
2571
|
-
|
|
2573
|
+
case tuya.dataPoints.neoTamper:
|
|
2572
2574
|
return {tamper: value > 0 ? true : false};
|
|
2573
|
-
|
|
2575
|
+
case 104:
|
|
2574
2576
|
return {temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
2575
|
-
|
|
2577
|
+
case 105:
|
|
2576
2578
|
return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
|
|
2577
|
-
|
|
2579
|
+
case tuya.dataPoints.neoMinTemp:
|
|
2578
2580
|
return {temperature_min: value};
|
|
2579
|
-
|
|
2581
|
+
case tuya.dataPoints.neoMaxTemp:
|
|
2580
2582
|
return {temperature_max: value};
|
|
2581
|
-
|
|
2583
|
+
case tuya.dataPoints.neoMinHumidity:
|
|
2582
2584
|
return {humidity_min: value};
|
|
2583
|
-
|
|
2585
|
+
case tuya.dataPoints.neoMaxHumidity:
|
|
2584
2586
|
return {humidity_max: value};
|
|
2585
|
-
|
|
2587
|
+
case tuya.dataPoints.neoTempScale:
|
|
2588
|
+
return {temperature_scale: value ? '°C' : '°F'};
|
|
2589
|
+
case 111:
|
|
2590
|
+
return {unknown_111: value ? 'ON' : 'OFF'};
|
|
2591
|
+
case 112:
|
|
2592
|
+
return {unknown_112: value ? 'ON' : 'OFF'};
|
|
2593
|
+
case tuya.dataPoints.neoTempHumidityAlarm:
|
|
2586
2594
|
return {alarm: {0: 'over_temperature', 1: 'over_humidity',
|
|
2587
2595
|
2: 'below_min_temperature', 3: 'below_min_humdity', 4: 'off'}[value]};
|
|
2588
|
-
|
|
2589
|
-
meta.logger.warn(`
|
|
2596
|
+
default: // Unknown code
|
|
2597
|
+
meta.logger.warn(`fz.neo_nas_pd07: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
|
|
2590
2598
|
}
|
|
2591
2599
|
},
|
|
2592
2600
|
},
|
|
2593
2601
|
neo_t_h_alarm: {
|
|
2594
2602
|
cluster: 'manuSpecificTuya',
|
|
2595
2603
|
type: ['commandDataReport', 'commandDataResponse'],
|
|
2604
|
+
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
2605
|
+
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
2596
2606
|
convert: (model, msg, publish, options, meta) => {
|
|
2597
2607
|
const dpValue = tuya.firstDpValue(msg, meta, 'neo_t_h_alarm');
|
|
2598
2608
|
const dp = dpValue.dp;
|
|
2599
2609
|
const value = tuya.getDataValue(dpValue);
|
|
2600
|
-
|
|
2601
2610
|
switch (dp) {
|
|
2602
2611
|
case tuya.dataPoints.neoAlarm:
|
|
2603
2612
|
return {alarm: value};
|
|
@@ -2610,9 +2619,9 @@ const converters = {
|
|
|
2610
2619
|
case tuya.dataPoints.neoDuration: // 0x0267 [0,0,0,10] duration alarm in second
|
|
2611
2620
|
return {duration: value};
|
|
2612
2621
|
case tuya.dataPoints.neoTemp: // 0x0269 [0,0,0,240] temperature
|
|
2613
|
-
return {temperature: (value / 10)
|
|
2622
|
+
return {temperature: calibrateAndPrecisionRoundOptions((value / 10), options, 'temperature')};
|
|
2614
2623
|
case tuya.dataPoints.neoHumidity: // 0x026A [0,0,0,36] humidity
|
|
2615
|
-
return {humidity: value};
|
|
2624
|
+
return {humidity: calibrateAndPrecisionRoundOptions(value, options, 'humidity')};
|
|
2616
2625
|
case tuya.dataPoints.neoMinTemp: // 0x026B [0,0,0,18] min alarm temperature
|
|
2617
2626
|
return {temperature_min: value};
|
|
2618
2627
|
case tuya.dataPoints.neoMaxTemp: // 0x026C [0,0,0,27] max alarm temperature
|
|
@@ -2633,7 +2642,7 @@ const converters = {
|
|
|
2633
2642
|
case tuya.dataPoints.neoVolume: // 0x0474 [0]/[1]/[2] Volume 0-max, 2-low
|
|
2634
2643
|
return {volume: {2: 'low', 1: 'medium', 0: 'high'}[value]};
|
|
2635
2644
|
default: // Unknown code
|
|
2636
|
-
meta.logger.warn(`Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
|
|
2645
|
+
meta.logger.warn(`fz.neo_t_h_alarm: Unhandled DP #${dp}: ${JSON.stringify(dpValue)}`);
|
|
2637
2646
|
}
|
|
2638
2647
|
},
|
|
2639
2648
|
},
|
|
@@ -4309,14 +4318,19 @@ const converters = {
|
|
|
4309
4318
|
// DP2: Smart Air Box: co2, Smart Air Housekeeper: MP25
|
|
4310
4319
|
case tuya.dataPoints.tuyaSabCO2:
|
|
4311
4320
|
if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
|
|
4321
|
+
if (value === 0xaaab) return; // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
|
|
4312
4322
|
return {pm25: calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
|
|
4313
4323
|
} else if (meta.device.manufacturerName === '_TZE200_ryfmq5rl') {
|
|
4314
|
-
return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
|
|
4324
|
+
return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd') / 100};
|
|
4315
4325
|
} else {
|
|
4316
4326
|
return {co2: calibrateAndPrecisionRoundOptions(value, options, 'co2')};
|
|
4317
4327
|
}
|
|
4318
4328
|
case tuya.dataPoints.tuyaSabVOC:
|
|
4319
|
-
|
|
4329
|
+
if (meta.device.manufacturerName === '_TZE200_ryfmq5rl') {
|
|
4330
|
+
return {voc: calibrateAndPrecisionRoundOptions(value, options, 'voc') / 10};
|
|
4331
|
+
} else {
|
|
4332
|
+
return {voc: calibrateAndPrecisionRoundOptions(value, options, 'voc')};
|
|
4333
|
+
}
|
|
4320
4334
|
case tuya.dataPoints.tuyaSahkFormaldehyd:
|
|
4321
4335
|
return {formaldehyd: calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
|
|
4322
4336
|
default:
|
package/converters/toZigbee.js
CHANGED
|
@@ -5531,7 +5531,7 @@ const converters = {
|
|
|
5531
5531
|
},
|
|
5532
5532
|
},
|
|
5533
5533
|
neo_nas_pd07: {
|
|
5534
|
-
key: ['temperature_max', 'temperature_min', 'humidity_max', 'humidity_min'],
|
|
5534
|
+
key: ['temperature_max', 'temperature_min', 'humidity_max', 'humidity_min', 'temperature_scale', 'unknown_111', 'unknown_112'],
|
|
5535
5535
|
convertSet: async (entity, key, value, meta) => {
|
|
5536
5536
|
switch (key) {
|
|
5537
5537
|
case 'temperature_max':
|
|
@@ -5546,8 +5546,17 @@ const converters = {
|
|
|
5546
5546
|
case 'humidity_min':
|
|
5547
5547
|
await tuya.sendDataPointValue(entity, tuya.dataPoints.neoMinHumidity, value);
|
|
5548
5548
|
break;
|
|
5549
|
+
case 'temperature_scale':
|
|
5550
|
+
await tuya.sendDataPointBool(entity, tuya.dataPoints.neoTempScale, value === '°C');
|
|
5551
|
+
break;
|
|
5552
|
+
case 'unknown_111':
|
|
5553
|
+
await tuya.sendDataPointBool(entity, 111, value === 'ON');
|
|
5554
|
+
break;
|
|
5555
|
+
case 'unknown_112':
|
|
5556
|
+
await tuya.sendDataPointBool(entity, 112, value === 'ON');
|
|
5557
|
+
break;
|
|
5549
5558
|
default: // Unknown key
|
|
5550
|
-
throw new Error(`
|
|
5559
|
+
throw new Error(`tz.neo_nas_pd07: Unhandled key ${key}`);
|
|
5551
5560
|
}
|
|
5552
5561
|
},
|
|
5553
5562
|
},
|
|
@@ -5593,7 +5602,7 @@ const converters = {
|
|
|
5593
5602
|
await tuya.sendDataPointBool(entity, tuya.dataPoints.neoHumidityAlarm, value);
|
|
5594
5603
|
break;
|
|
5595
5604
|
default: // Unknown key
|
|
5596
|
-
throw new Error(`Unhandled key ${key}`);
|
|
5605
|
+
throw new Error(`tz.neo_t_h_alarm: Unhandled key ${key}`);
|
|
5597
5606
|
}
|
|
5598
5607
|
},
|
|
5599
5608
|
},
|
package/devices/neo.js
CHANGED
|
@@ -12,18 +12,18 @@ module.exports = [
|
|
|
12
12
|
model: 'NAS-AB02B0',
|
|
13
13
|
vendor: 'Neo',
|
|
14
14
|
description: 'Temperature & humidity sensor and alarm',
|
|
15
|
-
fromZigbee: [fz.neo_t_h_alarm, fz.ignore_basic_report],
|
|
15
|
+
fromZigbee: [fz.neo_t_h_alarm, fz.ignore_basic_report, fz.ignore_tuya_set_time],
|
|
16
16
|
toZigbee: [tz.neo_t_h_alarm],
|
|
17
17
|
exposes: [
|
|
18
18
|
e.temperature(), e.humidity(), exposes.binary('humidity_alarm', ea.STATE_SET, true, false), e.battery_low(),
|
|
19
19
|
exposes.binary('temperature_alarm', ea.STATE_SET, true, false),
|
|
20
20
|
exposes.binary('alarm', ea.STATE_SET, true, false),
|
|
21
21
|
exposes.enum('melody', ea.STATE_SET, Array.from(Array(18).keys()).map((x)=>(x+1).toString())),
|
|
22
|
-
exposes.numeric('duration', ea.STATE_SET).withUnit('second').withValueMin(0).withValueMax(
|
|
23
|
-
exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-
|
|
24
|
-
exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-
|
|
25
|
-
exposes.numeric('humidity_min', ea.STATE_SET).withUnit('%').withValueMin(
|
|
26
|
-
exposes.numeric('humidity_max', ea.STATE_SET).withUnit('%').withValueMin(
|
|
22
|
+
exposes.numeric('duration', ea.STATE_SET).withUnit('second').withValueMin(0).withValueMax(1800),
|
|
23
|
+
exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
|
|
24
|
+
exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
|
|
25
|
+
exposes.numeric('humidity_min', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
|
|
26
|
+
exposes.numeric('humidity_max', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
|
|
27
27
|
exposes.enum('volume', ea.STATE_SET, ['low', 'medium', 'high']),
|
|
28
28
|
exposes.enum('power_type', ea.STATE, ['battery_full', 'battery_high', 'battery_medium', 'battery_low', 'usb']),
|
|
29
29
|
],
|
|
@@ -62,16 +62,25 @@ module.exports = [
|
|
|
62
62
|
model: 'NAS-PD07',
|
|
63
63
|
vendor: 'Neo',
|
|
64
64
|
description: 'Motion, temperature & humidity sensor',
|
|
65
|
-
fromZigbee: [fz.neo_nas_pd07],
|
|
65
|
+
fromZigbee: [fz.neo_nas_pd07, fz.ignore_tuya_set_time],
|
|
66
66
|
toZigbee: [tz.neo_nas_pd07],
|
|
67
67
|
onEvent: tuya.onEventSetTime,
|
|
68
68
|
exposes: [e.occupancy(), e.humidity(), e.temperature(), e.tamper(), e.battery_low(),
|
|
69
69
|
exposes.enum('power_type', ea.STATE, ['battery_full', 'battery_high', 'battery_medium', 'battery_low', 'usb']),
|
|
70
70
|
exposes.enum('alarm', ea.STATE, ['over_temperature', 'over_humidity', 'below_min_temperature', 'below_min_humdity', 'off'])
|
|
71
71
|
.withDescription('Temperature/humidity alarm status'),
|
|
72
|
-
exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-
|
|
73
|
-
exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-
|
|
74
|
-
exposes.
|
|
75
|
-
exposes.numeric('
|
|
72
|
+
exposes.numeric('temperature_min', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
|
|
73
|
+
exposes.numeric('temperature_max', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(80),
|
|
74
|
+
exposes.binary('temperature_scale', ea.STATE_SET, '°C', '°F').withDescription('Temperature scale (°F/°C)'),
|
|
75
|
+
exposes.numeric('humidity_min', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
|
|
76
|
+
exposes.numeric('humidity_max', ea.STATE_SET).withUnit('%').withValueMin(1).withValueMax(100),
|
|
77
|
+
// exposes.binary('unknown_111', ea.STATE_SET, 'ON', 'OFF').withDescription('Unknown datapoint 111 (default: ON)'),
|
|
78
|
+
// exposes.binary('unknown_112', ea.STATE_SET, 'ON', 'OFF').withDescription('Unknown datapoint 112 (default: ON)')
|
|
79
|
+
],
|
|
80
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
81
|
+
const endpoint = device.getEndpoint(1);
|
|
82
|
+
await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
|
|
83
|
+
await endpoint.command('manuSpecificTuya', 'mcuVersionRequest', {'seq': 0x0002});
|
|
84
|
+
},
|
|
76
85
|
},
|
|
77
86
|
];
|
package/devices/nue_3a.js
CHANGED
|
@@ -286,7 +286,7 @@ module.exports = [
|
|
|
286
286
|
extend: extend.light_onoff_brightness_colortemp_color(),
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
|
-
zigbeeModel: ['LXN60-LS27-Z30'],
|
|
289
|
+
zigbeeModel: ['LXN60-LS27-Z30', 'FEB56-ZCW2CLX1.0'],
|
|
290
290
|
model: 'WL-SD001-9W',
|
|
291
291
|
vendor: 'Nue / 3A',
|
|
292
292
|
description: '9W RGB LED downlight',
|
package/devices/tuya.js
CHANGED
|
@@ -13,7 +13,7 @@ const utils = require('../lib/utils');
|
|
|
13
13
|
const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx', '_TZ3000_gjnozsaz',
|
|
14
14
|
'_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
|
|
15
15
|
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5', '_TZ3000_amdymr7l', '_TZ3000_z1pnpsdo', '_TZ3000_ksw8qtmt',
|
|
16
|
-
'_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh'];
|
|
16
|
+
'_TZ3000_nzkqcvvs', '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau'];
|
|
17
17
|
|
|
18
18
|
const tzLocal = {
|
|
19
19
|
TS0504B_color: {
|
|
@@ -1413,7 +1413,8 @@ module.exports = [
|
|
|
1413
1413
|
model: 'TS011F_plug_3',
|
|
1414
1414
|
description: 'Smart plug (with power monitoring by polling)',
|
|
1415
1415
|
vendor: 'TuYa',
|
|
1416
|
-
whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'}
|
|
1416
|
+
whiteLabel: [{vendor: 'VIKEFON', model: 'TS011F'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'},
|
|
1417
|
+
{vendor: 'Avatto', model: 'MIUCOT10Z'}],
|
|
1417
1418
|
ota: ota.zigbeeOTA,
|
|
1418
1419
|
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
|
|
1419
1420
|
fz.ts011f_plug_indicator_mode, fz.ts011f_plug_child_mode],
|
package/devices/xiaomi.js
CHANGED
|
@@ -844,15 +844,17 @@ module.exports = [
|
|
|
844
844
|
model: 'WSDCGQ12LM',
|
|
845
845
|
vendor: 'Xiaomi',
|
|
846
846
|
description: 'Aqara T1 temperature, humidity and pressure sensor',
|
|
847
|
-
fromZigbee: [fz.
|
|
847
|
+
fromZigbee: [fz.aqara_opple, fz.temperature, fz.humidity, fz.pressure, fz.battery],
|
|
848
848
|
toZigbee: [],
|
|
849
|
+
exposes: [e.temperature(), e.humidity(), e.pressure(), e.battery(), e.battery_voltage()],
|
|
849
850
|
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
|
|
850
851
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
851
852
|
const endpoint = device.getEndpoint(1);
|
|
852
853
|
const binds = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement'];
|
|
853
854
|
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
855
|
+
await endpoint.read('genPowerCfg', ['batteryVoltage']);
|
|
854
856
|
},
|
|
855
|
-
|
|
857
|
+
ota: ota.zigbeeOTA,
|
|
856
858
|
},
|
|
857
859
|
{
|
|
858
860
|
zigbeeModel: ['lumi.sensor_motion'],
|
package/lib/tuya.js
CHANGED
|
@@ -358,11 +358,14 @@ const dataPoints = {
|
|
|
358
358
|
moesSmaxTempSet: 108,
|
|
359
359
|
moesSminTempSet: 109,
|
|
360
360
|
// Neo T&H
|
|
361
|
+
neoOccupancy: 101,
|
|
361
362
|
neoPowerType: 101,
|
|
362
363
|
neoMelody: 102,
|
|
363
364
|
neoDuration: 103,
|
|
365
|
+
neoTamper: 103,
|
|
364
366
|
neoAlarm: 104,
|
|
365
367
|
neoTemp: 105,
|
|
368
|
+
neoTempScale: 106,
|
|
366
369
|
neoHumidity: 106,
|
|
367
370
|
neoMinTemp: 107,
|
|
368
371
|
neoMaxTemp: 108,
|
|
@@ -370,6 +373,7 @@ const dataPoints = {
|
|
|
370
373
|
neoMaxHumidity: 110,
|
|
371
374
|
neoUnknown2: 112,
|
|
372
375
|
neoTempAlarm: 113,
|
|
376
|
+
neoTempHumidityAlarm: 113,
|
|
373
377
|
neoHumidityAlarm: 114,
|
|
374
378
|
neoUnknown3: 115,
|
|
375
379
|
neoVolume: 116,
|
package/lib/xiaomi.js
CHANGED
|
@@ -158,7 +158,9 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
158
158
|
}
|
|
159
159
|
break;
|
|
160
160
|
case '3':
|
|
161
|
-
if (
|
|
161
|
+
if (['WSDCGQ12LM'].includes(model.model)) {
|
|
162
|
+
// This temperature value is ignored because with greater accuracy it is reported in key №100
|
|
163
|
+
} else if (!['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
|
|
162
164
|
payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
|
|
163
165
|
}
|
|
164
166
|
break;
|
|
@@ -200,7 +202,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
200
202
|
// We don't know what the value means for these devices.
|
|
201
203
|
// https://github.com/Koenkk/zigbee2mqtt/issues/11126
|
|
202
204
|
// https://github.com/Koenkk/zigbee2mqtt/issues/12279
|
|
203
|
-
} else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
|
|
205
|
+
} else if (['WSDCGQ01LM', 'WSDCGQ11LM', 'WSDCGQ12LM'].includes(model.model)) {
|
|
204
206
|
// https://github.com/Koenkk/zigbee2mqtt/issues/798
|
|
205
207
|
// Sometimes the sensor publishes non-realistic vales, filter these
|
|
206
208
|
const temperature = parseFloat(value) / 100.0;
|
|
@@ -242,7 +244,7 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
242
244
|
payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
|
|
243
245
|
} else if (['RTCGQ12LM', 'RTCGQ14LM'].includes(model.model)) {
|
|
244
246
|
payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
|
|
245
|
-
} else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
|
|
247
|
+
} else if (['WSDCGQ01LM', 'WSDCGQ11LM', 'WSDCGQ12LM'].includes(model.model)) {
|
|
246
248
|
// https://github.com/Koenkk/zigbee2mqtt/issues/798
|
|
247
249
|
// Sometimes the sensor publishes non-realistic vales, filter these
|
|
248
250
|
const humidity = parseFloat(value) / 100.0;
|
|
@@ -260,6 +262,9 @@ const numericAttributes2Payload = (msg, meta, model, options, dataObject) => {
|
|
|
260
262
|
payload.state_right = value === 1 ? 'ON' : 'OFF';
|
|
261
263
|
} else if (['WSDCGQ01LM', 'WSDCGQ11LM'].includes(model.model)) {
|
|
262
264
|
payload.pressure = calibrateAndPrecisionRoundOptions(value/100.0, options, 'pressure');
|
|
265
|
+
} else if (['WSDCGQ12LM'].includes(model.model)) {
|
|
266
|
+
// This pressure value is ignored because it is less accurate than reported in the 'scaledValue' attribute
|
|
267
|
+
// of the 'msPressureMeasurement' cluster
|
|
263
268
|
} else if (['RTCZCGQ11LM'].includes(model.model)) {
|
|
264
269
|
if (meta.device.applicationVersion < 50) {
|
|
265
270
|
payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
|