@camstack/addon-provider-homeassistant 1.2.71 → 1.2.72
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DkMiMzBV.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-device-source.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-
|
|
1
|
+
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-CwsG7FxA.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-device-source.ts
|
|
@@ -19571,7 +19571,20 @@ var RecentTracksQueryInput = object({
|
|
|
19571
19571
|
projection: TrackProjectionSchema.optional(),
|
|
19572
19572
|
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
19573
19573
|
* feed lists passages; parking records live on the stationary registry. */
|
|
19574
|
-
includeStationary: boolean().optional()
|
|
19574
|
+
includeStationary: boolean().optional(),
|
|
19575
|
+
/**
|
|
19576
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
19577
|
+
*
|
|
19578
|
+
* The same filter `listTracks` takes, because the timeline's class chips must
|
|
19579
|
+
* mean the same thing whether the scope is one camera or twelve. Until this
|
|
19580
|
+
* existed the scoped feed downloaded a page and narrowed it on the phone
|
|
19581
|
+
* while the single-camera path narrowed the read — one filter, two costs.
|
|
19582
|
+
*
|
|
19583
|
+
* A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
|
|
19584
|
+
* whose class list is unreadable are kept, and the client's rule stays the
|
|
19585
|
+
* exact one.
|
|
19586
|
+
*/
|
|
19587
|
+
classes: array(string()).optional()
|
|
19575
19588
|
});
|
|
19576
19589
|
var RecentTracksPageSchema = object({
|
|
19577
19590
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -23813,8 +23826,22 @@ var automationControlCapability = {
|
|
|
23813
23826
|
* threshold.
|
|
23814
23827
|
*/
|
|
23815
23828
|
var BatteryStatusSchema = object({
|
|
23816
|
-
/**
|
|
23817
|
-
|
|
23829
|
+
/**
|
|
23830
|
+
* 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
|
|
23831
|
+
* provider has registered the capability but no reading has landed.
|
|
23832
|
+
*
|
|
23833
|
+
* It is nullable because it was not, and the only value a provider could
|
|
23834
|
+
* seed with was `0`. A battery camera behind an NVR therefore announced
|
|
23835
|
+
* itself at 0% on every start and corrected itself a moment later, which is
|
|
23836
|
+
* indistinguishable from a real flat battery: it fires the low-battery alert
|
|
23837
|
+
* every time the hub restarts. Unknown is not empty (D315), and on a battery
|
|
23838
|
+
* reading the difference is an alarm.
|
|
23839
|
+
*
|
|
23840
|
+
* `vacuum-control` and `lawn-mower-control` already model it this way.
|
|
23841
|
+
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
23842
|
+
* declines to band a non-finite reading, which is the correct shape.
|
|
23843
|
+
*/
|
|
23844
|
+
percentage: number().min(0).max(100).nullable(),
|
|
23818
23845
|
/**
|
|
23819
23846
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23820
23847
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -19571,7 +19571,20 @@ var RecentTracksQueryInput = object({
|
|
|
19571
19571
|
projection: TrackProjectionSchema.optional(),
|
|
19572
19572
|
/** Include stationary-promoted rows (parked objects). Default false: the
|
|
19573
19573
|
* feed lists passages; parking records live on the stationary registry. */
|
|
19574
|
-
includeStationary: boolean().optional()
|
|
19574
|
+
includeStationary: boolean().optional(),
|
|
19575
|
+
/**
|
|
19576
|
+
* Restrict to these track classes. ABSENT or EMPTY means no filter.
|
|
19577
|
+
*
|
|
19578
|
+
* The same filter `listTracks` takes, because the timeline's class chips must
|
|
19579
|
+
* mean the same thing whether the scope is one camera or twelve. Until this
|
|
19580
|
+
* existed the scoped feed downloaded a page and narrowed it on the phone
|
|
19581
|
+
* while the single-camera path narrowed the read — one filter, two costs.
|
|
19582
|
+
*
|
|
19583
|
+
* A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
|
|
19584
|
+
* whose class list is unreadable are kept, and the client's rule stays the
|
|
19585
|
+
* exact one.
|
|
19586
|
+
*/
|
|
19587
|
+
classes: array(string()).optional()
|
|
19575
19588
|
});
|
|
19576
19589
|
var RecentTracksPageSchema = object({
|
|
19577
19590
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -23813,8 +23826,22 @@ var automationControlCapability = {
|
|
|
23813
23826
|
* threshold.
|
|
23814
23827
|
*/
|
|
23815
23828
|
var BatteryStatusSchema = object({
|
|
23816
|
-
/**
|
|
23817
|
-
|
|
23829
|
+
/**
|
|
23830
|
+
* 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
|
|
23831
|
+
* provider has registered the capability but no reading has landed.
|
|
23832
|
+
*
|
|
23833
|
+
* It is nullable because it was not, and the only value a provider could
|
|
23834
|
+
* seed with was `0`. A battery camera behind an NVR therefore announced
|
|
23835
|
+
* itself at 0% on every start and corrected itself a moment later, which is
|
|
23836
|
+
* indistinguishable from a real flat battery: it fires the low-battery alert
|
|
23837
|
+
* every time the hub restarts. Unknown is not empty (D315), and on a battery
|
|
23838
|
+
* reading the difference is an alarm.
|
|
23839
|
+
*
|
|
23840
|
+
* `vacuum-control` and `lawn-mower-control` already model it this way.
|
|
23841
|
+
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
23842
|
+
* declines to band a non-finite reading, which is the correct shape.
|
|
23843
|
+
*/
|
|
23844
|
+
percentage: number().min(0).max(100).nullable(),
|
|
23818
23845
|
/**
|
|
23819
23846
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
23820
23847
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-DkMiMzBV.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -4971,8 +4971,12 @@ function projectBatterySlice(deviceKey, slice) {
|
|
|
4971
4971
|
* `binary: true` means the device reports "low" or "not low" and the
|
|
4972
4972
|
* percentage is a stand-in. Publishing it would put a fabricated
|
|
4973
4973
|
* number on a battery gauge, which is worse than an empty one.
|
|
4974
|
+
*
|
|
4975
|
+
* A `null` percentage is the same judgement for a different reason: the
|
|
4976
|
+
* level is NOT YET KNOWN. `String(null)` would publish the text "null" onto
|
|
4977
|
+
* that gauge, and coercing it to 0 would publish a flat battery.
|
|
4974
4978
|
*/
|
|
4975
|
-
if (slice.binary !== true) values.push({
|
|
4979
|
+
if (slice.binary !== true && slice.percentage !== null) values.push({
|
|
4976
4980
|
topic: stateTopic(deviceKey, "battery"),
|
|
4977
4981
|
value: String(slice.percentage)
|
|
4978
4982
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-
|
|
1
|
+
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-CwsG7FxA.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|
|
@@ -4966,8 +4966,12 @@ function projectBatterySlice(deviceKey, slice) {
|
|
|
4966
4966
|
* `binary: true` means the device reports "low" or "not low" and the
|
|
4967
4967
|
* percentage is a stand-in. Publishing it would put a fabricated
|
|
4968
4968
|
* number on a battery gauge, which is worse than an empty one.
|
|
4969
|
+
*
|
|
4970
|
+
* A `null` percentage is the same judgement for a different reason: the
|
|
4971
|
+
* level is NOT YET KNOWN. `String(null)` would publish the text "null" onto
|
|
4972
|
+
* that gauge, and coercing it to 0 would publish a flat battery.
|
|
4969
4973
|
*/
|
|
4970
|
-
if (slice.binary !== true) values.push({
|
|
4974
|
+
if (slice.binary !== true && slice.percentage !== null) values.push({
|
|
4971
4975
|
topic: stateTopic(deviceKey, "battery"),
|
|
4972
4976
|
value: String(slice.percentage)
|
|
4973
4977
|
});
|