Skip to content

Commit

Permalink
Debounce 30 seconds before using remote camera state
Browse files Browse the repository at this point in the history
Possible fix for #1272
  • Loading branch information
dgreif committed Aug 19, 2023
1 parent 7d198b8 commit bac6b96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/light-pillows-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'homebridge-ring': patch
---

Wait 30 seconds (instead of 5 seconds) before fetching remote camera status after light is toggled in HomeKit. This may help with issues where camera lights appear to toggle back to old state shortly after turning them on/off.
4 changes: 2 additions & 2 deletions packages/homebridge-ring/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export class Camera extends BaseDataAccessory<RingCamera> {
return value
},
setValue: (value: boolean) => {
// Allow 5 seconds for the light value to update in our status updates from Ring
lightTargetTimer.setTarget(value, 5000)
// Allow 30 seconds for the light value to update in our status updates from Ring
lightTargetTimer.setTarget(value, 30000)
return device.setLight(value)
},
requestUpdate: () => device.requestUpdate(),
Expand Down

0 comments on commit bac6b96

Please # to comment.