@camstack/addon-provider-homeassistant 1.2.37 → 1.2.39
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-DGR35D_v.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 pressureSensorCapability, A as coverCapability, B as imageCapability, C as buttonCapability, Ct as record, D as connectivityCapability, Dt as url, E as colorCapability, Et as unknown, F as fanControlCapability, G as normalizeUnit, H as lockControlCapability, I as floodCapability, J as numericSensorCapability, K as notificationOutputCapability, L as gasCapability, N as enumSensorCapability, O as contactCapability, Ot as EventCategory, P as eventEmitterCapability, Q as presenceCapability, R as humidifierCapability, S as buildAddonRouteProvider, St as object, T as climateControlCapability, Tt as union, U as mediaPlayerCapability, V as lawnMowerControlCapability, W as motionCapability, X as powerMeterCapability, Z as prepareNotification, _ as batteryCapability, _t as _enum, at as updateCapability, b as brightnessCapability, bt as literal, ct as vibrationCapability, d as accessoriesCapability, dt as errMsg, et as scriptRunnerCapability, f as addonRoutesCapability, g as automationControlCapability, gt as createEvent, h as ambientLightSensorCapability, ht as DeviceType, it as temperatureSensorCapability, j as deviceAdoptionCapability, k as controlCapability, lt as waterHeaterCapability, m as alarmPanelCapability, mt as DeviceRole, n as BaseDevice, nt as switchCapability, o as EnumSensorDateTimeFormatSchema, ot as vacuumControlCapability, p as airQualitySensorCapability, pt as DeviceFeature, q as notifierCapability, r as BaseDeviceProvider, rt as tamperCapability, st as valveCapability, tt as smokeCapability, u as TargetSchema, ut as weatherCapability, v as bestLocationMatch, vt as array, w as carbonMonoxideCapability, wt as string, x as brokerCapability, xt as number, y as binaryCapability, yt as discriminatedUnion, z as humiditySensorCapability } from "./dist-
|
|
1
|
+
import { $ as pressureSensorCapability, A as coverCapability, B as imageCapability, C as buttonCapability, Ct as record, D as connectivityCapability, Dt as url, E as colorCapability, Et as unknown, F as fanControlCapability, G as normalizeUnit, H as lockControlCapability, I as floodCapability, J as numericSensorCapability, K as notificationOutputCapability, L as gasCapability, N as enumSensorCapability, O as contactCapability, Ot as EventCategory, P as eventEmitterCapability, Q as presenceCapability, R as humidifierCapability, S as buildAddonRouteProvider, St as object, T as climateControlCapability, Tt as union, U as mediaPlayerCapability, V as lawnMowerControlCapability, W as motionCapability, X as powerMeterCapability, Z as prepareNotification, _ as batteryCapability, _t as _enum, at as updateCapability, b as brightnessCapability, bt as literal, ct as vibrationCapability, d as accessoriesCapability, dt as errMsg, et as scriptRunnerCapability, f as addonRoutesCapability, g as automationControlCapability, gt as createEvent, h as ambientLightSensorCapability, ht as DeviceType, it as temperatureSensorCapability, j as deviceAdoptionCapability, k as controlCapability, lt as waterHeaterCapability, m as alarmPanelCapability, mt as DeviceRole, n as BaseDevice, nt as switchCapability, o as EnumSensorDateTimeFormatSchema, ot as vacuumControlCapability, p as airQualitySensorCapability, pt as DeviceFeature, q as notifierCapability, r as BaseDeviceProvider, rt as tamperCapability, st as valveCapability, tt as smokeCapability, u as TargetSchema, ut as weatherCapability, v as bestLocationMatch, vt as array, w as carbonMonoxideCapability, wt as string, x as brokerCapability, xt as number, y as binaryCapability, yt as discriminatedUnion, z as humiditySensorCapability } from "./dist-CMmUPJOe.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -14,6 +14,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
14
14
|
*/
|
|
15
15
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
16
16
|
/**
|
|
17
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
18
|
+
* Emitted only when the material on disk actually changed, so an
|
|
19
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
20
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
21
|
+
*
|
|
22
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
23
|
+
*/
|
|
24
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
25
|
+
/**
|
|
17
26
|
* A newer addon or server-root package version was found by the
|
|
18
27
|
* authoritative registry check. Emitted once when any observed
|
|
19
28
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19274,6 +19283,12 @@ var CameraStatusSchema = object({
|
|
|
19274
19283
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19275
19284
|
fetchedAt: number()
|
|
19276
19285
|
});
|
|
19286
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19287
|
+
"disabled",
|
|
19288
|
+
"unavailable",
|
|
19289
|
+
"cannot-host-camera-root",
|
|
19290
|
+
"accelerator-preferred"
|
|
19291
|
+
]);
|
|
19277
19292
|
var NodeInferenceDeviceSchema = object({
|
|
19278
19293
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19279
19294
|
key: string(),
|
|
@@ -19304,7 +19319,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19304
19319
|
* available per format; this is the stored selection that becomes the
|
|
19305
19320
|
* default for EVERY camera landing on this accelerator.
|
|
19306
19321
|
*/
|
|
19307
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19322
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19323
|
+
/**
|
|
19324
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19325
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19326
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19327
|
+
* never disagree with the election — deriving it in the UI from
|
|
19328
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19329
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19330
|
+
* "an accelerator is serving" predicate).
|
|
19331
|
+
*/
|
|
19332
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19308
19333
|
});
|
|
19309
19334
|
var NodeInferenceDevicesSchema = object({
|
|
19310
19335
|
nodeId: string(),
|
|
@@ -24244,7 +24269,12 @@ var ListResultSchema = object({
|
|
|
24244
24269
|
probedAt: number()
|
|
24245
24270
|
});
|
|
24246
24271
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
24247
|
-
|
|
24272
|
+
/**
|
|
24273
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
24274
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
24275
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
24276
|
+
*/
|
|
24277
|
+
var ConnectionEndpointSchema = object({
|
|
24248
24278
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
24249
24279
|
label: string(),
|
|
24250
24280
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -24287,7 +24317,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
24287
24317
|
* ordering between polls.
|
|
24288
24318
|
*/
|
|
24289
24319
|
priority: number()
|
|
24290
|
-
})
|
|
24320
|
+
});
|
|
24321
|
+
/**
|
|
24322
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24323
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24324
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24325
|
+
*/
|
|
24326
|
+
var LocalPortSourceEnum = _enum([
|
|
24327
|
+
"server-config",
|
|
24328
|
+
"server-env",
|
|
24329
|
+
"caller-hint",
|
|
24330
|
+
"default"
|
|
24331
|
+
]);
|
|
24332
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24333
|
+
var AdvertisedLocalPortSchema = object({
|
|
24334
|
+
port: number().int().min(1).max(65535),
|
|
24335
|
+
source: LocalPortSourceEnum
|
|
24336
|
+
});
|
|
24337
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24338
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24339
|
+
/**
|
|
24340
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24341
|
+
* came from.
|
|
24342
|
+
*
|
|
24343
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24344
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24345
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24346
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24347
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24348
|
+
* `caller-hint` is the hub's own socket.
|
|
24349
|
+
*
|
|
24350
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24351
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24352
|
+
* `caller-hint`.
|
|
24353
|
+
*/
|
|
24354
|
+
localPort: AdvertisedLocalPortSchema
|
|
24355
|
+
});
|
|
24291
24356
|
/**
|
|
24292
24357
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
24293
24358
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24308,8 +24373,13 @@ var AllowedAddressesSchema = object({
|
|
|
24308
24373
|
*/
|
|
24309
24374
|
addresses: array(string()).readonly() });
|
|
24310
24375
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24311
|
-
/**
|
|
24312
|
-
|
|
24376
|
+
/**
|
|
24377
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24378
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24379
|
+
* only when it cannot read its own port, and says so via
|
|
24380
|
+
* `localPort.source === 'caller-hint'`.
|
|
24381
|
+
*/
|
|
24382
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24313
24383
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24314
24384
|
* candidate. Default `true`. */
|
|
24315
24385
|
includeLoopback: boolean().optional(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-CIa_iT6b.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -14,6 +14,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
14
14
|
*/
|
|
15
15
|
EventCategory["SystemRestartCompleted"] = "system.restart-completed";
|
|
16
16
|
/**
|
|
17
|
+
* The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
|
|
18
|
+
* Emitted only when the material on disk actually changed, so an
|
|
19
|
+
* operator who trusted the old certificate by hand is told rather than
|
|
20
|
+
* discovering it as a browser error. Payload `TlsCertChangedPayload`.
|
|
21
|
+
*
|
|
22
|
+
* Rule: docs/decisions/adr-0227-*.md
|
|
23
|
+
*/
|
|
24
|
+
EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
|
|
25
|
+
/**
|
|
17
26
|
* A newer addon or server-root package version was found by the
|
|
18
27
|
* authoritative registry check. Emitted once when any observed
|
|
19
28
|
* `latestVersion` changes (or a package/node first appears behind);
|
|
@@ -19274,6 +19283,12 @@ var CameraStatusSchema = object({
|
|
|
19274
19283
|
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
19275
19284
|
fetchedAt: number()
|
|
19276
19285
|
});
|
|
19286
|
+
var InferenceDeviceExclusionReasonSchema = _enum([
|
|
19287
|
+
"disabled",
|
|
19288
|
+
"unavailable",
|
|
19289
|
+
"cannot-host-camera-root",
|
|
19290
|
+
"accelerator-preferred"
|
|
19291
|
+
]);
|
|
19277
19292
|
var NodeInferenceDeviceSchema = object({
|
|
19278
19293
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
19279
19294
|
key: string(),
|
|
@@ -19304,7 +19319,17 @@ var NodeInferenceDeviceSchema = object({
|
|
|
19304
19319
|
* available per format; this is the stored selection that becomes the
|
|
19305
19320
|
* default for EVERY camera landing on this accelerator.
|
|
19306
19321
|
*/
|
|
19307
|
-
steps: record(string(), DeviceStepConfigSchema).optional()
|
|
19322
|
+
steps: record(string(), DeviceStepConfigSchema).optional(),
|
|
19323
|
+
/**
|
|
19324
|
+
* `null` when the device IS a camera-root candidate on this node; otherwise
|
|
19325
|
+
* the reason the dispatcher drops it. Computed by the SAME
|
|
19326
|
+
* `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
|
|
19327
|
+
* never disagree with the election — deriving it in the UI from
|
|
19328
|
+
* `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
|
|
19329
|
+
* the node's model catalog) and `accelerator-preferred` (needs the node-wide
|
|
19330
|
+
* "an accelerator is serving" predicate).
|
|
19331
|
+
*/
|
|
19332
|
+
exclusion: InferenceDeviceExclusionReasonSchema.nullable()
|
|
19308
19333
|
});
|
|
19309
19334
|
var NodeInferenceDevicesSchema = object({
|
|
19310
19335
|
nodeId: string(),
|
|
@@ -24244,7 +24269,12 @@ var ListResultSchema = object({
|
|
|
24244
24269
|
probedAt: number()
|
|
24245
24270
|
});
|
|
24246
24271
|
var PreferredSchema = LocalInterfaceSchema.nullable();
|
|
24247
|
-
|
|
24272
|
+
/**
|
|
24273
|
+
* Candidate base URL for the SDK to race on connect. Order matters —
|
|
24274
|
+
* the SDK should attempt these top-to-bottom with a short per-candidate
|
|
24275
|
+
* timeout (e.g. 1500ms) and cache the winner for the session.
|
|
24276
|
+
*/
|
|
24277
|
+
var ConnectionEndpointSchema = object({
|
|
24248
24278
|
/** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
|
|
24249
24279
|
label: string(),
|
|
24250
24280
|
/** Fully-formed base URL with scheme + host + port. */
|
|
@@ -24287,7 +24317,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
|
|
|
24287
24317
|
* ordering between polls.
|
|
24288
24318
|
*/
|
|
24289
24319
|
priority: number()
|
|
24290
|
-
})
|
|
24320
|
+
});
|
|
24321
|
+
/**
|
|
24322
|
+
* Where the advertised local port came from. Ordered most → least
|
|
24323
|
+
* authoritative, and the whole point of returning it: a client must be able to
|
|
24324
|
+
* tell a FACT about the hub's socket from an echo of its own guess.
|
|
24325
|
+
*/
|
|
24326
|
+
var LocalPortSourceEnum = _enum([
|
|
24327
|
+
"server-config",
|
|
24328
|
+
"server-env",
|
|
24329
|
+
"caller-hint",
|
|
24330
|
+
"default"
|
|
24331
|
+
]);
|
|
24332
|
+
/** The port every LAN/loopback `baseUrl` in the same result was built with. */
|
|
24333
|
+
var AdvertisedLocalPortSchema = object({
|
|
24334
|
+
port: number().int().min(1).max(65535),
|
|
24335
|
+
source: LocalPortSourceEnum
|
|
24336
|
+
});
|
|
24337
|
+
var GetConnectionEndpointsResultSchema = object({
|
|
24338
|
+
endpoints: array(ConnectionEndpointSchema).readonly(),
|
|
24339
|
+
/**
|
|
24340
|
+
* The port the hub built the LAN/loopback URLs with, and where that number
|
|
24341
|
+
* came from.
|
|
24342
|
+
*
|
|
24343
|
+
* Returned rather than merely applied, because "the URL is right" and "the
|
|
24344
|
+
* client can KNOW the URL is right" are different properties. A client that
|
|
24345
|
+
* only sees a corrected URL cannot distinguish a hub that fixed the port from
|
|
24346
|
+
* a hub that echoed the port the client sent, so it cannot decide whether to
|
|
24347
|
+
* race the candidate or discard it. With `source` it can: anything but
|
|
24348
|
+
* `caller-hint` is the hub's own socket.
|
|
24349
|
+
*
|
|
24350
|
+
* Absent on hubs predating this field — a client that finds it missing is
|
|
24351
|
+
* talking to an echoing hub and must degrade exactly as it does for
|
|
24352
|
+
* `caller-hint`.
|
|
24353
|
+
*/
|
|
24354
|
+
localPort: AdvertisedLocalPortSchema
|
|
24355
|
+
});
|
|
24291
24356
|
/**
|
|
24292
24357
|
* The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
|
|
24293
24358
|
* AUTO (resolved from the candidate ranking at send time); `resolved` reports
|
|
@@ -24308,8 +24373,13 @@ var AllowedAddressesSchema = object({
|
|
|
24308
24373
|
*/
|
|
24309
24374
|
addresses: array(string()).readonly() });
|
|
24310
24375
|
method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
|
|
24311
|
-
/**
|
|
24312
|
-
|
|
24376
|
+
/**
|
|
24377
|
+
* LEGACY HINT — do not send from new code. Kept optional so clients
|
|
24378
|
+
* written against the echoing contract keep working; the hub uses it
|
|
24379
|
+
* only when it cannot read its own port, and says so via
|
|
24380
|
+
* `localPort.source === 'caller-hint'`.
|
|
24381
|
+
*/
|
|
24382
|
+
port: number().int().min(1).max(65535).optional(),
|
|
24313
24383
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24314
24384
|
* candidate. Default `true`. */
|
|
24315
24385
|
includeLoopback: boolean().optional(),
|
|
@@ -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-DGR35D_v.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as deviceExportCapability, Ot as EventCategory, S as buildAddonRouteProvider, Y as oauthIntegrationCapability, a as CameraSwitchIdSchema, c as HvacModeSchema, f as addonRoutesCapability, ft as BaseAddon, i as COCO_TO_MACRO, l as MediaPlayerRepeatSchema, s as FanDirectionSchema, t as AlarmArmModeSchema, wt as string } from "../dist-
|
|
1
|
+
import { M as deviceExportCapability, Ot as EventCategory, S as buildAddonRouteProvider, Y as oauthIntegrationCapability, a as CameraSwitchIdSchema, c as HvacModeSchema, f as addonRoutesCapability, ft as BaseAddon, i as COCO_TO_MACRO, l as MediaPlayerRepeatSchema, s as FanDirectionSchema, t as AlarmArmModeSchema, wt as string } from "../dist-CMmUPJOe.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|