diff --git a/.changeset/beige-hairs-argue.md b/.changeset/beige-hairs-argue.md new file mode 100644 index 00000000..7d1a97bf --- /dev/null +++ b/.changeset/beige-hairs-argue.md @@ -0,0 +1,6 @@ +--- +'homebridge-ring': patch +'ring-client-api': patch +--- + +Fixed a typo which caused all cameras to be recognized as wired cameras. This lead to slower notifications for battery cameras and removed the battery level in HomeKit. Big thanks to @satrik for pointing me in the right direction to track down these issues! diff --git a/packages/ring-client-api/ring-camera.ts b/packages/ring-client-api/ring-camera.ts index 8a1d7513..d994d85a 100644 --- a/packages/ring-client-api/ring-camera.ts +++ b/packages/ring-client-api/ring-camera.ts @@ -160,7 +160,7 @@ export class RingCamera extends Subscribed { this.onBatteryLevel = this.onData.pipe( map((data) => { - if (!('battery_level' in data)) { + if (!('battery_life' in data)) { return null } return getBatteryLevel(data) @@ -219,7 +219,7 @@ export class RingCamera extends Subscribed { } get batteryLevel() { - if (!('battery_level' in this.data)) { + if (!('battery_life' in this.data)) { return null } return getBatteryLevel(this.data)