Skip to content

Commit

Permalink
feat: smoke and co alarm types
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreif committed Jan 10, 2019
1 parent e001ed8 commit f4f8fcc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions get-alarms.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const DeviceType = {
ZigbeeAdapter: 'adapter.zigbee',
AccessCodeVault: 'access-code.vault',
AccessCode: 'access-code',
SmokeAlarm: 'alarm.smoke',
CoAlarm: 'alarm.co',
SmokeCoListener: 'listener.smoke-co',
},
deviceListMessageType = 'DeviceInfoDocGetList'

Expand Down
8 changes: 7 additions & 1 deletion main.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ declare namespace RingApi {
ZigbeeAdapter = 'adapter.zigbee',
AccessCodeVault = 'access-code.vault',
AccessCode = 'access-code',
SmokeAlarm = 'alarm.smoke',
CoAlarm = 'alarm.co',
SmokeCoListener = 'listener.smoke-co',
}

interface AlarmDeviceData {
Expand All @@ -36,11 +39,14 @@ declare namespace RingApi {
volume?: number
mode?: 'all' | 'some' | 'none'
alarmInfo?: {
state: 'burglar-alarm' | 'entry-delay'
state: 'burglar-alarm' | 'entry-delay' | 'fire-alarm' | 'co-alarm' | 'panic' | 'user-verified-co-or-fire-alarm' | 'user-verified-burglar-alarm'
faultedDevices?: string[]
timestamp?: number
uuid?: string
}
alarmStatus?: 'active'
co?: { alarmStatus?: 'active' }
smoke?: { alarmStatus?: 'active' }
}

interface AlarmDevice {
Expand Down

0 comments on commit f4f8fcc

Please sign in to comment.