From 8d9a24573830ba586226ad913c8030eab5f0e4fb Mon Sep 17 00:00:00 2001 From: Jacky Liang Date: Mon, 11 Mar 2024 22:32:39 -0400 Subject: [PATCH] Minor enhancements ### UPDATED - Better detection of unknown orb security button collections and sensors status. v3.2.11 --- package.json | 2 +- src/lib/detect.ts | 4 ++-- src/lib/items.ts | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index d1c074f..74f7654 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-adt-pulse", "displayName": "Homebridge ADT Pulse", - "version": "3.2.10", + "version": "3.2.11", "description": "Homebridge security system platform for ADT Pulse", "main": "./build/index.js", "exports": "./build/index.js", diff --git a/src/lib/detect.ts b/src/lib/detect.ts index 0b59d1d..cec16c1 100644 --- a/src/lib/detect.ts +++ b/src/lib/detect.ts @@ -95,11 +95,11 @@ import type { export async function detectApiDebugParser(data: DetectApiDebugParserData, logger: DetectApiDebugParserLogger, debugMode: DetectApiDebugParserDebugMode): DetectApiDebugParserReturns { const forceArmHandlerAnomaly = data.method === 'forceArmHandler' && isUnknownDoSubmitHandlerCollection(data.response); const getGatewayInformationAnomaly = data.method === 'getGatewayInformation' && isUnknownGatewayDevice(data.response); - const getOrbSecurityButtonsAnomaly = data.method === 'getOrbSecurityButtons' && isUnknownOrbSecurityButtonCollection(data.response); + const getOrbSecurityButtonsAnomaly = data.method === 'getOrbSecurityButtons' && isUnknownOrbSecurityButtonCollection(data.response) && !data.rawHtml.includes('Status Unavailable.'); const getPanelInformationAnomaly = data.method === 'getPanelInformation' && isUnknownPanelDevice(data.response); const getPanelStatusAnomaly = data.method === 'getPanelStatus' && isEmptyOrbTextSummary(data.response); const getSensorsInformationAnomaly = data.method === 'getSensorsInformation' && data.response.length < 1; - const getSensorsStatusAnomaly = data.method === 'getSensorsStatus' && data.response.length < 1; + const getSensorsStatusAnomaly = data.method === 'getSensorsStatus' && data.response.length < 1 && !data.rawHtml.includes('Status Unavailable.'); if ( forceArmHandlerAnomaly diff --git a/src/lib/items.ts b/src/lib/items.ts index aac8eb4..09a1672 100644 --- a/src/lib/items.ts +++ b/src/lib/items.ts @@ -154,10 +154,6 @@ export const collectionOrbSecurityButtons: CollectionOrbSecurityButtons = [ }, ], }, - { - description: 'System unavailable', - buttons: [], - }, ]; /**