zigbee-herdsman-converters 25.56.0 → 25.58.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 +49 -0
- package/dist/devices/eurotronic.d.ts.map +1 -1
- package/dist/devices/eurotronic.js +2 -1
- package/dist/devices/eurotronic.js.map +1 -1
- package/dist/devices/lixee.js +8 -8
- package/dist/devices/lixee.js.map +1 -1
- package/dist/devices/lumi.d.ts.map +1 -1
- package/dist/devices/lumi.js +14 -2
- package/dist/devices/lumi.js.map +1 -1
- package/dist/devices/philips.d.ts.map +1 -1
- package/dist/devices/philips.js +32 -18
- package/dist/devices/philips.js.map +1 -1
- package/dist/devices/somfy.d.ts.map +1 -1
- package/dist/devices/somfy.js +7 -0
- package/dist/devices/somfy.js.map +1 -1
- package/dist/devices/sonoff.d.ts.map +1 -1
- package/dist/devices/sonoff.js +239 -24
- package/dist/devices/sonoff.js.map +1 -1
- package/dist/devices/third_reality.d.ts.map +1 -1
- package/dist/devices/third_reality.js +2 -0
- package/dist/devices/third_reality.js.map +1 -1
- package/dist/devices/tuya.d.ts.map +1 -1
- package/dist/devices/tuya.js +366 -52
- package/dist/devices/tuya.js.map +1 -1
- package/dist/devices/zemismart.d.ts.map +1 -1
- package/dist/devices/zemismart.js +0 -11
- package/dist/devices/zemismart.js.map +1 -1
- package/dist/lib/modernExtend.d.ts +1 -1
- package/dist/lib/modernExtend.d.ts.map +1 -1
- package/dist/lib/modernExtend.js +4 -1
- package/dist/lib/modernExtend.js.map +1 -1
- package/dist/lib/tuya.d.ts.map +1 -1
- package/dist/lib/tuya.js +19 -7
- package/dist/lib/tuya.js.map +1 -1
- package/dist/models-index.json +1 -1
- package/package.json +1 -1
package/dist/lib/tuya.js
CHANGED
|
@@ -2063,7 +2063,9 @@ const tuyaModernExtend = {
|
|
|
2063
2063
|
event.data.device.endpoints[0]
|
|
2064
2064
|
.command("manuSpecificTuya", "dataQuery", {})
|
|
2065
2065
|
.catch((error) => logger_1.logger.error(`Failed to query '${event.data.device.ieeeAddr}' on interval (${error})`, NS));
|
|
2066
|
-
|
|
2066
|
+
if (globalStore.getValue(event.data.device.ieeeAddr, "query_interval") === timer) {
|
|
2067
|
+
setTimer();
|
|
2068
|
+
}
|
|
2067
2069
|
}, queryIntervalSeconds * 1000);
|
|
2068
2070
|
globalStore.putValue(event.data.device.ieeeAddr, "query_interval", timer);
|
|
2069
2071
|
};
|
|
@@ -2347,7 +2349,7 @@ const tuyaModernExtend = {
|
|
|
2347
2349
|
return result;
|
|
2348
2350
|
},
|
|
2349
2351
|
tuyaOnOff: (args = {}) => {
|
|
2350
|
-
const { indicatorMode = false } = args;
|
|
2352
|
+
const { indicatorMode = false, powerOutageMemory = false, childLock = false } = args;
|
|
2351
2353
|
const exposes = args.endpoints
|
|
2352
2354
|
? args.endpoints.map((ee) => e.switch().withEndpoint(ee))
|
|
2353
2355
|
: [e.switch()];
|
|
@@ -2367,11 +2369,16 @@ const tuyaModernExtend = {
|
|
|
2367
2369
|
else {
|
|
2368
2370
|
toZigbee.push(tz.on_off);
|
|
2369
2371
|
}
|
|
2370
|
-
if (
|
|
2372
|
+
if (powerOutageMemory) {
|
|
2371
2373
|
// Legacy, powerOnBehavior is preferred
|
|
2372
2374
|
fromZigbee.push(tuyaFz.power_outage_memory);
|
|
2373
2375
|
toZigbee.push(tuyaTz.power_on_behavior_1);
|
|
2374
|
-
|
|
2376
|
+
if (typeof powerOutageMemory === "function") {
|
|
2377
|
+
exposes.push((d) => (powerOutageMemory(d.manufacturerName) ? [tuyaExposes.powerOutageMemory()] : []));
|
|
2378
|
+
}
|
|
2379
|
+
else {
|
|
2380
|
+
exposes.push(tuyaExposes.powerOutageMemory());
|
|
2381
|
+
}
|
|
2375
2382
|
}
|
|
2376
2383
|
else if (args.powerOnBehavior2) {
|
|
2377
2384
|
fromZigbee.push(tuyaFz.power_on_behavior_2);
|
|
@@ -2415,13 +2422,13 @@ const tuyaModernExtend = {
|
|
|
2415
2422
|
}
|
|
2416
2423
|
if (indicatorMode) {
|
|
2417
2424
|
fromZigbee.push(tuyaFz.indicator_mode);
|
|
2425
|
+
toZigbee.push(tuyaTz.backlight_indicator_mode_1);
|
|
2418
2426
|
if (typeof indicatorMode === "function") {
|
|
2419
2427
|
exposes.push((d) => (indicatorMode(d.manufacturerName) ? [tuyaExposes.indicatorMode()] : []));
|
|
2420
2428
|
}
|
|
2421
2429
|
else {
|
|
2422
2430
|
exposes.push(tuyaExposes.indicatorMode());
|
|
2423
2431
|
}
|
|
2424
|
-
toZigbee.push(tuyaTz.backlight_indicator_mode_1);
|
|
2425
2432
|
}
|
|
2426
2433
|
if (args.indicatorModeNoneRelayPos) {
|
|
2427
2434
|
fromZigbee.push(tuyaFz.indicator_mode_none_relay_pos);
|
|
@@ -2432,10 +2439,15 @@ const tuyaModernExtend = {
|
|
|
2432
2439
|
fromZigbee.push(args.electricalMeasurementsFzConverter || fz.electrical_measurement, fz.metering);
|
|
2433
2440
|
exposes.push(e.power(), e.current(), e.voltage(), e.energy());
|
|
2434
2441
|
}
|
|
2435
|
-
if (
|
|
2442
|
+
if (childLock) {
|
|
2436
2443
|
fromZigbee.push(tuyaFz.child_lock);
|
|
2437
2444
|
toZigbee.push(tuyaTz.child_lock);
|
|
2438
|
-
|
|
2445
|
+
if (typeof childLock === "function") {
|
|
2446
|
+
exposes.push((d) => (childLock(d.manufacturerName) ? [e.child_lock()] : []));
|
|
2447
|
+
}
|
|
2448
|
+
else {
|
|
2449
|
+
exposes.push(e.child_lock());
|
|
2450
|
+
}
|
|
2439
2451
|
}
|
|
2440
2452
|
if (args.switchMode) {
|
|
2441
2453
|
if (args.endpoints) {
|