zigbee-herdsman-converters 20.1.0 → 20.2.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 +24 -0
- package/converters/toZigbee.js +1 -1
- package/converters/toZigbee.js.map +1 -1
- package/devices/ikea.d.ts.map +1 -1
- package/devices/ikea.js +10 -6
- package/devices/ikea.js.map +1 -1
- package/devices/immax.js +1 -1
- package/devices/immax.js.map +1 -1
- package/devices/lanesto.js +1 -1
- package/devices/lanesto.js.map +1 -1
- package/devices/lonsonho.js +2 -2
- package/devices/lonsonho.js.map +1 -1
- package/devices/lumi.d.ts.map +1 -1
- package/devices/lumi.js +32 -1
- package/devices/lumi.js.map +1 -1
- package/devices/tuya.d.ts.map +1 -1
- package/devices/tuya.js +2 -1
- package/devices/tuya.js.map +1 -1
- package/lib/lumi.d.ts +17 -0
- package/lib/lumi.d.ts.map +1 -1
- package/lib/lumi.js +221 -1
- package/lib/lumi.js.map +1 -1
- package/package.json +1 -1
package/lib/lumi.d.ts
CHANGED
|
@@ -136,6 +136,19 @@ export declare const lumiModernExtend: {
|
|
|
136
136
|
}) => ModernExtend;
|
|
137
137
|
lumiSwitchType: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
138
138
|
lumiMotorSpeed: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
139
|
+
lumiCurtainSpeed: (args?: Partial<modernExtend.NumericArgs>) => ModernExtend;
|
|
140
|
+
lumiCurtainManualOpenClose: (args?: Partial<modernExtend.BinaryArgs>) => ModernExtend;
|
|
141
|
+
lumiCurtainAdaptivePullingSpeed: (args?: Partial<modernExtend.BinaryArgs>) => ModernExtend;
|
|
142
|
+
lumiCurtainManualStop: (args?: Partial<modernExtend.BinaryArgs>) => ModernExtend;
|
|
143
|
+
lumiCurtainReverse: (args?: Partial<modernExtend.BinaryArgs>) => ModernExtend;
|
|
144
|
+
lumiCurtainStatus: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
145
|
+
lumiCurtainLastManualOperation: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
146
|
+
lumiCurtainPosition: (args?: Partial<modernExtend.NumericArgs>) => ModernExtend;
|
|
147
|
+
lumiCurtainTraverseTime: (args?: Partial<modernExtend.NumericArgs>) => ModernExtend;
|
|
148
|
+
lumiCurtainCalibrationStatus: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
149
|
+
lumiCurtainCalibrated: (args?: Partial<modernExtend.BinaryArgs>) => ModernExtend;
|
|
150
|
+
lumiCurtainControlManuSpecific: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
151
|
+
lumiCurtainIdentifyBeep: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
139
152
|
lumiPowerOnBehavior: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
140
153
|
lumiPowerOutageMemory: (args?: Partial<modernExtend.BinaryArgs>) => ModernExtend;
|
|
141
154
|
lumiOperationMode: (args?: Partial<modernExtend.EnumLookupArgs>) => ModernExtend;
|
|
@@ -853,6 +866,10 @@ export declare const toZigbee: {
|
|
|
853
866
|
options: exposes.Enum[];
|
|
854
867
|
convertSet: (entity: import("zigbee-herdsman/dist/controller/model").Group | import("zigbee-herdsman/dist/controller/model").Endpoint, key: string, value: unknown, meta: Tz.Meta) => Promise<void>;
|
|
855
868
|
};
|
|
869
|
+
lumi_curtain_automatic_calibration_ZNCLDJ01LM: {
|
|
870
|
+
key: string[];
|
|
871
|
+
convertSet: (entity: import("zigbee-herdsman/dist/controller/model").Group | import("zigbee-herdsman/dist/controller/model").Endpoint, key: string, value: unknown, meta: Tz.Meta) => Promise<void>;
|
|
872
|
+
};
|
|
856
873
|
lumi_buzzer: {
|
|
857
874
|
key: string[];
|
|
858
875
|
convertSet: (entity: import("zigbee-herdsman/dist/controller/model").Group | import("zigbee-herdsman/dist/controller/model").Endpoint, key: string, value: unknown, meta: Tz.Meta) => Promise<void>;
|
package/lib/lumi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lumi.d.ts","sourceRoot":"","sources":["../src/lib/lumi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EACH,EAAE,EACF,UAAU,EACV,QAAQ,EACR,WAAW,EACX,EAAE,EACF,YAAY,EAMZ,uBAAuB,EACvB,oBAAoB,EACvB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"lumi.d.ts","sourceRoot":"","sources":["../src/lib/lumi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EACH,EAAE,EACF,UAAU,EACV,QAAQ,EACR,WAAW,EACX,EAAE,EACF,YAAY,EAMZ,uBAAuB,EACvB,oBAAoB,EACvB,MAAM,SAAS,CAAC;AA6BjB,OAAO,MAAM,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,EAAE,sBAAsB,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,UAAW,UAAU,UAAU,MAAM,aAiIlE,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAe,EAAE,CAAC,OAAO,QAAQ,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mGA6tCyB,WAAW;;;;;;;CA6G1D,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsjDpB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgQ5B,CAAC"}
|
package/lib/lumi.js
CHANGED
|
@@ -1437,6 +1437,157 @@ exports.lumiModernExtend = {
|
|
|
1437
1437
|
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1438
1438
|
...args,
|
|
1439
1439
|
}),
|
|
1440
|
+
lumiCurtainSpeed: (args) => modernExtend.numeric({
|
|
1441
|
+
name: 'curtain_speed',
|
|
1442
|
+
cluster: 'manuSpecificLumi',
|
|
1443
|
+
attribute: { ID: 0x043b, type: 0x20 },
|
|
1444
|
+
description: 'Speed of curtain movement',
|
|
1445
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1446
|
+
access: 'ALL',
|
|
1447
|
+
unit: '%',
|
|
1448
|
+
valueMin: 1,
|
|
1449
|
+
valueMax: 100,
|
|
1450
|
+
entityCategory: 'config',
|
|
1451
|
+
...args,
|
|
1452
|
+
}),
|
|
1453
|
+
lumiCurtainManualOpenClose: (args) => modernExtend.binary({
|
|
1454
|
+
name: 'manual_open_close',
|
|
1455
|
+
valueOn: ['ON', true],
|
|
1456
|
+
valueOff: ['OFF', false],
|
|
1457
|
+
cluster: 'manuSpecificLumi',
|
|
1458
|
+
attribute: 'curtainHandOpen',
|
|
1459
|
+
description: 'Gently pull to open/close the curtain automatically',
|
|
1460
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1461
|
+
access: 'ALL',
|
|
1462
|
+
entityCategory: 'config',
|
|
1463
|
+
...args,
|
|
1464
|
+
}),
|
|
1465
|
+
lumiCurtainAdaptivePullingSpeed: (args) => modernExtend.binary({
|
|
1466
|
+
name: 'adaptive_pulling_speed',
|
|
1467
|
+
valueOn: ['ON', 1],
|
|
1468
|
+
valueOff: ['OFF', 0],
|
|
1469
|
+
cluster: 'manuSpecificLumi',
|
|
1470
|
+
attribute: { ID: 0x0442, type: 0x20 },
|
|
1471
|
+
description: 'The faster/slower the curtain is pulled manually, the faster/slower the curtain will move',
|
|
1472
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1473
|
+
access: 'ALL',
|
|
1474
|
+
entityCategory: 'config',
|
|
1475
|
+
...args,
|
|
1476
|
+
}),
|
|
1477
|
+
lumiCurtainManualStop: (args) => modernExtend.binary({
|
|
1478
|
+
name: 'manual_stop',
|
|
1479
|
+
valueOn: ['ON', true],
|
|
1480
|
+
valueOff: ['OFF', false],
|
|
1481
|
+
cluster: 'manuSpecificLumi',
|
|
1482
|
+
attribute: { ID: 0x043a, type: 0x10 },
|
|
1483
|
+
description: 'Manually pulling the curtain during operation stops the motor',
|
|
1484
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1485
|
+
access: 'ALL',
|
|
1486
|
+
entityCategory: 'config',
|
|
1487
|
+
...args,
|
|
1488
|
+
}),
|
|
1489
|
+
lumiCurtainReverse: (args) => modernExtend.binary({
|
|
1490
|
+
name: 'reverse_direction',
|
|
1491
|
+
valueOn: [true, 1],
|
|
1492
|
+
valueOff: [false, 0],
|
|
1493
|
+
cluster: 'closuresWindowCovering',
|
|
1494
|
+
attribute: 'windowCoveringMode',
|
|
1495
|
+
description: 'Whether the curtain direction is inverted',
|
|
1496
|
+
access: 'ALL',
|
|
1497
|
+
entityCategory: 'config',
|
|
1498
|
+
...args,
|
|
1499
|
+
}),
|
|
1500
|
+
lumiCurtainStatus: (args) => modernExtend.enumLookup({
|
|
1501
|
+
name: 'status',
|
|
1502
|
+
lookup: { 0: 'closing', 1: 'opening', 2: 'stopped', 3: 'blocked' },
|
|
1503
|
+
cluster: 'manuSpecificLumi',
|
|
1504
|
+
attribute: { ID: 0x0421, type: 0x20 },
|
|
1505
|
+
description: 'Current status of the curtain (Opening, Closing, Stopped, Blocked)',
|
|
1506
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1507
|
+
access: 'STATE',
|
|
1508
|
+
entityCategory: 'diagnostic',
|
|
1509
|
+
...args,
|
|
1510
|
+
}),
|
|
1511
|
+
lumiCurtainLastManualOperation: (args) => modernExtend.enumLookup({
|
|
1512
|
+
name: 'last_manual_operation',
|
|
1513
|
+
lookup: { 1: 'open', 2: 'close', 3: 'stop' },
|
|
1514
|
+
cluster: 'manuSpecificLumi',
|
|
1515
|
+
attribute: { ID: 0x0425, type: 0x20 },
|
|
1516
|
+
description: 'Last triggered manual operation',
|
|
1517
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1518
|
+
access: 'STATE',
|
|
1519
|
+
entityCategory: 'diagnostic',
|
|
1520
|
+
...args,
|
|
1521
|
+
}),
|
|
1522
|
+
lumiCurtainPosition: (args) => modernExtend.numeric({
|
|
1523
|
+
name: 'curtain_position',
|
|
1524
|
+
cluster: 'manuSpecificLumi',
|
|
1525
|
+
attribute: { ID: 0x041f, type: 0x20 },
|
|
1526
|
+
description: 'Current position of the curtain',
|
|
1527
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1528
|
+
access: 'STATE',
|
|
1529
|
+
unit: '%',
|
|
1530
|
+
valueMin: 1,
|
|
1531
|
+
valueMax: 100,
|
|
1532
|
+
entityCategory: 'diagnostic',
|
|
1533
|
+
...args,
|
|
1534
|
+
}),
|
|
1535
|
+
lumiCurtainTraverseTime: (args) => modernExtend.numeric({
|
|
1536
|
+
name: 'traverse_time',
|
|
1537
|
+
cluster: 'manuSpecificLumi',
|
|
1538
|
+
attribute: { ID: 0x0403, type: 0x20 },
|
|
1539
|
+
description: 'Time in seconds to get from one end to another',
|
|
1540
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1541
|
+
access: 'STATE',
|
|
1542
|
+
unit: 'sec',
|
|
1543
|
+
entityCategory: 'diagnostic',
|
|
1544
|
+
...args,
|
|
1545
|
+
}),
|
|
1546
|
+
lumiCurtainCalibrationStatus: (args) => modernExtend.enumLookup({
|
|
1547
|
+
name: 'calibration_status',
|
|
1548
|
+
lookup: { 0: 'not_calibrated', 1: 'half_calibrated', 2: 'fully_calibrated' },
|
|
1549
|
+
cluster: 'manuSpecificLumi',
|
|
1550
|
+
attribute: { ID: 0x0426, type: 0x20 },
|
|
1551
|
+
description: 'Calibration status of the curtain (Not calibrated, Half calibrated, Fully calibrated)',
|
|
1552
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1553
|
+
access: 'STATE',
|
|
1554
|
+
entityCategory: 'diagnostic',
|
|
1555
|
+
...args,
|
|
1556
|
+
}),
|
|
1557
|
+
lumiCurtainCalibrated: (args) => modernExtend.binary({
|
|
1558
|
+
name: 'calibrated',
|
|
1559
|
+
valueOn: [true, 1],
|
|
1560
|
+
valueOff: [false, 0],
|
|
1561
|
+
cluster: 'manuSpecificLumi',
|
|
1562
|
+
attribute: 'curtainCalibrated',
|
|
1563
|
+
description: 'Indicates if this device is calibrated',
|
|
1564
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1565
|
+
access: 'STATE',
|
|
1566
|
+
entityCategory: 'diagnostic',
|
|
1567
|
+
...args,
|
|
1568
|
+
}),
|
|
1569
|
+
lumiCurtainControlManuSpecific: (args) => modernExtend.enumLookup({
|
|
1570
|
+
name: 'control',
|
|
1571
|
+
lookup: { toggle: 3, open: 7, close: 8 },
|
|
1572
|
+
cluster: 'manuSpecificLumi',
|
|
1573
|
+
attribute: { ID: 0x0420, type: 0x20 },
|
|
1574
|
+
description: 'manuSpecific curtain control',
|
|
1575
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1576
|
+
access: 'ALL',
|
|
1577
|
+
entityCategory: 'config',
|
|
1578
|
+
...args,
|
|
1579
|
+
}),
|
|
1580
|
+
lumiCurtainIdentifyBeep: (args) => modernExtend.enumLookup({
|
|
1581
|
+
name: 'identify_beep',
|
|
1582
|
+
lookup: { short: 0, '1_sec': 1, '2_sec': 2 },
|
|
1583
|
+
cluster: 'manuSpecificLumi',
|
|
1584
|
+
attribute: { ID: 0x0404, type: 0x20 },
|
|
1585
|
+
description: 'Device will beep for chosen time duration',
|
|
1586
|
+
zigbeeCommandOptions: { manufacturerCode: exports.manufacturerCode },
|
|
1587
|
+
access: 'ALL',
|
|
1588
|
+
entityCategory: 'config',
|
|
1589
|
+
...args,
|
|
1590
|
+
}),
|
|
1440
1591
|
lumiPowerOnBehavior: (args) => modernExtend.enumLookup({
|
|
1441
1592
|
name: 'power_on_behavior',
|
|
1442
1593
|
lookup: { on: 0, previous: 1, off: 2, inverted: 3 },
|
|
@@ -4416,7 +4567,9 @@ exports.toZigbee = {
|
|
|
4416
4567
|
lumi_curtain_limits_calibration: {
|
|
4417
4568
|
key: ['limits_calibration'],
|
|
4418
4569
|
convertSet: async (entity, key, value, meta) => {
|
|
4419
|
-
|
|
4570
|
+
(0, utils_1.assertString)(value);
|
|
4571
|
+
const normalizedValue = value.toLowerCase();
|
|
4572
|
+
switch (normalizedValue) {
|
|
4420
4573
|
case 'start':
|
|
4421
4574
|
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x01, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4422
4575
|
break;
|
|
@@ -4449,6 +4602,73 @@ exports.toZigbee = {
|
|
|
4449
4602
|
}
|
|
4450
4603
|
},
|
|
4451
4604
|
},
|
|
4605
|
+
lumi_curtain_automatic_calibration_ZNCLDJ01LM: {
|
|
4606
|
+
key: ['automatic_calibration'],
|
|
4607
|
+
convertSet: async (entity, key, value, meta) => {
|
|
4608
|
+
// Check if the curtain is already calibrated
|
|
4609
|
+
const checkIfCalibrated = async () => {
|
|
4610
|
+
const result = await entity.read('manuSpecificLumi', ['curtainCalibrated']);
|
|
4611
|
+
return result ? result.curtainCalibrated : false;
|
|
4612
|
+
};
|
|
4613
|
+
if (await checkIfCalibrated()) {
|
|
4614
|
+
logger_1.logger.info('End positions already calibrated. Reset the calibration before proceeding.', NS);
|
|
4615
|
+
return;
|
|
4616
|
+
}
|
|
4617
|
+
// Reset Calibration
|
|
4618
|
+
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x00, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4619
|
+
logger_1.logger.info('Starting the calibration process...', NS);
|
|
4620
|
+
// Wait for 3 seconds
|
|
4621
|
+
await (0, utils_1.sleep)(3000);
|
|
4622
|
+
// Move the curtain to one direction
|
|
4623
|
+
await entity.command('closuresWindowCovering', 'goToLiftPercentage', { percentageliftvalue: 100 }, (0, utils_1.getOptions)(meta.mapped, entity));
|
|
4624
|
+
logger_1.logger.info('Moving curtain and waiting to reach the end position.', NS);
|
|
4625
|
+
// Wait until the curtain gets into a moving state, then wait until it gets blocked or stopped
|
|
4626
|
+
const waitForStateTransition = async (initialStates, desiredStates) => {
|
|
4627
|
+
return new Promise((resolve) => {
|
|
4628
|
+
const checkState = async () => {
|
|
4629
|
+
const result = await entity.read('manuSpecificLumi', [0x0421]);
|
|
4630
|
+
const state = result ? result[0x0421] : null;
|
|
4631
|
+
if (!initialStates.includes(state)) {
|
|
4632
|
+
const checkDesiredState = async () => {
|
|
4633
|
+
const result = await entity.read('manuSpecificLumi', [0x0421]);
|
|
4634
|
+
const state = result ? result[0x0421] : null;
|
|
4635
|
+
if (desiredStates.includes(state)) {
|
|
4636
|
+
resolve();
|
|
4637
|
+
}
|
|
4638
|
+
else {
|
|
4639
|
+
setTimeout(checkDesiredState, 500);
|
|
4640
|
+
}
|
|
4641
|
+
};
|
|
4642
|
+
setTimeout(checkDesiredState, 500);
|
|
4643
|
+
}
|
|
4644
|
+
else {
|
|
4645
|
+
setTimeout(checkState, 500);
|
|
4646
|
+
}
|
|
4647
|
+
};
|
|
4648
|
+
void checkState();
|
|
4649
|
+
});
|
|
4650
|
+
};
|
|
4651
|
+
await waitForStateTransition([2, 3], [2, 3]);
|
|
4652
|
+
// Wait for 1 second
|
|
4653
|
+
await (0, utils_1.sleep)(1000);
|
|
4654
|
+
// Set First Calibration Position
|
|
4655
|
+
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x01, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4656
|
+
logger_1.logger.info('End position 1 has been set.', NS);
|
|
4657
|
+
// Wait for 3 seconds
|
|
4658
|
+
await (0, utils_1.sleep)(3000);
|
|
4659
|
+
// Move the curtain in the opposite direction
|
|
4660
|
+
await entity.command('closuresWindowCovering', 'goToLiftPercentage', { percentageliftvalue: 0 }, (0, utils_1.getOptions)(meta.mapped, entity));
|
|
4661
|
+
logger_1.logger.info('Moving curtain in the opposite direction and waiting to reach the end position.', NS);
|
|
4662
|
+
// Wait until the curtain gets into a moving state, then wait until it gets blocked or stopped
|
|
4663
|
+
await waitForStateTransition([2, 3], [2, 3]);
|
|
4664
|
+
// Wait for 1 second
|
|
4665
|
+
await (0, utils_1.sleep)(1000);
|
|
4666
|
+
// Set Second Calibration Position
|
|
4667
|
+
await entity.write('manuSpecificLumi', { 0x0407: { value: 0x02, type: 0x20 } }, manufacturerOptions.lumi);
|
|
4668
|
+
logger_1.logger.info('End position 2 has been set.', NS);
|
|
4669
|
+
logger_1.logger.info('Calibration process completed.', NS);
|
|
4670
|
+
},
|
|
4671
|
+
},
|
|
4452
4672
|
lumi_buzzer: {
|
|
4453
4673
|
key: ['buzzer'],
|
|
4454
4674
|
convertSet: async (entity, key, value, meta) => {
|