zigbee-herdsman-converters 14.0.433 → 14.0.434
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/devices/tuya.js +19 -2
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/devices/tuya.js
CHANGED
|
@@ -43,6 +43,18 @@ const tzLocal = {
|
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
const fzLocal = {
|
|
47
|
+
TS0201_battery: {
|
|
48
|
+
cluster: 'genPowerCfg',
|
|
49
|
+
type: ['attributeReport', 'readResponse'],
|
|
50
|
+
convert: (model, msg, publish, options, meta) => {
|
|
51
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/11470
|
|
52
|
+
if (msg.data.batteryVoltage < 30) return;
|
|
53
|
+
return fz.battery(model, msg, publish, options, meta);
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
46
58
|
module.exports = [
|
|
47
59
|
{
|
|
48
60
|
zigbeeModel: ['TS0204'],
|
|
@@ -411,7 +423,12 @@ module.exports = [
|
|
|
411
423
|
vendor: 'TuYa',
|
|
412
424
|
description: 'Socket module',
|
|
413
425
|
extend: extend.switch(),
|
|
414
|
-
whiteLabel: [{vendor: 'LoraTap', model: 'RR400ZB'}],
|
|
426
|
+
whiteLabel: [{vendor: 'LoraTap', model: 'RR400ZB'}, {vendor: 'LoraTap', model: 'SP400ZB'}],
|
|
427
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
428
|
+
const endpoint = device.getEndpoint(1);
|
|
429
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
430
|
+
await reporting.onOff(endpoint);
|
|
431
|
+
},
|
|
415
432
|
},
|
|
416
433
|
{
|
|
417
434
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_wxtp7c5y'},
|
|
@@ -649,7 +666,7 @@ module.exports = [
|
|
|
649
666
|
vendor: 'TuYa',
|
|
650
667
|
description: 'Temperature & humidity sensor with display',
|
|
651
668
|
whiteLabel: [{vendor: 'BlitzWolf', model: 'BW-IS4'}],
|
|
652
|
-
fromZigbee: [
|
|
669
|
+
fromZigbee: [fzLocal.TS0201_battery, fz.temperature, fz.humidity],
|
|
653
670
|
toZigbee: [],
|
|
654
671
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
|
|
655
672
|
},
|
package/npm-shrinkwrap.json
CHANGED