@camstack/addon-provider-reolink 1.2.80 → 1.2.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +32 -5
- package/dist/addon.mjs +32 -5
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -19806,7 +19806,20 @@ var RecentTracksQueryInput = object({
|
|
|
19806
19806
|
projection: TrackProjectionSchema.optional(),
|
|
19807
19807
|
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
19808
19808
|
* feed lists passages; parking records live on the stationary registry. */
|
|
19809
|
-
includeStationary: boolean().optional()
|
|
19809
|
+
includeStationary: boolean().optional(),
|
|
19810
|
+
/**
|
|
19811
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
19812
|
+
*
|
|
19813
|
+
* The same filter `listTracks` takes, because the timeline's class chips must
|
|
19814
|
+
* mean the same thing whether the scope is one camera or twelve. Until this
|
|
19815
|
+
* existed the scoped feed downloaded a page and narrowed it on the phone
|
|
19816
|
+
* while the single-camera path narrowed the read — one filter, two costs.
|
|
19817
|
+
*
|
|
19818
|
+
* A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
|
|
19819
|
+
* whose class list is unreadable are kept, and the client's rule stays the
|
|
19820
|
+
* exact one.
|
|
19821
|
+
*/
|
|
19822
|
+
classes: array(string()).optional()
|
|
19810
19823
|
});
|
|
19811
19824
|
var RecentTracksPageSchema = object({
|
|
19812
19825
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -24080,8 +24093,22 @@ var automationControlCapability = {
|
|
|
24080
24093
|
* threshold.
|
|
24081
24094
|
*/
|
|
24082
24095
|
var BatteryStatusSchema = object({
|
|
24083
|
-
/**
|
|
24084
|
-
|
|
24096
|
+
/**
|
|
24097
|
+
* 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
|
|
24098
|
+
* provider has registered the capability but no reading has landed.
|
|
24099
|
+
*
|
|
24100
|
+
* It is nullable because it was not, and the only value a provider could
|
|
24101
|
+
* seed with was `0`. A battery camera behind an NVR therefore announced
|
|
24102
|
+
* itself at 0% on every start and corrected itself a moment later, which is
|
|
24103
|
+
* indistinguishable from a real flat battery: it fires the low-battery alert
|
|
24104
|
+
* every time the hub restarts. Unknown is not empty (D315), and on a battery
|
|
24105
|
+
* reading the difference is an alarm.
|
|
24106
|
+
*
|
|
24107
|
+
* `vacuum-control` and `lawn-mower-control` already model it this way.
|
|
24108
|
+
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
24109
|
+
* declines to band a non-finite reading, which is the correct shape.
|
|
24110
|
+
*/
|
|
24111
|
+
percentage: number().min(0).max(100).nullable(),
|
|
24085
24112
|
/**
|
|
24086
24113
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
24087
24114
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -235466,7 +235493,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
235466
235493
|
* tracker is more reliable.
|
|
235467
235494
|
*/
|
|
235468
235495
|
mapBatteryInfo(info) {
|
|
235469
|
-
const percentage = typeof info.batteryPercent === "number" ? Math.max(0, Math.min(100, Math.round(info.batteryPercent))) : this.state.battery.percentage ??
|
|
235496
|
+
const percentage = typeof info.batteryPercent === "number" ? Math.max(0, Math.min(100, Math.round(info.batteryPercent))) : this.state.battery.percentage ?? null;
|
|
235470
235497
|
const adapter = (info.adapterStatus ?? "").toLowerCase();
|
|
235471
235498
|
const charge = (info.chargeStatus ?? "").toLowerCase();
|
|
235472
235499
|
const isCharging = charge === "charging" || charge === "chargecomplete";
|
|
@@ -235597,7 +235624,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
235597
235624
|
}
|
|
235598
235625
|
});
|
|
235599
235626
|
if (this.getCapSlice(batteryCapability) === null) this.setCapSlice(batteryCapability, {
|
|
235600
|
-
percentage:
|
|
235627
|
+
percentage: null,
|
|
235601
235628
|
charging: "none",
|
|
235602
235629
|
sleeping: false,
|
|
235603
235630
|
lastUpdated: Date.now()
|
package/dist/addon.mjs
CHANGED
|
@@ -19801,7 +19801,20 @@ var RecentTracksQueryInput = object({
|
|
|
19801
19801
|
projection: TrackProjectionSchema.optional(),
|
|
19802
19802
|
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
19803
19803
|
* feed lists passages; parking records live on the stationary registry. */
|
|
19804
|
-
includeStationary: boolean().optional()
|
|
19804
|
+
includeStationary: boolean().optional(),
|
|
19805
|
+
/**
|
|
19806
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
19807
|
+
*
|
|
19808
|
+
* The same filter `listTracks` takes, because the timeline's class chips must
|
|
19809
|
+
* mean the same thing whether the scope is one camera or twelve. Until this
|
|
19810
|
+
* existed the scoped feed downloaded a page and narrowed it on the phone
|
|
19811
|
+
* while the single-camera path narrowed the read — one filter, two costs.
|
|
19812
|
+
*
|
|
19813
|
+
* A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
|
|
19814
|
+
* whose class list is unreadable are kept, and the client's rule stays the
|
|
19815
|
+
* exact one.
|
|
19816
|
+
*/
|
|
19817
|
+
classes: array(string()).optional()
|
|
19805
19818
|
});
|
|
19806
19819
|
var RecentTracksPageSchema = object({
|
|
19807
19820
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -24075,8 +24088,22 @@ var automationControlCapability = {
|
|
|
24075
24088
|
* threshold.
|
|
24076
24089
|
*/
|
|
24077
24090
|
var BatteryStatusSchema = object({
|
|
24078
|
-
/**
|
|
24079
|
-
|
|
24091
|
+
/**
|
|
24092
|
+
* 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
|
|
24093
|
+
* provider has registered the capability but no reading has landed.
|
|
24094
|
+
*
|
|
24095
|
+
* It is nullable because it was not, and the only value a provider could
|
|
24096
|
+
* seed with was `0`. A battery camera behind an NVR therefore announced
|
|
24097
|
+
* itself at 0% on every start and corrected itself a moment later, which is
|
|
24098
|
+
* indistinguishable from a real flat battery: it fires the low-battery alert
|
|
24099
|
+
* every time the hub restarts. Unknown is not empty (D315), and on a battery
|
|
24100
|
+
* reading the difference is an alarm.
|
|
24101
|
+
*
|
|
24102
|
+
* `vacuum-control` and `lawn-mower-control` already model it this way.
|
|
24103
|
+
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
24104
|
+
* declines to band a non-finite reading, which is the correct shape.
|
|
24105
|
+
*/
|
|
24106
|
+
percentage: number().min(0).max(100).nullable(),
|
|
24080
24107
|
/**
|
|
24081
24108
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
24082
24109
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -235446,7 +235473,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
235446
235473
|
* tracker is more reliable.
|
|
235447
235474
|
*/
|
|
235448
235475
|
mapBatteryInfo(info) {
|
|
235449
|
-
const percentage = typeof info.batteryPercent === "number" ? Math.max(0, Math.min(100, Math.round(info.batteryPercent))) : this.state.battery.percentage ??
|
|
235476
|
+
const percentage = typeof info.batteryPercent === "number" ? Math.max(0, Math.min(100, Math.round(info.batteryPercent))) : this.state.battery.percentage ?? null;
|
|
235450
235477
|
const adapter = (info.adapterStatus ?? "").toLowerCase();
|
|
235451
235478
|
const charge = (info.chargeStatus ?? "").toLowerCase();
|
|
235452
235479
|
const isCharging = charge === "charging" || charge === "chargecomplete";
|
|
@@ -235577,7 +235604,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
235577
235604
|
}
|
|
235578
235605
|
});
|
|
235579
235606
|
if (this.getCapSlice(batteryCapability) === null) this.setCapSlice(batteryCapability, {
|
|
235580
|
-
percentage:
|
|
235607
|
+
percentage: null,
|
|
235581
235608
|
charging: "none",
|
|
235582
235609
|
sleeping: false,
|
|
235583
235610
|
lastUpdated: Date.now()
|