@camstack/addon-export-hap 1.2.179 → 1.2.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hap-export.addon.js +283 -431
- package/dist/hap-export.addon.mjs +283 -431
- package/package.json +10 -1
|
@@ -5474,7 +5474,7 @@ var ZodIssueCode = {
|
|
|
5474
5474
|
var ZodFirstPartyTypeKind;
|
|
5475
5475
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5476
5476
|
//#endregion
|
|
5477
|
-
//#region ../types/dist/sleep-
|
|
5477
|
+
//#region ../types/dist/sleep-CARd6wZF.mjs
|
|
5478
5478
|
/**
|
|
5479
5479
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5480
5480
|
* window to float samples (D455).
|
|
@@ -7961,6 +7961,52 @@ var RecordKindDeclarationSchema = object({
|
|
|
7961
7961
|
}).strict();
|
|
7962
7962
|
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7963
7963
|
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7964
|
+
var READING_QUANTITIES = [
|
|
7965
|
+
"temperature",
|
|
7966
|
+
"pressure",
|
|
7967
|
+
"speed",
|
|
7968
|
+
"precipitation",
|
|
7969
|
+
"precipitation-rate",
|
|
7970
|
+
"length",
|
|
7971
|
+
"area",
|
|
7972
|
+
"illuminance",
|
|
7973
|
+
"irradiance",
|
|
7974
|
+
"power",
|
|
7975
|
+
"energy",
|
|
7976
|
+
"voltage",
|
|
7977
|
+
"current",
|
|
7978
|
+
"apparent-power",
|
|
7979
|
+
"humidity",
|
|
7980
|
+
"percentage",
|
|
7981
|
+
"concentration-volume",
|
|
7982
|
+
"concentration-mass",
|
|
7983
|
+
"concentration-ppb",
|
|
7984
|
+
"volume",
|
|
7985
|
+
"duration",
|
|
7986
|
+
"duration-ms",
|
|
7987
|
+
"information",
|
|
7988
|
+
"sound-level",
|
|
7989
|
+
"signal-level",
|
|
7990
|
+
"colour-temperature",
|
|
7991
|
+
"angle",
|
|
7992
|
+
"bitrate",
|
|
7993
|
+
"rate",
|
|
7994
|
+
"mass",
|
|
7995
|
+
"index",
|
|
7996
|
+
"ratio",
|
|
7997
|
+
"count",
|
|
7998
|
+
"none",
|
|
7999
|
+
"device"
|
|
8000
|
+
];
|
|
8001
|
+
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
8002
|
+
new Set(READING_QUANTITIES);
|
|
8003
|
+
function readingMeta(quantity, extras) {
|
|
8004
|
+
return {
|
|
8005
|
+
quantity,
|
|
8006
|
+
...extras?.precision !== void 0 ? { precision: extras.precision } : {},
|
|
8007
|
+
...extras?.label !== void 0 ? { label: extras.label } : {}
|
|
8008
|
+
};
|
|
8009
|
+
}
|
|
7964
8010
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7965
8011
|
var CamProfileSchema = _enum([
|
|
7966
8012
|
"high",
|
|
@@ -7988,8 +8034,8 @@ var CamStreamKindSchema = _enum([
|
|
|
7988
8034
|
"derived"
|
|
7989
8035
|
]);
|
|
7990
8036
|
var CamStreamResolutionSchema = object({
|
|
7991
|
-
width: number().int().positive(),
|
|
7992
|
-
height: number().int().positive()
|
|
8037
|
+
width: number().int().positive().meta(readingMeta("none")),
|
|
8038
|
+
height: number().int().positive().meta(readingMeta("none"))
|
|
7993
8039
|
});
|
|
7994
8040
|
var CameraStreamSchema = object({
|
|
7995
8041
|
/** Stable, provider-assigned id unique within the (deviceId) scope. */
|
|
@@ -8691,14 +8737,6 @@ Object.freeze({
|
|
|
8691
8737
|
{
|
|
8692
8738
|
"path": "aqi",
|
|
8693
8739
|
"valueType": "number"
|
|
8694
|
-
},
|
|
8695
|
-
{
|
|
8696
|
-
"path": "unit",
|
|
8697
|
-
"valueType": "string"
|
|
8698
|
-
},
|
|
8699
|
-
{
|
|
8700
|
-
"path": "precision",
|
|
8701
|
-
"valueType": "number"
|
|
8702
8740
|
}
|
|
8703
8741
|
],
|
|
8704
8742
|
"alarm-panel": [
|
|
@@ -8734,20 +8772,10 @@ Object.freeze({
|
|
|
8734
8772
|
"valueType": "boolean"
|
|
8735
8773
|
}
|
|
8736
8774
|
],
|
|
8737
|
-
"ambient-light-sensor": [
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
},
|
|
8742
|
-
{
|
|
8743
|
-
"path": "unit",
|
|
8744
|
-
"valueType": "string"
|
|
8745
|
-
},
|
|
8746
|
-
{
|
|
8747
|
-
"path": "precision",
|
|
8748
|
-
"valueType": "number"
|
|
8749
|
-
}
|
|
8750
|
-
],
|
|
8775
|
+
"ambient-light-sensor": [{
|
|
8776
|
+
"path": "lux",
|
|
8777
|
+
"valueType": "number"
|
|
8778
|
+
}],
|
|
8751
8779
|
"audio-metrics": [
|
|
8752
8780
|
{
|
|
8753
8781
|
"path": "ts",
|
|
@@ -8827,6 +8855,10 @@ Object.freeze({
|
|
|
8827
8855
|
"path": "lastUpdated",
|
|
8828
8856
|
"valueType": "number"
|
|
8829
8857
|
},
|
|
8858
|
+
{
|
|
8859
|
+
"path": "volts",
|
|
8860
|
+
"valueType": "number"
|
|
8861
|
+
},
|
|
8830
8862
|
{
|
|
8831
8863
|
"path": "lastContactAt",
|
|
8832
8864
|
"valueType": "number"
|
|
@@ -9069,10 +9101,6 @@ Object.freeze({
|
|
|
9069
9101
|
"datetime"
|
|
9070
9102
|
]
|
|
9071
9103
|
},
|
|
9072
|
-
{
|
|
9073
|
-
"path": "unit",
|
|
9074
|
-
"valueType": "string"
|
|
9075
|
-
},
|
|
9076
9104
|
{
|
|
9077
9105
|
"path": "min",
|
|
9078
9106
|
"valueType": "number"
|
|
@@ -9084,19 +9112,6 @@ Object.freeze({
|
|
|
9084
9112
|
{
|
|
9085
9113
|
"path": "step",
|
|
9086
9114
|
"valueType": "number"
|
|
9087
|
-
},
|
|
9088
|
-
{
|
|
9089
|
-
"path": "precision",
|
|
9090
|
-
"valueType": "number"
|
|
9091
|
-
},
|
|
9092
|
-
{
|
|
9093
|
-
"path": "format",
|
|
9094
|
-
"valueType": "enum",
|
|
9095
|
-
"enumValues": [
|
|
9096
|
-
"date",
|
|
9097
|
-
"time",
|
|
9098
|
-
"datetime"
|
|
9099
|
-
]
|
|
9100
9115
|
}
|
|
9101
9116
|
],
|
|
9102
9117
|
"cover": [
|
|
@@ -9337,13 +9352,8 @@ Object.freeze({
|
|
|
9337
9352
|
"path": "value",
|
|
9338
9353
|
"valueType": "string"
|
|
9339
9354
|
}, {
|
|
9340
|
-
"path": "
|
|
9341
|
-
"valueType": "
|
|
9342
|
-
"enumValues": [
|
|
9343
|
-
"date",
|
|
9344
|
-
"time",
|
|
9345
|
-
"datetime"
|
|
9346
|
-
]
|
|
9355
|
+
"path": "timestamp",
|
|
9356
|
+
"valueType": "boolean"
|
|
9347
9357
|
}],
|
|
9348
9358
|
"event-emitter": [
|
|
9349
9359
|
{
|
|
@@ -9450,20 +9460,10 @@ Object.freeze({
|
|
|
9450
9460
|
"valueType": "number"
|
|
9451
9461
|
}
|
|
9452
9462
|
],
|
|
9453
|
-
"humidity-sensor": [
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
},
|
|
9458
|
-
{
|
|
9459
|
-
"path": "unit",
|
|
9460
|
-
"valueType": "string"
|
|
9461
|
-
},
|
|
9462
|
-
{
|
|
9463
|
-
"path": "precision",
|
|
9464
|
-
"valueType": "number"
|
|
9465
|
-
}
|
|
9466
|
-
],
|
|
9463
|
+
"humidity-sensor": [{
|
|
9464
|
+
"path": "percent",
|
|
9465
|
+
"valueType": "number"
|
|
9466
|
+
}],
|
|
9467
9467
|
"image": [{
|
|
9468
9468
|
"path": "url",
|
|
9469
9469
|
"valueType": "string"
|
|
@@ -9802,20 +9802,10 @@ Object.freeze({
|
|
|
9802
9802
|
"valueType": "boolean"
|
|
9803
9803
|
}
|
|
9804
9804
|
],
|
|
9805
|
-
"numeric-sensor": [
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
},
|
|
9810
|
-
{
|
|
9811
|
-
"path": "unit",
|
|
9812
|
-
"valueType": "string"
|
|
9813
|
-
},
|
|
9814
|
-
{
|
|
9815
|
-
"path": "precision",
|
|
9816
|
-
"valueType": "number"
|
|
9817
|
-
}
|
|
9818
|
-
],
|
|
9805
|
+
"numeric-sensor": [{
|
|
9806
|
+
"path": "value",
|
|
9807
|
+
"valueType": "number"
|
|
9808
|
+
}],
|
|
9819
9809
|
"pet-feeder": [
|
|
9820
9810
|
{
|
|
9821
9811
|
"path": "foodLevel",
|
|
@@ -9907,14 +9897,6 @@ Object.freeze({
|
|
|
9907
9897
|
{
|
|
9908
9898
|
"path": "powerFactor",
|
|
9909
9899
|
"valueType": "number"
|
|
9910
|
-
},
|
|
9911
|
-
{
|
|
9912
|
-
"path": "unit",
|
|
9913
|
-
"valueType": "string"
|
|
9914
|
-
},
|
|
9915
|
-
{
|
|
9916
|
-
"path": "precision",
|
|
9917
|
-
"valueType": "number"
|
|
9918
9900
|
}
|
|
9919
9901
|
],
|
|
9920
9902
|
"presence": [
|
|
@@ -9943,20 +9925,10 @@ Object.freeze({
|
|
|
9943
9925
|
"valueType": "number"
|
|
9944
9926
|
}
|
|
9945
9927
|
],
|
|
9946
|
-
"pressure-sensor": [
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
},
|
|
9951
|
-
{
|
|
9952
|
-
"path": "unit",
|
|
9953
|
-
"valueType": "string"
|
|
9954
|
-
},
|
|
9955
|
-
{
|
|
9956
|
-
"path": "precision",
|
|
9957
|
-
"valueType": "number"
|
|
9958
|
-
}
|
|
9959
|
-
],
|
|
9928
|
+
"pressure-sensor": [{
|
|
9929
|
+
"path": "hpa",
|
|
9930
|
+
"valueType": "number"
|
|
9931
|
+
}],
|
|
9960
9932
|
"privacy-mask": [{
|
|
9961
9933
|
"path": "enabled",
|
|
9962
9934
|
"valueType": "boolean"
|
|
@@ -10267,20 +10239,10 @@ Object.freeze({
|
|
|
10267
10239
|
"path": "tampered",
|
|
10268
10240
|
"valueType": "boolean"
|
|
10269
10241
|
}],
|
|
10270
|
-
"temperature-sensor": [
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
},
|
|
10275
|
-
{
|
|
10276
|
-
"path": "unit",
|
|
10277
|
-
"valueType": "string"
|
|
10278
|
-
},
|
|
10279
|
-
{
|
|
10280
|
-
"path": "precision",
|
|
10281
|
-
"valueType": "number"
|
|
10282
|
-
}
|
|
10283
|
-
],
|
|
10242
|
+
"temperature-sensor": [{
|
|
10243
|
+
"path": "celsius",
|
|
10244
|
+
"valueType": "number"
|
|
10245
|
+
}],
|
|
10284
10246
|
"update": [
|
|
10285
10247
|
{
|
|
10286
10248
|
"path": "currentVersion",
|
|
@@ -10391,10 +10353,6 @@ Object.freeze({
|
|
|
10391
10353
|
"path": "temperature",
|
|
10392
10354
|
"valueType": "number"
|
|
10393
10355
|
},
|
|
10394
|
-
{
|
|
10395
|
-
"path": "temperatureUnit",
|
|
10396
|
-
"valueType": "string"
|
|
10397
|
-
},
|
|
10398
10356
|
{
|
|
10399
10357
|
"path": "humidity",
|
|
10400
10358
|
"valueType": "number"
|
|
@@ -10403,18 +10361,10 @@ Object.freeze({
|
|
|
10403
10361
|
"path": "pressure",
|
|
10404
10362
|
"valueType": "number"
|
|
10405
10363
|
},
|
|
10406
|
-
{
|
|
10407
|
-
"path": "pressureUnit",
|
|
10408
|
-
"valueType": "string"
|
|
10409
|
-
},
|
|
10410
10364
|
{
|
|
10411
10365
|
"path": "windSpeed",
|
|
10412
10366
|
"valueType": "number"
|
|
10413
10367
|
},
|
|
10414
|
-
{
|
|
10415
|
-
"path": "windSpeedUnit",
|
|
10416
|
-
"valueType": "string"
|
|
10417
|
-
},
|
|
10418
10368
|
{
|
|
10419
10369
|
"path": "windBearing",
|
|
10420
10370
|
"valueType": "number"
|
|
@@ -18591,7 +18541,8 @@ var CompositionProblemSchema = object({
|
|
|
18591
18541
|
"item-field-reserved",
|
|
18592
18542
|
"target-missing",
|
|
18593
18543
|
"target-unreadable",
|
|
18594
|
-
"not-replaceable"
|
|
18544
|
+
"not-replaceable",
|
|
18545
|
+
"native-capability-replace"
|
|
18595
18546
|
]),
|
|
18596
18547
|
path: string(),
|
|
18597
18548
|
message: string()
|
|
@@ -18649,9 +18600,11 @@ var CompositionFieldPlanSchema = object({
|
|
|
18649
18600
|
reads: array(CompositionFieldReadSchema)
|
|
18650
18601
|
});
|
|
18651
18602
|
/**
|
|
18652
|
-
* What a feature does to its target (D663): `new` builds a capability on a
|
|
18653
|
-
* device; on an existing device it `add`s a capability the device lacks
|
|
18654
|
-
*
|
|
18603
|
+
* What a feature does to its target (D663, D944): `new` builds a capability on a
|
|
18604
|
+
* new device; on an existing device it `add`s a capability the device lacks.
|
|
18605
|
+
* Replacing a capability the device already serves is refused
|
|
18606
|
+
* (`native-capability-replace`), not planned. `replace` remains on the claim
|
|
18607
|
+
* wire for a claim the hub already holds.
|
|
18655
18608
|
*/
|
|
18656
18609
|
var CompositionFeatureModeSchema = _enum([
|
|
18657
18610
|
"new",
|
|
@@ -20593,12 +20546,12 @@ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema
|
|
|
20593
20546
|
* providers detect renames by matching `uniqueId` and patch `id`
|
|
20594
20547
|
* in-place so dispatch keeps working.
|
|
20595
20548
|
*
|
|
20596
|
-
* **
|
|
20597
|
-
*
|
|
20598
|
-
*
|
|
20599
|
-
*
|
|
20600
|
-
* (`ha-domain-mapping`)
|
|
20601
|
-
* stored after that point.
|
|
20549
|
+
* **Display unit and precision are NOT stored here.** They are a read-time
|
|
20550
|
+
* preference (D944). A polymorphic reading stores its `quantity` here once,
|
|
20551
|
+
* at adopt, and a date/time value stores `dateTimeShape` the same way —
|
|
20552
|
+
* neither is repeated on each sample. The `device_class` tag is an
|
|
20553
|
+
* HA-specific input consumed at the discovery boundary (`ha-domain-mapping`)
|
|
20554
|
+
* to derive the CamStack `DeviceRole`; it is never stored after that point.
|
|
20602
20555
|
*
|
|
20603
20556
|
* The `raw` escape hatch carries provider-specific attributes that don't
|
|
20604
20557
|
* fit the structured slots (HA `attributes` whitelist, Reolink `deviceCache`
|
|
@@ -20612,6 +20565,14 @@ var SourceInfoSchema = object({
|
|
|
20612
20565
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
20613
20566
|
* Used to detect rename when `id` changes. */
|
|
20614
20567
|
uniqueId: string().optional(),
|
|
20568
|
+
/** Quantity of a polymorphic reading, written once at adopt (D944). */
|
|
20569
|
+
quantity: ReadingQuantitySchema.optional(),
|
|
20570
|
+
/** Date / time / datetime shape of a string reading, written once at adopt. */
|
|
20571
|
+
dateTimeShape: _enum([
|
|
20572
|
+
"date",
|
|
20573
|
+
"time",
|
|
20574
|
+
"datetime"
|
|
20575
|
+
]).optional(),
|
|
20615
20576
|
/** Provider-specific extras that don't fit the structured slots.
|
|
20616
20577
|
* Whitelist what goes here per provider — do NOT dump entire HA
|
|
20617
20578
|
* attribute blobs (would explode the meta JSON column). */
|
|
@@ -41549,7 +41510,8 @@ method(object({
|
|
|
41549
41510
|
"enum"
|
|
41550
41511
|
]),
|
|
41551
41512
|
enumValues: array(string()).optional(),
|
|
41552
|
-
item: boolean().optional()
|
|
41513
|
+
item: boolean().optional(),
|
|
41514
|
+
quantity: ReadingQuantitySchema.optional()
|
|
41553
41515
|
})).readonly(),
|
|
41554
41516
|
itemArray: object({
|
|
41555
41517
|
path: string(),
|
|
@@ -45349,8 +45311,8 @@ var MaskPolygonShapeSchema = object({
|
|
|
45349
45311
|
/** Boolean cell grid — row-major, length === gridWidth*gridHeight. */
|
|
45350
45312
|
var MaskGridShapeSchema = object({
|
|
45351
45313
|
kind: literal("grid"),
|
|
45352
|
-
gridWidth: number(),
|
|
45353
|
-
gridHeight: number(),
|
|
45314
|
+
gridWidth: number().meta(readingMeta("none")),
|
|
45315
|
+
gridHeight: number().meta(readingMeta("none")),
|
|
45354
45316
|
cells: array(boolean())
|
|
45355
45317
|
});
|
|
45356
45318
|
discriminatedUnion("kind", [
|
|
@@ -56937,27 +56899,17 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56937
56899
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56938
56900
|
object({
|
|
56939
56901
|
/** Carbon dioxide concentration in ppm. */
|
|
56940
|
-
co2Ppm: number().min(0).optional(),
|
|
56902
|
+
co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56941
56903
|
/** Total volatile organic compounds in ppb. */
|
|
56942
|
-
vocPpb: number().min(0).optional(),
|
|
56904
|
+
vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56943
56905
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56944
|
-
pm25: number().min(0).optional(),
|
|
56906
|
+
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56945
56907
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
56946
|
-
pm10: number().min(0).optional(),
|
|
56908
|
+
pm10: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56947
56909
|
/** Composite AQI value (typically 0..500). */
|
|
56948
|
-
aqi: number().optional(),
|
|
56910
|
+
aqi: number().optional().meta(readingMeta("index")),
|
|
56949
56911
|
/** Ms epoch when the slice was last updated. */
|
|
56950
|
-
lastFetchedAt: number()
|
|
56951
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
56952
|
-
* `attributes.unit_of_measurement` → 'ppm' / 'ppb' / 'µg/m³'). Each
|
|
56953
|
-
* upstream `sensor.*` entity surfaces ONE device_class, so one unit
|
|
56954
|
-
* per slice is unambiguous. */
|
|
56955
|
-
unit: string().optional(),
|
|
56956
|
-
/** Suggested decimal places for numeric display.
|
|
56957
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56958
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56959
|
-
* auto-formatting when absent. */
|
|
56960
|
-
precision: number().int().min(0).max(10).optional()
|
|
56912
|
+
lastFetchedAt: number()
|
|
56961
56913
|
});
|
|
56962
56914
|
DeviceType.Sensor;
|
|
56963
56915
|
/**
|
|
@@ -56965,22 +56917,13 @@ DeviceType.Sensor;
|
|
|
56965
56917
|
* entries with `device_class: illuminance`.
|
|
56966
56918
|
*/
|
|
56967
56919
|
var AmbientLightSensorStatusSchema = object({
|
|
56968
|
-
/** Current illuminance in lux (lx). */
|
|
56969
|
-
lux: number().min(0).meta({
|
|
56970
|
-
|
|
56920
|
+
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56921
|
+
lux: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56922
|
+
precision: 0,
|
|
56971
56923
|
label: "Illuminance"
|
|
56972
|
-
}),
|
|
56924
|
+
})),
|
|
56973
56925
|
/** Ms epoch when the slice was last updated. */
|
|
56974
|
-
lastFetchedAt: number()
|
|
56975
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
56976
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
56977
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
56978
|
-
unit: string().optional(),
|
|
56979
|
-
/** Suggested decimal places for numeric display.
|
|
56980
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56981
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56982
|
-
* auto-formatting when absent. */
|
|
56983
|
-
precision: number().int().min(0).max(10).optional()
|
|
56926
|
+
lastFetchedAt: number()
|
|
56984
56927
|
});
|
|
56985
56928
|
DeviceType.Sensor;
|
|
56986
56929
|
/**
|
|
@@ -57125,10 +57068,7 @@ var BatteryStatusSchema = object({
|
|
|
57125
57068
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
57126
57069
|
* declines to band a non-finite reading, which is the correct shape.
|
|
57127
57070
|
*/
|
|
57128
|
-
percentage: number().min(0).max(100).nullable().meta({
|
|
57129
|
-
unit: "%",
|
|
57130
|
-
label: "Charge"
|
|
57131
|
-
}),
|
|
57071
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
57132
57072
|
/**
|
|
57133
57073
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
57134
57074
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -57155,7 +57095,14 @@ var BatteryStatusSchema = object({
|
|
|
57155
57095
|
*/
|
|
57156
57096
|
sleeping: boolean().meta({ label: "Sleeping" }),
|
|
57157
57097
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
57158
|
-
lastUpdated: number(),
|
|
57098
|
+
lastUpdated: number().meta(readingMeta("none")),
|
|
57099
|
+
/**
|
|
57100
|
+
* Battery voltage in volts, for a cell the firmware reports as voltage
|
|
57101
|
+
* rather than a percentage (Ecowitt capacitor packs). Absent on cameras
|
|
57102
|
+
* that only report charge. A second reading on this cap, not a second
|
|
57103
|
+
* `numeric-sensor` on the same device.
|
|
57104
|
+
*/
|
|
57105
|
+
volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57159
57106
|
/**
|
|
57160
57107
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57161
57108
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57215,7 +57162,7 @@ object({
|
|
|
57215
57162
|
DeviceType.Sensor;
|
|
57216
57163
|
object({
|
|
57217
57164
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57218
|
-
percentage: number().min(0).max(100),
|
|
57165
|
+
percentage: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57219
57166
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57220
57167
|
lastChangedAt: number()
|
|
57221
57168
|
});
|
|
@@ -57604,21 +57551,21 @@ object({
|
|
|
57604
57551
|
/** Single setpoint in Celsius. Used by single-target modes
|
|
57605
57552
|
* (heat / cool / dry). Null when the device is in a range mode
|
|
57606
57553
|
* (`heat_cool`) or has no setpoint at all (`fan_only`/`off`). */
|
|
57607
|
-
target: number().nullable(),
|
|
57554
|
+
target: number().nullable().meta(readingMeta("temperature")),
|
|
57608
57555
|
/** Upper bound of the dual setpoint in Celsius. Populated only
|
|
57609
57556
|
* in `heat_cool` mode. */
|
|
57610
|
-
targetHigh: number().nullable(),
|
|
57557
|
+
targetHigh: number().nullable().meta(readingMeta("temperature")),
|
|
57611
57558
|
/** Lower bound of the dual setpoint in Celsius. Populated only
|
|
57612
57559
|
* in `heat_cool` mode. */
|
|
57613
|
-
targetLow: number().nullable(),
|
|
57560
|
+
targetLow: number().nullable().meta(readingMeta("temperature")),
|
|
57614
57561
|
/** Target relative humidity (0..100). Null when the device has no
|
|
57615
57562
|
* humidity control. */
|
|
57616
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
57563
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
57617
57564
|
/** Current measured temperature in Celsius. Read-only — pushed by
|
|
57618
57565
|
* the device's internal sensor. */
|
|
57619
|
-
currentTemp: number().nullable(),
|
|
57566
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
57620
57567
|
/** Current measured relative humidity (0..100). Read-only. */
|
|
57621
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
57568
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
57622
57569
|
/** Vertical louver swing on/off. Null when the device has no vertical
|
|
57623
57570
|
* swing surface (gate with `DeviceFeature.ClimateSwingVertical`). */
|
|
57624
57571
|
swingVertical: boolean().nullable(),
|
|
@@ -57626,11 +57573,11 @@ object({
|
|
|
57626
57573
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
57627
57574
|
swingHorizontal: boolean().nullable(),
|
|
57628
57575
|
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
57629
|
-
minTemp: number().nullable().optional(),
|
|
57576
|
+
minTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
57630
57577
|
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
57631
|
-
maxTemp: number().nullable().optional(),
|
|
57578
|
+
maxTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
57632
57579
|
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
57633
|
-
tempStep: number().positive().nullable().optional(),
|
|
57580
|
+
tempStep: number().positive().nullable().optional().meta(readingMeta("temperature")),
|
|
57634
57581
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
57635
57582
|
lastFetchedAt: number()
|
|
57636
57583
|
});
|
|
@@ -57709,17 +57656,17 @@ DeviceType.Thermostat, DeviceType.Climate, method(object({
|
|
|
57709
57656
|
* modes to expose in the picker without a slice fetch.
|
|
57710
57657
|
*/
|
|
57711
57658
|
var RgbTripletSchema = object({
|
|
57712
|
-
r: number().int().min(0).max(255),
|
|
57713
|
-
g: number().int().min(0).max(255),
|
|
57714
|
-
b: number().int().min(0).max(255)
|
|
57659
|
+
r: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
57660
|
+
g: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
57661
|
+
b: number().int().min(0).max(255).meta(readingMeta("none"))
|
|
57715
57662
|
});
|
|
57716
57663
|
var HsvTripletSchema = object({
|
|
57717
57664
|
/** Hue in degrees, 0..360. */
|
|
57718
|
-
h: number().min(0).max(360),
|
|
57665
|
+
h: number().min(0).max(360).meta(readingMeta("none")),
|
|
57719
57666
|
/** Saturation as 0..100 inclusive. */
|
|
57720
|
-
s: number().min(0).max(100),
|
|
57667
|
+
s: number().min(0).max(100).meta(readingMeta("none")),
|
|
57721
57668
|
/** Value/brightness as 0..100 inclusive. */
|
|
57722
|
-
v: number().min(0).max(100)
|
|
57669
|
+
v: number().min(0).max(100).meta(readingMeta("none"))
|
|
57723
57670
|
});
|
|
57724
57671
|
var ColorInputSchema = discriminatedUnion("mode", [
|
|
57725
57672
|
object({
|
|
@@ -57748,7 +57695,7 @@ object({
|
|
|
57748
57695
|
/** Populated when `mode === 'hsv'`. */
|
|
57749
57696
|
hsv: HsvTripletSchema.optional(),
|
|
57750
57697
|
/** Populated when `mode === 'mired'`. */
|
|
57751
|
-
mireds: number().int().optional(),
|
|
57698
|
+
mireds: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57752
57699
|
/** Ms epoch of the last operator-driven change. */
|
|
57753
57700
|
lastChangedAt: number()
|
|
57754
57701
|
});
|
|
@@ -57872,18 +57819,12 @@ _enum([
|
|
|
57872
57819
|
"empty",
|
|
57873
57820
|
"full"
|
|
57874
57821
|
]);
|
|
57875
|
-
/**
|
|
57876
|
-
|
|
57877
|
-
|
|
57878
|
-
"days",
|
|
57879
|
-
"hours",
|
|
57880
|
-
"cycles"
|
|
57881
|
-
]);
|
|
57882
|
-
/** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
|
|
57883
|
-
* days). `value` null = unknown (D393). */
|
|
57822
|
+
/** Whether `remaining.value` is a duration in seconds or a dimensionless count. */
|
|
57823
|
+
var ConsumableRemainingKindSchema = _enum(["duration", "count"]);
|
|
57824
|
+
/** Remaining life. `value` null = unknown (D393). Duration is seconds. */
|
|
57884
57825
|
var ConsumableRemainingSchema = object({
|
|
57885
|
-
value: number().min(0).nullable(),
|
|
57886
|
-
|
|
57826
|
+
value: number().min(0).nullable().meta(readingMeta("device")),
|
|
57827
|
+
kind: ConsumableRemainingKindSchema
|
|
57887
57828
|
});
|
|
57888
57829
|
var ConsumablesStatusSchema = object({
|
|
57889
57830
|
items: array(object({
|
|
@@ -57892,7 +57833,7 @@ var ConsumablesStatusSchema = object({
|
|
|
57892
57833
|
/** Display name. */
|
|
57893
57834
|
label: string().min(1),
|
|
57894
57835
|
/** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
|
|
57895
|
-
level: number().min(0).max(100).nullable(),
|
|
57836
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57896
57837
|
/** The provider's discrete verdict when known (binary mode). */
|
|
57897
57838
|
status: ConsumableStatusSchema.nullable(),
|
|
57898
57839
|
/** What the item is — decides whether low or full is bad. Absent = `wear`. */
|
|
@@ -57909,7 +57850,7 @@ var ConsumablesStatusSchema = object({
|
|
|
57909
57850
|
})),
|
|
57910
57851
|
lastChangedAt: number()
|
|
57911
57852
|
});
|
|
57912
|
-
Object.values(DeviceType), [...
|
|
57853
|
+
Object.values(DeviceType), [...ConsumableRemainingKindSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
|
|
57913
57854
|
Object.values(DeviceType), method(object({
|
|
57914
57855
|
deviceId: number().int().nonnegative(),
|
|
57915
57856
|
key: string().min(1)
|
|
@@ -57946,39 +57887,17 @@ object({
|
|
|
57946
57887
|
/** Current value. Numeric kind → number; select/text/datetime → string.
|
|
57947
57888
|
* Datetime values are ISO 8601 strings (full timestamp, date-only,
|
|
57948
57889
|
* or time-only — HA accepts all three forms). */
|
|
57949
|
-
value: union([number(), string()]),
|
|
57890
|
+
value: union([number().meta(readingMeta("device")), string()]),
|
|
57950
57891
|
/** Acceptable values when `kind === 'select'`. Empty for other kinds. */
|
|
57951
57892
|
options: array(string()),
|
|
57952
57893
|
/** Ms epoch when the slice was last updated. */
|
|
57953
57894
|
lastChangedAt: number(),
|
|
57954
|
-
/**
|
|
57955
|
-
|
|
57956
|
-
|
|
57957
|
-
|
|
57958
|
-
/**
|
|
57959
|
-
|
|
57960
|
-
min: number().optional(),
|
|
57961
|
-
/** Maximum allowed value. Populated live from HA `attributes.max`.
|
|
57962
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57963
|
-
max: number().optional(),
|
|
57964
|
-
/** Step increment. Populated live from HA `attributes.step`.
|
|
57965
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57966
|
-
step: number().optional(),
|
|
57967
|
-
/** Suggested decimal places for numeric display. Populated live from HA
|
|
57968
|
-
* `attributes.suggested_display_precision`, or derived from `step` when the
|
|
57969
|
-
* HA attribute is absent. Meaningful for `kind === 'numeric'`; absent for
|
|
57970
|
-
* other kinds. Falls back to auto-formatting when absent. */
|
|
57971
|
-
precision: number().int().min(0).max(10).optional(),
|
|
57972
|
-
/** Date-picker granularity for `kind === 'datetime'`. 'date' → date-only,
|
|
57973
|
-
* 'time' → time-only, 'datetime' → full timestamp. Absent for other kinds
|
|
57974
|
-
* (UI defaults to 'datetime'). Derived live from the device's HA domain
|
|
57975
|
-
* (date.* / time.* / datetime.*) or, for input_datetime, from the entity's
|
|
57976
|
-
* `has_date`/`has_time` attributes on each push. */
|
|
57977
|
-
format: _enum([
|
|
57978
|
-
"date",
|
|
57979
|
-
"time",
|
|
57980
|
-
"datetime"
|
|
57981
|
-
]).optional()
|
|
57895
|
+
/** Minimum allowed value, in the device quantity's base unit. */
|
|
57896
|
+
min: number().optional().meta(readingMeta("device")),
|
|
57897
|
+
/** Maximum allowed value, in the device quantity's base unit. */
|
|
57898
|
+
max: number().optional().meta(readingMeta("device")),
|
|
57899
|
+
/** Step increment, in the device quantity's base unit. */
|
|
57900
|
+
step: number().optional().meta(readingMeta("device"))
|
|
57982
57901
|
});
|
|
57983
57902
|
var ControlSetValueInputSchema = discriminatedUnion("kind", [
|
|
57984
57903
|
object({
|
|
@@ -58016,9 +57935,9 @@ object({
|
|
|
58016
57935
|
]),
|
|
58017
57936
|
/** 0 = fully closed, 100 = fully open. Null when the device has
|
|
58018
57937
|
* no intermediate position surface. */
|
|
58019
|
-
position: number().min(0).max(100).nullable(),
|
|
57938
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58020
57939
|
/** 0 = closed slats, 100 = open slats. Null when no tilt support. */
|
|
58021
|
-
tiltPosition: number().min(0).max(100).nullable(),
|
|
57940
|
+
tiltPosition: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58022
57941
|
/** Ms epoch when the slice was last updated. */
|
|
58023
57942
|
lastChangedAt: number()
|
|
58024
57943
|
});
|
|
@@ -58076,9 +57995,9 @@ var NormalizedRangeSchema$1 = object({
|
|
|
58076
57995
|
object({
|
|
58077
57996
|
mode: DayNightModeSchema,
|
|
58078
57997
|
/** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
|
|
58079
|
-
sensitivity: number().optional(),
|
|
57998
|
+
sensitivity: number().optional().meta(readingMeta("none")),
|
|
58080
57999
|
/** Delay before the IR-cut filter flips, in seconds. */
|
|
58081
|
-
switchDelaySec: number().optional(),
|
|
58000
|
+
switchDelaySec: number().optional().meta(readingMeta("duration")),
|
|
58082
58001
|
lastFetchedAt: number()
|
|
58083
58002
|
});
|
|
58084
58003
|
/**
|
|
@@ -58233,11 +58152,11 @@ object({
|
|
|
58233
58152
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58234
58153
|
availablePrograms: array(string()),
|
|
58235
58154
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58236
|
-
remainingSeconds: number().int().nonnegative().nullable(),
|
|
58155
|
+
remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58237
58156
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58238
|
-
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
58157
|
+
delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58239
58158
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58240
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
58159
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58241
58160
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58242
58161
|
doorOpen: boolean().nullable(),
|
|
58243
58162
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58261,7 +58180,7 @@ object({
|
|
|
58261
58180
|
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
58262
58181
|
machineCareDue: boolean().nullable(),
|
|
58263
58182
|
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
58264
|
-
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
58183
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable().meta(readingMeta("count")),
|
|
58265
58184
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
58266
58185
|
halfLoad: boolean().nullable(),
|
|
58267
58186
|
hygienePlus: boolean().nullable(),
|
|
@@ -58276,7 +58195,7 @@ object({
|
|
|
58276
58195
|
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
58277
58196
|
activeEvents: array(string()),
|
|
58278
58197
|
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
58279
|
-
errorCode: number().nullable(),
|
|
58198
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
58280
58199
|
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
58281
58200
|
errorLabel: string().nullable(),
|
|
58282
58201
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
@@ -58422,24 +58341,14 @@ object({
|
|
|
58422
58341
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
58423
58342
|
lastPressedAt: number().nullable(),
|
|
58424
58343
|
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
58425
|
-
pressCountSinceStart: number()
|
|
58344
|
+
pressCountSinceStart: number().meta(readingMeta("count"))
|
|
58426
58345
|
});
|
|
58427
58346
|
object({
|
|
58428
58347
|
deviceId: number(),
|
|
58429
58348
|
timestamp: number()
|
|
58430
58349
|
});
|
|
58431
58350
|
DeviceType.Button, DeviceType.Camera;
|
|
58432
|
-
|
|
58433
|
-
* Enum-state sensor — a string value picked from a finite option set.
|
|
58434
|
-
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
58435
|
-
* states, weather conditions, contact-source channels, mode strings).
|
|
58436
|
-
* The option set is stable across observations; it is persisted in the
|
|
58437
|
-
* device config blob (via the control slice at adoption) and is NOT
|
|
58438
|
-
* stored in `sourceInfo`.
|
|
58439
|
-
*/
|
|
58440
|
-
/** Locale-render shape for an ISO `value` carried by a `DateTimeSensor`-role
|
|
58441
|
-
* enum sensor: `date` (date-only), `time` (time-only), `datetime` (both). */
|
|
58442
|
-
var EnumSensorDateTimeFormatSchema = _enum([
|
|
58351
|
+
_enum([
|
|
58443
58352
|
"date",
|
|
58444
58353
|
"time",
|
|
58445
58354
|
"datetime"
|
|
@@ -58447,12 +58356,11 @@ var EnumSensorDateTimeFormatSchema = _enum([
|
|
|
58447
58356
|
object({
|
|
58448
58357
|
value: string(),
|
|
58449
58358
|
/**
|
|
58450
|
-
* Set
|
|
58451
|
-
* as
|
|
58452
|
-
*
|
|
58453
|
-
* a time-only sensor → `'time'`.
|
|
58359
|
+
* Set when `value` is a timestamp rather than an enum state, so history
|
|
58360
|
+
* does not learn ISO strings as states. The display shape (date / time /
|
|
58361
|
+
* datetime) lives on `SourceInfo.dateTimeShape`, written once at adopt.
|
|
58454
58362
|
*/
|
|
58455
|
-
|
|
58363
|
+
timestamp: boolean().optional(),
|
|
58456
58364
|
/** Ms epoch when the slice was last updated. */
|
|
58457
58365
|
lastFetchedAt: number()
|
|
58458
58366
|
});
|
|
@@ -58471,13 +58379,13 @@ var EventFireSchema = object({
|
|
|
58471
58379
|
deviceId: number(),
|
|
58472
58380
|
eventType: string(),
|
|
58473
58381
|
data: record(string(), unknown()).nullable(),
|
|
58474
|
-
timestamp: number(),
|
|
58475
|
-
seq: number()
|
|
58382
|
+
timestamp: number().meta(readingMeta("none")),
|
|
58383
|
+
seq: number().meta(readingMeta("count"))
|
|
58476
58384
|
});
|
|
58477
58385
|
object({
|
|
58478
58386
|
eventTypes: array(string()),
|
|
58479
58387
|
lastEvent: EventFireSchema.nullable(),
|
|
58480
|
-
eventCountSinceStart: number()
|
|
58388
|
+
eventCountSinceStart: number().meta(readingMeta("count"))
|
|
58481
58389
|
});
|
|
58482
58390
|
DeviceType.EventEmitter;
|
|
58483
58391
|
var IdentitySchema = object({
|
|
@@ -58866,10 +58774,10 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58866
58774
|
object({
|
|
58867
58775
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58868
58776
|
* speed surface (single-speed fan). */
|
|
58869
|
-
percentage: number().min(0).max(100).nullable(),
|
|
58777
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58870
58778
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58871
58779
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58872
|
-
percentageStep: number().positive().optional(),
|
|
58780
|
+
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
58873
58781
|
/** Active preset mode (`auto` / `quiet` / `turbo` / vendor-specific)
|
|
58874
58782
|
* — empty string when no preset is active or supported. */
|
|
58875
58783
|
preset: string(),
|
|
@@ -58951,7 +58859,7 @@ var FeatureProbeStatusSchema = object({
|
|
|
58951
58859
|
/** Camera/firmware model string. `null` when the firmware doesn't expose it. */
|
|
58952
58860
|
model: string().nullable(),
|
|
58953
58861
|
/** Channel count for NVR/Hub devices; `1` for standalone cameras; `null` pre-probe. */
|
|
58954
|
-
channelCount: number().nullable(),
|
|
58862
|
+
channelCount: number().nullable().meta(readingMeta("count")),
|
|
58955
58863
|
/**
|
|
58956
58864
|
* Ms epoch of the last SUCCESSFUL probe. `0` before the first probe
|
|
58957
58865
|
* completes — drivers' `getAccessoryChildren()` should treat zero as
|
|
@@ -58993,7 +58901,7 @@ object({
|
|
|
58993
58901
|
DeviceType.Sensor;
|
|
58994
58902
|
object({
|
|
58995
58903
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58996
|
-
position: number().min(0).max(100).nullable(),
|
|
58904
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58997
58905
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
58998
58906
|
lastFetchedAt: number()
|
|
58999
58907
|
});
|
|
@@ -59002,9 +58910,9 @@ object({
|
|
|
59002
58910
|
/** Whether the humidifier is currently on. */
|
|
59003
58911
|
on: boolean(),
|
|
59004
58912
|
/** Current measured relative humidity (0..100). Null when not reported. */
|
|
59005
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
58913
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
59006
58914
|
/** Target relative humidity (0..100). Null when no setpoint surface. */
|
|
59007
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
58915
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
59008
58916
|
/** Active mode (`auto` / `normal` / `baby` / vendor). Null when the
|
|
59009
58917
|
* device has no mode surface. */
|
|
59010
58918
|
mode: string().nullable(),
|
|
@@ -59014,9 +58922,9 @@ object({
|
|
|
59014
58922
|
* `idle` / `off`). Null when the device doesn't report it. */
|
|
59015
58923
|
action: string().nullable(),
|
|
59016
58924
|
/** HA `min_humidity` attribute. Null → UI uses 0. */
|
|
59017
|
-
minHumidity: number().nullable(),
|
|
58925
|
+
minHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
59018
58926
|
/** HA `max_humidity` attribute. Null → UI uses 100. */
|
|
59019
|
-
maxHumidity: number().nullable(),
|
|
58927
|
+
maxHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
59020
58928
|
/** Ms epoch when the slice was last updated. */
|
|
59021
58929
|
lastChangedAt: number()
|
|
59022
58930
|
});
|
|
@@ -59048,22 +58956,13 @@ DeviceType.Humidifier, method(object({
|
|
|
59048
58956
|
* `sourceInfo`.
|
|
59049
58957
|
*/
|
|
59050
58958
|
var HumiditySensorStatusSchema = object({
|
|
59051
|
-
/** Current relative humidity, 0..100. */
|
|
59052
|
-
percent: number().min(0).max(100).meta({
|
|
59053
|
-
|
|
58959
|
+
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58960
|
+
percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58961
|
+
precision: 0,
|
|
59054
58962
|
label: "Humidity"
|
|
59055
|
-
}),
|
|
58963
|
+
})),
|
|
59056
58964
|
/** Ms epoch when the slice was last updated. */
|
|
59057
|
-
lastFetchedAt: number()
|
|
59058
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
59059
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
59060
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
59061
|
-
unit: string().optional(),
|
|
59062
|
-
/** Suggested decimal places for numeric display.
|
|
59063
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
59064
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
59065
|
-
* auto-formatting when absent. */
|
|
59066
|
-
precision: number().int().min(0).max(10).optional()
|
|
58965
|
+
lastFetchedAt: number()
|
|
59067
58966
|
});
|
|
59068
58967
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
59069
58968
|
object({
|
|
@@ -59071,7 +58970,7 @@ object({
|
|
|
59071
58970
|
* entity exposes no `entity_picture` (yet). */
|
|
59072
58971
|
url: string().nullable(),
|
|
59073
58972
|
/** Ms epoch of the upstream last-updated timestamp. Null at cold-start. */
|
|
59074
|
-
lastUpdated: number().nullable()
|
|
58973
|
+
lastUpdated: number().nullable().meta(readingMeta("none"))
|
|
59075
58974
|
});
|
|
59076
58975
|
DeviceType.Image;
|
|
59077
58976
|
/**
|
|
@@ -59127,19 +59026,19 @@ var NormalizedRangeSchema = object({
|
|
|
59127
59026
|
});
|
|
59128
59027
|
object({
|
|
59129
59028
|
/** Normalized 0–100. */
|
|
59130
|
-
brightness: number().optional(),
|
|
59029
|
+
brightness: number().optional().meta(readingMeta("none")),
|
|
59131
59030
|
/** Normalized 0–100. */
|
|
59132
|
-
contrast: number().optional(),
|
|
59031
|
+
contrast: number().optional().meta(readingMeta("none")),
|
|
59133
59032
|
/** Normalized 0–100. */
|
|
59134
|
-
saturation: number().optional(),
|
|
59033
|
+
saturation: number().optional().meta(readingMeta("none")),
|
|
59135
59034
|
/** Normalized 0–100. */
|
|
59136
|
-
sharpness: number().optional(),
|
|
59035
|
+
sharpness: number().optional().meta(readingMeta("none")),
|
|
59137
59036
|
mirror: boolean().optional(),
|
|
59138
59037
|
flip: boolean().optional(),
|
|
59139
59038
|
rotate: ImageRotateSchema.optional(),
|
|
59140
59039
|
whiteBalance: WhiteBalanceModeSchema.optional(),
|
|
59141
59040
|
/** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
|
|
59142
|
-
warmth: number().optional(),
|
|
59041
|
+
warmth: number().optional().meta(readingMeta("none")),
|
|
59143
59042
|
exposureMode: ExposureModeSchema.optional(),
|
|
59144
59043
|
backlightMode: BacklightModeSchema.optional(),
|
|
59145
59044
|
lastFetchedAt: number()
|
|
@@ -59384,10 +59283,10 @@ var IntercomAbilitySchema = object({
|
|
|
59384
59283
|
/** Codecs accepted by firmware, in preference order. Driver-authored strings. */
|
|
59385
59284
|
codecs: array(string()),
|
|
59386
59285
|
/** Sample rate (Hz) the firmware expects. Reolink typical: 16000. */
|
|
59387
|
-
sampleRate: number(),
|
|
59286
|
+
sampleRate: number().meta(readingMeta("none")),
|
|
59388
59287
|
duplex: _enum(["half", "full"]),
|
|
59389
59288
|
/** Max in-flight audio backlog before drop (ms). Server uses this to bound latency. */
|
|
59390
|
-
maxBacklogMs: number()
|
|
59289
|
+
maxBacklogMs: number().meta(readingMeta("duration-ms"))
|
|
59391
59290
|
});
|
|
59392
59291
|
var IntercomStatusSchema = object({
|
|
59393
59292
|
/** True while a talk session is open. */
|
|
@@ -59498,13 +59397,13 @@ object({
|
|
|
59498
59397
|
activity: LawnMowerActivitySchema,
|
|
59499
59398
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
59500
59399
|
* reading. */
|
|
59501
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
59400
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59502
59401
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59503
59402
|
* task is active / progress is unavailable. */
|
|
59504
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
59403
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59505
59404
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59506
59405
|
* or null when unknown. */
|
|
59507
|
-
currentCode: number().nullable(),
|
|
59406
|
+
currentCode: number().nullable().meta(readingMeta("none")),
|
|
59508
59407
|
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
59509
59408
|
currentCodeLabel: string().nullable(),
|
|
59510
59409
|
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
@@ -59966,7 +59865,7 @@ object({
|
|
|
59966
59865
|
state: MediaPlayerStateSchema,
|
|
59967
59866
|
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
59968
59867
|
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
59969
|
-
volumeLevel: number().min(0).max(100).nullable(),
|
|
59868
|
+
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59970
59869
|
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
59971
59870
|
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
59972
59871
|
isMuted: boolean().nullable(),
|
|
@@ -59979,10 +59878,10 @@ object({
|
|
|
59979
59878
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59980
59879
|
/** Current playback position in ms. Null when not seekable or
|
|
59981
59880
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59982
|
-
positionMs: number().int().nonnegative().nullable(),
|
|
59881
|
+
positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59983
59882
|
/** Total duration of the current media in ms. Null when unknown
|
|
59984
59883
|
* (live stream) or nothing is playing. */
|
|
59985
|
-
durationMs: number().int().nonnegative().nullable(),
|
|
59884
|
+
durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59986
59885
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59987
59886
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59988
59887
|
shuffle: boolean().nullable(),
|
|
@@ -60282,7 +60181,7 @@ var MotionStatusSchema = object({
|
|
|
60282
60181
|
* it, every provider seeded it at boot, and every session left it
|
|
60283
60182
|
* `detected: true` after its detach.
|
|
60284
60183
|
*/
|
|
60285
|
-
autoClearAfterMs: number().nullable()
|
|
60184
|
+
autoClearAfterMs: number().nullable().meta(readingMeta("duration-ms"))
|
|
60286
60185
|
});
|
|
60287
60186
|
/**
|
|
60288
60187
|
* Payload of `motion.onMotionChanged` event + the corresponding bus
|
|
@@ -60332,7 +60231,7 @@ var MotionZoneRegionSchema = object({
|
|
|
60332
60231
|
});
|
|
60333
60232
|
object({
|
|
60334
60233
|
enabled: boolean(),
|
|
60335
|
-
sensitivity: number(),
|
|
60234
|
+
sensitivity: number().meta(readingMeta("none")),
|
|
60336
60235
|
/** Grid region(s). Today exactly one `grid` shape. */
|
|
60337
60236
|
regions: array(MotionZoneRegionSchema),
|
|
60338
60237
|
lastFetchedAt: number()
|
|
@@ -60636,7 +60535,7 @@ var NavigationStatusSchema = object({
|
|
|
60636
60535
|
following: boolean(),
|
|
60637
60536
|
flash: boolean(),
|
|
60638
60537
|
lightMode: NavigationLightModeSchema,
|
|
60639
|
-
lightLevel: number().min(40).max(100),
|
|
60538
|
+
lightLevel: number().min(40).max(100).meta(readingMeta("none")),
|
|
60640
60539
|
/** Ms epoch when the slice was last updated. */
|
|
60641
60540
|
lastChangedAt: number()
|
|
60642
60541
|
});
|
|
@@ -60682,13 +60581,13 @@ var NetworkLinkStatusSchema = object({
|
|
|
60682
60581
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60683
60582
|
* SKIP a null rather than coerce it.
|
|
60684
60583
|
*/
|
|
60685
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
60584
|
+
signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60686
60585
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60687
|
-
rssiDbm: number().optional(),
|
|
60586
|
+
rssiDbm: number().optional().meta(readingMeta("signal-level")),
|
|
60688
60587
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60689
60588
|
ssid: string().optional(),
|
|
60690
60589
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
60691
|
-
lastUpdated: number()
|
|
60590
|
+
lastUpdated: number().meta(readingMeta("none"))
|
|
60692
60591
|
});
|
|
60693
60592
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
60694
60593
|
deviceId: number(),
|
|
@@ -61007,7 +60906,7 @@ object({
|
|
|
61007
60906
|
lastError: string().nullable(),
|
|
61008
60907
|
/** Number of deliveries currently buffered server-side (rate-limited
|
|
61009
60908
|
* notifiers may queue). 0 when the provider sends synchronously. */
|
|
61010
|
-
queueDepth: number().int().nonnegative(),
|
|
60909
|
+
queueDepth: number().int().nonnegative().meta(readingMeta("count")),
|
|
61011
60910
|
/** Per-feature capability matrix — authoritative source for the
|
|
61012
60911
|
* compose-form field gating. */
|
|
61013
60912
|
supports: NotifierSupportsSchema
|
|
@@ -61057,15 +60956,8 @@ DeviceType.Notifier, method(NotifierSendInputSchema, NotifierSendResultSchema, {
|
|
|
61057
60956
|
acceptedAt: number()
|
|
61058
60957
|
});
|
|
61059
60958
|
object({
|
|
61060
|
-
|
|
61061
|
-
|
|
61062
|
-
* Populated live from the upstream source on each state push.
|
|
61063
|
-
* Absent for unitless sensors. */
|
|
61064
|
-
unit: string().optional(),
|
|
61065
|
-
/** Suggested decimal places for numeric display.
|
|
61066
|
-
* Populated live from the upstream source when provided.
|
|
61067
|
-
* Falls back to auto-formatting when absent. */
|
|
61068
|
-
precision: number().int().min(0).max(10).optional(),
|
|
60959
|
+
/** Reading in the device quantity's base unit. `null` when refused (D393). */
|
|
60960
|
+
value: number().nullable().meta(readingMeta("device")),
|
|
61069
60961
|
/** Ms epoch when the slice was last updated. */
|
|
61070
60962
|
lastFetchedAt: number()
|
|
61071
60963
|
});
|
|
@@ -61355,23 +61247,26 @@ object({
|
|
|
61355
61247
|
/** Food currently in the bowl (grams). Null when the device has not
|
|
61356
61248
|
* reported a reading yet. On dual-hopper models this is the combined
|
|
61357
61249
|
* bowl reading; per-hopper levels live in `food1`/`food2`. */
|
|
61358
|
-
foodLevel: number().nullable(),
|
|
61250
|
+
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
61359
61251
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61360
61252
|
* single-hopper models. */
|
|
61361
|
-
food1: number().nullable(),
|
|
61253
|
+
food1: number().nullable().meta(readingMeta("none")),
|
|
61362
61254
|
/** Hopper-2 food level (grams) on dual-hopper feeders; null on
|
|
61363
61255
|
* single-hopper models. */
|
|
61364
|
-
food2: number().nullable(),
|
|
61256
|
+
food2: number().nullable().meta(readingMeta("none")),
|
|
61365
61257
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61366
61258
|
* (`device_class: problem`, on = low). True when the bowl is empty /
|
|
61367
61259
|
* below the feeder's low threshold. */
|
|
61368
61260
|
lowFood: boolean(),
|
|
61369
61261
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
61370
61262
|
* device has no battery reading. */
|
|
61371
|
-
batteryPower: number().min(0).max(100).nullable(),
|
|
61372
|
-
/**
|
|
61373
|
-
*
|
|
61374
|
-
|
|
61263
|
+
batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61264
|
+
/**
|
|
61265
|
+
* Desiccant life remaining, stored in seconds (duration base, D944).
|
|
61266
|
+
* Providers convert from the days the feeder reports. Null when the
|
|
61267
|
+
* model has no desiccant sensor.
|
|
61268
|
+
*/
|
|
61269
|
+
desiccantLeftDays: number().nullable().meta(readingMeta("duration")),
|
|
61375
61270
|
/** True while a feed is in progress. */
|
|
61376
61271
|
feeding: boolean(),
|
|
61377
61272
|
/** Decoded connectivity / power status (HA petkit device-status enum).
|
|
@@ -61382,7 +61277,7 @@ object({
|
|
|
61382
61277
|
* with `errorCode` for consumers that want the raw integer. */
|
|
61383
61278
|
error: string().nullable(),
|
|
61384
61279
|
/** Raw device error code (0 / null = no error). */
|
|
61385
|
-
errorCode: number().nullable(),
|
|
61280
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
61386
61281
|
/** True for D4S/D4SH dual-hopper hardware — gates the per-hopper UI. */
|
|
61387
61282
|
isDualHopper: boolean(),
|
|
61388
61283
|
/** Child-lock (manual-lock) setting — buttons on the unit are disabled. */
|
|
@@ -61392,7 +61287,7 @@ object({
|
|
|
61392
61287
|
/** Play a chime when dispensing. */
|
|
61393
61288
|
feedSound: boolean(),
|
|
61394
61289
|
/** Speaker / prompt volume level (device-scaled integer). */
|
|
61395
|
-
volume: number(),
|
|
61290
|
+
volume: number().meta(readingMeta("none")),
|
|
61396
61291
|
/** Ms epoch when the slice was last refreshed from the cloud. */
|
|
61397
61292
|
lastFetchedAt: number()
|
|
61398
61293
|
});
|
|
@@ -61829,36 +61724,19 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61829
61724
|
});
|
|
61830
61725
|
object({
|
|
61831
61726
|
/** Instantaneous power draw in watts. */
|
|
61832
|
-
watts: number().optional().meta({
|
|
61833
|
-
unit: "W",
|
|
61834
|
-
label: "Power"
|
|
61835
|
-
}),
|
|
61727
|
+
watts: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61836
61728
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61837
|
-
kwhTotal: number().optional().meta({
|
|
61838
|
-
unit: "kWh",
|
|
61839
|
-
label: "Energy"
|
|
61840
|
-
}),
|
|
61729
|
+
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
61841
61730
|
/** Voltage in volts. */
|
|
61842
|
-
volts: number().optional(),
|
|
61731
|
+
volts: number().optional().meta(readingMeta("voltage")),
|
|
61843
61732
|
/** Current in amperes. */
|
|
61844
|
-
amps: number().optional(),
|
|
61845
|
-
/** Apparent power in volt-amperes
|
|
61846
|
-
va: number().optional(),
|
|
61733
|
+
amps: number().optional().meta(readingMeta("current")),
|
|
61734
|
+
/** Apparent power in volt-amperes. */
|
|
61735
|
+
va: number().optional().meta(readingMeta("apparent-power")),
|
|
61847
61736
|
/** Power factor (0..1) if reported. */
|
|
61848
|
-
powerFactor: number().min(0).max(1).optional(),
|
|
61737
|
+
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61849
61738
|
/** Ms epoch when the slice was last updated. */
|
|
61850
|
-
lastFetchedAt: number()
|
|
61851
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
61852
|
-
* `attributes.unit_of_measurement` → 'V' / 'A' / 'W' / 'kW' / 'kWh').
|
|
61853
|
-
* Each upstream `sensor.*` entity surfaces ONE device_class, so one
|
|
61854
|
-
* unit per slice is unambiguous. The UI prefers this over the role's
|
|
61855
|
-
* canonical unit so a 'kW' / 'Wh' feed renders verbatim. */
|
|
61856
|
-
unit: string().optional(),
|
|
61857
|
-
/** Suggested decimal places for numeric display.
|
|
61858
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
61859
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
61860
|
-
* auto-formatting when absent. */
|
|
61861
|
-
precision: number().int().min(0).max(10).optional()
|
|
61739
|
+
lastFetchedAt: number()
|
|
61862
61740
|
});
|
|
61863
61741
|
DeviceType.Sensor;
|
|
61864
61742
|
/**
|
|
@@ -61879,11 +61757,11 @@ DeviceType.Sensor;
|
|
|
61879
61757
|
*/
|
|
61880
61758
|
var GpsLocationSchema = object({
|
|
61881
61759
|
/** Latitude in decimal degrees, -90..90. */
|
|
61882
|
-
latitude: number().min(-90).max(90),
|
|
61760
|
+
latitude: number().min(-90).max(90).meta(readingMeta("angle")),
|
|
61883
61761
|
/** Longitude in decimal degrees, -180..180. */
|
|
61884
|
-
longitude: number().min(-180).max(180),
|
|
61762
|
+
longitude: number().min(-180).max(180).meta(readingMeta("angle")),
|
|
61885
61763
|
/** Reported accuracy in meters (lower = better). */
|
|
61886
|
-
accuracyMeters: number().nonnegative()
|
|
61764
|
+
accuracyMeters: number().nonnegative().meta(readingMeta("length"))
|
|
61887
61765
|
});
|
|
61888
61766
|
var PresenceStatusSchema = object({
|
|
61889
61767
|
/** `home` / `not_home` / any user-defined zone name. */
|
|
@@ -61895,25 +61773,16 @@ var PresenceStatusSchema = object({
|
|
|
61895
61773
|
gps: GpsLocationSchema.nullable(),
|
|
61896
61774
|
/** Optional battery level of the tracking device (0..100). Null
|
|
61897
61775
|
* when not reported. */
|
|
61898
|
-
batteryPercent: number().min(0).max(100).nullable(),
|
|
61776
|
+
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61899
61777
|
/** Ms epoch when the slice was last updated. */
|
|
61900
61778
|
lastChangedAt: number()
|
|
61901
61779
|
});
|
|
61902
61780
|
DeviceType.Presence;
|
|
61903
61781
|
object({
|
|
61904
|
-
/** Current pressure in hPa. */
|
|
61905
|
-
hpa: number(),
|
|
61782
|
+
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61783
|
+
hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61906
61784
|
/** Ms epoch when the slice was last updated. */
|
|
61907
|
-
lastFetchedAt: number()
|
|
61908
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
61909
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
61910
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
61911
|
-
unit: string().optional(),
|
|
61912
|
-
/** Suggested decimal places for numeric display.
|
|
61913
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
61914
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
61915
|
-
* auto-formatting when absent. */
|
|
61916
|
-
precision: number().int().min(0).max(10).optional()
|
|
61785
|
+
lastFetchedAt: number()
|
|
61917
61786
|
});
|
|
61918
61787
|
DeviceType.Sensor;
|
|
61919
61788
|
/**
|
|
@@ -62246,8 +62115,8 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
62246
62115
|
}), _void(), { kind: "mutation" });
|
|
62247
62116
|
var PtzAutotrackSettingsSchema = object({
|
|
62248
62117
|
targetType: string().describe("Vendor target string (people/vehicle/pet); empty = camera default"),
|
|
62249
|
-
stopDelaySeconds: number().int().min(0).max(300),
|
|
62250
|
-
disappearDelaySeconds: number().int().min(0).max(300)
|
|
62118
|
+
stopDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration")),
|
|
62119
|
+
disappearDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration"))
|
|
62251
62120
|
});
|
|
62252
62121
|
/**
|
|
62253
62122
|
* One option the camera advertises as a valid `targetType`. Drivers
|
|
@@ -62304,7 +62173,7 @@ object({
|
|
|
62304
62173
|
/** null = unknown — never coerced to false (D393). */
|
|
62305
62174
|
running: boolean().nullable(),
|
|
62306
62175
|
/** Epoch ms the current boolean began; null while `running` is null. */
|
|
62307
|
-
since: number().nullable(),
|
|
62176
|
+
since: number().nullable().meta(readingMeta("none")),
|
|
62308
62177
|
source: RunningStateSourceSchema.meta({ label: "Source" }),
|
|
62309
62178
|
phase: string().nullable(),
|
|
62310
62179
|
/** null until a reading has been published (D393). */
|
|
@@ -63502,9 +63371,9 @@ var RecordTriggerSchema = _enum([
|
|
|
63502
63371
|
*/
|
|
63503
63372
|
var RecordWindowSchema = object({
|
|
63504
63373
|
trigger: RecordTriggerSchema,
|
|
63505
|
-
day: number().int().min(0).max(6),
|
|
63506
|
-
startMinute: number().int().min(0).max(1439),
|
|
63507
|
-
endMinute: number().int().min(1).max(1440)
|
|
63374
|
+
day: number().int().min(0).max(6).meta(readingMeta("none")),
|
|
63375
|
+
startMinute: number().int().min(0).max(1439).meta(readingMeta("none")),
|
|
63376
|
+
endMinute: number().int().min(1).max(1440).meta(readingMeta("none"))
|
|
63508
63377
|
});
|
|
63509
63378
|
/** Status of one physical volume, as the camera itself describes it. */
|
|
63510
63379
|
var OnboardStorageVolumeSchema = object({
|
|
@@ -63573,10 +63442,10 @@ object({
|
|
|
63573
63442
|
/** Master "record to the card at all" switch. */
|
|
63574
63443
|
enabled: boolean().nullable(),
|
|
63575
63444
|
overwriteWhenFull: boolean().nullable(),
|
|
63576
|
-
preRecordSec: number().nullable(),
|
|
63577
|
-
postRecordSec: number().nullable(),
|
|
63445
|
+
preRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
63446
|
+
postRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
63578
63447
|
/** Length of one recorded file, in minutes. */
|
|
63579
|
-
segmentMinutes: number().nullable(),
|
|
63448
|
+
segmentMinutes: number().nullable().meta(readingMeta("none")),
|
|
63580
63449
|
/** The primary track's weekly windows, flattened. */
|
|
63581
63450
|
windows: array(RecordWindowSchema),
|
|
63582
63451
|
/**
|
|
@@ -63592,7 +63461,7 @@ object({
|
|
|
63592
63461
|
* provider reporting a non-zero count also reports the schedule as not
|
|
63593
63462
|
* writable.
|
|
63594
63463
|
*/
|
|
63595
|
-
unreadableWindows: number(),
|
|
63464
|
+
unreadableWindows: number().meta(readingMeta("count")),
|
|
63596
63465
|
/**
|
|
63597
63466
|
* The camera is scheduled to record and has NO usable storage.
|
|
63598
63467
|
*
|
|
@@ -64238,7 +64107,7 @@ var CamStreamDescriptorSchema = object({
|
|
|
64238
64107
|
url: string().optional(),
|
|
64239
64108
|
codec: string().optional(),
|
|
64240
64109
|
resolution: CamStreamResolutionSchema.optional(),
|
|
64241
|
-
fps: number().positive().optional(),
|
|
64110
|
+
fps: number().positive().optional().meta(readingMeta("rate")),
|
|
64242
64111
|
label: string().optional(),
|
|
64243
64112
|
/** Device-level features (e.g. `battery-operated`) — drives broker policy. */
|
|
64244
64113
|
deviceFeatures: array(string()).optional(),
|
|
@@ -64268,18 +64137,18 @@ var StreamProfileSchema = _enum([
|
|
|
64268
64137
|
]);
|
|
64269
64138
|
/** The current encoding config of one stream profile. */
|
|
64270
64139
|
var StreamProfileConfigSchema = object({
|
|
64271
|
-
width: number(),
|
|
64272
|
-
height: number(),
|
|
64140
|
+
width: number().meta(readingMeta("none")),
|
|
64141
|
+
height: number().meta(readingMeta("none")),
|
|
64273
64142
|
codec: _enum(["h264", "h265"]),
|
|
64274
|
-
framerate: number(),
|
|
64275
|
-
bitrate: number(),
|
|
64143
|
+
framerate: number().meta(readingMeta("rate")),
|
|
64144
|
+
bitrate: number().meta(readingMeta("bitrate")),
|
|
64276
64145
|
bitrateMode: _enum(["vbr", "cbr"]).optional(),
|
|
64277
64146
|
encoderProfile: _enum([
|
|
64278
64147
|
"high",
|
|
64279
64148
|
"main",
|
|
64280
64149
|
"baseline"
|
|
64281
64150
|
]).optional(),
|
|
64282
|
-
gop: number().optional(),
|
|
64151
|
+
gop: number().optional().meta(readingMeta("none")),
|
|
64283
64152
|
/**
|
|
64284
64153
|
* Whether THIS profile currently carries an audio track. READ-ONLY here.
|
|
64285
64154
|
*
|
|
@@ -64926,35 +64795,21 @@ DeviceType.Sensor;
|
|
|
64926
64795
|
* entries with `device_class: temperature` and any future native
|
|
64927
64796
|
* thermometer.
|
|
64928
64797
|
*
|
|
64929
|
-
*
|
|
64930
|
-
*
|
|
64931
|
-
* (climate-control's `currentTemp`, energy analytics) can compose
|
|
64932
|
-
* without per-source unit fixups. The canonical display unit (`°C`) is
|
|
64933
|
-
* a descriptor constant in the UI (ROLE_DESCRIPTOR), not stored in
|
|
64934
|
-
* `sourceInfo`.
|
|
64798
|
+
* The number is Celsius (D944). Providers convert on ingest. A failed
|
|
64799
|
+
* conversion is `null`, never a guess. Display unit is a read-time preference.
|
|
64935
64800
|
*
|
|
64936
64801
|
* Status `lastFetchedAt` lets staleness-aware consumers detect a
|
|
64937
64802
|
* frozen feed (provider hung) distinct from a "temperature hasn't
|
|
64938
64803
|
* changed" steady state.
|
|
64939
64804
|
*/
|
|
64940
64805
|
var TemperatureSensorStatusSchema = object({
|
|
64941
|
-
/** Current temperature in Celsius. */
|
|
64942
|
-
celsius: number().meta({
|
|
64943
|
-
|
|
64806
|
+
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64807
|
+
celsius: number().nullable().meta(readingMeta("temperature", {
|
|
64808
|
+
precision: 1,
|
|
64944
64809
|
label: "Temperature"
|
|
64945
|
-
}),
|
|
64810
|
+
})),
|
|
64946
64811
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
64947
|
-
lastFetchedAt: number()
|
|
64948
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
64949
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
64950
|
-
* role's canonical unit, so a Fahrenheit feed renders '°F' not '°C'.
|
|
64951
|
-
* Absent → the UI falls back to the role's canonical unit. */
|
|
64952
|
-
unit: string().optional(),
|
|
64953
|
-
/** Suggested decimal places for numeric display.
|
|
64954
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
64955
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
64956
|
-
* auto-formatting when absent. */
|
|
64957
|
-
precision: number().int().min(0).max(10).optional()
|
|
64812
|
+
lastFetchedAt: number()
|
|
64958
64813
|
});
|
|
64959
64814
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
64960
64815
|
/**
|
|
@@ -65206,16 +65061,16 @@ object({
|
|
|
65206
65061
|
]),
|
|
65207
65062
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
65208
65063
|
* reading. */
|
|
65209
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
65064
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65210
65065
|
/** Current fan-speed token (provider-verbatim). Null when unknown or
|
|
65211
65066
|
* the vacuum has no speed control. */
|
|
65212
65067
|
fanSpeed: string().nullable(),
|
|
65213
65068
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
65214
65069
|
availableFanSpeeds: array(string()),
|
|
65215
65070
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
65216
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
65071
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65217
65072
|
/** Current error code (0 / null = no error). */
|
|
65218
|
-
errorCode: number().nullable(),
|
|
65073
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65219
65074
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
65220
65075
|
errorLabel: string().nullable(),
|
|
65221
65076
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -65254,7 +65109,7 @@ object({
|
|
|
65254
65109
|
]),
|
|
65255
65110
|
/** 0 = fully closed, 100 = fully open. Null when the device has no
|
|
65256
65111
|
* intermediate position surface. */
|
|
65257
|
-
position: number().min(0).max(100).nullable(),
|
|
65112
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65258
65113
|
/** Ms epoch when the slice was last updated. */
|
|
65259
65114
|
lastChangedAt: number()
|
|
65260
65115
|
});
|
|
@@ -65282,9 +65137,9 @@ object({
|
|
|
65282
65137
|
DeviceType.Sensor;
|
|
65283
65138
|
object({
|
|
65284
65139
|
/** Current measured temperature. Null when not reported. */
|
|
65285
|
-
currentTemp: number().nullable(),
|
|
65140
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65286
65141
|
/** Target temperature setpoint. Null when no setpoint surface. */
|
|
65287
|
-
targetTemp: number().nullable(),
|
|
65142
|
+
targetTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65288
65143
|
/** Active operation mode = HA `state` (`eco` / `electric` / `gas` /
|
|
65289
65144
|
* `heat_pump` / `high_demand` / `performance` / `off`). Null when the
|
|
65290
65145
|
* device reports an unknown state. */
|
|
@@ -65295,9 +65150,9 @@ object({
|
|
|
65295
65150
|
* has no away surface. */
|
|
65296
65151
|
away: boolean().nullable(),
|
|
65297
65152
|
/** HA `min_temp` attribute. Null when not reported. */
|
|
65298
|
-
minTemp: number().nullable(),
|
|
65153
|
+
minTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65299
65154
|
/** HA `max_temp` attribute. Null when not reported. */
|
|
65300
|
-
maxTemp: number().nullable(),
|
|
65155
|
+
maxTemp: number().nullable().meta(readingMeta("temperature")),
|
|
65301
65156
|
/** Ms epoch when the slice was last updated. */
|
|
65302
65157
|
lastChangedAt: number()
|
|
65303
65158
|
});
|
|
@@ -65321,25 +65176,18 @@ DeviceType.WaterHeater, method(object({
|
|
|
65321
65176
|
auth: "protected"
|
|
65322
65177
|
});
|
|
65323
65178
|
object({
|
|
65324
|
-
/** Verbatim
|
|
65325
|
-
* when no condition has been reported yet. */
|
|
65179
|
+
/** Verbatim condition state (`sunny`, `cloudy`, `rainy`, …). Null when none yet. */
|
|
65326
65180
|
condition: string().nullable(),
|
|
65327
|
-
/** Current temperature in
|
|
65328
|
-
temperature: number().nullable(),
|
|
65329
|
-
/** Temperature unit string (e.g. `°C` / `°F`). Null when not provided. */
|
|
65330
|
-
temperatureUnit: string().nullable(),
|
|
65181
|
+
/** Current temperature in Celsius. Null when not provided or refused. */
|
|
65182
|
+
temperature: number().nullable().meta(readingMeta("temperature", { precision: 1 })),
|
|
65331
65183
|
/** Relative humidity (0..100). Null when not provided. */
|
|
65332
|
-
humidity: number().min(0).max(100).nullable(),
|
|
65333
|
-
/** Barometric pressure in
|
|
65334
|
-
pressure: number().nullable(),
|
|
65335
|
-
/**
|
|
65336
|
-
|
|
65337
|
-
/** Wind speed in the reported unit. Null when not provided. */
|
|
65338
|
-
windSpeed: number().nullable(),
|
|
65339
|
-
/** Wind-speed unit string (e.g. `km/h` / `mph`). Null when not provided. */
|
|
65340
|
-
windSpeedUnit: string().nullable(),
|
|
65184
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
65185
|
+
/** Barometric pressure in hPa. Null when not provided or refused. */
|
|
65186
|
+
pressure: number().nullable().meta(readingMeta("pressure")),
|
|
65187
|
+
/** Wind speed in metres per second. Null when not provided or refused. */
|
|
65188
|
+
windSpeed: number().nullable().meta(readingMeta("speed")),
|
|
65341
65189
|
/** Wind bearing in degrees (0..360, meteorological). Null when not provided. */
|
|
65342
|
-
windBearing: number().nullable(),
|
|
65190
|
+
windBearing: number().nullable().meta(readingMeta("angle")),
|
|
65343
65191
|
/** Ms epoch when the slice was last updated. */
|
|
65344
65192
|
lastFetchedAt: number()
|
|
65345
65193
|
});
|
|
@@ -79214,7 +79062,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79214
79062
|
field: "value",
|
|
79215
79063
|
quantity: t("the reading", "il valore"),
|
|
79216
79064
|
label: t("Reading", "Valore"),
|
|
79217
|
-
unitField: "unit",
|
|
79218
79065
|
icon: "gauge"
|
|
79219
79066
|
}]
|
|
79220
79067
|
},
|
|
@@ -79350,7 +79197,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79350
79197
|
field: "temperature",
|
|
79351
79198
|
quantity: t("the outdoor temperature", "la temperatura esterna"),
|
|
79352
79199
|
label: t("Temperature", "Temperatura"),
|
|
79353
|
-
|
|
79200
|
+
unit: "°C",
|
|
79354
79201
|
icon: "thermometer"
|
|
79355
79202
|
},
|
|
79356
79203
|
{
|
|
@@ -79366,7 +79213,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79366
79213
|
field: "windSpeed",
|
|
79367
79214
|
quantity: t("the wind speed", "la velocità del vento"),
|
|
79368
79215
|
label: t("Wind", "Vento"),
|
|
79369
|
-
|
|
79216
|
+
unit: "m/s",
|
|
79370
79217
|
icon: "wind"
|
|
79371
79218
|
},
|
|
79372
79219
|
{
|
|
@@ -79374,7 +79221,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79374
79221
|
field: "pressure",
|
|
79375
79222
|
quantity: t("the air pressure", "la pressione atmosferica"),
|
|
79376
79223
|
label: t("Pressure", "Pressione"),
|
|
79377
|
-
|
|
79224
|
+
unit: "hPa",
|
|
79378
79225
|
icon: "gauge"
|
|
79379
79226
|
}
|
|
79380
79227
|
]
|
|
@@ -82511,6 +82358,11 @@ var PulseOverrideDraftSchema = object({
|
|
|
82511
82358
|
targetId: string().min(1),
|
|
82512
82359
|
enabled: boolean(),
|
|
82513
82360
|
debounceMs: number().nonnegative(),
|
|
82361
|
+
edges: array(_enum([
|
|
82362
|
+
"rising",
|
|
82363
|
+
"button",
|
|
82364
|
+
"native-event"
|
|
82365
|
+
])).min(1).optional(),
|
|
82514
82366
|
sources: array(OverrideSourceSchema).min(1)
|
|
82515
82367
|
});
|
|
82516
82368
|
var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
|
|
@@ -133730,7 +133582,7 @@ var SENSOR_SPECS = {
|
|
|
133730
133582
|
addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.TemperatureSensor, name, subtype),
|
|
133731
133583
|
getStatus: (proxy) => proxy.temperatureSensor?.getStatus({}),
|
|
133732
133584
|
subscribe: (proxy, onValue) => proxy.state.temperatureSensor?.subscribe(onValue) ?? null,
|
|
133733
|
-
read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => [{
|
|
133585
|
+
read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => status.celsius === null ? [] : [{
|
|
133734
133586
|
characteristic: import_dist.Characteristic.CurrentTemperature,
|
|
133735
133587
|
value: status.celsius
|
|
133736
133588
|
}])
|
|
@@ -133740,7 +133592,7 @@ var SENSOR_SPECS = {
|
|
|
133740
133592
|
addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.HumiditySensor, name, subtype),
|
|
133741
133593
|
getStatus: (proxy) => proxy.humiditySensor?.getStatus({}),
|
|
133742
133594
|
subscribe: (proxy, onValue) => proxy.state.humiditySensor?.subscribe(onValue) ?? null,
|
|
133743
|
-
read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => [{
|
|
133595
|
+
read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => status.percent === null ? [] : [{
|
|
133744
133596
|
characteristic: import_dist.Characteristic.CurrentRelativeHumidity,
|
|
133745
133597
|
value: status.percent
|
|
133746
133598
|
}])
|
|
@@ -133750,7 +133602,7 @@ var SENSOR_SPECS = {
|
|
|
133750
133602
|
addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.LightSensor, name, subtype),
|
|
133751
133603
|
getStatus: (proxy) => proxy.ambientLightSensor?.getStatus({}),
|
|
133752
133604
|
subscribe: (proxy, onValue) => proxy.state.ambientLightSensor?.subscribe(onValue) ?? null,
|
|
133753
|
-
read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => [{
|
|
133605
|
+
read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => status.lux === null ? [] : [{
|
|
133754
133606
|
characteristic: import_dist.Characteristic.CurrentAmbientLightLevel,
|
|
133755
133607
|
value: Math.max(MIN_LUX, status.lux)
|
|
133756
133608
|
}])
|