@camstack/addon-provider-homeassistant 1.2.45 → 1.2.46
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-Dve9pw2J.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-DyzpzpTm.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
|
|
@@ -28880,17 +28880,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
28880
28880
|
longitude: number().min(-180).max(180)
|
|
28881
28881
|
}).nullable();
|
|
28882
28882
|
/**
|
|
28883
|
-
*
|
|
28883
|
+
* The TRANSPORT a call arrived on.
|
|
28884
|
+
*
|
|
28885
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
28886
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
28887
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
28888
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
28889
|
+
* checkable rather than asserted.
|
|
28890
|
+
*
|
|
28891
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
28892
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
28893
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
28894
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
28895
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
28896
|
+
* never touches a socket and therefore never touched a census.
|
|
28897
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
28898
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
28899
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
28900
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
28901
|
+
*/
|
|
28902
|
+
var TransportPlaneSchema = _enum([
|
|
28903
|
+
"http",
|
|
28904
|
+
"ws",
|
|
28905
|
+
"mesh",
|
|
28906
|
+
"unknown"
|
|
28907
|
+
]);
|
|
28908
|
+
/**
|
|
28909
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
28910
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
28911
|
+
* make an operator wonder about.
|
|
28912
|
+
*/
|
|
28913
|
+
var TransportPlaneCountsSchema = object({
|
|
28914
|
+
http: number(),
|
|
28915
|
+
ws: number(),
|
|
28916
|
+
mesh: number(),
|
|
28917
|
+
unknown: number()
|
|
28918
|
+
});
|
|
28919
|
+
/**
|
|
28920
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
28884
28921
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28885
28922
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28886
28923
|
* already prints - never a token, never an `Authorization` header.
|
|
28924
|
+
*
|
|
28925
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
28926
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
28927
|
+
* stream look like a storm.
|
|
28887
28928
|
*/
|
|
28888
28929
|
var RequestCensusGroupSchema = object({
|
|
28930
|
+
plane: TransportPlaneSchema,
|
|
28889
28931
|
procedure: string(),
|
|
28890
28932
|
userAgent: string(),
|
|
28891
28933
|
ip: string(),
|
|
28892
28934
|
principal: string(),
|
|
28893
28935
|
calls: number(),
|
|
28936
|
+
subscriptions: number(),
|
|
28894
28937
|
perMin: number()
|
|
28895
28938
|
});
|
|
28896
28939
|
/**
|
|
@@ -28903,6 +28946,14 @@ var RequestCensusGroupSchema = object({
|
|
|
28903
28946
|
var RequestCensusProcedureSchema = object({
|
|
28904
28947
|
procedure: string(),
|
|
28905
28948
|
calls: number(),
|
|
28949
|
+
/**
|
|
28950
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
28951
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
28952
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
28953
|
+
*/
|
|
28954
|
+
planes: TransportPlaneCountsSchema,
|
|
28955
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
28956
|
+
subscriptions: number(),
|
|
28906
28957
|
perMin: number()
|
|
28907
28958
|
});
|
|
28908
28959
|
/**
|
|
@@ -28930,14 +28981,45 @@ var RequestCensusStatusSchema = object({
|
|
|
28930
28981
|
*/
|
|
28931
28982
|
procedureCalls: number(),
|
|
28932
28983
|
/**
|
|
28984
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
28985
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
28986
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
28987
|
+
*/
|
|
28988
|
+
planes: TransportPlaneCountsSchema,
|
|
28989
|
+
/**
|
|
28990
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
28991
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
28992
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
28993
|
+
*/
|
|
28994
|
+
planesExplainTotal: boolean(),
|
|
28995
|
+
/**
|
|
28933
28996
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28934
|
-
*
|
|
28935
|
-
*
|
|
28997
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
28998
|
+
* count of zero against 37 open connections says something different from a
|
|
28999
|
+
* plane with no connections at all.
|
|
28936
29000
|
*/
|
|
28937
29001
|
wsConnections: number(),
|
|
29002
|
+
/**
|
|
29003
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
29004
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
29005
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
29006
|
+
*/
|
|
29007
|
+
wsMessages: number(),
|
|
29008
|
+
/**
|
|
29009
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
29010
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
29011
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
29012
|
+
* masquerade as the storm.
|
|
29013
|
+
*/
|
|
29014
|
+
subscriptions: number(),
|
|
29015
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
29016
|
+
subscriptionStops: number(),
|
|
28938
29017
|
distinctGroups: number(),
|
|
28939
|
-
/**
|
|
28940
|
-
*
|
|
29018
|
+
/**
|
|
29019
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
29020
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
29021
|
+
* which transport they arrived on, they just lost their group row.
|
|
29022
|
+
*/
|
|
28941
29023
|
unattributedCalls: number(),
|
|
28942
29024
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28943
29025
|
groups: array(RequestCensusGroupSchema).readonly()
|
|
@@ -28880,17 +28880,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
28880
28880
|
longitude: number().min(-180).max(180)
|
|
28881
28881
|
}).nullable();
|
|
28882
28882
|
/**
|
|
28883
|
-
*
|
|
28883
|
+
* The TRANSPORT a call arrived on.
|
|
28884
|
+
*
|
|
28885
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
28886
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
28887
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
28888
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
28889
|
+
* checkable rather than asserted.
|
|
28890
|
+
*
|
|
28891
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
28892
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
28893
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
28894
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
28895
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
28896
|
+
* never touches a socket and therefore never touched a census.
|
|
28897
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
28898
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
28899
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
28900
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
28901
|
+
*/
|
|
28902
|
+
var TransportPlaneSchema = _enum([
|
|
28903
|
+
"http",
|
|
28904
|
+
"ws",
|
|
28905
|
+
"mesh",
|
|
28906
|
+
"unknown"
|
|
28907
|
+
]);
|
|
28908
|
+
/**
|
|
28909
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
28910
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
28911
|
+
* make an operator wonder about.
|
|
28912
|
+
*/
|
|
28913
|
+
var TransportPlaneCountsSchema = object({
|
|
28914
|
+
http: number(),
|
|
28915
|
+
ws: number(),
|
|
28916
|
+
mesh: number(),
|
|
28917
|
+
unknown: number()
|
|
28918
|
+
});
|
|
28919
|
+
/**
|
|
28920
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
28884
28921
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28885
28922
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28886
28923
|
* already prints - never a token, never an `Authorization` header.
|
|
28924
|
+
*
|
|
28925
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
28926
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
28927
|
+
* stream look like a storm.
|
|
28887
28928
|
*/
|
|
28888
28929
|
var RequestCensusGroupSchema = object({
|
|
28930
|
+
plane: TransportPlaneSchema,
|
|
28889
28931
|
procedure: string(),
|
|
28890
28932
|
userAgent: string(),
|
|
28891
28933
|
ip: string(),
|
|
28892
28934
|
principal: string(),
|
|
28893
28935
|
calls: number(),
|
|
28936
|
+
subscriptions: number(),
|
|
28894
28937
|
perMin: number()
|
|
28895
28938
|
});
|
|
28896
28939
|
/**
|
|
@@ -28903,6 +28946,14 @@ var RequestCensusGroupSchema = object({
|
|
|
28903
28946
|
var RequestCensusProcedureSchema = object({
|
|
28904
28947
|
procedure: string(),
|
|
28905
28948
|
calls: number(),
|
|
28949
|
+
/**
|
|
28950
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
28951
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
28952
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
28953
|
+
*/
|
|
28954
|
+
planes: TransportPlaneCountsSchema,
|
|
28955
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
28956
|
+
subscriptions: number(),
|
|
28906
28957
|
perMin: number()
|
|
28907
28958
|
});
|
|
28908
28959
|
/**
|
|
@@ -28930,14 +28981,45 @@ var RequestCensusStatusSchema = object({
|
|
|
28930
28981
|
*/
|
|
28931
28982
|
procedureCalls: number(),
|
|
28932
28983
|
/**
|
|
28984
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
28985
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
28986
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
28987
|
+
*/
|
|
28988
|
+
planes: TransportPlaneCountsSchema,
|
|
28989
|
+
/**
|
|
28990
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
28991
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
28992
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
28993
|
+
*/
|
|
28994
|
+
planesExplainTotal: boolean(),
|
|
28995
|
+
/**
|
|
28933
28996
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28934
|
-
*
|
|
28935
|
-
*
|
|
28997
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
28998
|
+
* count of zero against 37 open connections says something different from a
|
|
28999
|
+
* plane with no connections at all.
|
|
28936
29000
|
*/
|
|
28937
29001
|
wsConnections: number(),
|
|
29002
|
+
/**
|
|
29003
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
29004
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
29005
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
29006
|
+
*/
|
|
29007
|
+
wsMessages: number(),
|
|
29008
|
+
/**
|
|
29009
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
29010
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
29011
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
29012
|
+
* masquerade as the storm.
|
|
29013
|
+
*/
|
|
29014
|
+
subscriptions: number(),
|
|
29015
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
29016
|
+
subscriptionStops: number(),
|
|
28938
29017
|
distinctGroups: number(),
|
|
28939
|
-
/**
|
|
28940
|
-
*
|
|
29018
|
+
/**
|
|
29019
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
29020
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
29021
|
+
* which transport they arrived on, they just lost their group row.
|
|
29022
|
+
*/
|
|
28941
29023
|
unattributedCalls: number(),
|
|
28942
29024
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28943
29025
|
groups: array(RequestCensusGroupSchema).readonly()
|
|
@@ -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-Dve9pw2J.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 { 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-DyzpzpTm.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|