@camstack/addon-export-google 0.1.113 → 0.1.115
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/export-google.addon.js +999 -442
- package/dist/export-google.addon.mjs +999 -442
- package/package.json +4 -2
|
@@ -77,7 +77,7 @@ function createApiDeviceGateway(deps) {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region ../types/dist/event-category-
|
|
80
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
81
81
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
82
82
|
EventCategory["SystemBoot"] = "system.boot";
|
|
83
83
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -403,6 +403,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
403
403
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
404
404
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
405
405
|
/**
|
|
406
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
407
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
408
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
409
|
+
*/
|
|
410
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
411
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
412
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
413
|
+
/**
|
|
406
414
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
407
415
|
* (a settings change via `setAgentInferenceDevices` /
|
|
408
416
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5512,7 +5520,7 @@ var ZodIssueCode = {
|
|
|
5512
5520
|
var ZodFirstPartyTypeKind;
|
|
5513
5521
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5514
5522
|
//#endregion
|
|
5515
|
-
//#region ../types/dist/sleep-
|
|
5523
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5516
5524
|
/**
|
|
5517
5525
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5518
5526
|
* window to float samples (D455).
|
|
@@ -7999,6 +8007,99 @@ var RecordKindDeclarationSchema = object({
|
|
|
7999
8007
|
}).strict();
|
|
8000
8008
|
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
8001
8009
|
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
8010
|
+
var READING_QUANTITIES = [
|
|
8011
|
+
"temperature",
|
|
8012
|
+
"pressure",
|
|
8013
|
+
"speed",
|
|
8014
|
+
"precipitation",
|
|
8015
|
+
"precipitation-rate",
|
|
8016
|
+
"length",
|
|
8017
|
+
"area",
|
|
8018
|
+
"illuminance",
|
|
8019
|
+
"irradiance",
|
|
8020
|
+
"power",
|
|
8021
|
+
"energy",
|
|
8022
|
+
"voltage",
|
|
8023
|
+
"current",
|
|
8024
|
+
"apparent-power",
|
|
8025
|
+
"humidity",
|
|
8026
|
+
"percentage",
|
|
8027
|
+
"concentration-volume",
|
|
8028
|
+
"concentration-mass",
|
|
8029
|
+
"concentration-ppb",
|
|
8030
|
+
"volume",
|
|
8031
|
+
"duration",
|
|
8032
|
+
"duration-ms",
|
|
8033
|
+
"information",
|
|
8034
|
+
"sound-level",
|
|
8035
|
+
"signal-level",
|
|
8036
|
+
"colour-temperature",
|
|
8037
|
+
"angle",
|
|
8038
|
+
"bitrate",
|
|
8039
|
+
"rate",
|
|
8040
|
+
"mass",
|
|
8041
|
+
"index",
|
|
8042
|
+
"ratio",
|
|
8043
|
+
"count",
|
|
8044
|
+
"none",
|
|
8045
|
+
"device"
|
|
8046
|
+
];
|
|
8047
|
+
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
8048
|
+
new Set(READING_QUANTITIES);
|
|
8049
|
+
/**
|
|
8050
|
+
* Stored unit symbol for a quantity. `none` means the number is dimensionless
|
|
8051
|
+
* (or an index / ratio / count). `device` means the cap has no single unit.
|
|
8052
|
+
*/
|
|
8053
|
+
var QUANTITY_BASE = {
|
|
8054
|
+
temperature: "°C",
|
|
8055
|
+
pressure: "hPa",
|
|
8056
|
+
speed: "m/s",
|
|
8057
|
+
precipitation: "mm",
|
|
8058
|
+
"precipitation-rate": "mm/h",
|
|
8059
|
+
length: "m",
|
|
8060
|
+
area: "m²",
|
|
8061
|
+
illuminance: "lx",
|
|
8062
|
+
irradiance: "W/m²",
|
|
8063
|
+
power: "W",
|
|
8064
|
+
energy: "kWh",
|
|
8065
|
+
voltage: "V",
|
|
8066
|
+
current: "A",
|
|
8067
|
+
"apparent-power": "VA",
|
|
8068
|
+
humidity: "%",
|
|
8069
|
+
percentage: "%",
|
|
8070
|
+
"concentration-volume": "ppm",
|
|
8071
|
+
"concentration-mass": "µg/m³",
|
|
8072
|
+
"concentration-ppb": "ppb",
|
|
8073
|
+
volume: "L",
|
|
8074
|
+
duration: "s",
|
|
8075
|
+
"duration-ms": "ms",
|
|
8076
|
+
information: "B",
|
|
8077
|
+
"sound-level": "dBFS",
|
|
8078
|
+
"signal-level": "dBm",
|
|
8079
|
+
"colour-temperature": "mired",
|
|
8080
|
+
angle: "°",
|
|
8081
|
+
bitrate: "kbps",
|
|
8082
|
+
rate: "fps",
|
|
8083
|
+
mass: "kg",
|
|
8084
|
+
index: "none",
|
|
8085
|
+
ratio: "none",
|
|
8086
|
+
count: "none",
|
|
8087
|
+
none: "none",
|
|
8088
|
+
device: "device"
|
|
8089
|
+
};
|
|
8090
|
+
/** The stored unit, or `undefined` when the quantity has no unit symbol. */
|
|
8091
|
+
function baseUnitOf(quantity) {
|
|
8092
|
+
const symbol = QUANTITY_BASE[quantity];
|
|
8093
|
+
if (symbol === "none" || symbol === "device") return void 0;
|
|
8094
|
+
return symbol;
|
|
8095
|
+
}
|
|
8096
|
+
function readingMeta(quantity, extras) {
|
|
8097
|
+
return {
|
|
8098
|
+
quantity,
|
|
8099
|
+
...extras?.precision !== void 0 ? { precision: extras.precision } : {},
|
|
8100
|
+
...extras?.label !== void 0 ? { label: extras.label } : {}
|
|
8101
|
+
};
|
|
8102
|
+
}
|
|
8002
8103
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
8003
8104
|
var CamProfileSchema = _enum([
|
|
8004
8105
|
"high",
|
|
@@ -8026,8 +8127,8 @@ var CamStreamKindSchema = _enum([
|
|
|
8026
8127
|
"derived"
|
|
8027
8128
|
]);
|
|
8028
8129
|
var CamStreamResolutionSchema = object({
|
|
8029
|
-
width: number().int().positive(),
|
|
8030
|
-
height: number().int().positive()
|
|
8130
|
+
width: number().int().positive().meta(readingMeta("none")),
|
|
8131
|
+
height: number().int().positive().meta(readingMeta("none"))
|
|
8031
8132
|
});
|
|
8032
8133
|
var CameraStreamSchema = object({
|
|
8033
8134
|
/** Stable, provider-assigned id unique within the (deviceId) scope. */
|
|
@@ -8563,6 +8664,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
8563
8664
|
"filesystem-browse",
|
|
8564
8665
|
"flood",
|
|
8565
8666
|
"gas",
|
|
8667
|
+
"group-commands",
|
|
8668
|
+
"group-status",
|
|
8566
8669
|
"heating-valve",
|
|
8567
8670
|
"humidifier",
|
|
8568
8671
|
"humidity-sensor",
|
|
@@ -8692,14 +8795,6 @@ Object.freeze({
|
|
|
8692
8795
|
{
|
|
8693
8796
|
"path": "aqi",
|
|
8694
8797
|
"valueType": "number"
|
|
8695
|
-
},
|
|
8696
|
-
{
|
|
8697
|
-
"path": "unit",
|
|
8698
|
-
"valueType": "string"
|
|
8699
|
-
},
|
|
8700
|
-
{
|
|
8701
|
-
"path": "precision",
|
|
8702
|
-
"valueType": "number"
|
|
8703
8798
|
}
|
|
8704
8799
|
],
|
|
8705
8800
|
"alarm-panel": [
|
|
@@ -8735,20 +8830,10 @@ Object.freeze({
|
|
|
8735
8830
|
"valueType": "boolean"
|
|
8736
8831
|
}
|
|
8737
8832
|
],
|
|
8738
|
-
"ambient-light-sensor": [
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
},
|
|
8743
|
-
{
|
|
8744
|
-
"path": "unit",
|
|
8745
|
-
"valueType": "string"
|
|
8746
|
-
},
|
|
8747
|
-
{
|
|
8748
|
-
"path": "precision",
|
|
8749
|
-
"valueType": "number"
|
|
8750
|
-
}
|
|
8751
|
-
],
|
|
8833
|
+
"ambient-light-sensor": [{
|
|
8834
|
+
"path": "lux",
|
|
8835
|
+
"valueType": "number"
|
|
8836
|
+
}],
|
|
8752
8837
|
"audio-metrics": [
|
|
8753
8838
|
{
|
|
8754
8839
|
"path": "ts",
|
|
@@ -8828,6 +8913,10 @@ Object.freeze({
|
|
|
8828
8913
|
"path": "lastUpdated",
|
|
8829
8914
|
"valueType": "number"
|
|
8830
8915
|
},
|
|
8916
|
+
{
|
|
8917
|
+
"path": "volts",
|
|
8918
|
+
"valueType": "number"
|
|
8919
|
+
},
|
|
8831
8920
|
{
|
|
8832
8921
|
"path": "lastContactAt",
|
|
8833
8922
|
"valueType": "number"
|
|
@@ -9070,10 +9159,6 @@ Object.freeze({
|
|
|
9070
9159
|
"datetime"
|
|
9071
9160
|
]
|
|
9072
9161
|
},
|
|
9073
|
-
{
|
|
9074
|
-
"path": "unit",
|
|
9075
|
-
"valueType": "string"
|
|
9076
|
-
},
|
|
9077
9162
|
{
|
|
9078
9163
|
"path": "min",
|
|
9079
9164
|
"valueType": "number"
|
|
@@ -9085,19 +9170,6 @@ Object.freeze({
|
|
|
9085
9170
|
{
|
|
9086
9171
|
"path": "step",
|
|
9087
9172
|
"valueType": "number"
|
|
9088
|
-
},
|
|
9089
|
-
{
|
|
9090
|
-
"path": "precision",
|
|
9091
|
-
"valueType": "number"
|
|
9092
|
-
},
|
|
9093
|
-
{
|
|
9094
|
-
"path": "format",
|
|
9095
|
-
"valueType": "enum",
|
|
9096
|
-
"enumValues": [
|
|
9097
|
-
"date",
|
|
9098
|
-
"time",
|
|
9099
|
-
"datetime"
|
|
9100
|
-
]
|
|
9101
9173
|
}
|
|
9102
9174
|
],
|
|
9103
9175
|
"cover": [
|
|
@@ -9338,13 +9410,8 @@ Object.freeze({
|
|
|
9338
9410
|
"path": "value",
|
|
9339
9411
|
"valueType": "string"
|
|
9340
9412
|
}, {
|
|
9341
|
-
"path": "
|
|
9342
|
-
"valueType": "
|
|
9343
|
-
"enumValues": [
|
|
9344
|
-
"date",
|
|
9345
|
-
"time",
|
|
9346
|
-
"datetime"
|
|
9347
|
-
]
|
|
9413
|
+
"path": "timestamp",
|
|
9414
|
+
"valueType": "boolean"
|
|
9348
9415
|
}],
|
|
9349
9416
|
"event-emitter": [
|
|
9350
9417
|
{
|
|
@@ -9417,6 +9484,20 @@ Object.freeze({
|
|
|
9417
9484
|
"path": "detected",
|
|
9418
9485
|
"valueType": "boolean"
|
|
9419
9486
|
}],
|
|
9487
|
+
"group-status": [
|
|
9488
|
+
{
|
|
9489
|
+
"path": "included",
|
|
9490
|
+
"valueType": "number"
|
|
9491
|
+
},
|
|
9492
|
+
{
|
|
9493
|
+
"path": "excluded",
|
|
9494
|
+
"valueType": "number"
|
|
9495
|
+
},
|
|
9496
|
+
{
|
|
9497
|
+
"path": "total",
|
|
9498
|
+
"valueType": "number"
|
|
9499
|
+
}
|
|
9500
|
+
],
|
|
9420
9501
|
"heating-valve": [{
|
|
9421
9502
|
"path": "position",
|
|
9422
9503
|
"valueType": "number"
|
|
@@ -9451,20 +9532,10 @@ Object.freeze({
|
|
|
9451
9532
|
"valueType": "number"
|
|
9452
9533
|
}
|
|
9453
9534
|
],
|
|
9454
|
-
"humidity-sensor": [
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9458
|
-
},
|
|
9459
|
-
{
|
|
9460
|
-
"path": "unit",
|
|
9461
|
-
"valueType": "string"
|
|
9462
|
-
},
|
|
9463
|
-
{
|
|
9464
|
-
"path": "precision",
|
|
9465
|
-
"valueType": "number"
|
|
9466
|
-
}
|
|
9467
|
-
],
|
|
9535
|
+
"humidity-sensor": [{
|
|
9536
|
+
"path": "percent",
|
|
9537
|
+
"valueType": "number"
|
|
9538
|
+
}],
|
|
9468
9539
|
"image": [{
|
|
9469
9540
|
"path": "url",
|
|
9470
9541
|
"valueType": "string"
|
|
@@ -9803,20 +9874,10 @@ Object.freeze({
|
|
|
9803
9874
|
"valueType": "boolean"
|
|
9804
9875
|
}
|
|
9805
9876
|
],
|
|
9806
|
-
"numeric-sensor": [
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
},
|
|
9811
|
-
{
|
|
9812
|
-
"path": "unit",
|
|
9813
|
-
"valueType": "string"
|
|
9814
|
-
},
|
|
9815
|
-
{
|
|
9816
|
-
"path": "precision",
|
|
9817
|
-
"valueType": "number"
|
|
9818
|
-
}
|
|
9819
|
-
],
|
|
9877
|
+
"numeric-sensor": [{
|
|
9878
|
+
"path": "value",
|
|
9879
|
+
"valueType": "number"
|
|
9880
|
+
}],
|
|
9820
9881
|
"pet-feeder": [
|
|
9821
9882
|
{
|
|
9822
9883
|
"path": "foodLevel",
|
|
@@ -9908,14 +9969,6 @@ Object.freeze({
|
|
|
9908
9969
|
{
|
|
9909
9970
|
"path": "powerFactor",
|
|
9910
9971
|
"valueType": "number"
|
|
9911
|
-
},
|
|
9912
|
-
{
|
|
9913
|
-
"path": "unit",
|
|
9914
|
-
"valueType": "string"
|
|
9915
|
-
},
|
|
9916
|
-
{
|
|
9917
|
-
"path": "precision",
|
|
9918
|
-
"valueType": "number"
|
|
9919
9972
|
}
|
|
9920
9973
|
],
|
|
9921
9974
|
"presence": [
|
|
@@ -9944,20 +9997,10 @@ Object.freeze({
|
|
|
9944
9997
|
"valueType": "number"
|
|
9945
9998
|
}
|
|
9946
9999
|
],
|
|
9947
|
-
"pressure-sensor": [
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
},
|
|
9952
|
-
{
|
|
9953
|
-
"path": "unit",
|
|
9954
|
-
"valueType": "string"
|
|
9955
|
-
},
|
|
9956
|
-
{
|
|
9957
|
-
"path": "precision",
|
|
9958
|
-
"valueType": "number"
|
|
9959
|
-
}
|
|
9960
|
-
],
|
|
10000
|
+
"pressure-sensor": [{
|
|
10001
|
+
"path": "hpa",
|
|
10002
|
+
"valueType": "number"
|
|
10003
|
+
}],
|
|
9961
10004
|
"privacy-mask": [{
|
|
9962
10005
|
"path": "enabled",
|
|
9963
10006
|
"valueType": "boolean"
|
|
@@ -10268,20 +10311,10 @@ Object.freeze({
|
|
|
10268
10311
|
"path": "tampered",
|
|
10269
10312
|
"valueType": "boolean"
|
|
10270
10313
|
}],
|
|
10271
|
-
"temperature-sensor": [
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
},
|
|
10276
|
-
{
|
|
10277
|
-
"path": "unit",
|
|
10278
|
-
"valueType": "string"
|
|
10279
|
-
},
|
|
10280
|
-
{
|
|
10281
|
-
"path": "precision",
|
|
10282
|
-
"valueType": "number"
|
|
10283
|
-
}
|
|
10284
|
-
],
|
|
10314
|
+
"temperature-sensor": [{
|
|
10315
|
+
"path": "celsius",
|
|
10316
|
+
"valueType": "number"
|
|
10317
|
+
}],
|
|
10285
10318
|
"update": [
|
|
10286
10319
|
{
|
|
10287
10320
|
"path": "currentVersion",
|
|
@@ -10392,10 +10425,6 @@ Object.freeze({
|
|
|
10392
10425
|
"path": "temperature",
|
|
10393
10426
|
"valueType": "number"
|
|
10394
10427
|
},
|
|
10395
|
-
{
|
|
10396
|
-
"path": "temperatureUnit",
|
|
10397
|
-
"valueType": "string"
|
|
10398
|
-
},
|
|
10399
10428
|
{
|
|
10400
10429
|
"path": "humidity",
|
|
10401
10430
|
"valueType": "number"
|
|
@@ -10404,18 +10433,10 @@ Object.freeze({
|
|
|
10404
10433
|
"path": "pressure",
|
|
10405
10434
|
"valueType": "number"
|
|
10406
10435
|
},
|
|
10407
|
-
{
|
|
10408
|
-
"path": "pressureUnit",
|
|
10409
|
-
"valueType": "string"
|
|
10410
|
-
},
|
|
10411
10436
|
{
|
|
10412
10437
|
"path": "windSpeed",
|
|
10413
10438
|
"valueType": "number"
|
|
10414
10439
|
},
|
|
10415
|
-
{
|
|
10416
|
-
"path": "windSpeedUnit",
|
|
10417
|
-
"valueType": "string"
|
|
10418
|
-
},
|
|
10419
10440
|
{
|
|
10420
10441
|
"path": "windBearing",
|
|
10421
10442
|
"valueType": "number"
|
|
@@ -10465,7 +10486,7 @@ object({
|
|
|
10465
10486
|
params: record(string(), union([string(), number()])).optional()
|
|
10466
10487
|
});
|
|
10467
10488
|
//#endregion
|
|
10468
|
-
//#region ../types/dist/err-msg-
|
|
10489
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10469
10490
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10470
10491
|
DeviceType["Camera"] = "camera";
|
|
10471
10492
|
DeviceType["Hub"] = "hub";
|
|
@@ -10559,8 +10580,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10559
10580
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10560
10581
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10561
10582
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10562
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10583
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10584
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10563
10585
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10586
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10587
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10588
|
+
DeviceType["Washer"] = "washer";
|
|
10589
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10590
|
+
DeviceType["Dryer"] = "dryer";
|
|
10564
10591
|
return DeviceType;
|
|
10565
10592
|
}({});
|
|
10566
10593
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -10818,7 +10845,7 @@ function errMsg(err) {
|
|
|
10818
10845
|
return String(err);
|
|
10819
10846
|
}
|
|
10820
10847
|
//#endregion
|
|
10821
|
-
//#region ../types/dist/composition-
|
|
10848
|
+
//#region ../types/dist/composition-B2rw5L29.mjs
|
|
10822
10849
|
/**
|
|
10823
10850
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10824
10851
|
*
|
|
@@ -11573,15 +11600,102 @@ function validateExpressionSource(src) {
|
|
|
11573
11600
|
}
|
|
11574
11601
|
return null;
|
|
11575
11602
|
}
|
|
11576
|
-
/**
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11603
|
+
/**
|
|
11604
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
11605
|
+
*
|
|
11606
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
11607
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
11608
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
11609
|
+
*
|
|
11610
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
11611
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
11612
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
11613
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
11614
|
+
* can move later without moving the others.
|
|
11615
|
+
*/
|
|
11616
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
11617
|
+
var APPLIANCE_KINDS = [
|
|
11618
|
+
"washer",
|
|
11619
|
+
"dryer",
|
|
11620
|
+
"dishwasher"
|
|
11621
|
+
];
|
|
11622
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
11623
|
+
/**
|
|
11624
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11625
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
11626
|
+
* `composition.ts` (D659).
|
|
11627
|
+
*/
|
|
11580
11628
|
var CompositionSourceRefSchema = object({
|
|
11581
11629
|
/** The owning addon; `stableId` is unique only within it. */
|
|
11582
11630
|
addonId: string().min(1),
|
|
11583
11631
|
stableId: string().min(1)
|
|
11584
11632
|
});
|
|
11633
|
+
var GROUP_TEMPLATE_IDS = [
|
|
11634
|
+
"temperature",
|
|
11635
|
+
"humidity",
|
|
11636
|
+
"pressure",
|
|
11637
|
+
"illuminance",
|
|
11638
|
+
"power",
|
|
11639
|
+
"energy",
|
|
11640
|
+
"battery",
|
|
11641
|
+
"numeric",
|
|
11642
|
+
"motion",
|
|
11643
|
+
"contact",
|
|
11644
|
+
"leak",
|
|
11645
|
+
"smoke",
|
|
11646
|
+
"occupancy",
|
|
11647
|
+
"binary",
|
|
11648
|
+
"switch",
|
|
11649
|
+
"light"
|
|
11650
|
+
];
|
|
11651
|
+
var NUMERIC_AGGREGATES = [
|
|
11652
|
+
"mean",
|
|
11653
|
+
"median",
|
|
11654
|
+
"min",
|
|
11655
|
+
"max",
|
|
11656
|
+
"sum"
|
|
11657
|
+
];
|
|
11658
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
11659
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
11660
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
11661
|
+
var AGGREGATE_REDUCERS = [
|
|
11662
|
+
"mean",
|
|
11663
|
+
"median",
|
|
11664
|
+
"min",
|
|
11665
|
+
"max",
|
|
11666
|
+
"sum",
|
|
11667
|
+
"any",
|
|
11668
|
+
"all"
|
|
11669
|
+
];
|
|
11670
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
11671
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
11672
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
11673
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
11674
|
+
var HelperMemberSchema = object({
|
|
11675
|
+
source: CompositionSourceRefSchema,
|
|
11676
|
+
cap: string().min(1),
|
|
11677
|
+
fieldPath: string().min(1)
|
|
11678
|
+
});
|
|
11679
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
11680
|
+
kind: literal("group"),
|
|
11681
|
+
templateId: GroupTemplateIdSchema,
|
|
11682
|
+
aggregate: AggregateReducerSchema,
|
|
11683
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
11684
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
11685
|
+
active: ActiveCriterionSchema.optional()
|
|
11686
|
+
}), object({
|
|
11687
|
+
kind: literal("appliance"),
|
|
11688
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
11689
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
11690
|
+
thresholdWatts: number().positive(),
|
|
11691
|
+
startDwellMs: number().int().nonnegative(),
|
|
11692
|
+
stopDwellMs: number().int().nonnegative(),
|
|
11693
|
+
member: HelperMemberSchema
|
|
11694
|
+
})]);
|
|
11695
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
11696
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
11697
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
11698
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
11585
11699
|
/** One field of one capability of one source device. */
|
|
11586
11700
|
var CompositionFieldReadSchema = object({
|
|
11587
11701
|
source: CompositionSourceRefSchema,
|
|
@@ -11625,7 +11739,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
11625
11739
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
11626
11740
|
CompositionFromSourceSchema,
|
|
11627
11741
|
CompositionExpressionSourceSchema,
|
|
11628
|
-
CompositionCodeSourceSchema
|
|
11742
|
+
CompositionCodeSourceSchema,
|
|
11743
|
+
object({
|
|
11744
|
+
kind: literal("aggregate"),
|
|
11745
|
+
reducer: _enum([
|
|
11746
|
+
"mean",
|
|
11747
|
+
"median",
|
|
11748
|
+
"min",
|
|
11749
|
+
"max",
|
|
11750
|
+
"sum",
|
|
11751
|
+
"any",
|
|
11752
|
+
"all"
|
|
11753
|
+
]),
|
|
11754
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
11755
|
+
/** `value` is the reading; the others are the member counts. */
|
|
11756
|
+
publish: _enum([
|
|
11757
|
+
"value",
|
|
11758
|
+
"included",
|
|
11759
|
+
"excluded",
|
|
11760
|
+
"total"
|
|
11761
|
+
]),
|
|
11762
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
11763
|
+
empty: _enum([
|
|
11764
|
+
"null",
|
|
11765
|
+
"omit",
|
|
11766
|
+
"offline"
|
|
11767
|
+
])
|
|
11768
|
+
})
|
|
11629
11769
|
]);
|
|
11630
11770
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
11631
11771
|
kind: literal("forward"),
|
|
@@ -11671,7 +11811,13 @@ var CompositionSchema = object({
|
|
|
11671
11811
|
kind: literal("existing"),
|
|
11672
11812
|
device: CompositionSourceRefSchema
|
|
11673
11813
|
})]),
|
|
11674
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
11814
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
11815
|
+
/**
|
|
11816
|
+
* Present when the block is a helper template. Absent on a free
|
|
11817
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
11818
|
+
* never the compiled features.
|
|
11819
|
+
*/
|
|
11820
|
+
helper: HelperSpecSchema.optional()
|
|
11675
11821
|
}).superRefine((composition, ctx) => {
|
|
11676
11822
|
const seen = /* @__PURE__ */ new Set();
|
|
11677
11823
|
composition.features.forEach((feature, index) => {
|
|
@@ -17916,7 +18062,11 @@ var CompositionProblemSchema = object({
|
|
|
17916
18062
|
"item-field-reserved",
|
|
17917
18063
|
"target-missing",
|
|
17918
18064
|
"target-unreadable",
|
|
17919
|
-
"not-replaceable"
|
|
18065
|
+
"not-replaceable",
|
|
18066
|
+
"native-capability-replace",
|
|
18067
|
+
"mixed-quantity",
|
|
18068
|
+
"helper-mismatch",
|
|
18069
|
+
"member-constraint"
|
|
17920
18070
|
]),
|
|
17921
18071
|
path: string(),
|
|
17922
18072
|
message: string()
|
|
@@ -17937,7 +18087,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
17937
18087
|
"null",
|
|
17938
18088
|
"offline",
|
|
17939
18089
|
"unknown",
|
|
17940
|
-
"release"
|
|
18090
|
+
"release",
|
|
18091
|
+
"omit"
|
|
17941
18092
|
]);
|
|
17942
18093
|
/**
|
|
17943
18094
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -17974,9 +18125,11 @@ var CompositionFieldPlanSchema = object({
|
|
|
17974
18125
|
reads: array(CompositionFieldReadSchema)
|
|
17975
18126
|
});
|
|
17976
18127
|
/**
|
|
17977
|
-
* What a feature does to its target (D663): `new` builds a capability on a
|
|
17978
|
-
* device; on an existing device it `add`s a capability the device lacks
|
|
17979
|
-
*
|
|
18128
|
+
* What a feature does to its target (D663, D944): `new` builds a capability on a
|
|
18129
|
+
* new device; on an existing device it `add`s a capability the device lacks.
|
|
18130
|
+
* Replacing a capability the device already serves is refused
|
|
18131
|
+
* (`native-capability-replace`), not planned. `replace` remains on the claim
|
|
18132
|
+
* wire for a claim the hub already holds.
|
|
17980
18133
|
*/
|
|
17981
18134
|
var CompositionFeatureModeSchema = _enum([
|
|
17982
18135
|
"new",
|
|
@@ -18149,6 +18302,275 @@ Object.freeze({
|
|
|
18149
18302
|
result: ["number", "null"]
|
|
18150
18303
|
}
|
|
18151
18304
|
});
|
|
18305
|
+
/**
|
|
18306
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18307
|
+
* Data, not a form default written into the block.
|
|
18308
|
+
*/
|
|
18309
|
+
var NOW = {
|
|
18310
|
+
fieldPath: "lastFetchedAt",
|
|
18311
|
+
expr: "now"
|
|
18312
|
+
};
|
|
18313
|
+
var CHANGED = {
|
|
18314
|
+
fieldPath: "lastChangedAt",
|
|
18315
|
+
expr: "now"
|
|
18316
|
+
};
|
|
18317
|
+
function numeric(input) {
|
|
18318
|
+
return {
|
|
18319
|
+
...input,
|
|
18320
|
+
family: "numeric",
|
|
18321
|
+
deviceType: DeviceType.Sensor,
|
|
18322
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18323
|
+
commandCaps: [],
|
|
18324
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
18325
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
18326
|
+
accept: [{
|
|
18327
|
+
cap: input.outputCap,
|
|
18328
|
+
fieldPath: input.outputField
|
|
18329
|
+
}]
|
|
18330
|
+
};
|
|
18331
|
+
}
|
|
18332
|
+
function binary(input) {
|
|
18333
|
+
return {
|
|
18334
|
+
...input,
|
|
18335
|
+
family: "binary",
|
|
18336
|
+
deviceType: DeviceType.Sensor,
|
|
18337
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18338
|
+
commandCaps: [],
|
|
18339
|
+
quantity: "none",
|
|
18340
|
+
baseUnit: void 0,
|
|
18341
|
+
aggregates: BINARY_AGGREGATES,
|
|
18342
|
+
empty: "offline"
|
|
18343
|
+
};
|
|
18344
|
+
}
|
|
18345
|
+
var GROUP_TEMPLATES = [
|
|
18346
|
+
numeric({
|
|
18347
|
+
id: "temperature",
|
|
18348
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18349
|
+
role: DeviceRole.TemperatureSensor,
|
|
18350
|
+
outputCap: "temperature-sensor",
|
|
18351
|
+
outputField: "celsius",
|
|
18352
|
+
quantity: "temperature",
|
|
18353
|
+
defaultAggregate: "mean",
|
|
18354
|
+
empty: "null",
|
|
18355
|
+
companions: [NOW]
|
|
18356
|
+
}),
|
|
18357
|
+
numeric({
|
|
18358
|
+
id: "humidity",
|
|
18359
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18360
|
+
role: DeviceRole.HumiditySensor,
|
|
18361
|
+
outputCap: "humidity-sensor",
|
|
18362
|
+
outputField: "percent",
|
|
18363
|
+
quantity: "humidity",
|
|
18364
|
+
defaultAggregate: "mean",
|
|
18365
|
+
empty: "null",
|
|
18366
|
+
companions: [NOW]
|
|
18367
|
+
}),
|
|
18368
|
+
numeric({
|
|
18369
|
+
id: "pressure",
|
|
18370
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18371
|
+
role: DeviceRole.PressureSensor,
|
|
18372
|
+
outputCap: "pressure-sensor",
|
|
18373
|
+
outputField: "hpa",
|
|
18374
|
+
quantity: "pressure",
|
|
18375
|
+
defaultAggregate: "mean",
|
|
18376
|
+
empty: "null",
|
|
18377
|
+
companions: [NOW]
|
|
18378
|
+
}),
|
|
18379
|
+
numeric({
|
|
18380
|
+
id: "illuminance",
|
|
18381
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18382
|
+
role: DeviceRole.AmbientLightSensor,
|
|
18383
|
+
outputCap: "ambient-light-sensor",
|
|
18384
|
+
outputField: "lux",
|
|
18385
|
+
quantity: "illuminance",
|
|
18386
|
+
defaultAggregate: "mean",
|
|
18387
|
+
empty: "null",
|
|
18388
|
+
companions: [NOW]
|
|
18389
|
+
}),
|
|
18390
|
+
numeric({
|
|
18391
|
+
id: "power",
|
|
18392
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18393
|
+
role: DeviceRole.PowerSensor,
|
|
18394
|
+
outputCap: "power-meter",
|
|
18395
|
+
outputField: "watts",
|
|
18396
|
+
quantity: "power",
|
|
18397
|
+
defaultAggregate: "sum",
|
|
18398
|
+
empty: "omit",
|
|
18399
|
+
companions: [NOW]
|
|
18400
|
+
}),
|
|
18401
|
+
numeric({
|
|
18402
|
+
id: "energy",
|
|
18403
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18404
|
+
role: DeviceRole.EnergySensor,
|
|
18405
|
+
outputCap: "power-meter",
|
|
18406
|
+
outputField: "kwhTotal",
|
|
18407
|
+
quantity: "energy",
|
|
18408
|
+
defaultAggregate: "sum",
|
|
18409
|
+
empty: "omit",
|
|
18410
|
+
companions: [NOW]
|
|
18411
|
+
}),
|
|
18412
|
+
numeric({
|
|
18413
|
+
id: "battery",
|
|
18414
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18415
|
+
role: DeviceRole.BatterySensor,
|
|
18416
|
+
outputCap: "battery",
|
|
18417
|
+
outputField: "percentage",
|
|
18418
|
+
quantity: "percentage",
|
|
18419
|
+
defaultAggregate: "mean",
|
|
18420
|
+
empty: "null",
|
|
18421
|
+
companions: [
|
|
18422
|
+
{
|
|
18423
|
+
fieldPath: "charging",
|
|
18424
|
+
expr: "\"unknown\""
|
|
18425
|
+
},
|
|
18426
|
+
{
|
|
18427
|
+
fieldPath: "sleeping",
|
|
18428
|
+
expr: "false"
|
|
18429
|
+
},
|
|
18430
|
+
{
|
|
18431
|
+
fieldPath: "lastUpdated",
|
|
18432
|
+
expr: "now"
|
|
18433
|
+
}
|
|
18434
|
+
]
|
|
18435
|
+
}),
|
|
18436
|
+
numeric({
|
|
18437
|
+
id: "numeric",
|
|
18438
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
18439
|
+
role: DeviceRole.NumericSensor,
|
|
18440
|
+
outputCap: "numeric-sensor",
|
|
18441
|
+
outputField: "value",
|
|
18442
|
+
quantity: "device",
|
|
18443
|
+
defaultAggregate: "mean",
|
|
18444
|
+
empty: "null",
|
|
18445
|
+
companions: [NOW]
|
|
18446
|
+
}),
|
|
18447
|
+
binary({
|
|
18448
|
+
id: "motion",
|
|
18449
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
18450
|
+
role: DeviceRole.MotionSensor,
|
|
18451
|
+
outputCap: "motion",
|
|
18452
|
+
outputField: "detected",
|
|
18453
|
+
defaultAggregate: "any",
|
|
18454
|
+
accept: [{
|
|
18455
|
+
cap: "motion",
|
|
18456
|
+
fieldPath: "detected"
|
|
18457
|
+
}],
|
|
18458
|
+
companions: [{
|
|
18459
|
+
fieldPath: "lastDetectedAt",
|
|
18460
|
+
expr: "null"
|
|
18461
|
+
}, {
|
|
18462
|
+
fieldPath: "autoClearAfterMs",
|
|
18463
|
+
expr: "null"
|
|
18464
|
+
}]
|
|
18465
|
+
}),
|
|
18466
|
+
binary({
|
|
18467
|
+
id: "contact",
|
|
18468
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
18469
|
+
role: DeviceRole.ContactSensor,
|
|
18470
|
+
outputCap: "contact",
|
|
18471
|
+
outputField: "entryOpen",
|
|
18472
|
+
defaultAggregate: "any",
|
|
18473
|
+
accept: [{
|
|
18474
|
+
cap: "contact",
|
|
18475
|
+
fieldPath: "entryOpen"
|
|
18476
|
+
}],
|
|
18477
|
+
companions: [CHANGED]
|
|
18478
|
+
}),
|
|
18479
|
+
binary({
|
|
18480
|
+
id: "leak",
|
|
18481
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
18482
|
+
role: DeviceRole.LeakSensor,
|
|
18483
|
+
outputCap: "flood",
|
|
18484
|
+
outputField: "flooded",
|
|
18485
|
+
defaultAggregate: "any",
|
|
18486
|
+
accept: [{
|
|
18487
|
+
cap: "flood",
|
|
18488
|
+
fieldPath: "flooded"
|
|
18489
|
+
}],
|
|
18490
|
+
companions: [CHANGED]
|
|
18491
|
+
}),
|
|
18492
|
+
binary({
|
|
18493
|
+
id: "smoke",
|
|
18494
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
18495
|
+
role: DeviceRole.SmokeSensor,
|
|
18496
|
+
outputCap: "smoke",
|
|
18497
|
+
outputField: "detected",
|
|
18498
|
+
defaultAggregate: "any",
|
|
18499
|
+
accept: [{
|
|
18500
|
+
cap: "smoke",
|
|
18501
|
+
fieldPath: "detected"
|
|
18502
|
+
}],
|
|
18503
|
+
companions: [CHANGED]
|
|
18504
|
+
}),
|
|
18505
|
+
binary({
|
|
18506
|
+
id: "occupancy",
|
|
18507
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
18508
|
+
role: DeviceRole.BinarySensor,
|
|
18509
|
+
outputCap: "binary",
|
|
18510
|
+
outputField: "on",
|
|
18511
|
+
defaultAggregate: "any",
|
|
18512
|
+
accept: [{
|
|
18513
|
+
cap: "motion",
|
|
18514
|
+
fieldPath: "detected"
|
|
18515
|
+
}, {
|
|
18516
|
+
cap: "binary",
|
|
18517
|
+
fieldPath: "on"
|
|
18518
|
+
}],
|
|
18519
|
+
companions: [CHANGED]
|
|
18520
|
+
}),
|
|
18521
|
+
binary({
|
|
18522
|
+
id: "binary",
|
|
18523
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
18524
|
+
role: DeviceRole.BinarySensor,
|
|
18525
|
+
outputCap: "binary",
|
|
18526
|
+
outputField: "on",
|
|
18527
|
+
defaultAggregate: "any",
|
|
18528
|
+
accept: [{
|
|
18529
|
+
cap: "binary",
|
|
18530
|
+
fieldPath: "on"
|
|
18531
|
+
}],
|
|
18532
|
+
companions: [CHANGED]
|
|
18533
|
+
}),
|
|
18534
|
+
actuator({
|
|
18535
|
+
id: "switch",
|
|
18536
|
+
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.",
|
|
18537
|
+
deviceType: DeviceType.Switch,
|
|
18538
|
+
outputCap: "switch",
|
|
18539
|
+
commandCaps: ["switch"]
|
|
18540
|
+
}),
|
|
18541
|
+
actuator({
|
|
18542
|
+
id: "light",
|
|
18543
|
+
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.",
|
|
18544
|
+
deviceType: DeviceType.Light,
|
|
18545
|
+
outputCap: "switch",
|
|
18546
|
+
commandCaps: [
|
|
18547
|
+
"switch",
|
|
18548
|
+
"brightness",
|
|
18549
|
+
"color"
|
|
18550
|
+
]
|
|
18551
|
+
})
|
|
18552
|
+
];
|
|
18553
|
+
function actuator(input) {
|
|
18554
|
+
return {
|
|
18555
|
+
...input,
|
|
18556
|
+
family: "actuator",
|
|
18557
|
+
role: void 0,
|
|
18558
|
+
memberDeviceType: input.deviceType,
|
|
18559
|
+
outputField: "on",
|
|
18560
|
+
quantity: "none",
|
|
18561
|
+
baseUnit: void 0,
|
|
18562
|
+
aggregates: BINARY_AGGREGATES,
|
|
18563
|
+
defaultAggregate: "any",
|
|
18564
|
+
empty: "offline",
|
|
18565
|
+
accept: [{
|
|
18566
|
+
cap: "switch",
|
|
18567
|
+
fieldPath: "on"
|
|
18568
|
+
}],
|
|
18569
|
+
companions: [CHANGED]
|
|
18570
|
+
};
|
|
18571
|
+
}
|
|
18572
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
18573
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18152
18574
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18153
18575
|
/**
|
|
18154
18576
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -19862,12 +20284,12 @@ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema
|
|
|
19862
20284
|
* providers detect renames by matching `uniqueId` and patch `id`
|
|
19863
20285
|
* in-place so dispatch keeps working.
|
|
19864
20286
|
*
|
|
19865
|
-
* **
|
|
19866
|
-
*
|
|
19867
|
-
*
|
|
19868
|
-
*
|
|
19869
|
-
* (`ha-domain-mapping`)
|
|
19870
|
-
* stored after that point.
|
|
20287
|
+
* **Display unit and precision are NOT stored here.** They are a read-time
|
|
20288
|
+
* preference (D944). A polymorphic reading stores its `quantity` here once,
|
|
20289
|
+
* at adopt, and a date/time value stores `dateTimeShape` the same way —
|
|
20290
|
+
* neither is repeated on each sample. The `device_class` tag is an
|
|
20291
|
+
* HA-specific input consumed at the discovery boundary (`ha-domain-mapping`)
|
|
20292
|
+
* to derive the CamStack `DeviceRole`; it is never stored after that point.
|
|
19871
20293
|
*
|
|
19872
20294
|
* The `raw` escape hatch carries provider-specific attributes that don't
|
|
19873
20295
|
* fit the structured slots (HA `attributes` whitelist, Reolink `deviceCache`
|
|
@@ -19881,6 +20303,14 @@ var SourceInfoSchema = object({
|
|
|
19881
20303
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
19882
20304
|
* Used to detect rename when `id` changes. */
|
|
19883
20305
|
uniqueId: string().optional(),
|
|
20306
|
+
/** Quantity of a polymorphic reading, written once at adopt (D944). */
|
|
20307
|
+
quantity: ReadingQuantitySchema.optional(),
|
|
20308
|
+
/** Date / time / datetime shape of a string reading, written once at adopt. */
|
|
20309
|
+
dateTimeShape: _enum([
|
|
20310
|
+
"date",
|
|
20311
|
+
"time",
|
|
20312
|
+
"datetime"
|
|
20313
|
+
]).optional(),
|
|
19884
20314
|
/** Provider-specific extras that don't fit the structured slots.
|
|
19885
20315
|
* Whitelist what goes here per provider — do NOT dump entire HA
|
|
19886
20316
|
* attribute blobs (would explode the meta JSON column). */
|
|
@@ -40818,7 +41248,8 @@ method(object({
|
|
|
40818
41248
|
"enum"
|
|
40819
41249
|
]),
|
|
40820
41250
|
enumValues: array(string()).optional(),
|
|
40821
|
-
item: boolean().optional()
|
|
41251
|
+
item: boolean().optional(),
|
|
41252
|
+
quantity: ReadingQuantitySchema.optional()
|
|
40822
41253
|
})).readonly(),
|
|
40823
41254
|
itemArray: object({
|
|
40824
41255
|
path: string(),
|
|
@@ -44618,8 +45049,8 @@ var MaskPolygonShapeSchema = object({
|
|
|
44618
45049
|
/** Boolean cell grid — row-major, length === gridWidth*gridHeight. */
|
|
44619
45050
|
var MaskGridShapeSchema = object({
|
|
44620
45051
|
kind: literal("grid"),
|
|
44621
|
-
gridWidth: number(),
|
|
44622
|
-
gridHeight: number(),
|
|
45052
|
+
gridWidth: number().meta(readingMeta("none")),
|
|
45053
|
+
gridHeight: number().meta(readingMeta("none")),
|
|
44623
45054
|
cells: array(boolean())
|
|
44624
45055
|
});
|
|
44625
45056
|
discriminatedUnion("kind", [
|
|
@@ -44731,6 +45162,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
44731
45162
|
"detection-blind",
|
|
44732
45163
|
"motion-noisy",
|
|
44733
45164
|
"motion-calm",
|
|
45165
|
+
"package-llm-silent",
|
|
45166
|
+
"package-llm-answered",
|
|
44734
45167
|
"recording-stalled",
|
|
44735
45168
|
"recording-healthy",
|
|
44736
45169
|
"recording-degraded",
|
|
@@ -55761,6 +56194,28 @@ var PackageVersionInfoSchema = object({
|
|
|
55761
56194
|
deprecated: string().optional(),
|
|
55762
56195
|
distTags: array(string()).readonly()
|
|
55763
56196
|
});
|
|
56197
|
+
/**
|
|
56198
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
56199
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
56200
|
+
* tarball failure — never an empty string standing in for either.
|
|
56201
|
+
*/
|
|
56202
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
56203
|
+
object({
|
|
56204
|
+
status: literal("ok"),
|
|
56205
|
+
markdown: string()
|
|
56206
|
+
}),
|
|
56207
|
+
object({ status: literal("missing") }),
|
|
56208
|
+
object({
|
|
56209
|
+
status: literal("error"),
|
|
56210
|
+
message: string()
|
|
56211
|
+
})
|
|
56212
|
+
]);
|
|
56213
|
+
var PackageDocsSchema = object({
|
|
56214
|
+
name: string(),
|
|
56215
|
+
version: string(),
|
|
56216
|
+
readme: PackageDocBodySchema,
|
|
56217
|
+
changelog: PackageDocBodySchema
|
|
56218
|
+
});
|
|
55764
56219
|
var SearchResultSchema = object({
|
|
55765
56220
|
name: string(),
|
|
55766
56221
|
version: string(),
|
|
@@ -55979,7 +56434,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
55979
56434
|
}), object({ success: literal(true) }), {
|
|
55980
56435
|
kind: "mutation",
|
|
55981
56436
|
auth: "admin"
|
|
55982
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56437
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56438
|
+
name: string().min(1),
|
|
56439
|
+
version: string().min(1).optional()
|
|
56440
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
55983
56441
|
kind: "mutation",
|
|
55984
56442
|
auth: "admin"
|
|
55985
56443
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -56029,46 +56487,27 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56029
56487
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56030
56488
|
object({
|
|
56031
56489
|
/** Carbon dioxide concentration in ppm. */
|
|
56032
|
-
co2Ppm: number().min(0).optional(),
|
|
56490
|
+
co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56033
56491
|
/** Total volatile organic compounds in ppb. */
|
|
56034
|
-
vocPpb: number().min(0).optional(),
|
|
56492
|
+
vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56035
56493
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56036
|
-
pm25: number().min(0).optional(),
|
|
56494
|
+
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56037
56495
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
56038
|
-
pm10: number().min(0).optional(),
|
|
56496
|
+
pm10: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56039
56497
|
/** Composite AQI value (typically 0..500). */
|
|
56040
|
-
aqi: number().optional(),
|
|
56498
|
+
aqi: number().optional().meta(readingMeta("index")),
|
|
56041
56499
|
/** Ms epoch when the slice was last updated. */
|
|
56042
|
-
lastFetchedAt: number()
|
|
56043
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
56044
|
-
* `attributes.unit_of_measurement` → 'ppm' / 'ppb' / 'µg/m³'). Each
|
|
56045
|
-
* upstream `sensor.*` entity surfaces ONE device_class, so one unit
|
|
56046
|
-
* per slice is unambiguous. */
|
|
56047
|
-
unit: string().optional(),
|
|
56048
|
-
/** Suggested decimal places for numeric display.
|
|
56049
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56050
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56051
|
-
* auto-formatting when absent. */
|
|
56052
|
-
precision: number().int().min(0).max(10).optional()
|
|
56500
|
+
lastFetchedAt: number()
|
|
56053
56501
|
});
|
|
56054
56502
|
DeviceType.Sensor;
|
|
56055
56503
|
object({
|
|
56056
|
-
/** Current illuminance in lux (lx). */
|
|
56057
|
-
lux: number().min(0).meta({
|
|
56058
|
-
|
|
56504
|
+
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56505
|
+
lux: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56506
|
+
precision: 0,
|
|
56059
56507
|
label: "Illuminance"
|
|
56060
|
-
}),
|
|
56508
|
+
})),
|
|
56061
56509
|
/** Ms epoch when the slice was last updated. */
|
|
56062
|
-
lastFetchedAt: number()
|
|
56063
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
56064
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
56065
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
56066
|
-
unit: string().optional(),
|
|
56067
|
-
/** Suggested decimal places for numeric display.
|
|
56068
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56069
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56070
|
-
* auto-formatting when absent. */
|
|
56071
|
-
precision: number().int().min(0).max(10).optional()
|
|
56510
|
+
lastFetchedAt: number()
|
|
56072
56511
|
});
|
|
56073
56512
|
DeviceType.Sensor;
|
|
56074
56513
|
/**
|
|
@@ -56213,10 +56652,7 @@ var BatteryStatusSchema = object({
|
|
|
56213
56652
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
56214
56653
|
* declines to band a non-finite reading, which is the correct shape.
|
|
56215
56654
|
*/
|
|
56216
|
-
percentage: number().min(0).max(100).nullable().meta({
|
|
56217
|
-
unit: "%",
|
|
56218
|
-
label: "Charge"
|
|
56219
|
-
}),
|
|
56655
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
56220
56656
|
/**
|
|
56221
56657
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
56222
56658
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -56243,7 +56679,14 @@ var BatteryStatusSchema = object({
|
|
|
56243
56679
|
*/
|
|
56244
56680
|
sleeping: boolean().meta({ label: "Sleeping" }),
|
|
56245
56681
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
56246
|
-
lastUpdated: number(),
|
|
56682
|
+
lastUpdated: number().meta(readingMeta("none")),
|
|
56683
|
+
/**
|
|
56684
|
+
* Battery voltage in volts, for a cell the firmware reports as voltage
|
|
56685
|
+
* rather than a percentage (Ecowitt capacitor packs). Absent on cameras
|
|
56686
|
+
* that only report charge. A second reading on this cap, not a second
|
|
56687
|
+
* `numeric-sensor` on the same device.
|
|
56688
|
+
*/
|
|
56689
|
+
volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
56247
56690
|
/**
|
|
56248
56691
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
56249
56692
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -56315,7 +56758,7 @@ DeviceType.Sensor;
|
|
|
56315
56758
|
*/
|
|
56316
56759
|
var BrightnessStatusSchema = object({
|
|
56317
56760
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
56318
|
-
percentage: number().min(0).max(100),
|
|
56761
|
+
percentage: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
56319
56762
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
56320
56763
|
lastChangedAt: number()
|
|
56321
56764
|
});
|
|
@@ -56700,21 +57143,21 @@ object({
|
|
|
56700
57143
|
/** Single setpoint in Celsius. Used by single-target modes
|
|
56701
57144
|
* (heat / cool / dry). Null when the device is in a range mode
|
|
56702
57145
|
* (`heat_cool`) or has no setpoint at all (`fan_only`/`off`). */
|
|
56703
|
-
target: number().nullable(),
|
|
57146
|
+
target: number().nullable().meta(readingMeta("temperature")),
|
|
56704
57147
|
/** Upper bound of the dual setpoint in Celsius. Populated only
|
|
56705
57148
|
* in `heat_cool` mode. */
|
|
56706
|
-
targetHigh: number().nullable(),
|
|
57149
|
+
targetHigh: number().nullable().meta(readingMeta("temperature")),
|
|
56707
57150
|
/** Lower bound of the dual setpoint in Celsius. Populated only
|
|
56708
57151
|
* in `heat_cool` mode. */
|
|
56709
|
-
targetLow: number().nullable(),
|
|
57152
|
+
targetLow: number().nullable().meta(readingMeta("temperature")),
|
|
56710
57153
|
/** Target relative humidity (0..100). Null when the device has no
|
|
56711
57154
|
* humidity control. */
|
|
56712
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
57155
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
56713
57156
|
/** Current measured temperature in Celsius. Read-only — pushed by
|
|
56714
57157
|
* the device's internal sensor. */
|
|
56715
|
-
currentTemp: number().nullable(),
|
|
57158
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
56716
57159
|
/** Current measured relative humidity (0..100). Read-only. */
|
|
56717
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
57160
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
56718
57161
|
/** Vertical louver swing on/off. Null when the device has no vertical
|
|
56719
57162
|
* swing surface (gate with `DeviceFeature.ClimateSwingVertical`). */
|
|
56720
57163
|
swingVertical: boolean().nullable(),
|
|
@@ -56722,11 +57165,11 @@ object({
|
|
|
56722
57165
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
56723
57166
|
swingHorizontal: boolean().nullable(),
|
|
56724
57167
|
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
56725
|
-
minTemp: number().nullable().optional(),
|
|
57168
|
+
minTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
56726
57169
|
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
56727
|
-
maxTemp: number().nullable().optional(),
|
|
57170
|
+
maxTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
56728
57171
|
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
56729
|
-
tempStep: number().positive().nullable().optional(),
|
|
57172
|
+
tempStep: number().positive().nullable().optional().meta(readingMeta("temperature")),
|
|
56730
57173
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
56731
57174
|
lastFetchedAt: number()
|
|
56732
57175
|
});
|
|
@@ -56805,17 +57248,17 @@ DeviceType.Thermostat, DeviceType.Climate, method(object({
|
|
|
56805
57248
|
* modes to expose in the picker without a slice fetch.
|
|
56806
57249
|
*/
|
|
56807
57250
|
var RgbTripletSchema = object({
|
|
56808
|
-
r: number().int().min(0).max(255),
|
|
56809
|
-
g: number().int().min(0).max(255),
|
|
56810
|
-
b: number().int().min(0).max(255)
|
|
57251
|
+
r: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
57252
|
+
g: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
57253
|
+
b: number().int().min(0).max(255).meta(readingMeta("none"))
|
|
56811
57254
|
});
|
|
56812
57255
|
var HsvTripletSchema = object({
|
|
56813
57256
|
/** Hue in degrees, 0..360. */
|
|
56814
|
-
h: number().min(0).max(360),
|
|
57257
|
+
h: number().min(0).max(360).meta(readingMeta("none")),
|
|
56815
57258
|
/** Saturation as 0..100 inclusive. */
|
|
56816
|
-
s: number().min(0).max(100),
|
|
57259
|
+
s: number().min(0).max(100).meta(readingMeta("none")),
|
|
56817
57260
|
/** Value/brightness as 0..100 inclusive. */
|
|
56818
|
-
v: number().min(0).max(100)
|
|
57261
|
+
v: number().min(0).max(100).meta(readingMeta("none"))
|
|
56819
57262
|
});
|
|
56820
57263
|
var ColorInputSchema = discriminatedUnion("mode", [
|
|
56821
57264
|
object({
|
|
@@ -56844,7 +57287,7 @@ object({
|
|
|
56844
57287
|
/** Populated when `mode === 'hsv'`. */
|
|
56845
57288
|
hsv: HsvTripletSchema.optional(),
|
|
56846
57289
|
/** Populated when `mode === 'mired'`. */
|
|
56847
|
-
mireds: number().int().optional(),
|
|
57290
|
+
mireds: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
56848
57291
|
/** Ms epoch of the last operator-driven change. */
|
|
56849
57292
|
lastChangedAt: number()
|
|
56850
57293
|
});
|
|
@@ -56968,18 +57411,12 @@ _enum([
|
|
|
56968
57411
|
"empty",
|
|
56969
57412
|
"full"
|
|
56970
57413
|
]);
|
|
56971
|
-
/**
|
|
56972
|
-
|
|
56973
|
-
|
|
56974
|
-
"days",
|
|
56975
|
-
"hours",
|
|
56976
|
-
"cycles"
|
|
56977
|
-
]);
|
|
56978
|
-
/** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
|
|
56979
|
-
* days). `value` null = unknown (D393). */
|
|
57414
|
+
/** Whether `remaining.value` is a duration in seconds or a dimensionless count. */
|
|
57415
|
+
var ConsumableRemainingKindSchema = _enum(["duration", "count"]);
|
|
57416
|
+
/** Remaining life. `value` null = unknown (D393). Duration is seconds. */
|
|
56980
57417
|
var ConsumableRemainingSchema = object({
|
|
56981
|
-
value: number().min(0).nullable(),
|
|
56982
|
-
|
|
57418
|
+
value: number().min(0).nullable().meta(readingMeta("device")),
|
|
57419
|
+
kind: ConsumableRemainingKindSchema
|
|
56983
57420
|
});
|
|
56984
57421
|
var ConsumablesStatusSchema = object({
|
|
56985
57422
|
items: array(object({
|
|
@@ -56988,7 +57425,7 @@ var ConsumablesStatusSchema = object({
|
|
|
56988
57425
|
/** Display name. */
|
|
56989
57426
|
label: string().min(1),
|
|
56990
57427
|
/** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
|
|
56991
|
-
level: number().min(0).max(100).nullable(),
|
|
57428
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
56992
57429
|
/** The provider's discrete verdict when known (binary mode). */
|
|
56993
57430
|
status: ConsumableStatusSchema.nullable(),
|
|
56994
57431
|
/** What the item is — decides whether low or full is bad. Absent = `wear`. */
|
|
@@ -57005,7 +57442,7 @@ var ConsumablesStatusSchema = object({
|
|
|
57005
57442
|
})),
|
|
57006
57443
|
lastChangedAt: number()
|
|
57007
57444
|
});
|
|
57008
|
-
Object.values(DeviceType), [...
|
|
57445
|
+
Object.values(DeviceType), [...ConsumableRemainingKindSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
|
|
57009
57446
|
Object.values(DeviceType), method(object({
|
|
57010
57447
|
deviceId: number().int().nonnegative(),
|
|
57011
57448
|
key: string().min(1)
|
|
@@ -57030,39 +57467,17 @@ object({
|
|
|
57030
57467
|
/** Current value. Numeric kind → number; select/text/datetime → string.
|
|
57031
57468
|
* Datetime values are ISO 8601 strings (full timestamp, date-only,
|
|
57032
57469
|
* or time-only — HA accepts all three forms). */
|
|
57033
|
-
value: union([number(), string()]),
|
|
57470
|
+
value: union([number().meta(readingMeta("device")), string()]),
|
|
57034
57471
|
/** Acceptable values when `kind === 'select'`. Empty for other kinds. */
|
|
57035
57472
|
options: array(string()),
|
|
57036
57473
|
/** Ms epoch when the slice was last updated. */
|
|
57037
57474
|
lastChangedAt: number(),
|
|
57038
|
-
/**
|
|
57039
|
-
|
|
57040
|
-
|
|
57041
|
-
|
|
57042
|
-
/**
|
|
57043
|
-
|
|
57044
|
-
min: number().optional(),
|
|
57045
|
-
/** Maximum allowed value. Populated live from HA `attributes.max`.
|
|
57046
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57047
|
-
max: number().optional(),
|
|
57048
|
-
/** Step increment. Populated live from HA `attributes.step`.
|
|
57049
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57050
|
-
step: number().optional(),
|
|
57051
|
-
/** Suggested decimal places for numeric display. Populated live from HA
|
|
57052
|
-
* `attributes.suggested_display_precision`, or derived from `step` when the
|
|
57053
|
-
* HA attribute is absent. Meaningful for `kind === 'numeric'`; absent for
|
|
57054
|
-
* other kinds. Falls back to auto-formatting when absent. */
|
|
57055
|
-
precision: number().int().min(0).max(10).optional(),
|
|
57056
|
-
/** Date-picker granularity for `kind === 'datetime'`. 'date' → date-only,
|
|
57057
|
-
* 'time' → time-only, 'datetime' → full timestamp. Absent for other kinds
|
|
57058
|
-
* (UI defaults to 'datetime'). Derived live from the device's HA domain
|
|
57059
|
-
* (date.* / time.* / datetime.*) or, for input_datetime, from the entity's
|
|
57060
|
-
* `has_date`/`has_time` attributes on each push. */
|
|
57061
|
-
format: _enum([
|
|
57062
|
-
"date",
|
|
57063
|
-
"time",
|
|
57064
|
-
"datetime"
|
|
57065
|
-
]).optional()
|
|
57475
|
+
/** Minimum allowed value, in the device quantity's base unit. */
|
|
57476
|
+
min: number().optional().meta(readingMeta("device")),
|
|
57477
|
+
/** Maximum allowed value, in the device quantity's base unit. */
|
|
57478
|
+
max: number().optional().meta(readingMeta("device")),
|
|
57479
|
+
/** Step increment, in the device quantity's base unit. */
|
|
57480
|
+
step: number().optional().meta(readingMeta("device"))
|
|
57066
57481
|
});
|
|
57067
57482
|
var ControlSetValueInputSchema = discriminatedUnion("kind", [
|
|
57068
57483
|
object({
|
|
@@ -57100,9 +57515,9 @@ var CoverStatusSchema = object({
|
|
|
57100
57515
|
]),
|
|
57101
57516
|
/** 0 = fully closed, 100 = fully open. Null when the device has
|
|
57102
57517
|
* no intermediate position surface. */
|
|
57103
|
-
position: number().min(0).max(100).nullable(),
|
|
57518
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57104
57519
|
/** 0 = closed slats, 100 = open slats. Null when no tilt support. */
|
|
57105
|
-
tiltPosition: number().min(0).max(100).nullable(),
|
|
57520
|
+
tiltPosition: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57106
57521
|
/** Ms epoch when the slice was last updated. */
|
|
57107
57522
|
lastChangedAt: number()
|
|
57108
57523
|
});
|
|
@@ -57160,9 +57575,9 @@ var NormalizedRangeSchema$1 = object({
|
|
|
57160
57575
|
object({
|
|
57161
57576
|
mode: DayNightModeSchema,
|
|
57162
57577
|
/** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
|
|
57163
|
-
sensitivity: number().optional(),
|
|
57578
|
+
sensitivity: number().optional().meta(readingMeta("none")),
|
|
57164
57579
|
/** Delay before the IR-cut filter flips, in seconds. */
|
|
57165
|
-
switchDelaySec: number().optional(),
|
|
57580
|
+
switchDelaySec: number().optional().meta(readingMeta("duration")),
|
|
57166
57581
|
lastFetchedAt: number()
|
|
57167
57582
|
});
|
|
57168
57583
|
/**
|
|
@@ -57317,11 +57732,11 @@ object({
|
|
|
57317
57732
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
57318
57733
|
availablePrograms: array(string()),
|
|
57319
57734
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
57320
|
-
remainingSeconds: number().int().nonnegative().nullable(),
|
|
57735
|
+
remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
57321
57736
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
57322
|
-
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
57737
|
+
delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
57323
57738
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
57324
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
57739
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57325
57740
|
/** True when the door is reported open; null when the door state is not known. */
|
|
57326
57741
|
doorOpen: boolean().nullable(),
|
|
57327
57742
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -57345,7 +57760,7 @@ object({
|
|
|
57345
57760
|
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
57346
57761
|
machineCareDue: boolean().nullable(),
|
|
57347
57762
|
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
57348
|
-
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
57763
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable().meta(readingMeta("count")),
|
|
57349
57764
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
57350
57765
|
halfLoad: boolean().nullable(),
|
|
57351
57766
|
hygienePlus: boolean().nullable(),
|
|
@@ -57360,7 +57775,7 @@ object({
|
|
|
57360
57775
|
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
57361
57776
|
activeEvents: array(string()),
|
|
57362
57777
|
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
57363
|
-
errorCode: number().nullable(),
|
|
57778
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
57364
57779
|
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
57365
57780
|
errorLabel: string().nullable(),
|
|
57366
57781
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
@@ -57506,24 +57921,14 @@ object({
|
|
|
57506
57921
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
57507
57922
|
lastPressedAt: number().nullable(),
|
|
57508
57923
|
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
57509
|
-
pressCountSinceStart: number()
|
|
57924
|
+
pressCountSinceStart: number().meta(readingMeta("count"))
|
|
57510
57925
|
});
|
|
57511
57926
|
object({
|
|
57512
57927
|
deviceId: number(),
|
|
57513
57928
|
timestamp: number()
|
|
57514
57929
|
});
|
|
57515
57930
|
DeviceType.Button, DeviceType.Camera;
|
|
57516
|
-
|
|
57517
|
-
* Enum-state sensor — a string value picked from a finite option set.
|
|
57518
|
-
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
57519
|
-
* states, weather conditions, contact-source channels, mode strings).
|
|
57520
|
-
* The option set is stable across observations; it is persisted in the
|
|
57521
|
-
* device config blob (via the control slice at adoption) and is NOT
|
|
57522
|
-
* stored in `sourceInfo`.
|
|
57523
|
-
*/
|
|
57524
|
-
/** Locale-render shape for an ISO `value` carried by a `DateTimeSensor`-role
|
|
57525
|
-
* enum sensor: `date` (date-only), `time` (time-only), `datetime` (both). */
|
|
57526
|
-
var EnumSensorDateTimeFormatSchema = _enum([
|
|
57931
|
+
_enum([
|
|
57527
57932
|
"date",
|
|
57528
57933
|
"time",
|
|
57529
57934
|
"datetime"
|
|
@@ -57531,12 +57936,11 @@ var EnumSensorDateTimeFormatSchema = _enum([
|
|
|
57531
57936
|
object({
|
|
57532
57937
|
value: string(),
|
|
57533
57938
|
/**
|
|
57534
|
-
* Set
|
|
57535
|
-
* as
|
|
57536
|
-
*
|
|
57537
|
-
* a time-only sensor → `'time'`.
|
|
57939
|
+
* Set when `value` is a timestamp rather than an enum state, so history
|
|
57940
|
+
* does not learn ISO strings as states. The display shape (date / time /
|
|
57941
|
+
* datetime) lives on `SourceInfo.dateTimeShape`, written once at adopt.
|
|
57538
57942
|
*/
|
|
57539
|
-
|
|
57943
|
+
timestamp: boolean().optional(),
|
|
57540
57944
|
/** Ms epoch when the slice was last updated. */
|
|
57541
57945
|
lastFetchedAt: number()
|
|
57542
57946
|
});
|
|
@@ -57555,13 +57959,13 @@ var EventFireSchema = object({
|
|
|
57555
57959
|
deviceId: number(),
|
|
57556
57960
|
eventType: string(),
|
|
57557
57961
|
data: record(string(), unknown()).nullable(),
|
|
57558
|
-
timestamp: number(),
|
|
57559
|
-
seq: number()
|
|
57962
|
+
timestamp: number().meta(readingMeta("none")),
|
|
57963
|
+
seq: number().meta(readingMeta("count"))
|
|
57560
57964
|
});
|
|
57561
57965
|
object({
|
|
57562
57966
|
eventTypes: array(string()),
|
|
57563
57967
|
lastEvent: EventFireSchema.nullable(),
|
|
57564
|
-
eventCountSinceStart: number()
|
|
57968
|
+
eventCountSinceStart: number().meta(readingMeta("count"))
|
|
57565
57969
|
});
|
|
57566
57970
|
DeviceType.EventEmitter;
|
|
57567
57971
|
var IdentitySchema = object({
|
|
@@ -57950,10 +58354,10 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
57950
58354
|
object({
|
|
57951
58355
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
57952
58356
|
* speed surface (single-speed fan). */
|
|
57953
|
-
percentage: number().min(0).max(100).nullable(),
|
|
58357
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57954
58358
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
57955
58359
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
57956
|
-
percentageStep: number().positive().optional(),
|
|
58360
|
+
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
57957
58361
|
/** Active preset mode (`auto` / `quiet` / `turbo` / vendor-specific)
|
|
57958
58362
|
* — empty string when no preset is active or supported. */
|
|
57959
58363
|
preset: string(),
|
|
@@ -58035,7 +58439,7 @@ var FeatureProbeStatusSchema = object({
|
|
|
58035
58439
|
/** Camera/firmware model string. `null` when the firmware doesn't expose it. */
|
|
58036
58440
|
model: string().nullable(),
|
|
58037
58441
|
/** Channel count for NVR/Hub devices; `1` for standalone cameras; `null` pre-probe. */
|
|
58038
|
-
channelCount: number().nullable(),
|
|
58442
|
+
channelCount: number().nullable().meta(readingMeta("count")),
|
|
58039
58443
|
/**
|
|
58040
58444
|
* Ms epoch of the last SUCCESSFUL probe. `0` before the first probe
|
|
58041
58445
|
* completes — drivers' `getAccessoryChildren()` should treat zero as
|
|
@@ -58067,9 +58471,39 @@ object({
|
|
|
58067
58471
|
lastChangedAt: number()
|
|
58068
58472
|
});
|
|
58069
58473
|
DeviceType.Sensor;
|
|
58474
|
+
object({
|
|
58475
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
58476
|
+
results: array(object({
|
|
58477
|
+
deviceId: number().int().nonnegative(),
|
|
58478
|
+
cap: string().min(1),
|
|
58479
|
+
method: string().min(1),
|
|
58480
|
+
ok: boolean(),
|
|
58481
|
+
error: string().optional(),
|
|
58482
|
+
/** Ms epoch of the attempt. */
|
|
58483
|
+
at: number()
|
|
58484
|
+
})) });
|
|
58485
|
+
DeviceType.Switch, DeviceType.Light;
|
|
58486
|
+
object({
|
|
58487
|
+
/** Members whose current value entered the aggregate. */
|
|
58488
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
58489
|
+
precision: 0,
|
|
58490
|
+
label: "Reporting"
|
|
58491
|
+
})),
|
|
58492
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
58493
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
58494
|
+
precision: 0,
|
|
58495
|
+
label: "Excluded"
|
|
58496
|
+
})),
|
|
58497
|
+
/** `included` + `excluded`. */
|
|
58498
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
58499
|
+
precision: 0,
|
|
58500
|
+
label: "Members"
|
|
58501
|
+
}))
|
|
58502
|
+
});
|
|
58503
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58070
58504
|
object({
|
|
58071
58505
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58072
|
-
position: number().min(0).max(100).nullable(),
|
|
58506
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58073
58507
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
58074
58508
|
lastFetchedAt: number()
|
|
58075
58509
|
});
|
|
@@ -58078,9 +58512,9 @@ object({
|
|
|
58078
58512
|
/** Whether the humidifier is currently on. */
|
|
58079
58513
|
on: boolean(),
|
|
58080
58514
|
/** Current measured relative humidity (0..100). Null when not reported. */
|
|
58081
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
58515
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
58082
58516
|
/** Target relative humidity (0..100). Null when no setpoint surface. */
|
|
58083
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
58517
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
58084
58518
|
/** Active mode (`auto` / `normal` / `baby` / vendor). Null when the
|
|
58085
58519
|
* device has no mode surface. */
|
|
58086
58520
|
mode: string().nullable(),
|
|
@@ -58090,9 +58524,9 @@ object({
|
|
|
58090
58524
|
* `idle` / `off`). Null when the device doesn't report it. */
|
|
58091
58525
|
action: string().nullable(),
|
|
58092
58526
|
/** HA `min_humidity` attribute. Null → UI uses 0. */
|
|
58093
|
-
minHumidity: number().nullable(),
|
|
58527
|
+
minHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
58094
58528
|
/** HA `max_humidity` attribute. Null → UI uses 100. */
|
|
58095
|
-
maxHumidity: number().nullable(),
|
|
58529
|
+
maxHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
58096
58530
|
/** Ms epoch when the slice was last updated. */
|
|
58097
58531
|
lastChangedAt: number()
|
|
58098
58532
|
});
|
|
@@ -58116,22 +58550,13 @@ DeviceType.Humidifier, method(object({
|
|
|
58116
58550
|
auth: "protected"
|
|
58117
58551
|
});
|
|
58118
58552
|
object({
|
|
58119
|
-
/** Current relative humidity, 0..100. */
|
|
58120
|
-
percent: number().min(0).max(100).meta({
|
|
58121
|
-
|
|
58553
|
+
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58554
|
+
percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58555
|
+
precision: 0,
|
|
58122
58556
|
label: "Humidity"
|
|
58123
|
-
}),
|
|
58557
|
+
})),
|
|
58124
58558
|
/** Ms epoch when the slice was last updated. */
|
|
58125
|
-
lastFetchedAt: number()
|
|
58126
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
58127
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
58128
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
58129
|
-
unit: string().optional(),
|
|
58130
|
-
/** Suggested decimal places for numeric display.
|
|
58131
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
58132
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
58133
|
-
* auto-formatting when absent. */
|
|
58134
|
-
precision: number().int().min(0).max(10).optional()
|
|
58559
|
+
lastFetchedAt: number()
|
|
58135
58560
|
});
|
|
58136
58561
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
58137
58562
|
object({
|
|
@@ -58139,7 +58564,7 @@ object({
|
|
|
58139
58564
|
* entity exposes no `entity_picture` (yet). */
|
|
58140
58565
|
url: string().nullable(),
|
|
58141
58566
|
/** Ms epoch of the upstream last-updated timestamp. Null at cold-start. */
|
|
58142
|
-
lastUpdated: number().nullable()
|
|
58567
|
+
lastUpdated: number().nullable().meta(readingMeta("none"))
|
|
58143
58568
|
});
|
|
58144
58569
|
DeviceType.Image;
|
|
58145
58570
|
/**
|
|
@@ -58195,19 +58620,19 @@ var NormalizedRangeSchema = object({
|
|
|
58195
58620
|
});
|
|
58196
58621
|
object({
|
|
58197
58622
|
/** Normalized 0–100. */
|
|
58198
|
-
brightness: number().optional(),
|
|
58623
|
+
brightness: number().optional().meta(readingMeta("none")),
|
|
58199
58624
|
/** Normalized 0–100. */
|
|
58200
|
-
contrast: number().optional(),
|
|
58625
|
+
contrast: number().optional().meta(readingMeta("none")),
|
|
58201
58626
|
/** Normalized 0–100. */
|
|
58202
|
-
saturation: number().optional(),
|
|
58627
|
+
saturation: number().optional().meta(readingMeta("none")),
|
|
58203
58628
|
/** Normalized 0–100. */
|
|
58204
|
-
sharpness: number().optional(),
|
|
58629
|
+
sharpness: number().optional().meta(readingMeta("none")),
|
|
58205
58630
|
mirror: boolean().optional(),
|
|
58206
58631
|
flip: boolean().optional(),
|
|
58207
58632
|
rotate: ImageRotateSchema.optional(),
|
|
58208
58633
|
whiteBalance: WhiteBalanceModeSchema.optional(),
|
|
58209
58634
|
/** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
|
|
58210
|
-
warmth: number().optional(),
|
|
58635
|
+
warmth: number().optional().meta(readingMeta("none")),
|
|
58211
58636
|
exposureMode: ExposureModeSchema.optional(),
|
|
58212
58637
|
backlightMode: BacklightModeSchema.optional(),
|
|
58213
58638
|
lastFetchedAt: number()
|
|
@@ -58452,10 +58877,10 @@ var IntercomAbilitySchema = object({
|
|
|
58452
58877
|
/** Codecs accepted by firmware, in preference order. Driver-authored strings. */
|
|
58453
58878
|
codecs: array(string()),
|
|
58454
58879
|
/** Sample rate (Hz) the firmware expects. Reolink typical: 16000. */
|
|
58455
|
-
sampleRate: number(),
|
|
58880
|
+
sampleRate: number().meta(readingMeta("none")),
|
|
58456
58881
|
duplex: _enum(["half", "full"]),
|
|
58457
58882
|
/** Max in-flight audio backlog before drop (ms). Server uses this to bound latency. */
|
|
58458
|
-
maxBacklogMs: number()
|
|
58883
|
+
maxBacklogMs: number().meta(readingMeta("duration-ms"))
|
|
58459
58884
|
});
|
|
58460
58885
|
var IntercomStatusSchema = object({
|
|
58461
58886
|
/** True while a talk session is open. */
|
|
@@ -58566,13 +58991,13 @@ object({
|
|
|
58566
58991
|
activity: LawnMowerActivitySchema,
|
|
58567
58992
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
58568
58993
|
* reading. */
|
|
58569
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
58994
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58570
58995
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
58571
58996
|
* task is active / progress is unavailable. */
|
|
58572
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
58997
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58573
58998
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
58574
58999
|
* or null when unknown. */
|
|
58575
|
-
currentCode: number().nullable(),
|
|
59000
|
+
currentCode: number().nullable().meta(readingMeta("none")),
|
|
58576
59001
|
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
58577
59002
|
currentCodeLabel: string().nullable(),
|
|
58578
59003
|
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
@@ -59034,7 +59459,7 @@ object({
|
|
|
59034
59459
|
state: MediaPlayerStateSchema,
|
|
59035
59460
|
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
59036
59461
|
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
59037
|
-
volumeLevel: number().min(0).max(100).nullable(),
|
|
59462
|
+
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59038
59463
|
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
59039
59464
|
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
59040
59465
|
isMuted: boolean().nullable(),
|
|
@@ -59047,10 +59472,10 @@ object({
|
|
|
59047
59472
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59048
59473
|
/** Current playback position in ms. Null when not seekable or
|
|
59049
59474
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59050
|
-
positionMs: number().int().nonnegative().nullable(),
|
|
59475
|
+
positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59051
59476
|
/** Total duration of the current media in ms. Null when unknown
|
|
59052
59477
|
* (live stream) or nothing is playing. */
|
|
59053
|
-
durationMs: number().int().nonnegative().nullable(),
|
|
59478
|
+
durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59054
59479
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59055
59480
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59056
59481
|
shuffle: boolean().nullable(),
|
|
@@ -59350,7 +59775,7 @@ object({
|
|
|
59350
59775
|
* it, every provider seeded it at boot, and every session left it
|
|
59351
59776
|
* `detected: true` after its detach.
|
|
59352
59777
|
*/
|
|
59353
|
-
autoClearAfterMs: number().nullable()
|
|
59778
|
+
autoClearAfterMs: number().nullable().meta(readingMeta("duration-ms"))
|
|
59354
59779
|
});
|
|
59355
59780
|
/**
|
|
59356
59781
|
* Payload of `motion.onMotionChanged` event + the corresponding bus
|
|
@@ -59400,7 +59825,7 @@ var MotionZoneRegionSchema = object({
|
|
|
59400
59825
|
});
|
|
59401
59826
|
object({
|
|
59402
59827
|
enabled: boolean(),
|
|
59403
|
-
sensitivity: number(),
|
|
59828
|
+
sensitivity: number().meta(readingMeta("none")),
|
|
59404
59829
|
/** Grid region(s). Today exactly one `grid` shape. */
|
|
59405
59830
|
regions: array(MotionZoneRegionSchema),
|
|
59406
59831
|
lastFetchedAt: number()
|
|
@@ -59704,7 +60129,7 @@ var NavigationStatusSchema = object({
|
|
|
59704
60129
|
following: boolean(),
|
|
59705
60130
|
flash: boolean(),
|
|
59706
60131
|
lightMode: NavigationLightModeSchema,
|
|
59707
|
-
lightLevel: number().min(40).max(100),
|
|
60132
|
+
lightLevel: number().min(40).max(100).meta(readingMeta("none")),
|
|
59708
60133
|
/** Ms epoch when the slice was last updated. */
|
|
59709
60134
|
lastChangedAt: number()
|
|
59710
60135
|
});
|
|
@@ -59750,13 +60175,13 @@ var NetworkLinkStatusSchema = object({
|
|
|
59750
60175
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
59751
60176
|
* SKIP a null rather than coerce it.
|
|
59752
60177
|
*/
|
|
59753
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
60178
|
+
signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59754
60179
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
59755
|
-
rssiDbm: number().optional(),
|
|
60180
|
+
rssiDbm: number().optional().meta(readingMeta("signal-level")),
|
|
59756
60181
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
59757
60182
|
ssid: string().optional(),
|
|
59758
60183
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
59759
|
-
lastUpdated: number()
|
|
60184
|
+
lastUpdated: number().meta(readingMeta("none"))
|
|
59760
60185
|
});
|
|
59761
60186
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
59762
60187
|
deviceId: number(),
|
|
@@ -60075,7 +60500,7 @@ object({
|
|
|
60075
60500
|
lastError: string().nullable(),
|
|
60076
60501
|
/** Number of deliveries currently buffered server-side (rate-limited
|
|
60077
60502
|
* notifiers may queue). 0 when the provider sends synchronously. */
|
|
60078
|
-
queueDepth: number().int().nonnegative(),
|
|
60503
|
+
queueDepth: number().int().nonnegative().meta(readingMeta("count")),
|
|
60079
60504
|
/** Per-feature capability matrix — authoritative source for the
|
|
60080
60505
|
* compose-form field gating. */
|
|
60081
60506
|
supports: NotifierSupportsSchema
|
|
@@ -60125,15 +60550,8 @@ DeviceType.Notifier, method(NotifierSendInputSchema, NotifierSendResultSchema, {
|
|
|
60125
60550
|
acceptedAt: number()
|
|
60126
60551
|
});
|
|
60127
60552
|
object({
|
|
60128
|
-
|
|
60129
|
-
|
|
60130
|
-
* Populated live from the upstream source on each state push.
|
|
60131
|
-
* Absent for unitless sensors. */
|
|
60132
|
-
unit: string().optional(),
|
|
60133
|
-
/** Suggested decimal places for numeric display.
|
|
60134
|
-
* Populated live from the upstream source when provided.
|
|
60135
|
-
* Falls back to auto-formatting when absent. */
|
|
60136
|
-
precision: number().int().min(0).max(10).optional(),
|
|
60553
|
+
/** Reading in the device quantity's base unit. `null` when refused (D393). */
|
|
60554
|
+
value: number().nullable().meta(readingMeta("device")),
|
|
60137
60555
|
/** Ms epoch when the slice was last updated. */
|
|
60138
60556
|
lastFetchedAt: number()
|
|
60139
60557
|
});
|
|
@@ -60423,23 +60841,26 @@ object({
|
|
|
60423
60841
|
/** Food currently in the bowl (grams). Null when the device has not
|
|
60424
60842
|
* reported a reading yet. On dual-hopper models this is the combined
|
|
60425
60843
|
* bowl reading; per-hopper levels live in `food1`/`food2`. */
|
|
60426
|
-
foodLevel: number().nullable(),
|
|
60844
|
+
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
60427
60845
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
60428
60846
|
* single-hopper models. */
|
|
60429
|
-
food1: number().nullable(),
|
|
60847
|
+
food1: number().nullable().meta(readingMeta("none")),
|
|
60430
60848
|
/** Hopper-2 food level (grams) on dual-hopper feeders; null on
|
|
60431
60849
|
* single-hopper models. */
|
|
60432
|
-
food2: number().nullable(),
|
|
60850
|
+
food2: number().nullable().meta(readingMeta("none")),
|
|
60433
60851
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
60434
60852
|
* (`device_class: problem`, on = low). True when the bowl is empty /
|
|
60435
60853
|
* below the feeder's low threshold. */
|
|
60436
60854
|
lowFood: boolean(),
|
|
60437
60855
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
60438
60856
|
* device has no battery reading. */
|
|
60439
|
-
batteryPower: number().min(0).max(100).nullable(),
|
|
60440
|
-
/**
|
|
60441
|
-
*
|
|
60442
|
-
|
|
60857
|
+
batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60858
|
+
/**
|
|
60859
|
+
* Desiccant life remaining, stored in seconds (duration base, D944).
|
|
60860
|
+
* Providers convert from the days the feeder reports. Null when the
|
|
60861
|
+
* model has no desiccant sensor.
|
|
60862
|
+
*/
|
|
60863
|
+
desiccantLeftDays: number().nullable().meta(readingMeta("duration")),
|
|
60443
60864
|
/** True while a feed is in progress. */
|
|
60444
60865
|
feeding: boolean(),
|
|
60445
60866
|
/** Decoded connectivity / power status (HA petkit device-status enum).
|
|
@@ -60450,7 +60871,7 @@ object({
|
|
|
60450
60871
|
* with `errorCode` for consumers that want the raw integer. */
|
|
60451
60872
|
error: string().nullable(),
|
|
60452
60873
|
/** Raw device error code (0 / null = no error). */
|
|
60453
|
-
errorCode: number().nullable(),
|
|
60874
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
60454
60875
|
/** True for D4S/D4SH dual-hopper hardware — gates the per-hopper UI. */
|
|
60455
60876
|
isDualHopper: boolean(),
|
|
60456
60877
|
/** Child-lock (manual-lock) setting — buttons on the unit are disabled. */
|
|
@@ -60460,7 +60881,7 @@ object({
|
|
|
60460
60881
|
/** Play a chime when dispensing. */
|
|
60461
60882
|
feedSound: boolean(),
|
|
60462
60883
|
/** Speaker / prompt volume level (device-scaled integer). */
|
|
60463
|
-
volume: number(),
|
|
60884
|
+
volume: number().meta(readingMeta("none")),
|
|
60464
60885
|
/** Ms epoch when the slice was last refreshed from the cloud. */
|
|
60465
60886
|
lastFetchedAt: number()
|
|
60466
60887
|
});
|
|
@@ -60897,38 +61318,21 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
60897
61318
|
});
|
|
60898
61319
|
object({
|
|
60899
61320
|
/** Instantaneous power draw in watts. */
|
|
60900
|
-
watts: number().optional().meta({
|
|
60901
|
-
unit: "W",
|
|
60902
|
-
label: "Power"
|
|
60903
|
-
}),
|
|
61321
|
+
watts: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
60904
61322
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
60905
|
-
kwhTotal: number().optional().meta({
|
|
60906
|
-
unit: "kWh",
|
|
60907
|
-
label: "Energy"
|
|
60908
|
-
}),
|
|
61323
|
+
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
60909
61324
|
/** Voltage in volts. */
|
|
60910
|
-
volts: number().optional(),
|
|
61325
|
+
volts: number().optional().meta(readingMeta("voltage")),
|
|
60911
61326
|
/** Current in amperes. */
|
|
60912
|
-
amps: number().optional(),
|
|
60913
|
-
/** Apparent power in volt-amperes
|
|
60914
|
-
va: number().optional(),
|
|
61327
|
+
amps: number().optional().meta(readingMeta("current")),
|
|
61328
|
+
/** Apparent power in volt-amperes. */
|
|
61329
|
+
va: number().optional().meta(readingMeta("apparent-power")),
|
|
60915
61330
|
/** Power factor (0..1) if reported. */
|
|
60916
|
-
powerFactor: number().min(0).max(1).optional(),
|
|
61331
|
+
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
60917
61332
|
/** Ms epoch when the slice was last updated. */
|
|
60918
|
-
lastFetchedAt: number()
|
|
60919
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
60920
|
-
* `attributes.unit_of_measurement` → 'V' / 'A' / 'W' / 'kW' / 'kWh').
|
|
60921
|
-
* Each upstream `sensor.*` entity surfaces ONE device_class, so one
|
|
60922
|
-
* unit per slice is unambiguous. The UI prefers this over the role's
|
|
60923
|
-
* canonical unit so a 'kW' / 'Wh' feed renders verbatim. */
|
|
60924
|
-
unit: string().optional(),
|
|
60925
|
-
/** Suggested decimal places for numeric display.
|
|
60926
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
60927
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
60928
|
-
* auto-formatting when absent. */
|
|
60929
|
-
precision: number().int().min(0).max(10).optional()
|
|
61333
|
+
lastFetchedAt: number()
|
|
60930
61334
|
});
|
|
60931
|
-
DeviceType.Sensor;
|
|
61335
|
+
DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
60932
61336
|
/**
|
|
60933
61337
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
60934
61338
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -60947,11 +61351,11 @@ DeviceType.Sensor;
|
|
|
60947
61351
|
*/
|
|
60948
61352
|
var GpsLocationSchema = object({
|
|
60949
61353
|
/** Latitude in decimal degrees, -90..90. */
|
|
60950
|
-
latitude: number().min(-90).max(90),
|
|
61354
|
+
latitude: number().min(-90).max(90).meta(readingMeta("angle")),
|
|
60951
61355
|
/** Longitude in decimal degrees, -180..180. */
|
|
60952
|
-
longitude: number().min(-180).max(180),
|
|
61356
|
+
longitude: number().min(-180).max(180).meta(readingMeta("angle")),
|
|
60953
61357
|
/** Reported accuracy in meters (lower = better). */
|
|
60954
|
-
accuracyMeters: number().nonnegative()
|
|
61358
|
+
accuracyMeters: number().nonnegative().meta(readingMeta("length"))
|
|
60955
61359
|
});
|
|
60956
61360
|
object({
|
|
60957
61361
|
/** `home` / `not_home` / any user-defined zone name. */
|
|
@@ -60963,25 +61367,16 @@ object({
|
|
|
60963
61367
|
gps: GpsLocationSchema.nullable(),
|
|
60964
61368
|
/** Optional battery level of the tracking device (0..100). Null
|
|
60965
61369
|
* when not reported. */
|
|
60966
|
-
batteryPercent: number().min(0).max(100).nullable(),
|
|
61370
|
+
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60967
61371
|
/** Ms epoch when the slice was last updated. */
|
|
60968
61372
|
lastChangedAt: number()
|
|
60969
61373
|
});
|
|
60970
61374
|
DeviceType.Presence;
|
|
60971
61375
|
object({
|
|
60972
|
-
/** Current pressure in hPa. */
|
|
60973
|
-
hpa: number(),
|
|
61376
|
+
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61377
|
+
hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
60974
61378
|
/** Ms epoch when the slice was last updated. */
|
|
60975
|
-
lastFetchedAt: number()
|
|
60976
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
60977
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
60978
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
60979
|
-
unit: string().optional(),
|
|
60980
|
-
/** Suggested decimal places for numeric display.
|
|
60981
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
60982
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
60983
|
-
* auto-formatting when absent. */
|
|
60984
|
-
precision: number().int().min(0).max(10).optional()
|
|
61379
|
+
lastFetchedAt: number()
|
|
60985
61380
|
});
|
|
60986
61381
|
DeviceType.Sensor;
|
|
60987
61382
|
/**
|
|
@@ -61314,8 +61709,8 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
61314
61709
|
}), _void(), { kind: "mutation" });
|
|
61315
61710
|
var PtzAutotrackSettingsSchema = object({
|
|
61316
61711
|
targetType: string().describe("Vendor target string (people/vehicle/pet); empty = camera default"),
|
|
61317
|
-
stopDelaySeconds: number().int().min(0).max(300),
|
|
61318
|
-
disappearDelaySeconds: number().int().min(0).max(300)
|
|
61712
|
+
stopDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration")),
|
|
61713
|
+
disappearDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration"))
|
|
61319
61714
|
});
|
|
61320
61715
|
/**
|
|
61321
61716
|
* One option the camera advertises as a valid `targetType`. Drivers
|
|
@@ -61372,7 +61767,7 @@ object({
|
|
|
61372
61767
|
/** null = unknown — never coerced to false (D393). */
|
|
61373
61768
|
running: boolean().nullable(),
|
|
61374
61769
|
/** Epoch ms the current boolean began; null while `running` is null. */
|
|
61375
|
-
since: number().nullable(),
|
|
61770
|
+
since: number().nullable().meta(readingMeta("none")),
|
|
61376
61771
|
source: RunningStateSourceSchema.meta({ label: "Source" }),
|
|
61377
61772
|
phase: string().nullable(),
|
|
61378
61773
|
/** null until a reading has been published (D393). */
|
|
@@ -61384,7 +61779,7 @@ object({
|
|
|
61384
61779
|
phase: string().nullable()
|
|
61385
61780
|
});
|
|
61386
61781
|
Object.values(DeviceType);
|
|
61387
|
-
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
61782
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
61388
61783
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
61389
61784
|
kind: "mutation",
|
|
61390
61785
|
auth: "admin"
|
|
@@ -62570,9 +62965,9 @@ var RecordTriggerSchema = _enum([
|
|
|
62570
62965
|
*/
|
|
62571
62966
|
var RecordWindowSchema = object({
|
|
62572
62967
|
trigger: RecordTriggerSchema,
|
|
62573
|
-
day: number().int().min(0).max(6),
|
|
62574
|
-
startMinute: number().int().min(0).max(1439),
|
|
62575
|
-
endMinute: number().int().min(1).max(1440)
|
|
62968
|
+
day: number().int().min(0).max(6).meta(readingMeta("none")),
|
|
62969
|
+
startMinute: number().int().min(0).max(1439).meta(readingMeta("none")),
|
|
62970
|
+
endMinute: number().int().min(1).max(1440).meta(readingMeta("none"))
|
|
62576
62971
|
});
|
|
62577
62972
|
/** Status of one physical volume, as the camera itself describes it. */
|
|
62578
62973
|
var OnboardStorageVolumeSchema = object({
|
|
@@ -62641,10 +63036,10 @@ object({
|
|
|
62641
63036
|
/** Master "record to the card at all" switch. */
|
|
62642
63037
|
enabled: boolean().nullable(),
|
|
62643
63038
|
overwriteWhenFull: boolean().nullable(),
|
|
62644
|
-
preRecordSec: number().nullable(),
|
|
62645
|
-
postRecordSec: number().nullable(),
|
|
63039
|
+
preRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
63040
|
+
postRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
62646
63041
|
/** Length of one recorded file, in minutes. */
|
|
62647
|
-
segmentMinutes: number().nullable(),
|
|
63042
|
+
segmentMinutes: number().nullable().meta(readingMeta("none")),
|
|
62648
63043
|
/** The primary track's weekly windows, flattened. */
|
|
62649
63044
|
windows: array(RecordWindowSchema),
|
|
62650
63045
|
/**
|
|
@@ -62660,7 +63055,7 @@ object({
|
|
|
62660
63055
|
* provider reporting a non-zero count also reports the schedule as not
|
|
62661
63056
|
* writable.
|
|
62662
63057
|
*/
|
|
62663
|
-
unreadableWindows: number(),
|
|
63058
|
+
unreadableWindows: number().meta(readingMeta("count")),
|
|
62664
63059
|
/**
|
|
62665
63060
|
* The camera is scheduled to record and has NO usable storage.
|
|
62666
63061
|
*
|
|
@@ -63297,7 +63692,7 @@ var CamStreamDescriptorSchema = object({
|
|
|
63297
63692
|
url: string().optional(),
|
|
63298
63693
|
codec: string().optional(),
|
|
63299
63694
|
resolution: CamStreamResolutionSchema.optional(),
|
|
63300
|
-
fps: number().positive().optional(),
|
|
63695
|
+
fps: number().positive().optional().meta(readingMeta("rate")),
|
|
63301
63696
|
label: string().optional(),
|
|
63302
63697
|
/** Device-level features (e.g. `battery-operated`) — drives broker policy. */
|
|
63303
63698
|
deviceFeatures: array(string()).optional(),
|
|
@@ -63327,18 +63722,18 @@ var StreamProfileSchema = _enum([
|
|
|
63327
63722
|
]);
|
|
63328
63723
|
/** The current encoding config of one stream profile. */
|
|
63329
63724
|
var StreamProfileConfigSchema = object({
|
|
63330
|
-
width: number(),
|
|
63331
|
-
height: number(),
|
|
63725
|
+
width: number().meta(readingMeta("none")),
|
|
63726
|
+
height: number().meta(readingMeta("none")),
|
|
63332
63727
|
codec: _enum(["h264", "h265"]),
|
|
63333
|
-
framerate: number(),
|
|
63334
|
-
bitrate: number(),
|
|
63728
|
+
framerate: number().meta(readingMeta("rate")),
|
|
63729
|
+
bitrate: number().meta(readingMeta("bitrate")),
|
|
63335
63730
|
bitrateMode: _enum(["vbr", "cbr"]).optional(),
|
|
63336
63731
|
encoderProfile: _enum([
|
|
63337
63732
|
"high",
|
|
63338
63733
|
"main",
|
|
63339
63734
|
"baseline"
|
|
63340
63735
|
]).optional(),
|
|
63341
|
-
gop: number().optional(),
|
|
63736
|
+
gop: number().optional().meta(readingMeta("none")),
|
|
63342
63737
|
/**
|
|
63343
63738
|
* Whether THIS profile currently carries an audio track. READ-ONLY here.
|
|
63344
63739
|
*
|
|
@@ -63988,23 +64383,13 @@ object({
|
|
|
63988
64383
|
});
|
|
63989
64384
|
DeviceType.Sensor;
|
|
63990
64385
|
object({
|
|
63991
|
-
/** Current temperature in Celsius. */
|
|
63992
|
-
celsius: number().meta({
|
|
63993
|
-
|
|
64386
|
+
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64387
|
+
celsius: number().nullable().meta(readingMeta("temperature", {
|
|
64388
|
+
precision: 1,
|
|
63994
64389
|
label: "Temperature"
|
|
63995
|
-
}),
|
|
64390
|
+
})),
|
|
63996
64391
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
63997
|
-
lastFetchedAt: number()
|
|
63998
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
63999
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
64000
|
-
* role's canonical unit, so a Fahrenheit feed renders '°F' not '°C'.
|
|
64001
|
-
* Absent → the UI falls back to the role's canonical unit. */
|
|
64002
|
-
unit: string().optional(),
|
|
64003
|
-
/** Suggested decimal places for numeric display.
|
|
64004
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
64005
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
64006
|
-
* auto-formatting when absent. */
|
|
64007
|
-
precision: number().int().min(0).max(10).optional()
|
|
64392
|
+
lastFetchedAt: number()
|
|
64008
64393
|
});
|
|
64009
64394
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
64010
64395
|
/**
|
|
@@ -64256,16 +64641,16 @@ object({
|
|
|
64256
64641
|
]),
|
|
64257
64642
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
64258
64643
|
* reading. */
|
|
64259
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
64644
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64260
64645
|
/** Current fan-speed token (provider-verbatim). Null when unknown or
|
|
64261
64646
|
* the vacuum has no speed control. */
|
|
64262
64647
|
fanSpeed: string().nullable(),
|
|
64263
64648
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
64264
64649
|
availableFanSpeeds: array(string()),
|
|
64265
64650
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
64266
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
64651
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64267
64652
|
/** Current error code (0 / null = no error). */
|
|
64268
|
-
errorCode: number().nullable(),
|
|
64653
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
64269
64654
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
64270
64655
|
errorLabel: string().nullable(),
|
|
64271
64656
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -64304,7 +64689,7 @@ object({
|
|
|
64304
64689
|
]),
|
|
64305
64690
|
/** 0 = fully closed, 100 = fully open. Null when the device has no
|
|
64306
64691
|
* intermediate position surface. */
|
|
64307
|
-
position: number().min(0).max(100).nullable(),
|
|
64692
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64308
64693
|
/** Ms epoch when the slice was last updated. */
|
|
64309
64694
|
lastChangedAt: number()
|
|
64310
64695
|
});
|
|
@@ -64332,9 +64717,9 @@ object({
|
|
|
64332
64717
|
DeviceType.Sensor;
|
|
64333
64718
|
object({
|
|
64334
64719
|
/** Current measured temperature. Null when not reported. */
|
|
64335
|
-
currentTemp: number().nullable(),
|
|
64720
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64336
64721
|
/** Target temperature setpoint. Null when no setpoint surface. */
|
|
64337
|
-
targetTemp: number().nullable(),
|
|
64722
|
+
targetTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64338
64723
|
/** Active operation mode = HA `state` (`eco` / `electric` / `gas` /
|
|
64339
64724
|
* `heat_pump` / `high_demand` / `performance` / `off`). Null when the
|
|
64340
64725
|
* device reports an unknown state. */
|
|
@@ -64345,9 +64730,9 @@ object({
|
|
|
64345
64730
|
* has no away surface. */
|
|
64346
64731
|
away: boolean().nullable(),
|
|
64347
64732
|
/** HA `min_temp` attribute. Null when not reported. */
|
|
64348
|
-
minTemp: number().nullable(),
|
|
64733
|
+
minTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64349
64734
|
/** HA `max_temp` attribute. Null when not reported. */
|
|
64350
|
-
maxTemp: number().nullable(),
|
|
64735
|
+
maxTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64351
64736
|
/** Ms epoch when the slice was last updated. */
|
|
64352
64737
|
lastChangedAt: number()
|
|
64353
64738
|
});
|
|
@@ -64371,25 +64756,18 @@ DeviceType.WaterHeater, method(object({
|
|
|
64371
64756
|
auth: "protected"
|
|
64372
64757
|
});
|
|
64373
64758
|
object({
|
|
64374
|
-
/** Verbatim
|
|
64375
|
-
* when no condition has been reported yet. */
|
|
64759
|
+
/** Verbatim condition state (`sunny`, `cloudy`, `rainy`, …). Null when none yet. */
|
|
64376
64760
|
condition: string().nullable(),
|
|
64377
|
-
/** Current temperature in
|
|
64378
|
-
temperature: number().nullable(),
|
|
64379
|
-
/** Temperature unit string (e.g. `°C` / `°F`). Null when not provided. */
|
|
64380
|
-
temperatureUnit: string().nullable(),
|
|
64761
|
+
/** Current temperature in Celsius. Null when not provided or refused. */
|
|
64762
|
+
temperature: number().nullable().meta(readingMeta("temperature", { precision: 1 })),
|
|
64381
64763
|
/** Relative humidity (0..100). Null when not provided. */
|
|
64382
|
-
humidity: number().min(0).max(100).nullable(),
|
|
64383
|
-
/** Barometric pressure in
|
|
64384
|
-
pressure: number().nullable(),
|
|
64385
|
-
/**
|
|
64386
|
-
|
|
64387
|
-
/** Wind speed in the reported unit. Null when not provided. */
|
|
64388
|
-
windSpeed: number().nullable(),
|
|
64389
|
-
/** Wind-speed unit string (e.g. `km/h` / `mph`). Null when not provided. */
|
|
64390
|
-
windSpeedUnit: string().nullable(),
|
|
64764
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
64765
|
+
/** Barometric pressure in hPa. Null when not provided or refused. */
|
|
64766
|
+
pressure: number().nullable().meta(readingMeta("pressure")),
|
|
64767
|
+
/** Wind speed in metres per second. Null when not provided or refused. */
|
|
64768
|
+
windSpeed: number().nullable().meta(readingMeta("speed")),
|
|
64391
64769
|
/** Wind bearing in degrees (0..360, meteorological). Null when not provided. */
|
|
64392
|
-
windBearing: number().nullable(),
|
|
64770
|
+
windBearing: number().nullable().meta(readingMeta("angle")),
|
|
64393
64771
|
/** Ms epoch when the slice was last updated. */
|
|
64394
64772
|
lastFetchedAt: number()
|
|
64395
64773
|
});
|
|
@@ -65140,7 +65518,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65140
65518
|
auth: "admin"
|
|
65141
65519
|
});
|
|
65142
65520
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65143
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
65521
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
65144
65522
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65145
65523
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65146
65524
|
new Set(CAP_NAMES);
|
|
@@ -65193,7 +65571,7 @@ var AccessoryKind = {
|
|
|
65193
65571
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
65194
65572
|
};
|
|
65195
65573
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
65196
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
65574
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
65197
65575
|
new Set(Object.values(DeviceType));
|
|
65198
65576
|
Object.freeze({
|
|
65199
65577
|
"accessories.getStatus": {
|
|
@@ -65301,6 +65679,13 @@ Object.freeze({
|
|
|
65301
65679
|
access: "view",
|
|
65302
65680
|
role: "admin"
|
|
65303
65681
|
},
|
|
65682
|
+
"addons.getPackageDocs": {
|
|
65683
|
+
capName: "addons",
|
|
65684
|
+
capScope: "system",
|
|
65685
|
+
addonId: null,
|
|
65686
|
+
access: "view",
|
|
65687
|
+
role: "admin"
|
|
65688
|
+
},
|
|
65304
65689
|
"addons.getVersions": {
|
|
65305
65690
|
capName: "addons",
|
|
65306
65691
|
capScope: "system",
|
|
@@ -68409,6 +68794,20 @@ Object.freeze({
|
|
|
68409
68794
|
access: "view",
|
|
68410
68795
|
role: "viewer"
|
|
68411
68796
|
},
|
|
68797
|
+
"groupCommands.getStatus": {
|
|
68798
|
+
capName: "group-commands",
|
|
68799
|
+
capScope: "device",
|
|
68800
|
+
addonId: null,
|
|
68801
|
+
access: "view",
|
|
68802
|
+
role: "viewer"
|
|
68803
|
+
},
|
|
68804
|
+
"groupStatus.getStatus": {
|
|
68805
|
+
capName: "group-status",
|
|
68806
|
+
capScope: "device",
|
|
68807
|
+
addonId: null,
|
|
68808
|
+
access: "view",
|
|
68809
|
+
role: "viewer"
|
|
68810
|
+
},
|
|
68412
68811
|
"heatingValve.getStatus": {
|
|
68413
68812
|
capName: "heating-valve",
|
|
68414
68813
|
capScope: "device",
|
|
@@ -77459,7 +77858,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77459
77858
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
77460
77859
|
icon: "square"
|
|
77461
77860
|
}
|
|
77462
|
-
}
|
|
77861
|
+
},
|
|
77862
|
+
overrides: { byType: {
|
|
77863
|
+
[DeviceType.Washer]: {
|
|
77864
|
+
state: { running: {
|
|
77865
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
77866
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
77867
|
+
} },
|
|
77868
|
+
events: {
|
|
77869
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
77870
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
77871
|
+
}
|
|
77872
|
+
},
|
|
77873
|
+
[DeviceType.Dryer]: {
|
|
77874
|
+
state: { running: {
|
|
77875
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
77876
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
77877
|
+
} },
|
|
77878
|
+
events: {
|
|
77879
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
77880
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
77881
|
+
}
|
|
77882
|
+
},
|
|
77883
|
+
[DeviceType.Dishwasher]: {
|
|
77884
|
+
state: { running: {
|
|
77885
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
77886
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
77887
|
+
} },
|
|
77888
|
+
events: {
|
|
77889
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
77890
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
77891
|
+
}
|
|
77892
|
+
}
|
|
77893
|
+
} }
|
|
77463
77894
|
},
|
|
77464
77895
|
update: {
|
|
77465
77896
|
scope: "device",
|
|
@@ -78231,6 +78662,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78231
78662
|
icon: "flame"
|
|
78232
78663
|
}]
|
|
78233
78664
|
},
|
|
78665
|
+
"group-commands": {
|
|
78666
|
+
scope: "device",
|
|
78667
|
+
noun: t("Group command", "Comando di gruppo")
|
|
78668
|
+
},
|
|
78669
|
+
"group-status": {
|
|
78670
|
+
scope: "device",
|
|
78671
|
+
noun: t("Group", "Gruppo"),
|
|
78672
|
+
state: [
|
|
78673
|
+
{
|
|
78674
|
+
kind: "numeric",
|
|
78675
|
+
field: "included",
|
|
78676
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
78677
|
+
label: t("Reporting", "Rispondono"),
|
|
78678
|
+
icon: "users"
|
|
78679
|
+
},
|
|
78680
|
+
{
|
|
78681
|
+
kind: "numeric",
|
|
78682
|
+
field: "excluded",
|
|
78683
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
78684
|
+
label: t("Excluded", "Esclusi"),
|
|
78685
|
+
icon: "users"
|
|
78686
|
+
},
|
|
78687
|
+
{
|
|
78688
|
+
kind: "numeric",
|
|
78689
|
+
field: "total",
|
|
78690
|
+
quantity: t("the member count", "il numero di membri"),
|
|
78691
|
+
label: t("Members", "Membri"),
|
|
78692
|
+
icon: "sigma"
|
|
78693
|
+
}
|
|
78694
|
+
]
|
|
78695
|
+
},
|
|
78234
78696
|
"humidity-sensor": {
|
|
78235
78697
|
scope: "device",
|
|
78236
78698
|
noun: t("Humidity", "Umidità"),
|
|
@@ -78264,7 +78726,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78264
78726
|
field: "value",
|
|
78265
78727
|
quantity: t("the reading", "il valore"),
|
|
78266
78728
|
label: t("Reading", "Valore"),
|
|
78267
|
-
unitField: "unit",
|
|
78268
78729
|
icon: "gauge"
|
|
78269
78730
|
}]
|
|
78270
78731
|
},
|
|
@@ -78400,7 +78861,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78400
78861
|
field: "temperature",
|
|
78401
78862
|
quantity: t("the outdoor temperature", "la temperatura esterna"),
|
|
78402
78863
|
label: t("Temperature", "Temperatura"),
|
|
78403
|
-
|
|
78864
|
+
unit: "°C",
|
|
78404
78865
|
icon: "thermometer"
|
|
78405
78866
|
},
|
|
78406
78867
|
{
|
|
@@ -78416,7 +78877,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78416
78877
|
field: "windSpeed",
|
|
78417
78878
|
quantity: t("the wind speed", "la velocità del vento"),
|
|
78418
78879
|
label: t("Wind", "Vento"),
|
|
78419
|
-
|
|
78880
|
+
unit: "m/s",
|
|
78420
78881
|
icon: "wind"
|
|
78421
78882
|
},
|
|
78422
78883
|
{
|
|
@@ -78424,7 +78885,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78424
78885
|
field: "pressure",
|
|
78425
78886
|
quantity: t("the air pressure", "la pressione atmosferica"),
|
|
78426
78887
|
label: t("Pressure", "Pressione"),
|
|
78427
|
-
|
|
78888
|
+
unit: "hPa",
|
|
78428
78889
|
icon: "gauge"
|
|
78429
78890
|
}
|
|
78430
78891
|
]
|
|
@@ -78729,8 +79190,72 @@ function projectAction(cap, action) {
|
|
|
78729
79190
|
};
|
|
78730
79191
|
}
|
|
78731
79192
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
78732
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
79193
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
78733
79194
|
DeviceFeature.BatteryOperated;
|
|
79195
|
+
/**
|
|
79196
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
79197
|
+
*
|
|
79198
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
79199
|
+
* travels is its power reading. The others have a laundry type that this
|
|
79200
|
+
* export cannot honour yet, so they are named and withheld.
|
|
79201
|
+
*/
|
|
79202
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
79203
|
+
DeviceType.Washer,
|
|
79204
|
+
DeviceType.Dryer,
|
|
79205
|
+
DeviceType.Dishwasher
|
|
79206
|
+
];
|
|
79207
|
+
var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
|
|
79208
|
+
var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
|
|
79209
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
79210
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
79211
|
+
var MATTER_REASON = "No Matter export is built. The closest device types are Laundry Washer (0x0073) and Laundry Dryer (0x0074); a power threshold is not the Laundry Washer Mode cluster.";
|
|
79212
|
+
function withheld(reason) {
|
|
79213
|
+
return {
|
|
79214
|
+
[DeviceType.Washer]: {
|
|
79215
|
+
exported: false,
|
|
79216
|
+
reason
|
|
79217
|
+
},
|
|
79218
|
+
[DeviceType.Dryer]: {
|
|
79219
|
+
exported: false,
|
|
79220
|
+
reason
|
|
79221
|
+
},
|
|
79222
|
+
[DeviceType.Dishwasher]: {
|
|
79223
|
+
exported: false,
|
|
79224
|
+
reason
|
|
79225
|
+
}
|
|
79226
|
+
};
|
|
79227
|
+
}
|
|
79228
|
+
function offered(received) {
|
|
79229
|
+
return {
|
|
79230
|
+
[DeviceType.Washer]: {
|
|
79231
|
+
exported: true,
|
|
79232
|
+
as: received
|
|
79233
|
+
},
|
|
79234
|
+
[DeviceType.Dryer]: {
|
|
79235
|
+
exported: true,
|
|
79236
|
+
as: received
|
|
79237
|
+
},
|
|
79238
|
+
[DeviceType.Dishwasher]: {
|
|
79239
|
+
exported: true,
|
|
79240
|
+
as: received
|
|
79241
|
+
}
|
|
79242
|
+
};
|
|
79243
|
+
}
|
|
79244
|
+
var APPLIANCE_EXPORT = {
|
|
79245
|
+
ha: offered(HA_AS),
|
|
79246
|
+
homekit: withheld(HOMEKIT_REASON),
|
|
79247
|
+
alexa: withheld(ALEXA_REASON),
|
|
79248
|
+
google: withheld(GOOGLE_REASON),
|
|
79249
|
+
matter: withheld(MATTER_REASON)
|
|
79250
|
+
};
|
|
79251
|
+
function isPlugApplianceType(deviceType) {
|
|
79252
|
+
return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
|
|
79253
|
+
}
|
|
79254
|
+
/** The decision for this ecosystem, or null when the type is not an appliance. */
|
|
79255
|
+
function applianceExport(ecosystem, deviceType) {
|
|
79256
|
+
if (!isPlugApplianceType(deviceType)) return null;
|
|
79257
|
+
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
79258
|
+
}
|
|
78734
79259
|
Object.freeze({
|
|
78735
79260
|
"accessories.getStatus": [{
|
|
78736
79261
|
name: "deviceId",
|
|
@@ -79697,6 +80222,16 @@ Object.freeze({
|
|
|
79697
80222
|
form: "single",
|
|
79698
80223
|
optional: false
|
|
79699
80224
|
}],
|
|
80225
|
+
"groupCommands.getStatus": [{
|
|
80226
|
+
name: "deviceId",
|
|
80227
|
+
form: "single",
|
|
80228
|
+
optional: false
|
|
80229
|
+
}],
|
|
80230
|
+
"groupStatus.getStatus": [{
|
|
80231
|
+
name: "deviceId",
|
|
80232
|
+
form: "single",
|
|
80233
|
+
optional: false
|
|
80234
|
+
}],
|
|
79700
80235
|
"heatingValve.getStatus": [{
|
|
79701
80236
|
name: "deviceId",
|
|
79702
80237
|
form: "single",
|
|
@@ -81681,6 +82216,8 @@ new Map(Object.entries({
|
|
|
81681
82216
|
"detection-blind": "device-events",
|
|
81682
82217
|
"motion-noisy": "device-events",
|
|
81683
82218
|
"motion-calm": "device-events",
|
|
82219
|
+
"package-llm-silent": "device-events",
|
|
82220
|
+
"package-llm-answered": "device-events",
|
|
81684
82221
|
"recording-stalled": "device-events",
|
|
81685
82222
|
"recording-healthy": "device-events",
|
|
81686
82223
|
"recording-degraded": "device-events",
|
|
@@ -81764,6 +82301,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
81764
82301
|
label: "Motion without a subject",
|
|
81765
82302
|
kinds: ["motion-noisy", "motion-calm"]
|
|
81766
82303
|
},
|
|
82304
|
+
{
|
|
82305
|
+
id: "package-llm",
|
|
82306
|
+
family: "device-events",
|
|
82307
|
+
label: "Package confirm",
|
|
82308
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
82309
|
+
},
|
|
81767
82310
|
{
|
|
81768
82311
|
id: "recording",
|
|
81769
82312
|
family: "device-events",
|
|
@@ -81945,6 +82488,8 @@ var DEVICE_EVENTS = [
|
|
|
81945
82488
|
"detection-blind",
|
|
81946
82489
|
"motion-noisy",
|
|
81947
82490
|
"motion-calm",
|
|
82491
|
+
"package-llm-silent",
|
|
82492
|
+
"package-llm-answered",
|
|
81948
82493
|
"recording-stalled",
|
|
81949
82494
|
"recording-healthy",
|
|
81950
82495
|
"recording-degraded",
|
|
@@ -82213,6 +82758,15 @@ new Map([
|
|
|
82213
82758
|
snapshotLabel: "Cameras with constant motion now",
|
|
82214
82759
|
snapshotSection: null
|
|
82215
82760
|
},
|
|
82761
|
+
{
|
|
82762
|
+
id: "package-llm-confirm",
|
|
82763
|
+
family: "device-events",
|
|
82764
|
+
label: "Package confirm (not answering / answering again)",
|
|
82765
|
+
bad: ["package-llm-silent"],
|
|
82766
|
+
recovery: ["package-llm-answered"],
|
|
82767
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
82768
|
+
snapshotSection: null
|
|
82769
|
+
},
|
|
82216
82770
|
{
|
|
82217
82771
|
id: "recording-health",
|
|
82218
82772
|
family: "device-events",
|
|
@@ -83070,8 +83624,9 @@ function traitForCommand(capNames, command) {
|
|
|
83070
83624
|
* (`SUPPORTED_DEVICE_KINDS` in `ha-export.addon.ts`) and it is what kept the
|
|
83071
83625
|
* previous exporter confined to cameras. `DeviceType` is consulted for exactly
|
|
83072
83626
|
* one thing here — picking between two Google types that carry the SAME traits
|
|
83073
|
-
* (a LIGHT and a SWITCH are both OnOff)
|
|
83074
|
-
*
|
|
83627
|
+
* (a LIGHT and a SWITCH are both OnOff). A washer, dryer or dishwasher is
|
|
83628
|
+
* withheld even when some other trait would match: Google's laundry types
|
|
83629
|
+
* require RunCycle, and this export does not publish that trait.
|
|
83075
83630
|
*/
|
|
83076
83631
|
var MANUFACTURER = "CamStack";
|
|
83077
83632
|
/**
|
|
@@ -83087,6 +83642,8 @@ var MANUFACTURER = "CamStack";
|
|
|
83087
83642
|
* A SECURITYSYSTEM would promise `ArmDisarm`, which nothing here answers.
|
|
83088
83643
|
*/
|
|
83089
83644
|
function resolveGoogleDeviceType(deviceType, traits) {
|
|
83645
|
+
const withheld = applianceExport("google", deviceType);
|
|
83646
|
+
if (withheld !== null && !withheld.exported) return null;
|
|
83090
83647
|
if (traits.includes("action.devices.traits.LockUnlock")) return "action.devices.types.LOCK";
|
|
83091
83648
|
if (traits.includes("action.devices.traits.OpenClose")) return "action.devices.types.SHUTTER";
|
|
83092
83649
|
if (!traits.includes("action.devices.traits.OnOff") && !traits.includes("action.devices.traits.Brightness")) return null;
|