@camstack/addon-provider-homeassistant 1.2.79 → 1.2.80
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-HZncHwuU.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-BpePMREY.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
|
|
@@ -13401,7 +13401,12 @@ var ConfigEntrySchema = object({
|
|
|
13401
13401
|
value: unknown(),
|
|
13402
13402
|
description: string().optional()
|
|
13403
13403
|
});
|
|
13404
|
-
|
|
13404
|
+
/**
|
|
13405
|
+
* Only `manual` since D356: the operator picks, nothing links itself. The
|
|
13406
|
+
* field survives on the wire because a viewer already OTA'd parses it —
|
|
13407
|
+
* drop it once no shipped client reads `mode`.
|
|
13408
|
+
*/
|
|
13409
|
+
var LinkedDevicesModeSchema = _enum(["manual"]);
|
|
13405
13410
|
/** One resolved linked device — the compact projection consumers need. */
|
|
13406
13411
|
var LinkedDeviceSchema = object({
|
|
13407
13412
|
deviceId: number(),
|
|
@@ -13401,7 +13401,12 @@ var ConfigEntrySchema = object({
|
|
|
13401
13401
|
value: unknown(),
|
|
13402
13402
|
description: string().optional()
|
|
13403
13403
|
});
|
|
13404
|
-
|
|
13404
|
+
/**
|
|
13405
|
+
* Only `manual` since D356: the operator picks, nothing links itself. The
|
|
13406
|
+
* field survives on the wire because a viewer already OTA'd parses it —
|
|
13407
|
+
* drop it once no shipped client reads `mode`.
|
|
13408
|
+
*/
|
|
13409
|
+
var LinkedDevicesModeSchema = _enum(["manual"]);
|
|
13405
13410
|
/** One resolved linked device — the compact projection consumers need. */
|
|
13406
13411
|
var LinkedDeviceSchema = object({
|
|
13407
13412
|
deviceId: number(),
|
|
@@ -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-HZncHwuU.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -4807,14 +4807,19 @@ function projectCapSlice(deviceKey, capName, slice) {
|
|
|
4807
4807
|
* the second in Home Assistant's registry with nothing arriving on it —
|
|
4808
4808
|
* which is precisely the defect the descriptor table replaced.
|
|
4809
4809
|
*/
|
|
4810
|
+
const missingFields = [];
|
|
4810
4811
|
for (const ref of capEntities(capName)) {
|
|
4811
4812
|
if (ref.descriptor.platform === "button") continue;
|
|
4812
|
-
if (!Object.prototype.hasOwnProperty.call(slice, ref.descriptor.field))
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4813
|
+
if (!Object.prototype.hasOwnProperty.call(slice, ref.descriptor.field)) {
|
|
4814
|
+
if (ref.entity === entity) return {
|
|
4815
|
+
kind: "missing-field",
|
|
4816
|
+
capName,
|
|
4817
|
+
field: ref.descriptor.field,
|
|
4818
|
+
sliceFields: Object.keys(slice)
|
|
4819
|
+
};
|
|
4820
|
+
missingFields.push(ref.descriptor.field);
|
|
4821
|
+
continue;
|
|
4822
|
+
}
|
|
4818
4823
|
const raw = slice[ref.descriptor.field];
|
|
4819
4824
|
if (raw === null || raw === void 0) continue;
|
|
4820
4825
|
const rendered = renderCapValue(ref.descriptor, deriveCapValue(ref.descriptor.derive, raw));
|
|
@@ -4833,7 +4838,12 @@ function projectCapSlice(deviceKey, capName, slice) {
|
|
|
4833
4838
|
kind: "no-entity",
|
|
4834
4839
|
capName
|
|
4835
4840
|
};
|
|
4836
|
-
return {
|
|
4841
|
+
return missingFields.length > 0 ? {
|
|
4842
|
+
kind: "values",
|
|
4843
|
+
entity,
|
|
4844
|
+
values,
|
|
4845
|
+
missingFields
|
|
4846
|
+
} : {
|
|
4837
4847
|
kind: "values",
|
|
4838
4848
|
entity,
|
|
4839
4849
|
values
|
|
@@ -6210,6 +6220,14 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
6210
6220
|
switch (projection.kind) {
|
|
6211
6221
|
case "values":
|
|
6212
6222
|
if (projection.values.length > 0) this.push(deviceId, projection.values);
|
|
6223
|
+
for (const field of projection.missingFields ?? []) this.warnOnce(deviceId, capName, field, {
|
|
6224
|
+
message: "ha-export: a derived extra entity reads a field its slice does not carry",
|
|
6225
|
+
meta: {
|
|
6226
|
+
capName,
|
|
6227
|
+
field,
|
|
6228
|
+
sliceFields: Object.keys(slice)
|
|
6229
|
+
}
|
|
6230
|
+
});
|
|
6213
6231
|
return;
|
|
6214
6232
|
case "no-entity": return;
|
|
6215
6233
|
case "missing-field":
|
|
@@ -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-BpePMREY.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|
|
@@ -4802,14 +4802,19 @@ function projectCapSlice(deviceKey, capName, slice) {
|
|
|
4802
4802
|
* the second in Home Assistant's registry with nothing arriving on it —
|
|
4803
4803
|
* which is precisely the defect the descriptor table replaced.
|
|
4804
4804
|
*/
|
|
4805
|
+
const missingFields = [];
|
|
4805
4806
|
for (const ref of capEntities(capName)) {
|
|
4806
4807
|
if (ref.descriptor.platform === "button") continue;
|
|
4807
|
-
if (!Object.prototype.hasOwnProperty.call(slice, ref.descriptor.field))
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4808
|
+
if (!Object.prototype.hasOwnProperty.call(slice, ref.descriptor.field)) {
|
|
4809
|
+
if (ref.entity === entity) return {
|
|
4810
|
+
kind: "missing-field",
|
|
4811
|
+
capName,
|
|
4812
|
+
field: ref.descriptor.field,
|
|
4813
|
+
sliceFields: Object.keys(slice)
|
|
4814
|
+
};
|
|
4815
|
+
missingFields.push(ref.descriptor.field);
|
|
4816
|
+
continue;
|
|
4817
|
+
}
|
|
4813
4818
|
const raw = slice[ref.descriptor.field];
|
|
4814
4819
|
if (raw === null || raw === void 0) continue;
|
|
4815
4820
|
const rendered = renderCapValue(ref.descriptor, deriveCapValue(ref.descriptor.derive, raw));
|
|
@@ -4828,7 +4833,12 @@ function projectCapSlice(deviceKey, capName, slice) {
|
|
|
4828
4833
|
kind: "no-entity",
|
|
4829
4834
|
capName
|
|
4830
4835
|
};
|
|
4831
|
-
return {
|
|
4836
|
+
return missingFields.length > 0 ? {
|
|
4837
|
+
kind: "values",
|
|
4838
|
+
entity,
|
|
4839
|
+
values,
|
|
4840
|
+
missingFields
|
|
4841
|
+
} : {
|
|
4832
4842
|
kind: "values",
|
|
4833
4843
|
entity,
|
|
4834
4844
|
values
|
|
@@ -6205,6 +6215,14 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
6205
6215
|
switch (projection.kind) {
|
|
6206
6216
|
case "values":
|
|
6207
6217
|
if (projection.values.length > 0) this.push(deviceId, projection.values);
|
|
6218
|
+
for (const field of projection.missingFields ?? []) this.warnOnce(deviceId, capName, field, {
|
|
6219
|
+
message: "ha-export: a derived extra entity reads a field its slice does not carry",
|
|
6220
|
+
meta: {
|
|
6221
|
+
capName,
|
|
6222
|
+
field,
|
|
6223
|
+
sliceFields: Object.keys(slice)
|
|
6224
|
+
}
|
|
6225
|
+
});
|
|
6208
6226
|
return;
|
|
6209
6227
|
case "no-entity": return;
|
|
6210
6228
|
case "missing-field":
|