Skip to content

Commit 89e4ac6

Browse files
committed
Minor enhancements
### UPDATED - CO alarm statuses have been manually tested and confirmed. - Plugin will no longer send detector status if it sees a mismatch between the "sensorsInfo" and "sensorsStatus" if it sees that the `sensorsInfo` is empty and `sensorsStatus` isn't and vice versa. - Made some documentations concerning "Sensor Problem" or "Sensor Problems" constantly making status show as "Triggered" in the Home app. ### FIXED - Removed the `publish` script since it causes weird issues to happen when doing `npm install` or `npm publish`.
1 parent b7e6bc4 commit 89e4ac6

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "homebridge-adt-pulse",
33
"displayName": "Homebridge ADT Pulse",
4-
"version": "3.0.5",
4+
"version": "3.0.6",
55
"description": "Homebridge security system platform for ADT Pulse",
66
"main": "./build/index.js",
77
"exports": "./build/index.js",
@@ -18,8 +18,7 @@
1818
"repl": "node ./build/scripts/repl.js",
1919
"test-api": "node ./build/scripts/test-api.js",
2020
"prepare": "npm run build",
21-
"prepublishOnly": "npm run build",
22-
"publish": "npm publish"
21+
"prepublishOnly": "npm run build"
2322
},
2423
"types": "",
2524
"repository": {

src/lib/accessory.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ export class ADTPulseAccessory {
457457

458458
// Find the state for the sensor (required characteristic).
459459
switch (type) {
460-
// TODO Device type needs to be manually tested and confirmed first.
461460
case 'co':
462461
if (statuses.includes('ALARM') || statuses.includes('Tripped')) {
463462
return this.#characteristic.CarbonMonoxideDetected.CO_LEVELS_ABNORMAL;

src/lib/platform.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,8 +985,11 @@ export class ADTPulsePlatform implements ADTPulsePlatformPlugin {
985985
private async unknownInformationDispatcher(): ADTPulsePlatformUnknownInformationDispatcherReturns {
986986
const { sensorsInfo, sensorsStatus } = this.#state.data;
987987

988-
// Check if there was a mismatch between the "sensorsInfo" and "sensorsStatus" array.
989-
if (sensorsInfo.length !== sensorsStatus.length) {
988+
if (
989+
sensorsInfo.length !== sensorsStatus.length // Check if there was a mismatch between the "sensorsInfo" and "sensorsStatus" array.
990+
&& !(sensorsInfo.length === 0 && sensorsStatus.length > 0) // Sometimes devices are slow to fetch sensors information.
991+
&& !(sensorsInfo.length > 0 && sensorsStatus.length === 0) // Sometimes devices are slow to fetch sensors status.
992+
) {
990993
const data = {
991994
sensorsInfo,
992995
sensorsStatus,

src/lib/utility.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,8 @@ export function isPanelAlarmActive(panelStatuses: IsPanelAlarmActivePanelStatuse
872872
panelStatuses.includes('BURGLARY ALARM')
873873
|| panelStatuses.includes('Carbon Monoxide Alarm')
874874
|| panelStatuses.includes('FIRE ALARM')
875-
|| panelStatuses.includes('Sensor Problem')
876-
|| panelStatuses.includes('Sensor Problems')
875+
|| panelStatuses.includes('Sensor Problem') // User must fix the sensor issue before "Triggered" in Home app will go away.
876+
|| panelStatuses.includes('Sensor Problems') // User must fix the sensor issue before "Triggered" in Home app will go away.
877877
|| panelStatuses.includes('Uncleared Alarm')
878878
|| panelStatuses.includes('WATER ALARM')
879879
);

0 commit comments

Comments
 (0)