Skip to content

Commit 6ae2a40

Browse files
committed
Documented gatewaysand fixed bugs
### FIXED - `removePersonalIdentifiableInformation` did not properly remove information in arrays nested inside objects. ### ADDED - Documented a collection of security buttons - Documented a collection of force arm buttons. - Safewatch Pro Security Panel (with 3 emergency key buttons)
1 parent b1ae1b9 commit 6ae2a40

File tree

4 files changed

+48
-4
lines changed

4 files changed

+48
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
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.1.3",
4+
"version": "3.1.4",
55
"description": "Homebridge security system platform for ADT Pulse",
66
"main": "./build/index.js",
77
"exports": "./build/index.js",

src/lib/items.ts

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,51 @@ import type {
3535
*
3636
* @since 1.0.0
3737
*/
38-
export const collectionDoSubmitHandlers: CollectionDoSubmitHandlers = [];
38+
export const collectionDoSubmitHandlers: CollectionDoSubmitHandlers = [
39+
[],
40+
[
41+
{
42+
href: 'rest/adt/ui/client/security/setForceArm',
43+
},
44+
{
45+
href: 'rest/adt/ui/client/security/setCancelProtest',
46+
},
47+
],
48+
];
3949

4050
/**
4151
* Collection orb security buttons.
4252
*
4353
* @since 1.0.0
4454
*/
45-
export const collectionOrbSecurityButtons: CollectionOrbSecurityButtons = [];
55+
export const collectionOrbSecurityButtons: CollectionOrbSecurityButtons = [
56+
[
57+
{
58+
buttonDisabled: false,
59+
buttonText: 'Arm Away',
60+
loadingText: 'Arming Away',
61+
},
62+
{
63+
buttonDisabled: false,
64+
buttonText: 'Arm Stay',
65+
loadingText: 'Arming Stay',
66+
},
67+
],
68+
[
69+
{
70+
buttonDisabled: false,
71+
buttonText: 'Disarm',
72+
loadingText: 'Disarming',
73+
},
74+
],
75+
[
76+
{
77+
buttonDisabled: true,
78+
buttonText: 'Arming Night',
79+
loadingText: null,
80+
},
81+
],
82+
];
4683

4784
/**
4885
* Collection sensor actions.
@@ -246,6 +283,11 @@ export const deviceSecurityPanels: DeviceSecurityPanels = [
246283
manufacturerProvider: 'ADT',
247284
typeModel: 'Security Panel - Safewatch Pro 3000/3000CN',
248285
},
286+
{
287+
emergencyKeys: 'Button: Fire Alarm (Zone 95) Button: Personal Emergency (Zone 96) Button: Audible Panic Alarm (Zone 99)',
288+
manufacturerProvider: 'ADT',
289+
typeModel: 'Security Panel - Safewatch Pro 3000/3000CN',
290+
},
249291
];
250292

251293
/**

src/lib/utility.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,8 @@ export function removePersonalIdentifiableInformation(data: RemovePersonalIdenti
14171417

14181418
if (_.isPlainObject(value)) {
14191419
modifiedObject[key] = replaceValue(value as RemovePersonalIdentifiableInformationModifiedObject);
1420+
} else if (Array.isArray(value)) {
1421+
modifiedObject[key] = value.map(replaceValue);
14201422
} else if (redactedKeys.includes(key)) {
14211423
modifiedObject[key] = '*** REDACTED FOR PRIVACY ***';
14221424
} else {

src/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ export type CollectionOrbSecurityButtonButtonButtonDisabled = boolean;
11091109

11101110
export type CollectionOrbSecurityButtonButtonButtonText = PortalPanelArmButtonText | PortalPanelArmButtonLoadingText;
11111111

1112-
export type CollectionOrbSecurityButtonButtonLoadingText = PortalPanelArmButtonLoadingText;
1112+
export type CollectionOrbSecurityButtonButtonLoadingText = PortalPanelArmButtonLoadingText | null;
11131113

11141114
export type CollectionOrbSecurityButtonButton = {
11151115
buttonDisabled: CollectionOrbSecurityButtonButtonButtonDisabled;

0 commit comments

Comments
 (0)