homebridge-ring-hksv 14.3.4 → 14.3.5
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 +4 -0
- package/lib/lock.js +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Prevent lock accessories from reporting invalid `LockTargetState` values when Ring reports a jammed or unknown current state. This removes repeated Homebridge warnings while preserving the correct current lock state in HomeKit.
|
|
8
|
+
|
|
5
9
|
## 14.3.4
|
|
6
10
|
|
|
7
11
|
### Patch Changes
|
package/lib/lock.js
CHANGED
|
@@ -55,6 +55,15 @@ export class Lock extends BaseDeviceAccessory {
|
|
|
55
55
|
return this.device.sendCommand(`lock.${command}`);
|
|
56
56
|
}
|
|
57
57
|
getTargetState(data) {
|
|
58
|
-
|
|
58
|
+
if (this.targetState !== undefined) {
|
|
59
|
+
return this.targetState;
|
|
60
|
+
}
|
|
61
|
+
const { Characteristic: { LockCurrentState, LockTargetState }, } = hap;
|
|
62
|
+
const currentState = getCurrentState(data);
|
|
63
|
+
if (currentState === LockCurrentState.JAMMED ||
|
|
64
|
+
currentState === LockCurrentState.UNKNOWN) {
|
|
65
|
+
return LockTargetState.SECURED;
|
|
66
|
+
}
|
|
67
|
+
return currentState;
|
|
59
68
|
}
|
|
60
69
|
}
|
package/package.json
CHANGED