homebridge-securitysystem 8.4.1-beta.1 → 8.4.1-beta.2
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/package.json +1 -1
- package/src/index.js +10 -16
- package/.github/workflows/deploy-plugin.yml +0 -19
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-securitysystem",
|
|
3
3
|
"displayName": "Homebridge Security System",
|
|
4
|
-
"version": "8.4.1-beta.
|
|
4
|
+
"version": "8.4.1-beta.2",
|
|
5
5
|
"description": "Homebridge plugin that creates a security system accessory that can be triggered by HomeKit sensors.",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"scripts": {
|
package/src/index.js
CHANGED
|
@@ -970,13 +970,9 @@ SecuritySystem.prototype.resetTimers = function () {
|
|
|
970
970
|
};
|
|
971
971
|
|
|
972
972
|
SecuritySystem.prototype.handleTargetStateChange = function (origin) {
|
|
973
|
-
// Clear arming timeout
|
|
974
|
-
clearTimeout(this.armTimeout);
|
|
975
|
-
|
|
976
|
-
// Reset double-knock
|
|
977
|
-
this.isKnocked = false;
|
|
978
|
-
|
|
979
973
|
this.resetTimers();
|
|
974
|
+
this.resetTripSwitches();
|
|
975
|
+
this.resetTrippedMotionSensor();
|
|
980
976
|
this.resetModeSwitches();
|
|
981
977
|
this.updateModeSwitches();
|
|
982
978
|
|
|
@@ -994,18 +990,10 @@ SecuritySystem.prototype.handleTargetStateChange = function (origin) {
|
|
|
994
990
|
|
|
995
991
|
if (isCurrentStateAlarmTriggered) {
|
|
996
992
|
this.triggerResetSensor();
|
|
997
|
-
|
|
998
|
-
// Keep characteristic & switches on
|
|
999
|
-
return;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
// Reset tripped motion sensor
|
|
1003
|
-
if (this.tripSwitchService.getCharacteristic(Characteristic.On).value) {
|
|
1004
|
-
this.updateTripSwitch(false, originTypes.INTERNAL, true, null);
|
|
1005
993
|
}
|
|
1006
994
|
|
|
1007
|
-
// Reset
|
|
1008
|
-
this.
|
|
995
|
+
// Reset double-knock
|
|
996
|
+
this.isKnocked = false;
|
|
1009
997
|
};
|
|
1010
998
|
|
|
1011
999
|
SecuritySystem.prototype.isBadTargetState = function (state) {
|
|
@@ -2227,6 +2215,12 @@ SecuritySystem.prototype.resetModeSwitches = function () {
|
|
|
2227
2215
|
}
|
|
2228
2216
|
};
|
|
2229
2217
|
|
|
2218
|
+
SecuritySystem.prototype.resetTrippedMotionSensor = function () {
|
|
2219
|
+
if (this.tripSwitchService.getCharacteristic(Characteristic.On).value) {
|
|
2220
|
+
this.updateTripSwitch(false, originTypes.INTERNAL, true, null);
|
|
2221
|
+
}
|
|
2222
|
+
};
|
|
2223
|
+
|
|
2230
2224
|
SecuritySystem.prototype.updateModeSwitches = function () {
|
|
2231
2225
|
switch (this.targetState) {
|
|
2232
2226
|
case Characteristic.SecuritySystemTargetState.STAY_ARM:
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Deploy plugin
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: self-hosted
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout repository
|
|
16
|
-
uses: actions/checkout@v4
|
|
17
|
-
|
|
18
|
-
- name: Install plugin
|
|
19
|
-
run: /opt/homebridge/bin/npm install
|