zigbee-herdsman-converters 21.23.0 → 21.25.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.
- package/CHANGELOG.md +45 -0
- package/converters/toZigbee.d.ts.map +1 -1
- package/converters/toZigbee.js +29 -14
- package/converters/toZigbee.js.map +1 -1
- package/devices/avatto.d.ts.map +1 -1
- package/devices/avatto.js +150 -0
- package/devices/avatto.js.map +1 -1
- package/devices/direct_signs.d.ts +4 -0
- package/devices/direct_signs.d.ts.map +1 -0
- package/devices/direct_signs.js +48 -0
- package/devices/direct_signs.js.map +1 -0
- package/devices/heiman.d.ts.map +1 -1
- package/devices/heiman.js +0 -1
- package/devices/heiman.js.map +1 -1
- package/devices/index.d.ts.map +1 -1
- package/devices/index.js +4 -0
- package/devices/index.js.map +1 -1
- package/devices/legrand.js +1 -1
- package/devices/legrand.js.map +1 -1
- package/devices/lixee.d.ts.map +1 -1
- package/devices/lixee.js +10 -2
- package/devices/lixee.js.map +1 -1
- package/devices/lumi.d.ts.map +1 -1
- package/devices/lumi.js +3 -1
- package/devices/lumi.js.map +1 -1
- package/devices/namron.d.ts.map +1 -1
- package/devices/namron.js +132 -0
- package/devices/namron.js.map +1 -1
- package/devices/niko.d.ts.map +1 -1
- package/devices/niko.js +193 -55
- package/devices/niko.js.map +1 -1
- package/devices/nous.d.ts.map +1 -1
- package/devices/nous.js +18 -1
- package/devices/nous.js.map +1 -1
- package/devices/robb.d.ts.map +1 -1
- package/devices/robb.js +11 -0
- package/devices/robb.js.map +1 -1
- package/devices/simon.d.ts +4 -0
- package/devices/simon.d.ts.map +1 -0
- package/devices/simon.js +15 -0
- package/devices/simon.js.map +1 -0
- package/devices/smartthings.js +4 -4
- package/devices/smartthings.js.map +1 -1
- package/devices/smartwings.d.ts.map +1 -1
- package/devices/smartwings.js +13 -1
- package/devices/smartwings.js.map +1 -1
- package/devices/sonoff.d.ts.map +1 -1
- package/devices/sonoff.js +69 -1
- package/devices/sonoff.js.map +1 -1
- package/devices/sunricher.d.ts.map +1 -1
- package/devices/sunricher.js +20 -9
- package/devices/sunricher.js.map +1 -1
- package/devices/tuya.d.ts.map +1 -1
- package/devices/tuya.js +219 -24
- package/devices/tuya.js.map +1 -1
- package/devices/ubisys.d.ts.map +1 -1
- package/devices/ubisys.js +39 -128
- package/devices/ubisys.js.map +1 -1
- package/lib/exposes.d.ts +2 -1
- package/lib/exposes.d.ts.map +1 -1
- package/lib/exposes.js +3 -4
- package/lib/exposes.js.map +1 -1
- package/lib/lumi.d.ts +1 -1
- package/lib/lumi.js +5 -4
- package/lib/lumi.js.map +1 -1
- package/lib/modernExtend.js +1 -1
- package/lib/modernExtend.js.map +1 -1
- package/lib/namron.d.ts +56 -0
- package/lib/namron.d.ts.map +1 -0
- package/lib/namron.js +434 -0
- package/lib/namron.js.map +1 -0
- package/lib/tuya.d.ts +26 -8
- package/lib/tuya.d.ts.map +1 -1
- package/lib/tuya.js +43 -40
- package/lib/tuya.js.map +1 -1
- package/package.json +8 -8
package/lib/tuya.js
CHANGED
|
@@ -314,7 +314,7 @@ const tuyaExposes = {
|
|
|
314
314
|
.binary('frost_protection', ea.STATE_SET, 'ON', 'OFF')
|
|
315
315
|
.withDescription(`When Anti-Freezing function is activated, the temperature in the house is kept at 8 °C.${extraNote}`),
|
|
316
316
|
errorStatus: () => e.numeric('error_status', ea.STATE).withDescription('Error status'),
|
|
317
|
-
scheduleAllDays: (access,
|
|
317
|
+
scheduleAllDays: (access, example) => ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'].map((day) => e.text(`schedule_${day}`, access).withDescription(`Schedule for ${day}, example: "${example}"`)),
|
|
318
318
|
temperatureUnit: () => e.enum('temperature_unit', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Temperature unit'),
|
|
319
319
|
temperatureCalibration: () => e
|
|
320
320
|
.numeric('temperature_calibration', ea.STATE_SET)
|
|
@@ -330,6 +330,34 @@ const tuyaExposes = {
|
|
|
330
330
|
.withValueStep(1)
|
|
331
331
|
.withUnit('%')
|
|
332
332
|
.withDescription('Humidity calibration'),
|
|
333
|
+
soilCalibration: () => e
|
|
334
|
+
.numeric('soil_calibration', ea.STATE_SET)
|
|
335
|
+
.withValueMin(-30)
|
|
336
|
+
.withValueMax(30)
|
|
337
|
+
.withValueStep(1)
|
|
338
|
+
.withUnit('%')
|
|
339
|
+
.withDescription('Soil Humidity calibration'),
|
|
340
|
+
temperatureSampling: () => e
|
|
341
|
+
.numeric('temperature_sampling', ea.STATE_SET)
|
|
342
|
+
.withValueMin(5)
|
|
343
|
+
.withValueMax(3600)
|
|
344
|
+
.withValueStep(1)
|
|
345
|
+
.withUnit('s')
|
|
346
|
+
.withDescription('Air temperature and humidity sampling'),
|
|
347
|
+
soilSampling: () => e
|
|
348
|
+
.numeric('soil_sampling', ea.STATE_SET)
|
|
349
|
+
.withValueMin(5)
|
|
350
|
+
.withValueMax(3600)
|
|
351
|
+
.withValueStep(1)
|
|
352
|
+
.withUnit('s')
|
|
353
|
+
.withDescription('Soil humidity sampling'),
|
|
354
|
+
soilWarning: () => e
|
|
355
|
+
.numeric('soil_warning', ea.STATE_SET)
|
|
356
|
+
.withValueMin(0)
|
|
357
|
+
.withValueMax(100)
|
|
358
|
+
.withValueStep(1)
|
|
359
|
+
.withUnit('%')
|
|
360
|
+
.withDescription('Soil water shortage humidity value'),
|
|
333
361
|
gasValue: () => e.numeric('gas_value', ea.STATE).withDescription('Measured gas concentration'),
|
|
334
362
|
energyWithPhase: (phase) => e.numeric(`energy_${phase}`, ea.STATE).withUnit('kWh').withDescription(`Sum of consumed energy (phase ${phase.toUpperCase()})`),
|
|
335
363
|
energyProducedWithPhase: (phase) => e.numeric(`energy_produced_${phase}`, ea.STATE).withUnit('kWh').withDescription(`Sum of produced energy (phase ${phase.toUpperCase()})`),
|
|
@@ -994,7 +1022,7 @@ exports.valueConverter = {
|
|
|
994
1022
|
const hour = parseInt(hourMin[0]);
|
|
995
1023
|
const min = parseInt(hourMin[1]);
|
|
996
1024
|
const temperature = Math.floor(parseFloat(timeTemp[1]) * 10);
|
|
997
|
-
if (hour < 0 || hour > 24 || min < 0 || min > 60 || temperature < 50 || temperature >
|
|
1025
|
+
if (hour < 0 || hour > 24 || min < 0 || min > 60 || temperature < 50 || temperature > 350) {
|
|
998
1026
|
throw new Error('Invalid hour, minute or temperature of: ' + transition);
|
|
999
1027
|
}
|
|
1000
1028
|
payload.push(hour, min, (temperature & 0xff00) >> 8, temperature & 0xff);
|
|
@@ -1089,6 +1117,7 @@ exports.valueConverter = {
|
|
|
1089
1117
|
},
|
|
1090
1118
|
};
|
|
1091
1119
|
},
|
|
1120
|
+
/** @deprecated left for compatibility, use {@link thermostatSystemModeAndPresetMap} */
|
|
1092
1121
|
thermostatSystemModeAndPreset: (toKey) => {
|
|
1093
1122
|
return {
|
|
1094
1123
|
from: (v) => {
|
|
@@ -1105,44 +1134,6 @@ exports.valueConverter = {
|
|
|
1105
1134
|
},
|
|
1106
1135
|
};
|
|
1107
1136
|
},
|
|
1108
|
-
thermostatGtz10SystemModeAndPreset: (toKey) => {
|
|
1109
|
-
return {
|
|
1110
|
-
from: (v) => {
|
|
1111
|
-
utils.assertNumber(v, 'system_mode');
|
|
1112
|
-
const presetLookup = {
|
|
1113
|
-
0: 'manual',
|
|
1114
|
-
1: 'auto',
|
|
1115
|
-
2: 'holiday',
|
|
1116
|
-
3: 'comfort',
|
|
1117
|
-
4: 'eco',
|
|
1118
|
-
5: 'off',
|
|
1119
|
-
};
|
|
1120
|
-
const systemModeLookup = {
|
|
1121
|
-
0: 'heat',
|
|
1122
|
-
1: 'auto',
|
|
1123
|
-
5: 'off',
|
|
1124
|
-
};
|
|
1125
|
-
return { preset: presetLookup[v], system_mode: systemModeLookup[v] };
|
|
1126
|
-
},
|
|
1127
|
-
to: (v) => {
|
|
1128
|
-
const presetLookup = {
|
|
1129
|
-
manual: new Enum(0),
|
|
1130
|
-
auto: new Enum(1),
|
|
1131
|
-
holiday: new Enum(2),
|
|
1132
|
-
comfort: new Enum(3),
|
|
1133
|
-
eco: new Enum(4),
|
|
1134
|
-
off: new Enum(5),
|
|
1135
|
-
};
|
|
1136
|
-
const systemModeLookup = {
|
|
1137
|
-
heat: new Enum(0),
|
|
1138
|
-
auto: new Enum(1),
|
|
1139
|
-
off: new Enum(5),
|
|
1140
|
-
};
|
|
1141
|
-
const lookup = toKey === 'preset' ? presetLookup : systemModeLookup;
|
|
1142
|
-
return utils.getFromLookup(v, lookup);
|
|
1143
|
-
},
|
|
1144
|
-
};
|
|
1145
|
-
},
|
|
1146
1137
|
ZWT198_schedule: {
|
|
1147
1138
|
from: (value, meta, options) => {
|
|
1148
1139
|
const programmingMode = [];
|
|
@@ -1432,6 +1423,18 @@ exports.valueConverter = {
|
|
|
1432
1423
|
return data;
|
|
1433
1424
|
},
|
|
1434
1425
|
},
|
|
1426
|
+
/** @param toMap the key is 'system_mode' or 'preset' related value */
|
|
1427
|
+
thermostatSystemModeAndPresetMap: ({ fromMap = {}, toMap = {}, }) => {
|
|
1428
|
+
return {
|
|
1429
|
+
from: (v) => {
|
|
1430
|
+
utils.assertNumber(v, 'system_mode');
|
|
1431
|
+
return { running_mode: fromMap[v].device_mode, system_mode: fromMap[v].system_mode, preset: fromMap[v].preset };
|
|
1432
|
+
},
|
|
1433
|
+
to: (v) => {
|
|
1434
|
+
return utils.getFromLookup(v, toMap);
|
|
1435
|
+
},
|
|
1436
|
+
};
|
|
1437
|
+
},
|
|
1435
1438
|
};
|
|
1436
1439
|
const tuyaTz = {
|
|
1437
1440
|
power_on_behavior_1: {
|