Skip to content

Commit

Permalink
fix(homebridge): prevent double ding notifications
Browse files Browse the repository at this point in the history
Closes #944
  • Loading branch information
dgreif committed Aug 28, 2022
1 parent 2425a14 commit 9b63104
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homebridge/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hap } from './hap'
import { RingPlatformConfig } from './config'
import { RingCamera } from '../api'
import { BaseDataAccessory } from './base-data-accessory'
import { map, mapTo, switchMap } from 'rxjs/operators'
import { map, mapTo, switchMap, throttleTime } from 'rxjs/operators'
import { CameraSource } from './camera-source'
import { PlatformAccessory } from 'homebridge'
import { TargetValueTimer } from './target-value-timer'
Expand Down Expand Up @@ -67,6 +67,7 @@ export class Camera extends BaseDataAccessory<RingCamera> {
characteristicType: Characteristic.ProgrammableSwitchEvent,
serviceType: Service.Doorbell,
onValue: device.onDoorbellPressed.pipe(
throttleTime(15000),
switchMap(() => {
return this.loadSnapshotForEvent(
'Doorbell Pressed',
Expand Down

0 comments on commit 9b63104

Please sign in to comment.