From 9d519daef341e96427d678551c83555143d13cd5 Mon Sep 17 00:00:00 2001 From: Jacky Liang Date: Tue, 24 Dec 2019 15:45:02 -0500 Subject: [PATCH] Critical bug fix FIXED - [Plugin code] Unable to arm device because of typo in code. PRIVACY NOTICE Because of unknown bugs plagued in the plugin (that people aren't reporting on GitHub), this version will contain a bug reporting tool that will send debug logs here: "https://console.re/vHeMZvGjaBWjN29b8PARrCpBNtHTWYteMGFejmxDwgUpan9SMU" Please be advised these logs are not saved, are ANONYMOUS and in no way, you will be geographically or personally identified. The information that is being sent is: - A random session number (to group actions). - Date and time. - Basic system information (system and architecture version). - Node version, Homebridge version, Plugin version. - System status changes (e.g. "all quiet" to "motion"). - Set device logs (e.g. "disarmed" to "away"). - Wrong web portal version messages (e.g. "17.0.0" to "18.0.0"). --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 1d952a2..1520e76 100644 --- a/index.js +++ b/index.js @@ -924,8 +924,8 @@ ADTPulsePlatform.prototype.setDeviceStatus = function (accessory, arm) { .login() .then(async () => { // Attempt to clear the alarms first. - if (lastState.includes("alarm")) { - if (["carbon monoxide", "fire", "burglary"].includes(lastState)) { + if (latestState.includes("alarm")) { + if (["carbon monoxide", "fire", "burglary"].includes(latestState)) { this.logMessage(`Alarm is active! Disarming the ${name} (${id})...`, 20); await this.pulse.setDeviceStatus(oldArmState, "off") diff --git a/package.json b/package.json index eb33b1b..1101744 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-adt-pulse", - "version": "1.6.5", + "version": "1.6.6", "description": "Homebridge security system platform for ADT Pulse", "main": "index.js", "scripts": {