MCPcopy Create free account
hub / github.com/dgreif/ring / getSecurityPanel

Method getSecurityPanel

packages/ring-client-api/location.ts:438–455  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

436 }
437
438 async getSecurityPanel() {
439 if (this.securityPanel) {
440 return this.securityPanel
441 }
442
443 const devices = await this.getDevices(),
444 securityPanel = devices.find((device) => {
445 return device.data.deviceType === RingDeviceType.SecurityPanel
446 })
447
448 if (!securityPanel) {
449 throw new Error(
450 `Could not find a security panel for location ${this.name} - ${this.id}`,
451 )
452 }
453
454 return (this.securityPanel = securityPanel)
455 }
456
457 disarm() {
458 return this.setAlarmMode('none')

Callers 3

setAlarmModeMethod · 0.95
getAlarmModeMethod · 0.95

Calls 1

getDevicesMethod · 0.95

Tested by

no test coverage detected