Skip to content

Commit

Permalink
Fix intercom unlock notification handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreif committed Jun 21, 2024
1 parent 2cb672c commit f83011d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
6 changes: 6 additions & 0 deletions .changeset/soft-spiders-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'homebridge-ring': patch
'ring-client-api': patch
---

Use new category type for intercom unlock notifications
17 changes: 1 addition & 16 deletions packages/ring-client-api/ring-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,7 @@ export enum NotificationDetectionType {
export enum PushNotificationAction {
Ding = 'com.ring.pn.live-event.ding',
Motion = 'com.ring.pn.live-event.motion',
IntercomUnlock = 'com.ring.pn.live-event.intercom',
LowBattery = 'com.ring.push.LOW_BATTERY_ALERT',
IntercomUnlock = 'com.ring.pn.intercom.virtual.unlock',
}

export interface PushNotificationDingV2 {
Expand Down Expand Up @@ -1075,20 +1074,6 @@ export interface PushNotificationAlarm {
}
}

export interface PushNotificationLowBattery {
data: {
device_name: string
doorbot_id: number
battery_level: number // 29
device_kind: RingDeviceType
timestamp_epoch_ms: number
}
aps: {
title: string // 'Battery at 29% - ABC needs charging.'
}
action: PushNotificationAction.LowBattery
}

export type PushNotification = PushNotificationDingV2

export interface SocketTicketResponse {
Expand Down

0 comments on commit f83011d

Please # to comment.