matterbridge-zigbee2mqtt 2.5.0-dev.6 → 2.5.0-dev.8
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/dist/entity.js +11 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/entity.js
CHANGED
|
@@ -1197,8 +1197,10 @@ export class ZigbeeDevice extends ZigbeeEntity {
|
|
|
1197
1197
|
});
|
|
1198
1198
|
}
|
|
1199
1199
|
if (zigbeeDevice.bridgedDevice.hasClusterServer(WindowCoveringCluster.id)) {
|
|
1200
|
-
const reversed = zigbeeDevice.lastPayload.motor_direction === 'reversed';
|
|
1201
1200
|
zigbeeDevice.bridgedDevice.addCommandHandler('upOrOpen', async () => {
|
|
1201
|
+
const reversed = zigbeeDevice.lastPayload.motor_direction === 'reversed';
|
|
1202
|
+
if (reversed)
|
|
1203
|
+
zigbeeDevice.log.debug(`Device ${zigbeeDevice.ien}${device.friendly_name}${rs}${db} has reversed motor direction. Commands will be reversed.`);
|
|
1202
1204
|
zigbeeDevice.log.debug(`Command upOrOpen called for ${zigbeeDevice.ien}${device.friendly_name}${rs}${db}`);
|
|
1203
1205
|
if (zigbeeDevice.propertyMap.has('position'))
|
|
1204
1206
|
await zigbeeDevice.bridgedDevice?.setAttribute(WindowCoveringCluster.id, 'targetPositionLiftPercent100ths', reversed ? 10000 : 0, zigbeeDevice.log);
|
|
@@ -1207,6 +1209,9 @@ export class ZigbeeDevice extends ZigbeeEntity {
|
|
|
1207
1209
|
zigbeeDevice.publishCommand('upOrOpen', device.friendly_name, { state: reversed ? 'CLOSE' : 'OPEN' });
|
|
1208
1210
|
});
|
|
1209
1211
|
zigbeeDevice.bridgedDevice.addCommandHandler('downOrClose', async () => {
|
|
1212
|
+
const reversed = zigbeeDevice.lastPayload.motor_direction === 'reversed';
|
|
1213
|
+
if (reversed)
|
|
1214
|
+
zigbeeDevice.log.debug(`Device ${zigbeeDevice.ien}${device.friendly_name}${rs}${db} has reversed motor direction. Commands will be reversed.`);
|
|
1210
1215
|
zigbeeDevice.log.debug(`Command downOrClose called for ${zigbeeDevice.ien}${device.friendly_name}${rs}${db}`);
|
|
1211
1216
|
if (zigbeeDevice.propertyMap.has('position'))
|
|
1212
1217
|
await zigbeeDevice.bridgedDevice?.setAttribute(WindowCoveringCluster.id, 'targetPositionLiftPercent100ths', reversed ? 0 : 10000, zigbeeDevice.log);
|
|
@@ -1220,6 +1225,11 @@ export class ZigbeeDevice extends ZigbeeEntity {
|
|
|
1220
1225
|
zigbeeDevice.publishCommand('stopMotion', device.friendly_name, { state: 'STOP' });
|
|
1221
1226
|
});
|
|
1222
1227
|
zigbeeDevice.bridgedDevice.addCommandHandler('goToLiftPercentage', async ({ request: { liftPercent100thsValue } }) => {
|
|
1228
|
+
const reversed = zigbeeDevice.lastPayload.motor_direction === 'reversed';
|
|
1229
|
+
if (reversed)
|
|
1230
|
+
zigbeeDevice.log.debug(`Device ${zigbeeDevice.ien}${device.friendly_name}${rs}${db} has reversed motor direction. Commands will be reversed.`);
|
|
1231
|
+
if (reversed)
|
|
1232
|
+
liftPercent100thsValue = 10000 - liftPercent100thsValue;
|
|
1223
1233
|
zigbeeDevice.log.debug(`Command goToLiftPercentage called for ${zigbeeDevice.ien}${device.friendly_name}${rs}${db} request liftPercent100thsValue: ${liftPercent100thsValue}`);
|
|
1224
1234
|
if (zigbeeDevice.propertyMap.has('position'))
|
|
1225
1235
|
await zigbeeDevice.bridgedDevice?.setAttribute(WindowCoveringCluster.id, 'targetPositionLiftPercent100ths', liftPercent100thsValue, zigbeeDevice.log);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-zigbee2mqtt",
|
|
3
|
-
"version": "2.5.0-dev.
|
|
3
|
+
"version": "2.5.0-dev.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-zigbee2mqtt",
|
|
9
|
-
"version": "2.5.0-dev.
|
|
9
|
+
"version": "2.5.0-dev.8",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"moment": "2.30.1",
|