matterbridge-zigbee2mqtt 2.5.0-dev.7 → 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 CHANGED
@@ -1197,10 +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
- if (reversed)
1202
- zigbeeDevice.log.debug(`Device ${zigbeeDevice.ien}${device.friendly_name}${rs}${db} has reversed motor direction. Commands will be reversed.`);
1203
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.`);
1204
1204
  zigbeeDevice.log.debug(`Command upOrOpen called for ${zigbeeDevice.ien}${device.friendly_name}${rs}${db}`);
1205
1205
  if (zigbeeDevice.propertyMap.has('position'))
1206
1206
  await zigbeeDevice.bridgedDevice?.setAttribute(WindowCoveringCluster.id, 'targetPositionLiftPercent100ths', reversed ? 10000 : 0, zigbeeDevice.log);
@@ -1209,6 +1209,9 @@ export class ZigbeeDevice extends ZigbeeEntity {
1209
1209
  zigbeeDevice.publishCommand('upOrOpen', device.friendly_name, { state: reversed ? 'CLOSE' : 'OPEN' });
1210
1210
  });
1211
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.`);
1212
1215
  zigbeeDevice.log.debug(`Command downOrClose called for ${zigbeeDevice.ien}${device.friendly_name}${rs}${db}`);
1213
1216
  if (zigbeeDevice.propertyMap.has('position'))
1214
1217
  await zigbeeDevice.bridgedDevice?.setAttribute(WindowCoveringCluster.id, 'targetPositionLiftPercent100ths', reversed ? 0 : 10000, zigbeeDevice.log);
@@ -1222,6 +1225,9 @@ export class ZigbeeDevice extends ZigbeeEntity {
1222
1225
  zigbeeDevice.publishCommand('stopMotion', device.friendly_name, { state: 'STOP' });
1223
1226
  });
1224
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.`);
1225
1231
  if (reversed)
1226
1232
  liftPercent100thsValue = 10000 - liftPercent100thsValue;
1227
1233
  zigbeeDevice.log.debug(`Command goToLiftPercentage called for ${zigbeeDevice.ien}${device.friendly_name}${rs}${db} request liftPercent100thsValue: ${liftPercent100thsValue}`);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "2.5.0-dev.7",
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.7",
9
+ "version": "2.5.0-dev.8",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "moment": "2.30.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "2.5.0-dev.7",
3
+ "version": "2.5.0-dev.8",
4
4
  "description": "Matterbridge zigbee2mqtt plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",