@camstack/addon-export-hap 1.2.180 → 1.2.182
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/CHANGELOG.md +12 -0
- package/README.md +19 -0
- package/dist/hap-export.addon.js +861 -441
- package/dist/hap-export.addon.mjs +861 -441
- package/package.json +4 -2
|
@@ -39,7 +39,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
39
39
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
40
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../types/dist/event-category-
|
|
42
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
43
43
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
44
44
|
EventCategory["SystemBoot"] = "system.boot";
|
|
45
45
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -365,6 +365,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
365
365
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
366
366
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
367
367
|
/**
|
|
368
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
369
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
370
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
371
|
+
*/
|
|
372
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
373
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
374
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
375
|
+
/**
|
|
368
376
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
369
377
|
* (a settings change via `setAgentInferenceDevices` /
|
|
370
378
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5474,7 +5482,7 @@ var ZodIssueCode = {
|
|
|
5474
5482
|
var ZodFirstPartyTypeKind;
|
|
5475
5483
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5476
5484
|
//#endregion
|
|
5477
|
-
//#region ../types/dist/sleep-
|
|
5485
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5478
5486
|
/**
|
|
5479
5487
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5480
5488
|
* window to float samples (D455).
|
|
@@ -7961,6 +7969,99 @@ var RecordKindDeclarationSchema = object({
|
|
|
7961
7969
|
}).strict();
|
|
7962
7970
|
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7963
7971
|
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7972
|
+
var READING_QUANTITIES = [
|
|
7973
|
+
"temperature",
|
|
7974
|
+
"pressure",
|
|
7975
|
+
"speed",
|
|
7976
|
+
"precipitation",
|
|
7977
|
+
"precipitation-rate",
|
|
7978
|
+
"length",
|
|
7979
|
+
"area",
|
|
7980
|
+
"illuminance",
|
|
7981
|
+
"irradiance",
|
|
7982
|
+
"power",
|
|
7983
|
+
"energy",
|
|
7984
|
+
"voltage",
|
|
7985
|
+
"current",
|
|
7986
|
+
"apparent-power",
|
|
7987
|
+
"humidity",
|
|
7988
|
+
"percentage",
|
|
7989
|
+
"concentration-volume",
|
|
7990
|
+
"concentration-mass",
|
|
7991
|
+
"concentration-ppb",
|
|
7992
|
+
"volume",
|
|
7993
|
+
"duration",
|
|
7994
|
+
"duration-ms",
|
|
7995
|
+
"information",
|
|
7996
|
+
"sound-level",
|
|
7997
|
+
"signal-level",
|
|
7998
|
+
"colour-temperature",
|
|
7999
|
+
"angle",
|
|
8000
|
+
"bitrate",
|
|
8001
|
+
"rate",
|
|
8002
|
+
"mass",
|
|
8003
|
+
"index",
|
|
8004
|
+
"ratio",
|
|
8005
|
+
"count",
|
|
8006
|
+
"none",
|
|
8007
|
+
"device"
|
|
8008
|
+
];
|
|
8009
|
+
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
8010
|
+
new Set(READING_QUANTITIES);
|
|
8011
|
+
/**
|
|
8012
|
+
* Stored unit symbol for a quantity. `none` means the number is dimensionless
|
|
8013
|
+
* (or an index / ratio / count). `device` means the cap has no single unit.
|
|
8014
|
+
*/
|
|
8015
|
+
var QUANTITY_BASE = {
|
|
8016
|
+
temperature: "°C",
|
|
8017
|
+
pressure: "hPa",
|
|
8018
|
+
speed: "m/s",
|
|
8019
|
+
precipitation: "mm",
|
|
8020
|
+
"precipitation-rate": "mm/h",
|
|
8021
|
+
length: "m",
|
|
8022
|
+
area: "m²",
|
|
8023
|
+
illuminance: "lx",
|
|
8024
|
+
irradiance: "W/m²",
|
|
8025
|
+
power: "W",
|
|
8026
|
+
energy: "kWh",
|
|
8027
|
+
voltage: "V",
|
|
8028
|
+
current: "A",
|
|
8029
|
+
"apparent-power": "VA",
|
|
8030
|
+
humidity: "%",
|
|
8031
|
+
percentage: "%",
|
|
8032
|
+
"concentration-volume": "ppm",
|
|
8033
|
+
"concentration-mass": "µg/m³",
|
|
8034
|
+
"concentration-ppb": "ppb",
|
|
8035
|
+
volume: "L",
|
|
8036
|
+
duration: "s",
|
|
8037
|
+
"duration-ms": "ms",
|
|
8038
|
+
information: "B",
|
|
8039
|
+
"sound-level": "dBFS",
|
|
8040
|
+
"signal-level": "dBm",
|
|
8041
|
+
"colour-temperature": "mired",
|
|
8042
|
+
angle: "°",
|
|
8043
|
+
bitrate: "kbps",
|
|
8044
|
+
rate: "fps",
|
|
8045
|
+
mass: "kg",
|
|
8046
|
+
index: "none",
|
|
8047
|
+
ratio: "none",
|
|
8048
|
+
count: "none",
|
|
8049
|
+
none: "none",
|
|
8050
|
+
device: "device"
|
|
8051
|
+
};
|
|
8052
|
+
/** The stored unit, or `undefined` when the quantity has no unit symbol. */
|
|
8053
|
+
function baseUnitOf(quantity) {
|
|
8054
|
+
const symbol = QUANTITY_BASE[quantity];
|
|
8055
|
+
if (symbol === "none" || symbol === "device") return void 0;
|
|
8056
|
+
return symbol;
|
|
8057
|
+
}
|
|
8058
|
+
function readingMeta(quantity, extras) {
|
|
8059
|
+
return {
|
|
8060
|
+
quantity,
|
|
8061
|
+
...extras?.precision !== void 0 ? { precision: extras.precision } : {},
|
|
8062
|
+
...extras?.label !== void 0 ? { label: extras.label } : {}
|
|
8063
|
+
};
|
|
8064
|
+
}
|
|
7964
8065
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7965
8066
|
var CamProfileSchema = _enum([
|
|
7966
8067
|
"high",
|
|
@@ -7988,8 +8089,8 @@ var CamStreamKindSchema = _enum([
|
|
|
7988
8089
|
"derived"
|
|
7989
8090
|
]);
|
|
7990
8091
|
var CamStreamResolutionSchema = object({
|
|
7991
|
-
width: number().int().positive(),
|
|
7992
|
-
height: number().int().positive()
|
|
8092
|
+
width: number().int().positive().meta(readingMeta("none")),
|
|
8093
|
+
height: number().int().positive().meta(readingMeta("none"))
|
|
7993
8094
|
});
|
|
7994
8095
|
var CameraStreamSchema = object({
|
|
7995
8096
|
/** Stable, provider-assigned id unique within the (deviceId) scope. */
|
|
@@ -8562,6 +8663,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
8562
8663
|
"filesystem-browse",
|
|
8563
8664
|
"flood",
|
|
8564
8665
|
"gas",
|
|
8666
|
+
"group-commands",
|
|
8667
|
+
"group-status",
|
|
8565
8668
|
"heating-valve",
|
|
8566
8669
|
"humidifier",
|
|
8567
8670
|
"humidity-sensor",
|
|
@@ -8691,14 +8794,6 @@ Object.freeze({
|
|
|
8691
8794
|
{
|
|
8692
8795
|
"path": "aqi",
|
|
8693
8796
|
"valueType": "number"
|
|
8694
|
-
},
|
|
8695
|
-
{
|
|
8696
|
-
"path": "unit",
|
|
8697
|
-
"valueType": "string"
|
|
8698
|
-
},
|
|
8699
|
-
{
|
|
8700
|
-
"path": "precision",
|
|
8701
|
-
"valueType": "number"
|
|
8702
8797
|
}
|
|
8703
8798
|
],
|
|
8704
8799
|
"alarm-panel": [
|
|
@@ -8734,20 +8829,10 @@ Object.freeze({
|
|
|
8734
8829
|
"valueType": "boolean"
|
|
8735
8830
|
}
|
|
8736
8831
|
],
|
|
8737
|
-
"ambient-light-sensor": [
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
},
|
|
8742
|
-
{
|
|
8743
|
-
"path": "unit",
|
|
8744
|
-
"valueType": "string"
|
|
8745
|
-
},
|
|
8746
|
-
{
|
|
8747
|
-
"path": "precision",
|
|
8748
|
-
"valueType": "number"
|
|
8749
|
-
}
|
|
8750
|
-
],
|
|
8832
|
+
"ambient-light-sensor": [{
|
|
8833
|
+
"path": "lux",
|
|
8834
|
+
"valueType": "number"
|
|
8835
|
+
}],
|
|
8751
8836
|
"audio-metrics": [
|
|
8752
8837
|
{
|
|
8753
8838
|
"path": "ts",
|
|
@@ -8827,6 +8912,10 @@ Object.freeze({
|
|
|
8827
8912
|
"path": "lastUpdated",
|
|
8828
8913
|
"valueType": "number"
|
|
8829
8914
|
},
|
|
8915
|
+
{
|
|
8916
|
+
"path": "volts",
|
|
8917
|
+
"valueType": "number"
|
|
8918
|
+
},
|
|
8830
8919
|
{
|
|
8831
8920
|
"path": "lastContactAt",
|
|
8832
8921
|
"valueType": "number"
|
|
@@ -9069,10 +9158,6 @@ Object.freeze({
|
|
|
9069
9158
|
"datetime"
|
|
9070
9159
|
]
|
|
9071
9160
|
},
|
|
9072
|
-
{
|
|
9073
|
-
"path": "unit",
|
|
9074
|
-
"valueType": "string"
|
|
9075
|
-
},
|
|
9076
9161
|
{
|
|
9077
9162
|
"path": "min",
|
|
9078
9163
|
"valueType": "number"
|
|
@@ -9084,19 +9169,6 @@ Object.freeze({
|
|
|
9084
9169
|
{
|
|
9085
9170
|
"path": "step",
|
|
9086
9171
|
"valueType": "number"
|
|
9087
|
-
},
|
|
9088
|
-
{
|
|
9089
|
-
"path": "precision",
|
|
9090
|
-
"valueType": "number"
|
|
9091
|
-
},
|
|
9092
|
-
{
|
|
9093
|
-
"path": "format",
|
|
9094
|
-
"valueType": "enum",
|
|
9095
|
-
"enumValues": [
|
|
9096
|
-
"date",
|
|
9097
|
-
"time",
|
|
9098
|
-
"datetime"
|
|
9099
|
-
]
|
|
9100
9172
|
}
|
|
9101
9173
|
],
|
|
9102
9174
|
"cover": [
|
|
@@ -9337,13 +9409,8 @@ Object.freeze({
|
|
|
9337
9409
|
"path": "value",
|
|
9338
9410
|
"valueType": "string"
|
|
9339
9411
|
}, {
|
|
9340
|
-
"path": "
|
|
9341
|
-
"valueType": "
|
|
9342
|
-
"enumValues": [
|
|
9343
|
-
"date",
|
|
9344
|
-
"time",
|
|
9345
|
-
"datetime"
|
|
9346
|
-
]
|
|
9412
|
+
"path": "timestamp",
|
|
9413
|
+
"valueType": "boolean"
|
|
9347
9414
|
}],
|
|
9348
9415
|
"event-emitter": [
|
|
9349
9416
|
{
|
|
@@ -9416,6 +9483,20 @@ Object.freeze({
|
|
|
9416
9483
|
"path": "detected",
|
|
9417
9484
|
"valueType": "boolean"
|
|
9418
9485
|
}],
|
|
9486
|
+
"group-status": [
|
|
9487
|
+
{
|
|
9488
|
+
"path": "included",
|
|
9489
|
+
"valueType": "number"
|
|
9490
|
+
},
|
|
9491
|
+
{
|
|
9492
|
+
"path": "excluded",
|
|
9493
|
+
"valueType": "number"
|
|
9494
|
+
},
|
|
9495
|
+
{
|
|
9496
|
+
"path": "total",
|
|
9497
|
+
"valueType": "number"
|
|
9498
|
+
}
|
|
9499
|
+
],
|
|
9419
9500
|
"heating-valve": [{
|
|
9420
9501
|
"path": "position",
|
|
9421
9502
|
"valueType": "number"
|
|
@@ -9450,20 +9531,10 @@ Object.freeze({
|
|
|
9450
9531
|
"valueType": "number"
|
|
9451
9532
|
}
|
|
9452
9533
|
],
|
|
9453
|
-
"humidity-sensor": [
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
},
|
|
9458
|
-
{
|
|
9459
|
-
"path": "unit",
|
|
9460
|
-
"valueType": "string"
|
|
9461
|
-
},
|
|
9462
|
-
{
|
|
9463
|
-
"path": "precision",
|
|
9464
|
-
"valueType": "number"
|
|
9465
|
-
}
|
|
9466
|
-
],
|
|
9534
|
+
"humidity-sensor": [{
|
|
9535
|
+
"path": "percent",
|
|
9536
|
+
"valueType": "number"
|
|
9537
|
+
}],
|
|
9467
9538
|
"image": [{
|
|
9468
9539
|
"path": "url",
|
|
9469
9540
|
"valueType": "string"
|
|
@@ -9802,20 +9873,10 @@ Object.freeze({
|
|
|
9802
9873
|
"valueType": "boolean"
|
|
9803
9874
|
}
|
|
9804
9875
|
],
|
|
9805
|
-
"numeric-sensor": [
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
},
|
|
9810
|
-
{
|
|
9811
|
-
"path": "unit",
|
|
9812
|
-
"valueType": "string"
|
|
9813
|
-
},
|
|
9814
|
-
{
|
|
9815
|
-
"path": "precision",
|
|
9816
|
-
"valueType": "number"
|
|
9817
|
-
}
|
|
9818
|
-
],
|
|
9876
|
+
"numeric-sensor": [{
|
|
9877
|
+
"path": "value",
|
|
9878
|
+
"valueType": "number"
|
|
9879
|
+
}],
|
|
9819
9880
|
"pet-feeder": [
|
|
9820
9881
|
{
|
|
9821
9882
|
"path": "foodLevel",
|
|
@@ -9907,14 +9968,6 @@ Object.freeze({
|
|
|
9907
9968
|
{
|
|
9908
9969
|
"path": "powerFactor",
|
|
9909
9970
|
"valueType": "number"
|
|
9910
|
-
},
|
|
9911
|
-
{
|
|
9912
|
-
"path": "unit",
|
|
9913
|
-
"valueType": "string"
|
|
9914
|
-
},
|
|
9915
|
-
{
|
|
9916
|
-
"path": "precision",
|
|
9917
|
-
"valueType": "number"
|
|
9918
9971
|
}
|
|
9919
9972
|
],
|
|
9920
9973
|
"presence": [
|
|
@@ -9943,20 +9996,10 @@ Object.freeze({
|
|
|
9943
9996
|
"valueType": "number"
|
|
9944
9997
|
}
|
|
9945
9998
|
],
|
|
9946
|
-
"pressure-sensor": [
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
},
|
|
9951
|
-
{
|
|
9952
|
-
"path": "unit",
|
|
9953
|
-
"valueType": "string"
|
|
9954
|
-
},
|
|
9955
|
-
{
|
|
9956
|
-
"path": "precision",
|
|
9957
|
-
"valueType": "number"
|
|
9958
|
-
}
|
|
9959
|
-
],
|
|
9999
|
+
"pressure-sensor": [{
|
|
10000
|
+
"path": "hpa",
|
|
10001
|
+
"valueType": "number"
|
|
10002
|
+
}],
|
|
9960
10003
|
"privacy-mask": [{
|
|
9961
10004
|
"path": "enabled",
|
|
9962
10005
|
"valueType": "boolean"
|
|
@@ -10267,20 +10310,10 @@ Object.freeze({
|
|
|
10267
10310
|
"path": "tampered",
|
|
10268
10311
|
"valueType": "boolean"
|
|
10269
10312
|
}],
|
|
10270
|
-
"temperature-sensor": [
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
},
|
|
10275
|
-
{
|
|
10276
|
-
"path": "unit",
|
|
10277
|
-
"valueType": "string"
|
|
10278
|
-
},
|
|
10279
|
-
{
|
|
10280
|
-
"path": "precision",
|
|
10281
|
-
"valueType": "number"
|
|
10282
|
-
}
|
|
10283
|
-
],
|
|
10313
|
+
"temperature-sensor": [{
|
|
10314
|
+
"path": "celsius",
|
|
10315
|
+
"valueType": "number"
|
|
10316
|
+
}],
|
|
10284
10317
|
"update": [
|
|
10285
10318
|
{
|
|
10286
10319
|
"path": "currentVersion",
|
|
@@ -10391,10 +10424,6 @@ Object.freeze({
|
|
|
10391
10424
|
"path": "temperature",
|
|
10392
10425
|
"valueType": "number"
|
|
10393
10426
|
},
|
|
10394
|
-
{
|
|
10395
|
-
"path": "temperatureUnit",
|
|
10396
|
-
"valueType": "string"
|
|
10397
|
-
},
|
|
10398
10427
|
{
|
|
10399
10428
|
"path": "humidity",
|
|
10400
10429
|
"valueType": "number"
|
|
@@ -10403,18 +10432,10 @@ Object.freeze({
|
|
|
10403
10432
|
"path": "pressure",
|
|
10404
10433
|
"valueType": "number"
|
|
10405
10434
|
},
|
|
10406
|
-
{
|
|
10407
|
-
"path": "pressureUnit",
|
|
10408
|
-
"valueType": "string"
|
|
10409
|
-
},
|
|
10410
10435
|
{
|
|
10411
10436
|
"path": "windSpeed",
|
|
10412
10437
|
"valueType": "number"
|
|
10413
10438
|
},
|
|
10414
|
-
{
|
|
10415
|
-
"path": "windSpeedUnit",
|
|
10416
|
-
"valueType": "string"
|
|
10417
|
-
},
|
|
10418
10439
|
{
|
|
10419
10440
|
"path": "windBearing",
|
|
10420
10441
|
"valueType": "number"
|
|
@@ -10817,7 +10838,7 @@ function errMsg$16(err) {
|
|
|
10817
10838
|
return String(err);
|
|
10818
10839
|
}
|
|
10819
10840
|
//#endregion
|
|
10820
|
-
//#region ../types/dist/composition-
|
|
10841
|
+
//#region ../types/dist/composition-OhpuespA.mjs
|
|
10821
10842
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
10822
10843
|
opus: "libopus",
|
|
10823
10844
|
aac: "aac",
|
|
@@ -12167,15 +12188,74 @@ function validateExpressionSource(src) {
|
|
|
12167
12188
|
}
|
|
12168
12189
|
return null;
|
|
12169
12190
|
}
|
|
12170
|
-
/**
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12191
|
+
/**
|
|
12192
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
12193
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
12194
|
+
* `composition.ts` (D659).
|
|
12195
|
+
*/
|
|
12174
12196
|
var CompositionSourceRefSchema = object({
|
|
12175
12197
|
/** The owning addon; `stableId` is unique only within it. */
|
|
12176
12198
|
addonId: string().min(1),
|
|
12177
12199
|
stableId: string().min(1)
|
|
12178
12200
|
});
|
|
12201
|
+
var GROUP_TEMPLATE_IDS = [
|
|
12202
|
+
"temperature",
|
|
12203
|
+
"humidity",
|
|
12204
|
+
"pressure",
|
|
12205
|
+
"illuminance",
|
|
12206
|
+
"power",
|
|
12207
|
+
"energy",
|
|
12208
|
+
"battery",
|
|
12209
|
+
"numeric",
|
|
12210
|
+
"motion",
|
|
12211
|
+
"contact",
|
|
12212
|
+
"leak",
|
|
12213
|
+
"smoke",
|
|
12214
|
+
"occupancy",
|
|
12215
|
+
"binary",
|
|
12216
|
+
"switch",
|
|
12217
|
+
"light"
|
|
12218
|
+
];
|
|
12219
|
+
var NUMERIC_AGGREGATES = [
|
|
12220
|
+
"mean",
|
|
12221
|
+
"median",
|
|
12222
|
+
"min",
|
|
12223
|
+
"max",
|
|
12224
|
+
"sum"
|
|
12225
|
+
];
|
|
12226
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
12227
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
12228
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
12229
|
+
var AGGREGATE_REDUCERS = [
|
|
12230
|
+
"mean",
|
|
12231
|
+
"median",
|
|
12232
|
+
"min",
|
|
12233
|
+
"max",
|
|
12234
|
+
"sum",
|
|
12235
|
+
"any",
|
|
12236
|
+
"all"
|
|
12237
|
+
];
|
|
12238
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
12239
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
12240
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
12241
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
12242
|
+
var HelperMemberSchema = object({
|
|
12243
|
+
source: CompositionSourceRefSchema,
|
|
12244
|
+
cap: string().min(1),
|
|
12245
|
+
fieldPath: string().min(1)
|
|
12246
|
+
});
|
|
12247
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
12248
|
+
kind: literal("group"),
|
|
12249
|
+
templateId: GroupTemplateIdSchema,
|
|
12250
|
+
aggregate: AggregateReducerSchema,
|
|
12251
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
12252
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
12253
|
+
active: ActiveCriterionSchema.optional()
|
|
12254
|
+
})]);
|
|
12255
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
12256
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
12257
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
12258
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
12179
12259
|
/** One field of one capability of one source device. */
|
|
12180
12260
|
var CompositionFieldReadSchema = object({
|
|
12181
12261
|
source: CompositionSourceRefSchema,
|
|
@@ -12219,7 +12299,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
12219
12299
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
12220
12300
|
CompositionFromSourceSchema,
|
|
12221
12301
|
CompositionExpressionSourceSchema,
|
|
12222
|
-
CompositionCodeSourceSchema
|
|
12302
|
+
CompositionCodeSourceSchema,
|
|
12303
|
+
object({
|
|
12304
|
+
kind: literal("aggregate"),
|
|
12305
|
+
reducer: _enum([
|
|
12306
|
+
"mean",
|
|
12307
|
+
"median",
|
|
12308
|
+
"min",
|
|
12309
|
+
"max",
|
|
12310
|
+
"sum",
|
|
12311
|
+
"any",
|
|
12312
|
+
"all"
|
|
12313
|
+
]),
|
|
12314
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
12315
|
+
/** `value` is the reading; the others are the member counts. */
|
|
12316
|
+
publish: _enum([
|
|
12317
|
+
"value",
|
|
12318
|
+
"included",
|
|
12319
|
+
"excluded",
|
|
12320
|
+
"total"
|
|
12321
|
+
]),
|
|
12322
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
12323
|
+
empty: _enum([
|
|
12324
|
+
"null",
|
|
12325
|
+
"omit",
|
|
12326
|
+
"offline"
|
|
12327
|
+
])
|
|
12328
|
+
})
|
|
12223
12329
|
]);
|
|
12224
12330
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
12225
12331
|
kind: literal("forward"),
|
|
@@ -12265,7 +12371,13 @@ var CompositionSchema = object({
|
|
|
12265
12371
|
kind: literal("existing"),
|
|
12266
12372
|
device: CompositionSourceRefSchema
|
|
12267
12373
|
})]),
|
|
12268
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
12374
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
12375
|
+
/**
|
|
12376
|
+
* Present when the block is a helper template. Absent on a free
|
|
12377
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
12378
|
+
* never the compiled features.
|
|
12379
|
+
*/
|
|
12380
|
+
helper: HelperSpecSchema.optional()
|
|
12269
12381
|
}).superRefine((composition, ctx) => {
|
|
12270
12382
|
const seen = /* @__PURE__ */ new Set();
|
|
12271
12383
|
composition.features.forEach((feature, index) => {
|
|
@@ -18591,7 +18703,11 @@ var CompositionProblemSchema = object({
|
|
|
18591
18703
|
"item-field-reserved",
|
|
18592
18704
|
"target-missing",
|
|
18593
18705
|
"target-unreadable",
|
|
18594
|
-
"not-replaceable"
|
|
18706
|
+
"not-replaceable",
|
|
18707
|
+
"native-capability-replace",
|
|
18708
|
+
"mixed-quantity",
|
|
18709
|
+
"helper-mismatch",
|
|
18710
|
+
"member-constraint"
|
|
18595
18711
|
]),
|
|
18596
18712
|
path: string(),
|
|
18597
18713
|
message: string()
|
|
@@ -18612,7 +18728,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
18612
18728
|
"null",
|
|
18613
18729
|
"offline",
|
|
18614
18730
|
"unknown",
|
|
18615
|
-
"release"
|
|
18731
|
+
"release",
|
|
18732
|
+
"omit"
|
|
18616
18733
|
]);
|
|
18617
18734
|
/**
|
|
18618
18735
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -18649,9 +18766,11 @@ var CompositionFieldPlanSchema = object({
|
|
|
18649
18766
|
reads: array(CompositionFieldReadSchema)
|
|
18650
18767
|
});
|
|
18651
18768
|
/**
|
|
18652
|
-
* What a feature does to its target (D663): `new` builds a capability on a
|
|
18653
|
-
* device; on an existing device it `add`s a capability the device lacks
|
|
18654
|
-
*
|
|
18769
|
+
* What a feature does to its target (D663, D944): `new` builds a capability on a
|
|
18770
|
+
* new device; on an existing device it `add`s a capability the device lacks.
|
|
18771
|
+
* Replacing a capability the device already serves is refused
|
|
18772
|
+
* (`native-capability-replace`), not planned. `replace` remains on the claim
|
|
18773
|
+
* wire for a claim the hub already holds.
|
|
18655
18774
|
*/
|
|
18656
18775
|
var CompositionFeatureModeSchema = _enum([
|
|
18657
18776
|
"new",
|
|
@@ -18824,6 +18943,275 @@ Object.freeze({
|
|
|
18824
18943
|
result: ["number", "null"]
|
|
18825
18944
|
}
|
|
18826
18945
|
});
|
|
18946
|
+
/**
|
|
18947
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18948
|
+
* Data, not a form default written into the block.
|
|
18949
|
+
*/
|
|
18950
|
+
var NOW = {
|
|
18951
|
+
fieldPath: "lastFetchedAt",
|
|
18952
|
+
expr: "now"
|
|
18953
|
+
};
|
|
18954
|
+
var CHANGED = {
|
|
18955
|
+
fieldPath: "lastChangedAt",
|
|
18956
|
+
expr: "now"
|
|
18957
|
+
};
|
|
18958
|
+
function numeric(input) {
|
|
18959
|
+
return {
|
|
18960
|
+
...input,
|
|
18961
|
+
family: "numeric",
|
|
18962
|
+
deviceType: DeviceType.Sensor,
|
|
18963
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18964
|
+
commandCaps: [],
|
|
18965
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
18966
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
18967
|
+
accept: [{
|
|
18968
|
+
cap: input.outputCap,
|
|
18969
|
+
fieldPath: input.outputField
|
|
18970
|
+
}]
|
|
18971
|
+
};
|
|
18972
|
+
}
|
|
18973
|
+
function binary(input) {
|
|
18974
|
+
return {
|
|
18975
|
+
...input,
|
|
18976
|
+
family: "binary",
|
|
18977
|
+
deviceType: DeviceType.Sensor,
|
|
18978
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18979
|
+
commandCaps: [],
|
|
18980
|
+
quantity: "none",
|
|
18981
|
+
baseUnit: void 0,
|
|
18982
|
+
aggregates: BINARY_AGGREGATES,
|
|
18983
|
+
empty: "offline"
|
|
18984
|
+
};
|
|
18985
|
+
}
|
|
18986
|
+
var GROUP_TEMPLATES = [
|
|
18987
|
+
numeric({
|
|
18988
|
+
id: "temperature",
|
|
18989
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18990
|
+
role: DeviceRole.TemperatureSensor,
|
|
18991
|
+
outputCap: "temperature-sensor",
|
|
18992
|
+
outputField: "celsius",
|
|
18993
|
+
quantity: "temperature",
|
|
18994
|
+
defaultAggregate: "mean",
|
|
18995
|
+
empty: "null",
|
|
18996
|
+
companions: [NOW]
|
|
18997
|
+
}),
|
|
18998
|
+
numeric({
|
|
18999
|
+
id: "humidity",
|
|
19000
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
19001
|
+
role: DeviceRole.HumiditySensor,
|
|
19002
|
+
outputCap: "humidity-sensor",
|
|
19003
|
+
outputField: "percent",
|
|
19004
|
+
quantity: "humidity",
|
|
19005
|
+
defaultAggregate: "mean",
|
|
19006
|
+
empty: "null",
|
|
19007
|
+
companions: [NOW]
|
|
19008
|
+
}),
|
|
19009
|
+
numeric({
|
|
19010
|
+
id: "pressure",
|
|
19011
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
19012
|
+
role: DeviceRole.PressureSensor,
|
|
19013
|
+
outputCap: "pressure-sensor",
|
|
19014
|
+
outputField: "hpa",
|
|
19015
|
+
quantity: "pressure",
|
|
19016
|
+
defaultAggregate: "mean",
|
|
19017
|
+
empty: "null",
|
|
19018
|
+
companions: [NOW]
|
|
19019
|
+
}),
|
|
19020
|
+
numeric({
|
|
19021
|
+
id: "illuminance",
|
|
19022
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
19023
|
+
role: DeviceRole.AmbientLightSensor,
|
|
19024
|
+
outputCap: "ambient-light-sensor",
|
|
19025
|
+
outputField: "lux",
|
|
19026
|
+
quantity: "illuminance",
|
|
19027
|
+
defaultAggregate: "mean",
|
|
19028
|
+
empty: "null",
|
|
19029
|
+
companions: [NOW]
|
|
19030
|
+
}),
|
|
19031
|
+
numeric({
|
|
19032
|
+
id: "power",
|
|
19033
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
19034
|
+
role: DeviceRole.PowerSensor,
|
|
19035
|
+
outputCap: "power-meter",
|
|
19036
|
+
outputField: "watts",
|
|
19037
|
+
quantity: "power",
|
|
19038
|
+
defaultAggregate: "sum",
|
|
19039
|
+
empty: "omit",
|
|
19040
|
+
companions: [NOW]
|
|
19041
|
+
}),
|
|
19042
|
+
numeric({
|
|
19043
|
+
id: "energy",
|
|
19044
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
19045
|
+
role: DeviceRole.EnergySensor,
|
|
19046
|
+
outputCap: "power-meter",
|
|
19047
|
+
outputField: "kwhTotal",
|
|
19048
|
+
quantity: "energy",
|
|
19049
|
+
defaultAggregate: "sum",
|
|
19050
|
+
empty: "omit",
|
|
19051
|
+
companions: [NOW]
|
|
19052
|
+
}),
|
|
19053
|
+
numeric({
|
|
19054
|
+
id: "battery",
|
|
19055
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
19056
|
+
role: DeviceRole.BatterySensor,
|
|
19057
|
+
outputCap: "battery",
|
|
19058
|
+
outputField: "percentage",
|
|
19059
|
+
quantity: "percentage",
|
|
19060
|
+
defaultAggregate: "mean",
|
|
19061
|
+
empty: "null",
|
|
19062
|
+
companions: [
|
|
19063
|
+
{
|
|
19064
|
+
fieldPath: "charging",
|
|
19065
|
+
expr: "\"unknown\""
|
|
19066
|
+
},
|
|
19067
|
+
{
|
|
19068
|
+
fieldPath: "sleeping",
|
|
19069
|
+
expr: "false"
|
|
19070
|
+
},
|
|
19071
|
+
{
|
|
19072
|
+
fieldPath: "lastUpdated",
|
|
19073
|
+
expr: "now"
|
|
19074
|
+
}
|
|
19075
|
+
]
|
|
19076
|
+
}),
|
|
19077
|
+
numeric({
|
|
19078
|
+
id: "numeric",
|
|
19079
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
19080
|
+
role: DeviceRole.NumericSensor,
|
|
19081
|
+
outputCap: "numeric-sensor",
|
|
19082
|
+
outputField: "value",
|
|
19083
|
+
quantity: "device",
|
|
19084
|
+
defaultAggregate: "mean",
|
|
19085
|
+
empty: "null",
|
|
19086
|
+
companions: [NOW]
|
|
19087
|
+
}),
|
|
19088
|
+
binary({
|
|
19089
|
+
id: "motion",
|
|
19090
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
19091
|
+
role: DeviceRole.MotionSensor,
|
|
19092
|
+
outputCap: "motion",
|
|
19093
|
+
outputField: "detected",
|
|
19094
|
+
defaultAggregate: "any",
|
|
19095
|
+
accept: [{
|
|
19096
|
+
cap: "motion",
|
|
19097
|
+
fieldPath: "detected"
|
|
19098
|
+
}],
|
|
19099
|
+
companions: [{
|
|
19100
|
+
fieldPath: "lastDetectedAt",
|
|
19101
|
+
expr: "null"
|
|
19102
|
+
}, {
|
|
19103
|
+
fieldPath: "autoClearAfterMs",
|
|
19104
|
+
expr: "null"
|
|
19105
|
+
}]
|
|
19106
|
+
}),
|
|
19107
|
+
binary({
|
|
19108
|
+
id: "contact",
|
|
19109
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
19110
|
+
role: DeviceRole.ContactSensor,
|
|
19111
|
+
outputCap: "contact",
|
|
19112
|
+
outputField: "entryOpen",
|
|
19113
|
+
defaultAggregate: "any",
|
|
19114
|
+
accept: [{
|
|
19115
|
+
cap: "contact",
|
|
19116
|
+
fieldPath: "entryOpen"
|
|
19117
|
+
}],
|
|
19118
|
+
companions: [CHANGED]
|
|
19119
|
+
}),
|
|
19120
|
+
binary({
|
|
19121
|
+
id: "leak",
|
|
19122
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
19123
|
+
role: DeviceRole.LeakSensor,
|
|
19124
|
+
outputCap: "flood",
|
|
19125
|
+
outputField: "flooded",
|
|
19126
|
+
defaultAggregate: "any",
|
|
19127
|
+
accept: [{
|
|
19128
|
+
cap: "flood",
|
|
19129
|
+
fieldPath: "flooded"
|
|
19130
|
+
}],
|
|
19131
|
+
companions: [CHANGED]
|
|
19132
|
+
}),
|
|
19133
|
+
binary({
|
|
19134
|
+
id: "smoke",
|
|
19135
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
19136
|
+
role: DeviceRole.SmokeSensor,
|
|
19137
|
+
outputCap: "smoke",
|
|
19138
|
+
outputField: "detected",
|
|
19139
|
+
defaultAggregate: "any",
|
|
19140
|
+
accept: [{
|
|
19141
|
+
cap: "smoke",
|
|
19142
|
+
fieldPath: "detected"
|
|
19143
|
+
}],
|
|
19144
|
+
companions: [CHANGED]
|
|
19145
|
+
}),
|
|
19146
|
+
binary({
|
|
19147
|
+
id: "occupancy",
|
|
19148
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
19149
|
+
role: DeviceRole.BinarySensor,
|
|
19150
|
+
outputCap: "binary",
|
|
19151
|
+
outputField: "on",
|
|
19152
|
+
defaultAggregate: "any",
|
|
19153
|
+
accept: [{
|
|
19154
|
+
cap: "motion",
|
|
19155
|
+
fieldPath: "detected"
|
|
19156
|
+
}, {
|
|
19157
|
+
cap: "binary",
|
|
19158
|
+
fieldPath: "on"
|
|
19159
|
+
}],
|
|
19160
|
+
companions: [CHANGED]
|
|
19161
|
+
}),
|
|
19162
|
+
binary({
|
|
19163
|
+
id: "binary",
|
|
19164
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
19165
|
+
role: DeviceRole.BinarySensor,
|
|
19166
|
+
outputCap: "binary",
|
|
19167
|
+
outputField: "on",
|
|
19168
|
+
defaultAggregate: "any",
|
|
19169
|
+
accept: [{
|
|
19170
|
+
cap: "binary",
|
|
19171
|
+
fieldPath: "on"
|
|
19172
|
+
}],
|
|
19173
|
+
companions: [CHANGED]
|
|
19174
|
+
}),
|
|
19175
|
+
actuator({
|
|
19176
|
+
id: "switch",
|
|
19177
|
+
summary: "On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.",
|
|
19178
|
+
deviceType: DeviceType.Switch,
|
|
19179
|
+
outputCap: "switch",
|
|
19180
|
+
commandCaps: ["switch"]
|
|
19181
|
+
}),
|
|
19182
|
+
actuator({
|
|
19183
|
+
id: "light",
|
|
19184
|
+
summary: "On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.",
|
|
19185
|
+
deviceType: DeviceType.Light,
|
|
19186
|
+
outputCap: "switch",
|
|
19187
|
+
commandCaps: [
|
|
19188
|
+
"switch",
|
|
19189
|
+
"brightness",
|
|
19190
|
+
"color"
|
|
19191
|
+
]
|
|
19192
|
+
})
|
|
19193
|
+
];
|
|
19194
|
+
function actuator(input) {
|
|
19195
|
+
return {
|
|
19196
|
+
...input,
|
|
19197
|
+
family: "actuator",
|
|
19198
|
+
role: void 0,
|
|
19199
|
+
memberDeviceType: input.deviceType,
|
|
19200
|
+
outputField: "on",
|
|
19201
|
+
quantity: "none",
|
|
19202
|
+
baseUnit: void 0,
|
|
19203
|
+
aggregates: BINARY_AGGREGATES,
|
|
19204
|
+
defaultAggregate: "any",
|
|
19205
|
+
empty: "offline",
|
|
19206
|
+
accept: [{
|
|
19207
|
+
cap: "switch",
|
|
19208
|
+
fieldPath: "on"
|
|
19209
|
+
}],
|
|
19210
|
+
companions: [CHANGED]
|
|
19211
|
+
};
|
|
19212
|
+
}
|
|
19213
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
19214
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18827
19215
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18828
19216
|
/**
|
|
18829
19217
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -20593,12 +20981,12 @@ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema
|
|
|
20593
20981
|
* providers detect renames by matching `uniqueId` and patch `id`
|
|
20594
20982
|
* in-place so dispatch keeps working.
|
|
20595
20983
|
*
|
|
20596
|
-
* **
|
|
20597
|
-
*
|
|
20598
|
-
*
|
|
20599
|
-
*
|
|
20600
|
-
* (`ha-domain-mapping`)
|
|
20601
|
-
* stored after that point.
|
|
20984
|
+
* **Display unit and precision are NOT stored here.** They are a read-time
|
|
20985
|
+
* preference (D944). A polymorphic reading stores its `quantity` here once,
|
|
20986
|
+
* at adopt, and a date/time value stores `dateTimeShape` the same way —
|
|
20987
|
+
* neither is repeated on each sample. The `device_class` tag is an
|
|
20988
|
+
* HA-specific input consumed at the discovery boundary (`ha-domain-mapping`)
|
|
20989
|
+
* to derive the CamStack `DeviceRole`; it is never stored after that point.
|
|
20602
20990
|
*
|
|
20603
20991
|
* The `raw` escape hatch carries provider-specific attributes that don't
|
|
20604
20992
|
* fit the structured slots (HA `attributes` whitelist, Reolink `deviceCache`
|
|
@@ -20612,6 +21000,14 @@ var SourceInfoSchema = object({
|
|
|
20612
21000
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
20613
21001
|
* Used to detect rename when `id` changes. */
|
|
20614
21002
|
uniqueId: string().optional(),
|
|
21003
|
+
/** Quantity of a polymorphic reading, written once at adopt (D944). */
|
|
21004
|
+
quantity: ReadingQuantitySchema.optional(),
|
|
21005
|
+
/** Date / time / datetime shape of a string reading, written once at adopt. */
|
|
21006
|
+
dateTimeShape: _enum([
|
|
21007
|
+
"date",
|
|
21008
|
+
"time",
|
|
21009
|
+
"datetime"
|
|
21010
|
+
]).optional(),
|
|
20615
21011
|
/** Provider-specific extras that don't fit the structured slots.
|
|
20616
21012
|
* Whitelist what goes here per provider — do NOT dump entire HA
|
|
20617
21013
|
* attribute blobs (would explode the meta JSON column). */
|
|
@@ -41549,7 +41945,8 @@ method(object({
|
|
|
41549
41945
|
"enum"
|
|
41550
41946
|
]),
|
|
41551
41947
|
enumValues: array(string()).optional(),
|
|
41552
|
-
item: boolean().optional()
|
|
41948
|
+
item: boolean().optional(),
|
|
41949
|
+
quantity: ReadingQuantitySchema.optional()
|
|
41553
41950
|
})).readonly(),
|
|
41554
41951
|
itemArray: object({
|
|
41555
41952
|
path: string(),
|
|
@@ -45349,8 +45746,8 @@ var MaskPolygonShapeSchema = object({
|
|
|
45349
45746
|
/** Boolean cell grid — row-major, length === gridWidth*gridHeight. */
|
|
45350
45747
|
var MaskGridShapeSchema = object({
|
|
45351
45748
|
kind: literal("grid"),
|
|
45352
|
-
gridWidth: number(),
|
|
45353
|
-
gridHeight: number(),
|
|
45749
|
+
gridWidth: number().meta(readingMeta("none")),
|
|
45750
|
+
gridHeight: number().meta(readingMeta("none")),
|
|
45354
45751
|
cells: array(boolean())
|
|
45355
45752
|
});
|
|
45356
45753
|
discriminatedUnion("kind", [
|
|
@@ -45462,6 +45859,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
45462
45859
|
"detection-blind",
|
|
45463
45860
|
"motion-noisy",
|
|
45464
45861
|
"motion-calm",
|
|
45862
|
+
"package-llm-silent",
|
|
45863
|
+
"package-llm-answered",
|
|
45465
45864
|
"recording-stalled",
|
|
45466
45865
|
"recording-healthy",
|
|
45467
45866
|
"recording-degraded",
|
|
@@ -56669,6 +57068,28 @@ var PackageVersionInfoSchema = object({
|
|
|
56669
57068
|
deprecated: string().optional(),
|
|
56670
57069
|
distTags: array(string()).readonly()
|
|
56671
57070
|
});
|
|
57071
|
+
/**
|
|
57072
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
57073
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
57074
|
+
* tarball failure — never an empty string standing in for either.
|
|
57075
|
+
*/
|
|
57076
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
57077
|
+
object({
|
|
57078
|
+
status: literal("ok"),
|
|
57079
|
+
markdown: string()
|
|
57080
|
+
}),
|
|
57081
|
+
object({ status: literal("missing") }),
|
|
57082
|
+
object({
|
|
57083
|
+
status: literal("error"),
|
|
57084
|
+
message: string()
|
|
57085
|
+
})
|
|
57086
|
+
]);
|
|
57087
|
+
var PackageDocsSchema = object({
|
|
57088
|
+
name: string(),
|
|
57089
|
+
version: string(),
|
|
57090
|
+
readme: PackageDocBodySchema,
|
|
57091
|
+
changelog: PackageDocBodySchema
|
|
57092
|
+
});
|
|
56672
57093
|
var SearchResultSchema = object({
|
|
56673
57094
|
name: string(),
|
|
56674
57095
|
version: string(),
|
|
@@ -56887,7 +57308,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56887
57308
|
}), object({ success: literal(true) }), {
|
|
56888
57309
|
kind: "mutation",
|
|
56889
57310
|
auth: "admin"
|
|
56890
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57311
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57312
|
+
name: string().min(1),
|
|
57313
|
+
version: string().min(1).optional()
|
|
57314
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
56891
57315
|
kind: "mutation",
|
|
56892
57316
|
auth: "admin"
|
|
56893
57317
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -56937,27 +57361,17 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56937
57361
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56938
57362
|
object({
|
|
56939
57363
|
/** Carbon dioxide concentration in ppm. */
|
|
56940
|
-
co2Ppm: number().min(0).optional(),
|
|
57364
|
+
co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56941
57365
|
/** Total volatile organic compounds in ppb. */
|
|
56942
|
-
vocPpb: number().min(0).optional(),
|
|
57366
|
+
vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56943
57367
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56944
|
-
pm25: number().min(0).optional(),
|
|
57368
|
+
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56945
57369
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
56946
|
-
pm10: number().min(0).optional(),
|
|
57370
|
+
pm10: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56947
57371
|
/** Composite AQI value (typically 0..500). */
|
|
56948
|
-
aqi: number().optional(),
|
|
57372
|
+
aqi: number().optional().meta(readingMeta("index")),
|
|
56949
57373
|
/** Ms epoch when the slice was last updated. */
|
|
56950
|
-
lastFetchedAt: number()
|
|
56951
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
56952
|
-
* `attributes.unit_of_measurement` → 'ppm' / 'ppb' / 'µg/m³'). Each
|
|
56953
|
-
* upstream `sensor.*` entity surfaces ONE device_class, so one unit
|
|
56954
|
-
* per slice is unambiguous. */
|
|
56955
|
-
unit: string().optional(),
|
|
56956
|
-
/** Suggested decimal places for numeric display.
|
|
56957
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56958
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56959
|
-
* auto-formatting when absent. */
|
|
56960
|
-
precision: number().int().min(0).max(10).optional()
|
|
57374
|
+
lastFetchedAt: number()
|
|
56961
57375
|
});
|
|
56962
57376
|
DeviceType.Sensor;
|
|
56963
57377
|
/**
|
|
@@ -56965,22 +57379,13 @@ DeviceType.Sensor;
|
|
|
56965
57379
|
* entries with `device_class: illuminance`.
|
|
56966
57380
|
*/
|
|
56967
57381
|
var AmbientLightSensorStatusSchema = object({
|
|
56968
|
-
/** Current illuminance in lux (lx). */
|
|
56969
|
-
lux: number().min(0).meta({
|
|
56970
|
-
|
|
57382
|
+
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
57383
|
+
lux: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
57384
|
+
precision: 0,
|
|
56971
57385
|
label: "Illuminance"
|
|
56972
|
-
}),
|
|
57386
|
+
})),
|
|
56973
57387
|
/** Ms epoch when the slice was last updated. */
|
|
56974
|
-
lastFetchedAt: number()
|
|
56975
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
56976
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
56977
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
56978
|
-
unit: string().optional(),
|
|
56979
|
-
/** Suggested decimal places for numeric display.
|
|
56980
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56981
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56982
|
-
* auto-formatting when absent. */
|
|
56983
|
-
precision: number().int().min(0).max(10).optional()
|
|
57388
|
+
lastFetchedAt: number()
|
|
56984
57389
|
});
|
|
56985
57390
|
DeviceType.Sensor;
|
|
56986
57391
|
/**
|
|
@@ -57125,10 +57530,7 @@ var BatteryStatusSchema = object({
|
|
|
57125
57530
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
57126
57531
|
* declines to band a non-finite reading, which is the correct shape.
|
|
57127
57532
|
*/
|
|
57128
|
-
percentage: number().min(0).max(100).nullable().meta({
|
|
57129
|
-
unit: "%",
|
|
57130
|
-
label: "Charge"
|
|
57131
|
-
}),
|
|
57533
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
57132
57534
|
/**
|
|
57133
57535
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
57134
57536
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -57155,7 +57557,14 @@ var BatteryStatusSchema = object({
|
|
|
57155
57557
|
*/
|
|
57156
57558
|
sleeping: boolean().meta({ label: "Sleeping" }),
|
|
57157
57559
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
57158
|
-
lastUpdated: number(),
|
|
57560
|
+
lastUpdated: number().meta(readingMeta("none")),
|
|
57561
|
+
/**
|
|
57562
|
+
* Battery voltage in volts, for a cell the firmware reports as voltage
|
|
57563
|
+
* rather than a percentage (Ecowitt capacitor packs). Absent on cameras
|
|
57564
|
+
* that only report charge. A second reading on this cap, not a second
|
|
57565
|
+
* `numeric-sensor` on the same device.
|
|
57566
|
+
*/
|
|
57567
|
+
volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57159
57568
|
/**
|
|
57160
57569
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57161
57570
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57215,7 +57624,7 @@ object({
|
|
|
57215
57624
|
DeviceType.Sensor;
|
|
57216
57625
|
object({
|
|
57217
57626
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57218
|
-
percentage: number().min(0).max(100),
|
|
57627
|
+
percentage: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57219
57628
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57220
57629
|
lastChangedAt: number()
|
|
57221
57630
|
});
|
|
@@ -57604,21 +58013,21 @@ object({
|
|
|
57604
58013
|
/** Single setpoint in Celsius. Used by single-target modes
|
|
57605
58014
|
* (heat / cool / dry). Null when the device is in a range mode
|
|
57606
58015
|
* (`heat_cool`) or has no setpoint at all (`fan_only`/`off`). */
|
|
57607
|
-
target: number().nullable(),
|
|
58016
|
+
target: number().nullable().meta(readingMeta("temperature")),
|
|
57608
58017
|
/** Upper bound of the dual setpoint in Celsius. Populated only
|
|
57609
58018
|
* in `heat_cool` mode. */
|
|
57610
|
-
targetHigh: number().nullable(),
|
|
58019
|
+
targetHigh: number().nullable().meta(readingMeta("temperature")),
|
|
57611
58020
|
/** Lower bound of the dual setpoint in Celsius. Populated only
|
|
57612
58021
|
* in `heat_cool` mode. */
|
|
57613
|
-
targetLow: number().nullable(),
|
|
58022
|
+
targetLow: number().nullable().meta(readingMeta("temperature")),
|
|
57614
58023
|
/** Target relative humidity (0..100). Null when the device has no
|
|
57615
58024
|
* humidity control. */
|
|
57616
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
58025
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
57617
58026
|
/** Current measured temperature in Celsius. Read-only — pushed by
|
|
57618
58027
|
* the device's internal sensor. */
|
|
57619
|
-
currentTemp: number().nullable(),
|
|
58028
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
57620
58029
|
/** Current measured relative humidity (0..100). Read-only. */
|
|
57621
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
58030
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
57622
58031
|
/** Vertical louver swing on/off. Null when the device has no vertical
|
|
57623
58032
|
* swing surface (gate with `DeviceFeature.ClimateSwingVertical`). */
|
|
57624
58033
|
swingVertical: boolean().nullable(),
|
|
@@ -57626,11 +58035,11 @@ object({
|
|
|
57626
58035
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
57627
58036
|
swingHorizontal: boolean().nullable(),
|
|
57628
58037
|
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
57629
|
-
minTemp: number().nullable().optional(),
|
|
58038
|
+
minTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
57630
58039
|
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
57631
|
-
maxTemp: number().nullable().optional(),
|
|
58040
|
+
maxTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
57632
58041
|
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
57633
|
-
tempStep: number().positive().nullable().optional(),
|
|
58042
|
+
tempStep: number().positive().nullable().optional().meta(readingMeta("temperature")),
|
|
57634
58043
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
57635
58044
|
lastFetchedAt: number()
|
|
57636
58045
|
});
|
|
@@ -57709,17 +58118,17 @@ DeviceType.Thermostat, DeviceType.Climate, method(object({
|
|
|
57709
58118
|
* modes to expose in the picker without a slice fetch.
|
|
57710
58119
|
*/
|
|
57711
58120
|
var RgbTripletSchema = object({
|
|
57712
|
-
r: number().int().min(0).max(255),
|
|
57713
|
-
g: number().int().min(0).max(255),
|
|
57714
|
-
b: number().int().min(0).max(255)
|
|
58121
|
+
r: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
58122
|
+
g: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
58123
|
+
b: number().int().min(0).max(255).meta(readingMeta("none"))
|
|
57715
58124
|
});
|
|
57716
58125
|
var HsvTripletSchema = object({
|
|
57717
58126
|
/** Hue in degrees, 0..360. */
|
|
57718
|
-
h: number().min(0).max(360),
|
|
58127
|
+
h: number().min(0).max(360).meta(readingMeta("none")),
|
|
57719
58128
|
/** Saturation as 0..100 inclusive. */
|
|
57720
|
-
s: number().min(0).max(100),
|
|
58129
|
+
s: number().min(0).max(100).meta(readingMeta("none")),
|
|
57721
58130
|
/** Value/brightness as 0..100 inclusive. */
|
|
57722
|
-
v: number().min(0).max(100)
|
|
58131
|
+
v: number().min(0).max(100).meta(readingMeta("none"))
|
|
57723
58132
|
});
|
|
57724
58133
|
var ColorInputSchema = discriminatedUnion("mode", [
|
|
57725
58134
|
object({
|
|
@@ -57748,7 +58157,7 @@ object({
|
|
|
57748
58157
|
/** Populated when `mode === 'hsv'`. */
|
|
57749
58158
|
hsv: HsvTripletSchema.optional(),
|
|
57750
58159
|
/** Populated when `mode === 'mired'`. */
|
|
57751
|
-
mireds: number().int().optional(),
|
|
58160
|
+
mireds: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57752
58161
|
/** Ms epoch of the last operator-driven change. */
|
|
57753
58162
|
lastChangedAt: number()
|
|
57754
58163
|
});
|
|
@@ -57872,18 +58281,12 @@ _enum([
|
|
|
57872
58281
|
"empty",
|
|
57873
58282
|
"full"
|
|
57874
58283
|
]);
|
|
57875
|
-
/**
|
|
57876
|
-
|
|
57877
|
-
|
|
57878
|
-
"days",
|
|
57879
|
-
"hours",
|
|
57880
|
-
"cycles"
|
|
57881
|
-
]);
|
|
57882
|
-
/** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
|
|
57883
|
-
* days). `value` null = unknown (D393). */
|
|
58284
|
+
/** Whether `remaining.value` is a duration in seconds or a dimensionless count. */
|
|
58285
|
+
var ConsumableRemainingKindSchema = _enum(["duration", "count"]);
|
|
58286
|
+
/** Remaining life. `value` null = unknown (D393). Duration is seconds. */
|
|
57884
58287
|
var ConsumableRemainingSchema = object({
|
|
57885
|
-
value: number().min(0).nullable(),
|
|
57886
|
-
|
|
58288
|
+
value: number().min(0).nullable().meta(readingMeta("device")),
|
|
58289
|
+
kind: ConsumableRemainingKindSchema
|
|
57887
58290
|
});
|
|
57888
58291
|
var ConsumablesStatusSchema = object({
|
|
57889
58292
|
items: array(object({
|
|
@@ -57892,7 +58295,7 @@ var ConsumablesStatusSchema = object({
|
|
|
57892
58295
|
/** Display name. */
|
|
57893
58296
|
label: string().min(1),
|
|
57894
58297
|
/** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
|
|
57895
|
-
level: number().min(0).max(100).nullable(),
|
|
58298
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57896
58299
|
/** The provider's discrete verdict when known (binary mode). */
|
|
57897
58300
|
status: ConsumableStatusSchema.nullable(),
|
|
57898
58301
|
/** What the item is — decides whether low or full is bad. Absent = `wear`. */
|
|
@@ -57909,7 +58312,7 @@ var ConsumablesStatusSchema = object({
|
|
|
57909
58312
|
})),
|
|
57910
58313
|
lastChangedAt: number()
|
|
57911
58314
|
});
|
|
57912
|
-
Object.values(DeviceType), [...
|
|
58315
|
+
Object.values(DeviceType), [...ConsumableRemainingKindSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
|
|
57913
58316
|
Object.values(DeviceType), method(object({
|
|
57914
58317
|
deviceId: number().int().nonnegative(),
|
|
57915
58318
|
key: string().min(1)
|
|
@@ -57946,39 +58349,17 @@ object({
|
|
|
57946
58349
|
/** Current value. Numeric kind → number; select/text/datetime → string.
|
|
57947
58350
|
* Datetime values are ISO 8601 strings (full timestamp, date-only,
|
|
57948
58351
|
* or time-only — HA accepts all three forms). */
|
|
57949
|
-
value: union([number(), string()]),
|
|
58352
|
+
value: union([number().meta(readingMeta("device")), string()]),
|
|
57950
58353
|
/** Acceptable values when `kind === 'select'`. Empty for other kinds. */
|
|
57951
58354
|
options: array(string()),
|
|
57952
58355
|
/** Ms epoch when the slice was last updated. */
|
|
57953
58356
|
lastChangedAt: number(),
|
|
57954
|
-
/**
|
|
57955
|
-
|
|
57956
|
-
|
|
57957
|
-
|
|
57958
|
-
/**
|
|
57959
|
-
|
|
57960
|
-
min: number().optional(),
|
|
57961
|
-
/** Maximum allowed value. Populated live from HA `attributes.max`.
|
|
57962
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57963
|
-
max: number().optional(),
|
|
57964
|
-
/** Step increment. Populated live from HA `attributes.step`.
|
|
57965
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57966
|
-
step: number().optional(),
|
|
57967
|
-
/** Suggested decimal places for numeric display. Populated live from HA
|
|
57968
|
-
* `attributes.suggested_display_precision`, or derived from `step` when the
|
|
57969
|
-
* HA attribute is absent. Meaningful for `kind === 'numeric'`; absent for
|
|
57970
|
-
* other kinds. Falls back to auto-formatting when absent. */
|
|
57971
|
-
precision: number().int().min(0).max(10).optional(),
|
|
57972
|
-
/** Date-picker granularity for `kind === 'datetime'`. 'date' → date-only,
|
|
57973
|
-
* 'time' → time-only, 'datetime' → full timestamp. Absent for other kinds
|
|
57974
|
-
* (UI defaults to 'datetime'). Derived live from the device's HA domain
|
|
57975
|
-
* (date.* / time.* / datetime.*) or, for input_datetime, from the entity's
|
|
57976
|
-
* `has_date`/`has_time` attributes on each push. */
|
|
57977
|
-
format: _enum([
|
|
57978
|
-
"date",
|
|
57979
|
-
"time",
|
|
57980
|
-
"datetime"
|
|
57981
|
-
]).optional()
|
|
58357
|
+
/** Minimum allowed value, in the device quantity's base unit. */
|
|
58358
|
+
min: number().optional().meta(readingMeta("device")),
|
|
58359
|
+
/** Maximum allowed value, in the device quantity's base unit. */
|
|
58360
|
+
max: number().optional().meta(readingMeta("device")),
|
|
58361
|
+
/** Step increment, in the device quantity's base unit. */
|
|
58362
|
+
step: number().optional().meta(readingMeta("device"))
|
|
57982
58363
|
});
|
|
57983
58364
|
var ControlSetValueInputSchema = discriminatedUnion("kind", [
|
|
57984
58365
|
object({
|
|
@@ -58016,9 +58397,9 @@ object({
|
|
|
58016
58397
|
]),
|
|
58017
58398
|
/** 0 = fully closed, 100 = fully open. Null when the device has
|
|
58018
58399
|
* no intermediate position surface. */
|
|
58019
|
-
position: number().min(0).max(100).nullable(),
|
|
58400
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58020
58401
|
/** 0 = closed slats, 100 = open slats. Null when no tilt support. */
|
|
58021
|
-
tiltPosition: number().min(0).max(100).nullable(),
|
|
58402
|
+
tiltPosition: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58022
58403
|
/** Ms epoch when the slice was last updated. */
|
|
58023
58404
|
lastChangedAt: number()
|
|
58024
58405
|
});
|
|
@@ -58076,9 +58457,9 @@ var NormalizedRangeSchema$1 = object({
|
|
|
58076
58457
|
object({
|
|
58077
58458
|
mode: DayNightModeSchema,
|
|
58078
58459
|
/** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
|
|
58079
|
-
sensitivity: number().optional(),
|
|
58460
|
+
sensitivity: number().optional().meta(readingMeta("none")),
|
|
58080
58461
|
/** Delay before the IR-cut filter flips, in seconds. */
|
|
58081
|
-
switchDelaySec: number().optional(),
|
|
58462
|
+
switchDelaySec: number().optional().meta(readingMeta("duration")),
|
|
58082
58463
|
lastFetchedAt: number()
|
|
58083
58464
|
});
|
|
58084
58465
|
/**
|
|
@@ -58233,11 +58614,11 @@ object({
|
|
|
58233
58614
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58234
58615
|
availablePrograms: array(string()),
|
|
58235
58616
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58236
|
-
remainingSeconds: number().int().nonnegative().nullable(),
|
|
58617
|
+
remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58237
58618
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58238
|
-
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
58619
|
+
delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58239
58620
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58240
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
58621
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58241
58622
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58242
58623
|
doorOpen: boolean().nullable(),
|
|
58243
58624
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58261,7 +58642,7 @@ object({
|
|
|
58261
58642
|
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
58262
58643
|
machineCareDue: boolean().nullable(),
|
|
58263
58644
|
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
58264
|
-
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
58645
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable().meta(readingMeta("count")),
|
|
58265
58646
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
58266
58647
|
halfLoad: boolean().nullable(),
|
|
58267
58648
|
hygienePlus: boolean().nullable(),
|
|
@@ -58276,7 +58657,7 @@ object({
|
|
|
58276
58657
|
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
58277
58658
|
activeEvents: array(string()),
|
|
58278
58659
|
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
58279
|
-
errorCode: number().nullable(),
|
|
58660
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
58280
58661
|
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
58281
58662
|
errorLabel: string().nullable(),
|
|
58282
58663
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
@@ -58422,24 +58803,14 @@ object({
|
|
|
58422
58803
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
58423
58804
|
lastPressedAt: number().nullable(),
|
|
58424
58805
|
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
58425
|
-
pressCountSinceStart: number()
|
|
58806
|
+
pressCountSinceStart: number().meta(readingMeta("count"))
|
|
58426
58807
|
});
|
|
58427
58808
|
object({
|
|
58428
58809
|
deviceId: number(),
|
|
58429
58810
|
timestamp: number()
|
|
58430
58811
|
});
|
|
58431
58812
|
DeviceType.Button, DeviceType.Camera;
|
|
58432
|
-
|
|
58433
|
-
* Enum-state sensor — a string value picked from a finite option set.
|
|
58434
|
-
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
58435
|
-
* states, weather conditions, contact-source channels, mode strings).
|
|
58436
|
-
* The option set is stable across observations; it is persisted in the
|
|
58437
|
-
* device config blob (via the control slice at adoption) and is NOT
|
|
58438
|
-
* stored in `sourceInfo`.
|
|
58439
|
-
*/
|
|
58440
|
-
/** Locale-render shape for an ISO `value` carried by a `DateTimeSensor`-role
|
|
58441
|
-
* enum sensor: `date` (date-only), `time` (time-only), `datetime` (both). */
|
|
58442
|
-
var EnumSensorDateTimeFormatSchema = _enum([
|
|
58813
|
+
_enum([
|
|
58443
58814
|
"date",
|
|
58444
58815
|
"time",
|
|
58445
58816
|
"datetime"
|
|
@@ -58447,12 +58818,11 @@ var EnumSensorDateTimeFormatSchema = _enum([
|
|
|
58447
58818
|
object({
|
|
58448
58819
|
value: string(),
|
|
58449
58820
|
/**
|
|
58450
|
-
* Set
|
|
58451
|
-
* as
|
|
58452
|
-
*
|
|
58453
|
-
* a time-only sensor → `'time'`.
|
|
58821
|
+
* Set when `value` is a timestamp rather than an enum state, so history
|
|
58822
|
+
* does not learn ISO strings as states. The display shape (date / time /
|
|
58823
|
+
* datetime) lives on `SourceInfo.dateTimeShape`, written once at adopt.
|
|
58454
58824
|
*/
|
|
58455
|
-
|
|
58825
|
+
timestamp: boolean().optional(),
|
|
58456
58826
|
/** Ms epoch when the slice was last updated. */
|
|
58457
58827
|
lastFetchedAt: number()
|
|
58458
58828
|
});
|
|
@@ -58471,13 +58841,13 @@ var EventFireSchema = object({
|
|
|
58471
58841
|
deviceId: number(),
|
|
58472
58842
|
eventType: string(),
|
|
58473
58843
|
data: record(string(), unknown()).nullable(),
|
|
58474
|
-
timestamp: number(),
|
|
58475
|
-
seq: number()
|
|
58844
|
+
timestamp: number().meta(readingMeta("none")),
|
|
58845
|
+
seq: number().meta(readingMeta("count"))
|
|
58476
58846
|
});
|
|
58477
58847
|
object({
|
|
58478
58848
|
eventTypes: array(string()),
|
|
58479
58849
|
lastEvent: EventFireSchema.nullable(),
|
|
58480
|
-
eventCountSinceStart: number()
|
|
58850
|
+
eventCountSinceStart: number().meta(readingMeta("count"))
|
|
58481
58851
|
});
|
|
58482
58852
|
DeviceType.EventEmitter;
|
|
58483
58853
|
var IdentitySchema = object({
|
|
@@ -58866,10 +59236,10 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58866
59236
|
object({
|
|
58867
59237
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58868
59238
|
* speed surface (single-speed fan). */
|
|
58869
|
-
percentage: number().min(0).max(100).nullable(),
|
|
59239
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58870
59240
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58871
59241
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58872
|
-
percentageStep: number().positive().optional(),
|
|
59242
|
+
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
58873
59243
|
/** Active preset mode (`auto` / `quiet` / `turbo` / vendor-specific)
|
|
58874
59244
|
* — empty string when no preset is active or supported. */
|
|
58875
59245
|
preset: string(),
|
|
@@ -58951,7 +59321,7 @@ var FeatureProbeStatusSchema = object({
|
|
|
58951
59321
|
/** Camera/firmware model string. `null` when the firmware doesn't expose it. */
|
|
58952
59322
|
model: string().nullable(),
|
|
58953
59323
|
/** Channel count for NVR/Hub devices; `1` for standalone cameras; `null` pre-probe. */
|
|
58954
|
-
channelCount: number().nullable(),
|
|
59324
|
+
channelCount: number().nullable().meta(readingMeta("count")),
|
|
58955
59325
|
/**
|
|
58956
59326
|
* Ms epoch of the last SUCCESSFUL probe. `0` before the first probe
|
|
58957
59327
|
* completes — drivers' `getAccessoryChildren()` should treat zero as
|
|
@@ -58991,9 +59361,39 @@ object({
|
|
|
58991
59361
|
lastChangedAt: number()
|
|
58992
59362
|
});
|
|
58993
59363
|
DeviceType.Sensor;
|
|
59364
|
+
object({
|
|
59365
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
59366
|
+
results: array(object({
|
|
59367
|
+
deviceId: number().int().nonnegative(),
|
|
59368
|
+
cap: string().min(1),
|
|
59369
|
+
method: string().min(1),
|
|
59370
|
+
ok: boolean(),
|
|
59371
|
+
error: string().optional(),
|
|
59372
|
+
/** Ms epoch of the attempt. */
|
|
59373
|
+
at: number()
|
|
59374
|
+
})) });
|
|
59375
|
+
DeviceType.Switch, DeviceType.Light;
|
|
59376
|
+
object({
|
|
59377
|
+
/** Members whose current value entered the aggregate. */
|
|
59378
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
59379
|
+
precision: 0,
|
|
59380
|
+
label: "Reporting"
|
|
59381
|
+
})),
|
|
59382
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
59383
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
59384
|
+
precision: 0,
|
|
59385
|
+
label: "Excluded"
|
|
59386
|
+
})),
|
|
59387
|
+
/** `included` + `excluded`. */
|
|
59388
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
59389
|
+
precision: 0,
|
|
59390
|
+
label: "Members"
|
|
59391
|
+
}))
|
|
59392
|
+
});
|
|
59393
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58994
59394
|
object({
|
|
58995
59395
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58996
|
-
position: number().min(0).max(100).nullable(),
|
|
59396
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58997
59397
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
58998
59398
|
lastFetchedAt: number()
|
|
58999
59399
|
});
|
|
@@ -59002,9 +59402,9 @@ object({
|
|
|
59002
59402
|
/** Whether the humidifier is currently on. */
|
|
59003
59403
|
on: boolean(),
|
|
59004
59404
|
/** Current measured relative humidity (0..100). Null when not reported. */
|
|
59005
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
59405
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
59006
59406
|
/** Target relative humidity (0..100). Null when no setpoint surface. */
|
|
59007
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
59407
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
59008
59408
|
/** Active mode (`auto` / `normal` / `baby` / vendor). Null when the
|
|
59009
59409
|
* device has no mode surface. */
|
|
59010
59410
|
mode: string().nullable(),
|
|
@@ -59014,9 +59414,9 @@ object({
|
|
|
59014
59414
|
* `idle` / `off`). Null when the device doesn't report it. */
|
|
59015
59415
|
action: string().nullable(),
|
|
59016
59416
|
/** HA `min_humidity` attribute. Null → UI uses 0. */
|
|
59017
|
-
minHumidity: number().nullable(),
|
|
59417
|
+
minHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
59018
59418
|
/** HA `max_humidity` attribute. Null → UI uses 100. */
|
|
59019
|
-
maxHumidity: number().nullable(),
|
|
59419
|
+
maxHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
59020
59420
|
/** Ms epoch when the slice was last updated. */
|
|
59021
59421
|
lastChangedAt: number()
|
|
59022
59422
|
});
|
|
@@ -59048,22 +59448,13 @@ DeviceType.Humidifier, method(object({
|
|
|
59048
59448
|
* `sourceInfo`.
|
|
59049
59449
|
*/
|
|
59050
59450
|
var HumiditySensorStatusSchema = object({
|
|
59051
|
-
/** Current relative humidity, 0..100. */
|
|
59052
|
-
percent: number().min(0).max(100).meta({
|
|
59053
|
-
|
|
59451
|
+
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
59452
|
+
percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
59453
|
+
precision: 0,
|
|
59054
59454
|
label: "Humidity"
|
|
59055
|
-
}),
|
|
59455
|
+
})),
|
|
59056
59456
|
/** Ms epoch when the slice was last updated. */
|
|
59057
|
-
lastFetchedAt: number()
|
|
59058
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
59059
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
59060
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
59061
|
-
unit: string().optional(),
|
|
59062
|
-
/** Suggested decimal places for numeric display.
|
|
59063
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
59064
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
59065
|
-
* auto-formatting when absent. */
|
|
59066
|
-
precision: number().int().min(0).max(10).optional()
|
|
59457
|
+
lastFetchedAt: number()
|
|
59067
59458
|
});
|
|
59068
59459
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
59069
59460
|
object({
|
|
@@ -59071,7 +59462,7 @@ object({
|
|
|
59071
59462
|
* entity exposes no `entity_picture` (yet). */
|
|
59072
59463
|
url: string().nullable(),
|
|
59073
59464
|
/** Ms epoch of the upstream last-updated timestamp. Null at cold-start. */
|
|
59074
|
-
lastUpdated: number().nullable()
|
|
59465
|
+
lastUpdated: number().nullable().meta(readingMeta("none"))
|
|
59075
59466
|
});
|
|
59076
59467
|
DeviceType.Image;
|
|
59077
59468
|
/**
|
|
@@ -59127,19 +59518,19 @@ var NormalizedRangeSchema = object({
|
|
|
59127
59518
|
});
|
|
59128
59519
|
object({
|
|
59129
59520
|
/** Normalized 0–100. */
|
|
59130
|
-
brightness: number().optional(),
|
|
59521
|
+
brightness: number().optional().meta(readingMeta("none")),
|
|
59131
59522
|
/** Normalized 0–100. */
|
|
59132
|
-
contrast: number().optional(),
|
|
59523
|
+
contrast: number().optional().meta(readingMeta("none")),
|
|
59133
59524
|
/** Normalized 0–100. */
|
|
59134
|
-
saturation: number().optional(),
|
|
59525
|
+
saturation: number().optional().meta(readingMeta("none")),
|
|
59135
59526
|
/** Normalized 0–100. */
|
|
59136
|
-
sharpness: number().optional(),
|
|
59527
|
+
sharpness: number().optional().meta(readingMeta("none")),
|
|
59137
59528
|
mirror: boolean().optional(),
|
|
59138
59529
|
flip: boolean().optional(),
|
|
59139
59530
|
rotate: ImageRotateSchema.optional(),
|
|
59140
59531
|
whiteBalance: WhiteBalanceModeSchema.optional(),
|
|
59141
59532
|
/** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
|
|
59142
|
-
warmth: number().optional(),
|
|
59533
|
+
warmth: number().optional().meta(readingMeta("none")),
|
|
59143
59534
|
exposureMode: ExposureModeSchema.optional(),
|
|
59144
59535
|
backlightMode: BacklightModeSchema.optional(),
|
|
59145
59536
|
lastFetchedAt: number()
|
|
@@ -59384,10 +59775,10 @@ var IntercomAbilitySchema = object({
|
|
|
59384
59775
|
/** Codecs accepted by firmware, in preference order. Driver-authored strings. */
|
|
59385
59776
|
codecs: array(string()),
|
|
59386
59777
|
/** Sample rate (Hz) the firmware expects. Reolink typical: 16000. */
|
|
59387
|
-
sampleRate: number(),
|
|
59778
|
+
sampleRate: number().meta(readingMeta("none")),
|
|
59388
59779
|
duplex: _enum(["half", "full"]),
|
|
59389
59780
|
/** Max in-flight audio backlog before drop (ms). Server uses this to bound latency. */
|
|
59390
|
-
maxBacklogMs: number()
|
|
59781
|
+
maxBacklogMs: number().meta(readingMeta("duration-ms"))
|
|
59391
59782
|
});
|
|
59392
59783
|
var IntercomStatusSchema = object({
|
|
59393
59784
|
/** True while a talk session is open. */
|
|
@@ -59498,13 +59889,13 @@ object({
|
|
|
59498
59889
|
activity: LawnMowerActivitySchema,
|
|
59499
59890
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
59500
59891
|
* reading. */
|
|
59501
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
59892
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59502
59893
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59503
59894
|
* task is active / progress is unavailable. */
|
|
59504
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
59895
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59505
59896
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59506
59897
|
* or null when unknown. */
|
|
59507
|
-
currentCode: number().nullable(),
|
|
59898
|
+
currentCode: number().nullable().meta(readingMeta("none")),
|
|
59508
59899
|
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
59509
59900
|
currentCodeLabel: string().nullable(),
|
|
59510
59901
|
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
@@ -59966,7 +60357,7 @@ object({
|
|
|
59966
60357
|
state: MediaPlayerStateSchema,
|
|
59967
60358
|
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
59968
60359
|
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
59969
|
-
volumeLevel: number().min(0).max(100).nullable(),
|
|
60360
|
+
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59970
60361
|
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
59971
60362
|
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
59972
60363
|
isMuted: boolean().nullable(),
|
|
@@ -59979,10 +60370,10 @@ object({
|
|
|
59979
60370
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59980
60371
|
/** Current playback position in ms. Null when not seekable or
|
|
59981
60372
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59982
|
-
positionMs: number().int().nonnegative().nullable(),
|
|
60373
|
+
positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59983
60374
|
/** Total duration of the current media in ms. Null when unknown
|
|
59984
60375
|
* (live stream) or nothing is playing. */
|
|
59985
|
-
durationMs: number().int().nonnegative().nullable(),
|
|
60376
|
+
durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59986
60377
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59987
60378
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59988
60379
|
shuffle: boolean().nullable(),
|
|
@@ -60282,7 +60673,7 @@ var MotionStatusSchema = object({
|
|
|
60282
60673
|
* it, every provider seeded it at boot, and every session left it
|
|
60283
60674
|
* `detected: true` after its detach.
|
|
60284
60675
|
*/
|
|
60285
|
-
autoClearAfterMs: number().nullable()
|
|
60676
|
+
autoClearAfterMs: number().nullable().meta(readingMeta("duration-ms"))
|
|
60286
60677
|
});
|
|
60287
60678
|
/**
|
|
60288
60679
|
* Payload of `motion.onMotionChanged` event + the corresponding bus
|
|
@@ -60332,7 +60723,7 @@ var MotionZoneRegionSchema = object({
|
|
|
60332
60723
|
});
|
|
60333
60724
|
object({
|
|
60334
60725
|
enabled: boolean(),
|
|
60335
|
-
sensitivity: number(),
|
|
60726
|
+
sensitivity: number().meta(readingMeta("none")),
|
|
60336
60727
|
/** Grid region(s). Today exactly one `grid` shape. */
|
|
60337
60728
|
regions: array(MotionZoneRegionSchema),
|
|
60338
60729
|
lastFetchedAt: number()
|
|
@@ -60636,7 +61027,7 @@ var NavigationStatusSchema = object({
|
|
|
60636
61027
|
following: boolean(),
|
|
60637
61028
|
flash: boolean(),
|
|
60638
61029
|
lightMode: NavigationLightModeSchema,
|
|
60639
|
-
lightLevel: number().min(40).max(100),
|
|
61030
|
+
lightLevel: number().min(40).max(100).meta(readingMeta("none")),
|
|
60640
61031
|
/** Ms epoch when the slice was last updated. */
|
|
60641
61032
|
lastChangedAt: number()
|
|
60642
61033
|
});
|
|
@@ -60682,13 +61073,13 @@ var NetworkLinkStatusSchema = object({
|
|
|
60682
61073
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60683
61074
|
* SKIP a null rather than coerce it.
|
|
60684
61075
|
*/
|
|
60685
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
61076
|
+
signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60686
61077
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60687
|
-
rssiDbm: number().optional(),
|
|
61078
|
+
rssiDbm: number().optional().meta(readingMeta("signal-level")),
|
|
60688
61079
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60689
61080
|
ssid: string().optional(),
|
|
60690
61081
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
60691
|
-
lastUpdated: number()
|
|
61082
|
+
lastUpdated: number().meta(readingMeta("none"))
|
|
60692
61083
|
});
|
|
60693
61084
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
60694
61085
|
deviceId: number(),
|
|
@@ -61007,7 +61398,7 @@ object({
|
|
|
61007
61398
|
lastError: string().nullable(),
|
|
61008
61399
|
/** Number of deliveries currently buffered server-side (rate-limited
|
|
61009
61400
|
* notifiers may queue). 0 when the provider sends synchronously. */
|
|
61010
|
-
queueDepth: number().int().nonnegative(),
|
|
61401
|
+
queueDepth: number().int().nonnegative().meta(readingMeta("count")),
|
|
61011
61402
|
/** Per-feature capability matrix — authoritative source for the
|
|
61012
61403
|
* compose-form field gating. */
|
|
61013
61404
|
supports: NotifierSupportsSchema
|
|
@@ -61057,15 +61448,8 @@ DeviceType.Notifier, method(NotifierSendInputSchema, NotifierSendResultSchema, {
|
|
|
61057
61448
|
acceptedAt: number()
|
|
61058
61449
|
});
|
|
61059
61450
|
object({
|
|
61060
|
-
|
|
61061
|
-
|
|
61062
|
-
* Populated live from the upstream source on each state push.
|
|
61063
|
-
* Absent for unitless sensors. */
|
|
61064
|
-
unit: string().optional(),
|
|
61065
|
-
/** Suggested decimal places for numeric display.
|
|
61066
|
-
* Populated live from the upstream source when provided.
|
|
61067
|
-
* Falls back to auto-formatting when absent. */
|
|
61068
|
-
precision: number().int().min(0).max(10).optional(),
|
|
61451
|
+
/** Reading in the device quantity's base unit. `null` when refused (D393). */
|
|
61452
|
+
value: number().nullable().meta(readingMeta("device")),
|
|
61069
61453
|
/** Ms epoch when the slice was last updated. */
|
|
61070
61454
|
lastFetchedAt: number()
|
|
61071
61455
|
});
|
|
@@ -61355,23 +61739,26 @@ object({
|
|
|
61355
61739
|
/** Food currently in the bowl (grams). Null when the device has not
|
|
61356
61740
|
* reported a reading yet. On dual-hopper models this is the combined
|
|
61357
61741
|
* bowl reading; per-hopper levels live in `food1`/`food2`. */
|
|
61358
|
-
foodLevel: number().nullable(),
|
|
61742
|
+
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
61359
61743
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61360
61744
|
* single-hopper models. */
|
|
61361
|
-
food1: number().nullable(),
|
|
61745
|
+
food1: number().nullable().meta(readingMeta("none")),
|
|
61362
61746
|
/** Hopper-2 food level (grams) on dual-hopper feeders; null on
|
|
61363
61747
|
* single-hopper models. */
|
|
61364
|
-
food2: number().nullable(),
|
|
61748
|
+
food2: number().nullable().meta(readingMeta("none")),
|
|
61365
61749
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61366
61750
|
* (`device_class: problem`, on = low). True when the bowl is empty /
|
|
61367
61751
|
* below the feeder's low threshold. */
|
|
61368
61752
|
lowFood: boolean(),
|
|
61369
61753
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
61370
61754
|
* device has no battery reading. */
|
|
61371
|
-
batteryPower: number().min(0).max(100).nullable(),
|
|
61372
|
-
/**
|
|
61373
|
-
*
|
|
61374
|
-
|
|
61755
|
+
batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61756
|
+
/**
|
|
61757
|
+
* Desiccant life remaining, stored in seconds (duration base, D944).
|
|
61758
|
+
* Providers convert from the days the feeder reports. Null when the
|
|
61759
|
+
* model has no desiccant sensor.
|
|
61760
|
+
*/
|
|
61761
|
+
desiccantLeftDays: number().nullable().meta(readingMeta("duration")),
|
|
61375
61762
|
/** True while a feed is in progress. */
|
|
61376
61763
|
feeding: boolean(),
|
|
61377
61764
|
/** Decoded connectivity / power status (HA petkit device-status enum).
|
|
@@ -61382,7 +61769,7 @@ object({
|
|
|
61382
61769
|
* with `errorCode` for consumers that want the raw integer. */
|
|
61383
61770
|
error: string().nullable(),
|
|
61384
61771
|
/** Raw device error code (0 / null = no error). */
|
|
61385
|
-
errorCode: number().nullable(),
|
|
61772
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
61386
61773
|
/** True for D4S/D4SH dual-hopper hardware — gates the per-hopper UI. */
|
|
61387
61774
|
isDualHopper: boolean(),
|
|
61388
61775
|
/** Child-lock (manual-lock) setting — buttons on the unit are disabled. */
|
|
@@ -61392,7 +61779,7 @@ object({
|
|
|
61392
61779
|
/** Play a chime when dispensing. */
|
|
61393
61780
|
feedSound: boolean(),
|
|
61394
61781
|
/** Speaker / prompt volume level (device-scaled integer). */
|
|
61395
|
-
volume: number(),
|
|
61782
|
+
volume: number().meta(readingMeta("none")),
|
|
61396
61783
|
/** Ms epoch when the slice was last refreshed from the cloud. */
|
|
61397
61784
|
lastFetchedAt: number()
|
|
61398
61785
|
});
|
|
@@ -61829,36 +62216,19 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61829
62216
|
});
|
|
61830
62217
|
object({
|
|
61831
62218
|
/** Instantaneous power draw in watts. */
|
|
61832
|
-
watts: number().optional().meta({
|
|
61833
|
-
unit: "W",
|
|
61834
|
-
label: "Power"
|
|
61835
|
-
}),
|
|
62219
|
+
watts: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61836
62220
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61837
|
-
kwhTotal: number().optional().meta({
|
|
61838
|
-
unit: "kWh",
|
|
61839
|
-
label: "Energy"
|
|
61840
|
-
}),
|
|
62221
|
+
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
61841
62222
|
/** Voltage in volts. */
|
|
61842
|
-
volts: number().optional(),
|
|
62223
|
+
volts: number().optional().meta(readingMeta("voltage")),
|
|
61843
62224
|
/** Current in amperes. */
|
|
61844
|
-
amps: number().optional(),
|
|
61845
|
-
/** Apparent power in volt-amperes
|
|
61846
|
-
va: number().optional(),
|
|
62225
|
+
amps: number().optional().meta(readingMeta("current")),
|
|
62226
|
+
/** Apparent power in volt-amperes. */
|
|
62227
|
+
va: number().optional().meta(readingMeta("apparent-power")),
|
|
61847
62228
|
/** Power factor (0..1) if reported. */
|
|
61848
|
-
powerFactor: number().min(0).max(1).optional(),
|
|
62229
|
+
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61849
62230
|
/** Ms epoch when the slice was last updated. */
|
|
61850
|
-
lastFetchedAt: number()
|
|
61851
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
61852
|
-
* `attributes.unit_of_measurement` → 'V' / 'A' / 'W' / 'kW' / 'kWh').
|
|
61853
|
-
* Each upstream `sensor.*` entity surfaces ONE device_class, so one
|
|
61854
|
-
* unit per slice is unambiguous. The UI prefers this over the role's
|
|
61855
|
-
* canonical unit so a 'kW' / 'Wh' feed renders verbatim. */
|
|
61856
|
-
unit: string().optional(),
|
|
61857
|
-
/** Suggested decimal places for numeric display.
|
|
61858
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
61859
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
61860
|
-
* auto-formatting when absent. */
|
|
61861
|
-
precision: number().int().min(0).max(10).optional()
|
|
62231
|
+
lastFetchedAt: number()
|
|
61862
62232
|
});
|
|
61863
62233
|
DeviceType.Sensor;
|
|
61864
62234
|
/**
|
|
@@ -61879,11 +62249,11 @@ DeviceType.Sensor;
|
|
|
61879
62249
|
*/
|
|
61880
62250
|
var GpsLocationSchema = object({
|
|
61881
62251
|
/** Latitude in decimal degrees, -90..90. */
|
|
61882
|
-
latitude: number().min(-90).max(90),
|
|
62252
|
+
latitude: number().min(-90).max(90).meta(readingMeta("angle")),
|
|
61883
62253
|
/** Longitude in decimal degrees, -180..180. */
|
|
61884
|
-
longitude: number().min(-180).max(180),
|
|
62254
|
+
longitude: number().min(-180).max(180).meta(readingMeta("angle")),
|
|
61885
62255
|
/** Reported accuracy in meters (lower = better). */
|
|
61886
|
-
accuracyMeters: number().nonnegative()
|
|
62256
|
+
accuracyMeters: number().nonnegative().meta(readingMeta("length"))
|
|
61887
62257
|
});
|
|
61888
62258
|
var PresenceStatusSchema = object({
|
|
61889
62259
|
/** `home` / `not_home` / any user-defined zone name. */
|
|
@@ -61895,25 +62265,16 @@ var PresenceStatusSchema = object({
|
|
|
61895
62265
|
gps: GpsLocationSchema.nullable(),
|
|
61896
62266
|
/** Optional battery level of the tracking device (0..100). Null
|
|
61897
62267
|
* when not reported. */
|
|
61898
|
-
batteryPercent: number().min(0).max(100).nullable(),
|
|
62268
|
+
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61899
62269
|
/** Ms epoch when the slice was last updated. */
|
|
61900
62270
|
lastChangedAt: number()
|
|
61901
62271
|
});
|
|
61902
62272
|
DeviceType.Presence;
|
|
61903
62273
|
object({
|
|
61904
|
-
/** Current pressure in hPa. */
|
|
61905
|
-
hpa: number(),
|
|
62274
|
+
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
62275
|
+
hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61906
62276
|
/** Ms epoch when the slice was last updated. */
|
|
61907
|
-
lastFetchedAt: number()
|
|
61908
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
61909
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
61910
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
61911
|
-
unit: string().optional(),
|
|
61912
|
-
/** Suggested decimal places for numeric display.
|
|
61913
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
61914
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
61915
|
-
* auto-formatting when absent. */
|
|
61916
|
-
precision: number().int().min(0).max(10).optional()
|
|
62277
|
+
lastFetchedAt: number()
|
|
61917
62278
|
});
|
|
61918
62279
|
DeviceType.Sensor;
|
|
61919
62280
|
/**
|
|
@@ -62246,8 +62607,8 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
62246
62607
|
}), _void(), { kind: "mutation" });
|
|
62247
62608
|
var PtzAutotrackSettingsSchema = object({
|
|
62248
62609
|
targetType: string().describe("Vendor target string (people/vehicle/pet); empty = camera default"),
|
|
62249
|
-
stopDelaySeconds: number().int().min(0).max(300),
|
|
62250
|
-
disappearDelaySeconds: number().int().min(0).max(300)
|
|
62610
|
+
stopDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration")),
|
|
62611
|
+
disappearDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration"))
|
|
62251
62612
|
});
|
|
62252
62613
|
/**
|
|
62253
62614
|
* One option the camera advertises as a valid `targetType`. Drivers
|
|
@@ -62304,7 +62665,7 @@ object({
|
|
|
62304
62665
|
/** null = unknown — never coerced to false (D393). */
|
|
62305
62666
|
running: boolean().nullable(),
|
|
62306
62667
|
/** Epoch ms the current boolean began; null while `running` is null. */
|
|
62307
|
-
since: number().nullable(),
|
|
62668
|
+
since: number().nullable().meta(readingMeta("none")),
|
|
62308
62669
|
source: RunningStateSourceSchema.meta({ label: "Source" }),
|
|
62309
62670
|
phase: string().nullable(),
|
|
62310
62671
|
/** null until a reading has been published (D393). */
|
|
@@ -63502,9 +63863,9 @@ var RecordTriggerSchema = _enum([
|
|
|
63502
63863
|
*/
|
|
63503
63864
|
var RecordWindowSchema = object({
|
|
63504
63865
|
trigger: RecordTriggerSchema,
|
|
63505
|
-
day: number().int().min(0).max(6),
|
|
63506
|
-
startMinute: number().int().min(0).max(1439),
|
|
63507
|
-
endMinute: number().int().min(1).max(1440)
|
|
63866
|
+
day: number().int().min(0).max(6).meta(readingMeta("none")),
|
|
63867
|
+
startMinute: number().int().min(0).max(1439).meta(readingMeta("none")),
|
|
63868
|
+
endMinute: number().int().min(1).max(1440).meta(readingMeta("none"))
|
|
63508
63869
|
});
|
|
63509
63870
|
/** Status of one physical volume, as the camera itself describes it. */
|
|
63510
63871
|
var OnboardStorageVolumeSchema = object({
|
|
@@ -63573,10 +63934,10 @@ object({
|
|
|
63573
63934
|
/** Master "record to the card at all" switch. */
|
|
63574
63935
|
enabled: boolean().nullable(),
|
|
63575
63936
|
overwriteWhenFull: boolean().nullable(),
|
|
63576
|
-
preRecordSec: number().nullable(),
|
|
63577
|
-
postRecordSec: number().nullable(),
|
|
63937
|
+
preRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
63938
|
+
postRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
63578
63939
|
/** Length of one recorded file, in minutes. */
|
|
63579
|
-
segmentMinutes: number().nullable(),
|
|
63940
|
+
segmentMinutes: number().nullable().meta(readingMeta("none")),
|
|
63580
63941
|
/** The primary track's weekly windows, flattened. */
|
|
63581
63942
|
windows: array(RecordWindowSchema),
|
|
63582
63943
|
/**
|
|
@@ -63592,7 +63953,7 @@ object({
|
|
|
63592
63953
|
* provider reporting a non-zero count also reports the schedule as not
|
|
63593
63954
|
* writable.
|
|
63594
63955
|
*/
|
|
63595
|
-
unreadableWindows: number(),
|
|
63956
|
+
unreadableWindows: number().meta(readingMeta("count")),
|
|
63596
63957
|
/**
|
|
63597
63958
|
* The camera is scheduled to record and has NO usable storage.
|
|
63598
63959
|
*
|
|
@@ -64238,7 +64599,7 @@ var CamStreamDescriptorSchema = object({
|
|
|
64238
64599
|
url: string().optional(),
|
|
64239
64600
|
codec: string().optional(),
|
|
64240
64601
|
resolution: CamStreamResolutionSchema.optional(),
|
|
64241
|
-
fps: number().positive().optional(),
|
|
64602
|
+
fps: number().positive().optional().meta(readingMeta("rate")),
|
|
64242
64603
|
label: string().optional(),
|
|
64243
64604
|
/** Device-level features (e.g. `battery-operated`) — drives broker policy. */
|
|
64244
64605
|
deviceFeatures: array(string()).optional(),
|
|
@@ -64268,18 +64629,18 @@ var StreamProfileSchema = _enum([
|
|
|
64268
64629
|
]);
|
|
64269
64630
|
/** The current encoding config of one stream profile. */
|
|
64270
64631
|
var StreamProfileConfigSchema = object({
|
|
64271
|
-
width: number(),
|
|
64272
|
-
height: number(),
|
|
64632
|
+
width: number().meta(readingMeta("none")),
|
|
64633
|
+
height: number().meta(readingMeta("none")),
|
|
64273
64634
|
codec: _enum(["h264", "h265"]),
|
|
64274
|
-
framerate: number(),
|
|
64275
|
-
bitrate: number(),
|
|
64635
|
+
framerate: number().meta(readingMeta("rate")),
|
|
64636
|
+
bitrate: number().meta(readingMeta("bitrate")),
|
|
64276
64637
|
bitrateMode: _enum(["vbr", "cbr"]).optional(),
|
|
64277
64638
|
encoderProfile: _enum([
|
|
64278
64639
|
"high",
|
|
64279
64640
|
"main",
|
|
64280
64641
|
"baseline"
|
|
64281
64642
|
]).optional(),
|
|
64282
|
-
gop: number().optional(),
|
|
64643
|
+
gop: number().optional().meta(readingMeta("none")),
|
|
64283
64644
|
/**
|
|
64284
64645
|
* Whether THIS profile currently carries an audio track. READ-ONLY here.
|
|
64285
64646
|
*
|
|
@@ -64926,35 +65287,21 @@ DeviceType.Sensor;
|
|
|
64926
65287
|
* entries with `device_class: temperature` and any future native
|
|
64927
65288
|
* thermometer.
|
|
64928
65289
|
*
|
|
64929
|
-
*
|
|
64930
|
-
*
|
|
64931
|
-
* (climate-control's `currentTemp`, energy analytics) can compose
|
|
64932
|
-
* without per-source unit fixups. The canonical display unit (`°C`) is
|
|
64933
|
-
* a descriptor constant in the UI (ROLE_DESCRIPTOR), not stored in
|
|
64934
|
-
* `sourceInfo`.
|
|
65290
|
+
* The number is Celsius (D944). Providers convert on ingest. A failed
|
|
65291
|
+
* conversion is `null`, never a guess. Display unit is a read-time preference.
|
|
64935
65292
|
*
|
|
64936
65293
|
* Status `lastFetchedAt` lets staleness-aware consumers detect a
|
|
64937
65294
|
* frozen feed (provider hung) distinct from a "temperature hasn't
|
|
64938
65295
|
* changed" steady state.
|
|
64939
65296
|
*/
|
|
64940
65297
|
var TemperatureSensorStatusSchema = object({
|
|
64941
|
-
/** Current temperature in Celsius. */
|
|
64942
|
-
celsius: number().meta({
|
|
64943
|
-
|
|
65298
|
+
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
65299
|
+
celsius: number().nullable().meta(readingMeta("temperature", {
|
|
65300
|
+
precision: 1,
|
|
64944
65301
|
label: "Temperature"
|
|
64945
|
-
}),
|
|
65302
|
+
})),
|
|
64946
65303
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
64947
|
-
lastFetchedAt: number()
|
|
64948
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
64949
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
64950
|
-
* role's canonical unit, so a Fahrenheit feed renders '°F' not '°C'.
|
|
64951
|
-
* Absent → the UI falls back to the role's canonical unit. */
|
|
64952
|
-
unit: string().optional(),
|
|
64953
|
-
/** Suggested decimal places for numeric display.
|
|
64954
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
64955
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
64956
|
-
* auto-formatting when absent. */
|
|
64957
|
-
precision: number().int().min(0).max(10).optional()
|
|
65304
|
+
lastFetchedAt: number()
|
|
64958
65305
|
});
|
|
64959
65306
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
64960
65307
|
/**
|
|
@@ -65206,16 +65553,16 @@ object({
|
|
|
65206
65553
|
]),
|
|
65207
65554
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
65208
65555
|
* reading. */
|
|
65209
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
65556
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65210
65557
|
/** Current fan-speed token (provider-verbatim). Null when unknown or
|
|
65211
65558
|
* the vacuum has no speed control. */
|
|
65212
65559
|
fanSpeed: string().nullable(),
|
|
65213
65560
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
65214
65561
|
availableFanSpeeds: array(string()),
|
|
65215
65562
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
65216
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
65563
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65217
65564
|
/** Current error code (0 / null = no error). */
|
|
65218
|
-
errorCode: number().nullable(),
|
|
65565
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65219
65566
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
65220
65567
|
errorLabel: string().nullable(),
|
|
65221
65568
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -65254,7 +65601,7 @@ object({
|
|
|
65254
65601
|
]),
|
|
65255
65602
|
/** 0 = fully closed, 100 = fully open. Null when the device has no
|
|
65256
65603
|
* intermediate position surface. */
|
|
65257
|
-
position: number().min(0).max(100).nullable(),
|
|
65604
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65258
65605
|
/** Ms epoch when the slice was last updated. */
|
|
65259
65606
|
lastChangedAt: number()
|
|
65260
65607
|
});
|
|
@@ -65282,9 +65629,9 @@ object({
|
|
|
65282
65629
|
DeviceType.Sensor;
|
|
65283
65630
|
object({
|
|
65284
65631
|
/** Current measured temperature. Null when not reported. */
|
|
65285
|
-
currentTemp: number().nullable(),
|
|
65632
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65286
65633
|
/** Target temperature setpoint. Null when no setpoint surface. */
|
|
65287
|
-
targetTemp: number().nullable(),
|
|
65634
|
+
targetTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65288
65635
|
/** Active operation mode = HA `state` (`eco` / `electric` / `gas` /
|
|
65289
65636
|
* `heat_pump` / `high_demand` / `performance` / `off`). Null when the
|
|
65290
65637
|
* device reports an unknown state. */
|
|
@@ -65295,9 +65642,9 @@ object({
|
|
|
65295
65642
|
* has no away surface. */
|
|
65296
65643
|
away: boolean().nullable(),
|
|
65297
65644
|
/** HA `min_temp` attribute. Null when not reported. */
|
|
65298
|
-
minTemp: number().nullable(),
|
|
65645
|
+
minTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65299
65646
|
/** HA `max_temp` attribute. Null when not reported. */
|
|
65300
|
-
maxTemp: number().nullable(),
|
|
65647
|
+
maxTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65301
65648
|
/** Ms epoch when the slice was last updated. */
|
|
65302
65649
|
lastChangedAt: number()
|
|
65303
65650
|
});
|
|
@@ -65321,25 +65668,18 @@ DeviceType.WaterHeater, method(object({
|
|
|
65321
65668
|
auth: "protected"
|
|
65322
65669
|
});
|
|
65323
65670
|
object({
|
|
65324
|
-
/** Verbatim
|
|
65325
|
-
* when no condition has been reported yet. */
|
|
65671
|
+
/** Verbatim condition state (`sunny`, `cloudy`, `rainy`, …). Null when none yet. */
|
|
65326
65672
|
condition: string().nullable(),
|
|
65327
|
-
/** Current temperature in
|
|
65328
|
-
temperature: number().nullable(),
|
|
65329
|
-
/** Temperature unit string (e.g. `°C` / `°F`). Null when not provided. */
|
|
65330
|
-
temperatureUnit: string().nullable(),
|
|
65673
|
+
/** Current temperature in Celsius. Null when not provided or refused. */
|
|
65674
|
+
temperature: number().nullable().meta(readingMeta("temperature", { precision: 1 })),
|
|
65331
65675
|
/** Relative humidity (0..100). Null when not provided. */
|
|
65332
|
-
humidity: number().min(0).max(100).nullable(),
|
|
65333
|
-
/** Barometric pressure in
|
|
65334
|
-
pressure: number().nullable(),
|
|
65335
|
-
/**
|
|
65336
|
-
|
|
65337
|
-
/** Wind speed in the reported unit. Null when not provided. */
|
|
65338
|
-
windSpeed: number().nullable(),
|
|
65339
|
-
/** Wind-speed unit string (e.g. `km/h` / `mph`). Null when not provided. */
|
|
65340
|
-
windSpeedUnit: string().nullable(),
|
|
65676
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
65677
|
+
/** Barometric pressure in hPa. Null when not provided or refused. */
|
|
65678
|
+
pressure: number().nullable().meta(readingMeta("pressure")),
|
|
65679
|
+
/** Wind speed in metres per second. Null when not provided or refused. */
|
|
65680
|
+
windSpeed: number().nullable().meta(readingMeta("speed")),
|
|
65341
65681
|
/** Wind bearing in degrees (0..360, meteorological). Null when not provided. */
|
|
65342
|
-
windBearing: number().nullable(),
|
|
65682
|
+
windBearing: number().nullable().meta(readingMeta("angle")),
|
|
65343
65683
|
/** Ms epoch when the slice was last updated. */
|
|
65344
65684
|
lastFetchedAt: number()
|
|
65345
65685
|
});
|
|
@@ -66251,6 +66591,13 @@ Object.freeze({
|
|
|
66251
66591
|
access: "view",
|
|
66252
66592
|
role: "admin"
|
|
66253
66593
|
},
|
|
66594
|
+
"addons.getPackageDocs": {
|
|
66595
|
+
capName: "addons",
|
|
66596
|
+
capScope: "system",
|
|
66597
|
+
addonId: null,
|
|
66598
|
+
access: "view",
|
|
66599
|
+
role: "admin"
|
|
66600
|
+
},
|
|
66254
66601
|
"addons.getVersions": {
|
|
66255
66602
|
capName: "addons",
|
|
66256
66603
|
capScope: "system",
|
|
@@ -69359,6 +69706,20 @@ Object.freeze({
|
|
|
69359
69706
|
access: "view",
|
|
69360
69707
|
role: "viewer"
|
|
69361
69708
|
},
|
|
69709
|
+
"groupCommands.getStatus": {
|
|
69710
|
+
capName: "group-commands",
|
|
69711
|
+
capScope: "device",
|
|
69712
|
+
addonId: null,
|
|
69713
|
+
access: "view",
|
|
69714
|
+
role: "viewer"
|
|
69715
|
+
},
|
|
69716
|
+
"groupStatus.getStatus": {
|
|
69717
|
+
capName: "group-status",
|
|
69718
|
+
capScope: "device",
|
|
69719
|
+
addonId: null,
|
|
69720
|
+
access: "view",
|
|
69721
|
+
role: "viewer"
|
|
69722
|
+
},
|
|
69362
69723
|
"heatingValve.getStatus": {
|
|
69363
69724
|
capName: "heating-valve",
|
|
69364
69725
|
capScope: "device",
|
|
@@ -79181,6 +79542,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79181
79542
|
icon: "flame"
|
|
79182
79543
|
}]
|
|
79183
79544
|
},
|
|
79545
|
+
"group-commands": {
|
|
79546
|
+
scope: "device",
|
|
79547
|
+
noun: t("Group command", "Comando di gruppo")
|
|
79548
|
+
},
|
|
79549
|
+
"group-status": {
|
|
79550
|
+
scope: "device",
|
|
79551
|
+
noun: t("Group", "Gruppo"),
|
|
79552
|
+
state: [
|
|
79553
|
+
{
|
|
79554
|
+
kind: "numeric",
|
|
79555
|
+
field: "included",
|
|
79556
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
79557
|
+
label: t("Reporting", "Rispondono"),
|
|
79558
|
+
icon: "users"
|
|
79559
|
+
},
|
|
79560
|
+
{
|
|
79561
|
+
kind: "numeric",
|
|
79562
|
+
field: "excluded",
|
|
79563
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
79564
|
+
label: t("Excluded", "Esclusi"),
|
|
79565
|
+
icon: "users"
|
|
79566
|
+
},
|
|
79567
|
+
{
|
|
79568
|
+
kind: "numeric",
|
|
79569
|
+
field: "total",
|
|
79570
|
+
quantity: t("the member count", "il numero di membri"),
|
|
79571
|
+
label: t("Members", "Membri"),
|
|
79572
|
+
icon: "sigma"
|
|
79573
|
+
}
|
|
79574
|
+
]
|
|
79575
|
+
},
|
|
79184
79576
|
"humidity-sensor": {
|
|
79185
79577
|
scope: "device",
|
|
79186
79578
|
noun: t("Humidity", "Umidità"),
|
|
@@ -79214,7 +79606,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79214
79606
|
field: "value",
|
|
79215
79607
|
quantity: t("the reading", "il valore"),
|
|
79216
79608
|
label: t("Reading", "Valore"),
|
|
79217
|
-
unitField: "unit",
|
|
79218
79609
|
icon: "gauge"
|
|
79219
79610
|
}]
|
|
79220
79611
|
},
|
|
@@ -79350,7 +79741,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79350
79741
|
field: "temperature",
|
|
79351
79742
|
quantity: t("the outdoor temperature", "la temperatura esterna"),
|
|
79352
79743
|
label: t("Temperature", "Temperatura"),
|
|
79353
|
-
|
|
79744
|
+
unit: "°C",
|
|
79354
79745
|
icon: "thermometer"
|
|
79355
79746
|
},
|
|
79356
79747
|
{
|
|
@@ -79366,7 +79757,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79366
79757
|
field: "windSpeed",
|
|
79367
79758
|
quantity: t("the wind speed", "la velocità del vento"),
|
|
79368
79759
|
label: t("Wind", "Vento"),
|
|
79369
|
-
|
|
79760
|
+
unit: "m/s",
|
|
79370
79761
|
icon: "wind"
|
|
79371
79762
|
},
|
|
79372
79763
|
{
|
|
@@ -79374,7 +79765,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79374
79765
|
field: "pressure",
|
|
79375
79766
|
quantity: t("the air pressure", "la pressione atmosferica"),
|
|
79376
79767
|
label: t("Pressure", "Pressione"),
|
|
79377
|
-
|
|
79768
|
+
unit: "hPa",
|
|
79378
79769
|
icon: "gauge"
|
|
79379
79770
|
}
|
|
79380
79771
|
]
|
|
@@ -80647,6 +81038,16 @@ Object.freeze({
|
|
|
80647
81038
|
form: "single",
|
|
80648
81039
|
optional: false
|
|
80649
81040
|
}],
|
|
81041
|
+
"groupCommands.getStatus": [{
|
|
81042
|
+
name: "deviceId",
|
|
81043
|
+
form: "single",
|
|
81044
|
+
optional: false
|
|
81045
|
+
}],
|
|
81046
|
+
"groupStatus.getStatus": [{
|
|
81047
|
+
name: "deviceId",
|
|
81048
|
+
form: "single",
|
|
81049
|
+
optional: false
|
|
81050
|
+
}],
|
|
80650
81051
|
"heatingValve.getStatus": [{
|
|
80651
81052
|
name: "deviceId",
|
|
80652
81053
|
form: "single",
|
|
@@ -82631,6 +83032,8 @@ new Map(Object.entries({
|
|
|
82631
83032
|
"detection-blind": "device-events",
|
|
82632
83033
|
"motion-noisy": "device-events",
|
|
82633
83034
|
"motion-calm": "device-events",
|
|
83035
|
+
"package-llm-silent": "device-events",
|
|
83036
|
+
"package-llm-answered": "device-events",
|
|
82634
83037
|
"recording-stalled": "device-events",
|
|
82635
83038
|
"recording-healthy": "device-events",
|
|
82636
83039
|
"recording-degraded": "device-events",
|
|
@@ -82714,6 +83117,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
82714
83117
|
label: "Motion without a subject",
|
|
82715
83118
|
kinds: ["motion-noisy", "motion-calm"]
|
|
82716
83119
|
},
|
|
83120
|
+
{
|
|
83121
|
+
id: "package-llm",
|
|
83122
|
+
family: "device-events",
|
|
83123
|
+
label: "Package confirm",
|
|
83124
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
83125
|
+
},
|
|
82717
83126
|
{
|
|
82718
83127
|
id: "recording",
|
|
82719
83128
|
family: "device-events",
|
|
@@ -82895,6 +83304,8 @@ var DEVICE_EVENTS = [
|
|
|
82895
83304
|
"detection-blind",
|
|
82896
83305
|
"motion-noisy",
|
|
82897
83306
|
"motion-calm",
|
|
83307
|
+
"package-llm-silent",
|
|
83308
|
+
"package-llm-answered",
|
|
82898
83309
|
"recording-stalled",
|
|
82899
83310
|
"recording-healthy",
|
|
82900
83311
|
"recording-degraded",
|
|
@@ -83163,6 +83574,15 @@ new Map([
|
|
|
83163
83574
|
snapshotLabel: "Cameras with constant motion now",
|
|
83164
83575
|
snapshotSection: null
|
|
83165
83576
|
},
|
|
83577
|
+
{
|
|
83578
|
+
id: "package-llm-confirm",
|
|
83579
|
+
family: "device-events",
|
|
83580
|
+
label: "Package confirm (not answering / answering again)",
|
|
83581
|
+
bad: ["package-llm-silent"],
|
|
83582
|
+
recovery: ["package-llm-answered"],
|
|
83583
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
83584
|
+
snapshotSection: null
|
|
83585
|
+
},
|
|
83166
83586
|
{
|
|
83167
83587
|
id: "recording-health",
|
|
83168
83588
|
family: "device-events",
|
|
@@ -133735,7 +134155,7 @@ var SENSOR_SPECS = {
|
|
|
133735
134155
|
addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.TemperatureSensor, name, subtype),
|
|
133736
134156
|
getStatus: (proxy) => proxy.temperatureSensor?.getStatus({}),
|
|
133737
134157
|
subscribe: (proxy, onValue) => proxy.state.temperatureSensor?.subscribe(onValue) ?? null,
|
|
133738
|
-
read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => [{
|
|
134158
|
+
read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => status.celsius === null ? [] : [{
|
|
133739
134159
|
characteristic: import_dist.Characteristic.CurrentTemperature,
|
|
133740
134160
|
value: status.celsius
|
|
133741
134161
|
}])
|
|
@@ -133745,7 +134165,7 @@ var SENSOR_SPECS = {
|
|
|
133745
134165
|
addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.HumiditySensor, name, subtype),
|
|
133746
134166
|
getStatus: (proxy) => proxy.humiditySensor?.getStatus({}),
|
|
133747
134167
|
subscribe: (proxy, onValue) => proxy.state.humiditySensor?.subscribe(onValue) ?? null,
|
|
133748
|
-
read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => [{
|
|
134168
|
+
read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => status.percent === null ? [] : [{
|
|
133749
134169
|
characteristic: import_dist.Characteristic.CurrentRelativeHumidity,
|
|
133750
134170
|
value: status.percent
|
|
133751
134171
|
}])
|
|
@@ -133755,7 +134175,7 @@ var SENSOR_SPECS = {
|
|
|
133755
134175
|
addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.LightSensor, name, subtype),
|
|
133756
134176
|
getStatus: (proxy) => proxy.ambientLightSensor?.getStatus({}),
|
|
133757
134177
|
subscribe: (proxy, onValue) => proxy.state.ambientLightSensor?.subscribe(onValue) ?? null,
|
|
133758
|
-
read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => [{
|
|
134178
|
+
read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => status.lux === null ? [] : [{
|
|
133759
134179
|
characteristic: import_dist.Characteristic.CurrentAmbientLightLevel,
|
|
133760
134180
|
value: Math.max(MIN_LUX, status.lux)
|
|
133761
134181
|
}])
|