Skip to content

Commit

Permalink
Made some changes to panel tamper detection
Browse files Browse the repository at this point in the history
### ADDED
- Proper checks to detect if panel statuses are tampered or not.
  • Loading branch information
mrjackyliang committed Dec 31, 2023
1 parent 2c72762 commit 8d13500
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "homebridge-adt-pulse",
"displayName": "Homebridge ADT Pulse",
"version": "3.0.0-beta.16",
"version": "3.0.0-beta.17",
"description": "Homebridge security system platform for ADT Pulse",
"main": "./build/src/index.js",
"exports": "./build/src/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/lib/accessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ export class ADTPulseAccessory {
// If mode is "tamper".
if (mode === 'tamper') {
// TODO: Not enough statuses currently to determine whether system is tampered or not.
if (!panelStatuses.some((panelStatus) => panelStatus.includes('tamper'))) {
return this.#characteristic.StatusTampered.NOT_TAMPERED;
}
}

// If mode is "target".
Expand Down

0 comments on commit 8d13500

Please sign in to comment.