homebridge-securitysystem 8.0.2 → 8.1.0-beta.1
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.
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
uses: actions/checkout@v4
|
|
31
31
|
|
|
32
32
|
- name: Create tag name
|
|
33
|
-
uses: MiguelRipoll23/create-tag-name@v2.
|
|
33
|
+
uses: MiguelRipoll23/create-tag-name@v2.1.0
|
|
34
34
|
id: create-tag-name
|
|
35
35
|
with:
|
|
36
36
|
channel: ${{ inputs.channel }}
|
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
version: ${{ steps.create-tag-name.outputs.tag-name }}
|
|
42
42
|
|
|
43
43
|
- name: Create pull request
|
|
44
|
-
uses: peter-evans/create-pull-request@
|
|
44
|
+
uses: peter-evans/create-pull-request@v6
|
|
45
45
|
with:
|
|
46
46
|
branch: version/${{ steps.create-tag-name.outputs.tag-name }}
|
|
47
47
|
commit-message: ${{ steps.create-tag-name.outputs.tag-name }}
|
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
pull-requests: write
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/stale@
|
|
20
|
+
- uses: actions/stale@v9
|
|
21
21
|
with:
|
|
22
22
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
23
23
|
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a few days if no further activity occurs. Thank you for your contributions."
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-securitysystem",
|
|
3
3
|
"displayName": "Homebridge Security System",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.1.0-beta.1",
|
|
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": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"express": "^4.17.1",
|
|
45
45
|
"node-fetch": "^2.6.7",
|
|
46
|
-
"node-persist": "^
|
|
46
|
+
"node-persist": "^4.0.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"eslint": "^8.0.0"
|
package/src/index.js
CHANGED
|
@@ -801,18 +801,7 @@ SecuritySystem.prototype.setCurrentState = function (state, origin) {
|
|
|
801
801
|
this.resetTimeout = null;
|
|
802
802
|
this.log.info("Reset (Finished)");
|
|
803
803
|
|
|
804
|
-
|
|
805
|
-
this.triggeredResetMotionSensorService.updateCharacteristic(
|
|
806
|
-
Characteristic.MotionDetected,
|
|
807
|
-
true
|
|
808
|
-
);
|
|
809
|
-
|
|
810
|
-
setTimeout(() => {
|
|
811
|
-
this.triggeredResetMotionSensorService.updateCharacteristic(
|
|
812
|
-
Characteristic.MotionDetected,
|
|
813
|
-
false
|
|
814
|
-
);
|
|
815
|
-
}, 750);
|
|
804
|
+
this.triggerResetSensor();
|
|
816
805
|
|
|
817
806
|
// Alternative flow (Triggered -> Off -> Armed mode)
|
|
818
807
|
if (options.resetOffFlow) {
|
|
@@ -845,6 +834,21 @@ SecuritySystem.prototype.setCurrentState = function (state, origin) {
|
|
|
845
834
|
this.save();
|
|
846
835
|
};
|
|
847
836
|
|
|
837
|
+
SecuritySystem.prototype.triggerResetSensor = function () {
|
|
838
|
+
// Update triggered reset motion sensor
|
|
839
|
+
this.triggeredResetMotionSensorService.updateCharacteristic(
|
|
840
|
+
Characteristic.MotionDetected,
|
|
841
|
+
true
|
|
842
|
+
);
|
|
843
|
+
|
|
844
|
+
setTimeout(() => {
|
|
845
|
+
this.triggeredResetMotionSensorService.updateCharacteristic(
|
|
846
|
+
Characteristic.MotionDetected,
|
|
847
|
+
false
|
|
848
|
+
);
|
|
849
|
+
}, 750);
|
|
850
|
+
};
|
|
851
|
+
|
|
848
852
|
SecuritySystem.prototype.resetTimers = function () {
|
|
849
853
|
// Clear trigger timeout
|
|
850
854
|
if (this.triggerTimeout !== null) {
|
|
@@ -1027,6 +1031,12 @@ SecuritySystem.prototype.updateTargetState = function (
|
|
|
1027
1031
|
return false;
|
|
1028
1032
|
}
|
|
1029
1033
|
|
|
1034
|
+
// Trigger reset sensor for mode
|
|
1035
|
+
// change in triggered state
|
|
1036
|
+
if (isCurrentStateAlarmTriggered) {
|
|
1037
|
+
this.triggerResetSensor();
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1030
1040
|
// Set arming delay
|
|
1031
1041
|
let armSeconds = 0;
|
|
1032
1042
|
|