@camstack/addon-export-alexa 1.2.168 → 1.2.169
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/export-alexa.addon.js +281 -432
- package/dist/export-alexa.addon.mjs +281 -432
- package/package.json +1 -1
|
@@ -5469,7 +5469,7 @@ var ZodIssueCode = {
|
|
|
5469
5469
|
var ZodFirstPartyTypeKind;
|
|
5470
5470
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5471
5471
|
//#endregion
|
|
5472
|
-
//#region ../types/dist/sleep-
|
|
5472
|
+
//#region ../types/dist/sleep-CARd6wZF.mjs
|
|
5473
5473
|
/**
|
|
5474
5474
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5475
5475
|
* window to float samples (D455).
|
|
@@ -7956,6 +7956,52 @@ var RecordKindDeclarationSchema = object({
|
|
|
7956
7956
|
}).strict();
|
|
7957
7957
|
/** The kind names: lower-case, dash separated, short enough for an index name. */
|
|
7958
7958
|
var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
7959
|
+
var READING_QUANTITIES = [
|
|
7960
|
+
"temperature",
|
|
7961
|
+
"pressure",
|
|
7962
|
+
"speed",
|
|
7963
|
+
"precipitation",
|
|
7964
|
+
"precipitation-rate",
|
|
7965
|
+
"length",
|
|
7966
|
+
"area",
|
|
7967
|
+
"illuminance",
|
|
7968
|
+
"irradiance",
|
|
7969
|
+
"power",
|
|
7970
|
+
"energy",
|
|
7971
|
+
"voltage",
|
|
7972
|
+
"current",
|
|
7973
|
+
"apparent-power",
|
|
7974
|
+
"humidity",
|
|
7975
|
+
"percentage",
|
|
7976
|
+
"concentration-volume",
|
|
7977
|
+
"concentration-mass",
|
|
7978
|
+
"concentration-ppb",
|
|
7979
|
+
"volume",
|
|
7980
|
+
"duration",
|
|
7981
|
+
"duration-ms",
|
|
7982
|
+
"information",
|
|
7983
|
+
"sound-level",
|
|
7984
|
+
"signal-level",
|
|
7985
|
+
"colour-temperature",
|
|
7986
|
+
"angle",
|
|
7987
|
+
"bitrate",
|
|
7988
|
+
"rate",
|
|
7989
|
+
"mass",
|
|
7990
|
+
"index",
|
|
7991
|
+
"ratio",
|
|
7992
|
+
"count",
|
|
7993
|
+
"none",
|
|
7994
|
+
"device"
|
|
7995
|
+
];
|
|
7996
|
+
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
7997
|
+
new Set(READING_QUANTITIES);
|
|
7998
|
+
function readingMeta(quantity, extras) {
|
|
7999
|
+
return {
|
|
8000
|
+
quantity,
|
|
8001
|
+
...extras?.precision !== void 0 ? { precision: extras.precision } : {},
|
|
8002
|
+
...extras?.label !== void 0 ? { label: extras.label } : {}
|
|
8003
|
+
};
|
|
8004
|
+
}
|
|
7959
8005
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7960
8006
|
var CamProfileSchema = _enum([
|
|
7961
8007
|
"high",
|
|
@@ -7983,8 +8029,8 @@ var CamStreamKindSchema = _enum([
|
|
|
7983
8029
|
"derived"
|
|
7984
8030
|
]);
|
|
7985
8031
|
var CamStreamResolutionSchema = object({
|
|
7986
|
-
width: number().int().positive(),
|
|
7987
|
-
height: number().int().positive()
|
|
8032
|
+
width: number().int().positive().meta(readingMeta("none")),
|
|
8033
|
+
height: number().int().positive().meta(readingMeta("none"))
|
|
7988
8034
|
});
|
|
7989
8035
|
var CameraStreamSchema = object({
|
|
7990
8036
|
/** Stable, provider-assigned id unique within the (deviceId) scope. */
|
|
@@ -8649,14 +8695,6 @@ Object.freeze({
|
|
|
8649
8695
|
{
|
|
8650
8696
|
"path": "aqi",
|
|
8651
8697
|
"valueType": "number"
|
|
8652
|
-
},
|
|
8653
|
-
{
|
|
8654
|
-
"path": "unit",
|
|
8655
|
-
"valueType": "string"
|
|
8656
|
-
},
|
|
8657
|
-
{
|
|
8658
|
-
"path": "precision",
|
|
8659
|
-
"valueType": "number"
|
|
8660
8698
|
}
|
|
8661
8699
|
],
|
|
8662
8700
|
"alarm-panel": [
|
|
@@ -8692,20 +8730,10 @@ Object.freeze({
|
|
|
8692
8730
|
"valueType": "boolean"
|
|
8693
8731
|
}
|
|
8694
8732
|
],
|
|
8695
|
-
"ambient-light-sensor": [
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
},
|
|
8700
|
-
{
|
|
8701
|
-
"path": "unit",
|
|
8702
|
-
"valueType": "string"
|
|
8703
|
-
},
|
|
8704
|
-
{
|
|
8705
|
-
"path": "precision",
|
|
8706
|
-
"valueType": "number"
|
|
8707
|
-
}
|
|
8708
|
-
],
|
|
8733
|
+
"ambient-light-sensor": [{
|
|
8734
|
+
"path": "lux",
|
|
8735
|
+
"valueType": "number"
|
|
8736
|
+
}],
|
|
8709
8737
|
"audio-metrics": [
|
|
8710
8738
|
{
|
|
8711
8739
|
"path": "ts",
|
|
@@ -8785,6 +8813,10 @@ Object.freeze({
|
|
|
8785
8813
|
"path": "lastUpdated",
|
|
8786
8814
|
"valueType": "number"
|
|
8787
8815
|
},
|
|
8816
|
+
{
|
|
8817
|
+
"path": "volts",
|
|
8818
|
+
"valueType": "number"
|
|
8819
|
+
},
|
|
8788
8820
|
{
|
|
8789
8821
|
"path": "lastContactAt",
|
|
8790
8822
|
"valueType": "number"
|
|
@@ -9027,10 +9059,6 @@ Object.freeze({
|
|
|
9027
9059
|
"datetime"
|
|
9028
9060
|
]
|
|
9029
9061
|
},
|
|
9030
|
-
{
|
|
9031
|
-
"path": "unit",
|
|
9032
|
-
"valueType": "string"
|
|
9033
|
-
},
|
|
9034
9062
|
{
|
|
9035
9063
|
"path": "min",
|
|
9036
9064
|
"valueType": "number"
|
|
@@ -9042,19 +9070,6 @@ Object.freeze({
|
|
|
9042
9070
|
{
|
|
9043
9071
|
"path": "step",
|
|
9044
9072
|
"valueType": "number"
|
|
9045
|
-
},
|
|
9046
|
-
{
|
|
9047
|
-
"path": "precision",
|
|
9048
|
-
"valueType": "number"
|
|
9049
|
-
},
|
|
9050
|
-
{
|
|
9051
|
-
"path": "format",
|
|
9052
|
-
"valueType": "enum",
|
|
9053
|
-
"enumValues": [
|
|
9054
|
-
"date",
|
|
9055
|
-
"time",
|
|
9056
|
-
"datetime"
|
|
9057
|
-
]
|
|
9058
9073
|
}
|
|
9059
9074
|
],
|
|
9060
9075
|
"cover": [
|
|
@@ -9295,13 +9310,8 @@ Object.freeze({
|
|
|
9295
9310
|
"path": "value",
|
|
9296
9311
|
"valueType": "string"
|
|
9297
9312
|
}, {
|
|
9298
|
-
"path": "
|
|
9299
|
-
"valueType": "
|
|
9300
|
-
"enumValues": [
|
|
9301
|
-
"date",
|
|
9302
|
-
"time",
|
|
9303
|
-
"datetime"
|
|
9304
|
-
]
|
|
9313
|
+
"path": "timestamp",
|
|
9314
|
+
"valueType": "boolean"
|
|
9305
9315
|
}],
|
|
9306
9316
|
"event-emitter": [
|
|
9307
9317
|
{
|
|
@@ -9408,20 +9418,10 @@ Object.freeze({
|
|
|
9408
9418
|
"valueType": "number"
|
|
9409
9419
|
}
|
|
9410
9420
|
],
|
|
9411
|
-
"humidity-sensor": [
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
},
|
|
9416
|
-
{
|
|
9417
|
-
"path": "unit",
|
|
9418
|
-
"valueType": "string"
|
|
9419
|
-
},
|
|
9420
|
-
{
|
|
9421
|
-
"path": "precision",
|
|
9422
|
-
"valueType": "number"
|
|
9423
|
-
}
|
|
9424
|
-
],
|
|
9421
|
+
"humidity-sensor": [{
|
|
9422
|
+
"path": "percent",
|
|
9423
|
+
"valueType": "number"
|
|
9424
|
+
}],
|
|
9425
9425
|
"image": [{
|
|
9426
9426
|
"path": "url",
|
|
9427
9427
|
"valueType": "string"
|
|
@@ -9760,20 +9760,10 @@ Object.freeze({
|
|
|
9760
9760
|
"valueType": "boolean"
|
|
9761
9761
|
}
|
|
9762
9762
|
],
|
|
9763
|
-
"numeric-sensor": [
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
},
|
|
9768
|
-
{
|
|
9769
|
-
"path": "unit",
|
|
9770
|
-
"valueType": "string"
|
|
9771
|
-
},
|
|
9772
|
-
{
|
|
9773
|
-
"path": "precision",
|
|
9774
|
-
"valueType": "number"
|
|
9775
|
-
}
|
|
9776
|
-
],
|
|
9763
|
+
"numeric-sensor": [{
|
|
9764
|
+
"path": "value",
|
|
9765
|
+
"valueType": "number"
|
|
9766
|
+
}],
|
|
9777
9767
|
"pet-feeder": [
|
|
9778
9768
|
{
|
|
9779
9769
|
"path": "foodLevel",
|
|
@@ -9865,14 +9855,6 @@ Object.freeze({
|
|
|
9865
9855
|
{
|
|
9866
9856
|
"path": "powerFactor",
|
|
9867
9857
|
"valueType": "number"
|
|
9868
|
-
},
|
|
9869
|
-
{
|
|
9870
|
-
"path": "unit",
|
|
9871
|
-
"valueType": "string"
|
|
9872
|
-
},
|
|
9873
|
-
{
|
|
9874
|
-
"path": "precision",
|
|
9875
|
-
"valueType": "number"
|
|
9876
9858
|
}
|
|
9877
9859
|
],
|
|
9878
9860
|
"presence": [
|
|
@@ -9901,20 +9883,10 @@ Object.freeze({
|
|
|
9901
9883
|
"valueType": "number"
|
|
9902
9884
|
}
|
|
9903
9885
|
],
|
|
9904
|
-
"pressure-sensor": [
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
},
|
|
9909
|
-
{
|
|
9910
|
-
"path": "unit",
|
|
9911
|
-
"valueType": "string"
|
|
9912
|
-
},
|
|
9913
|
-
{
|
|
9914
|
-
"path": "precision",
|
|
9915
|
-
"valueType": "number"
|
|
9916
|
-
}
|
|
9917
|
-
],
|
|
9886
|
+
"pressure-sensor": [{
|
|
9887
|
+
"path": "hpa",
|
|
9888
|
+
"valueType": "number"
|
|
9889
|
+
}],
|
|
9918
9890
|
"privacy-mask": [{
|
|
9919
9891
|
"path": "enabled",
|
|
9920
9892
|
"valueType": "boolean"
|
|
@@ -10225,20 +10197,10 @@ Object.freeze({
|
|
|
10225
10197
|
"path": "tampered",
|
|
10226
10198
|
"valueType": "boolean"
|
|
10227
10199
|
}],
|
|
10228
|
-
"temperature-sensor": [
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
},
|
|
10233
|
-
{
|
|
10234
|
-
"path": "unit",
|
|
10235
|
-
"valueType": "string"
|
|
10236
|
-
},
|
|
10237
|
-
{
|
|
10238
|
-
"path": "precision",
|
|
10239
|
-
"valueType": "number"
|
|
10240
|
-
}
|
|
10241
|
-
],
|
|
10200
|
+
"temperature-sensor": [{
|
|
10201
|
+
"path": "celsius",
|
|
10202
|
+
"valueType": "number"
|
|
10203
|
+
}],
|
|
10242
10204
|
"update": [
|
|
10243
10205
|
{
|
|
10244
10206
|
"path": "currentVersion",
|
|
@@ -10349,10 +10311,6 @@ Object.freeze({
|
|
|
10349
10311
|
"path": "temperature",
|
|
10350
10312
|
"valueType": "number"
|
|
10351
10313
|
},
|
|
10352
|
-
{
|
|
10353
|
-
"path": "temperatureUnit",
|
|
10354
|
-
"valueType": "string"
|
|
10355
|
-
},
|
|
10356
10314
|
{
|
|
10357
10315
|
"path": "humidity",
|
|
10358
10316
|
"valueType": "number"
|
|
@@ -10361,18 +10319,10 @@ Object.freeze({
|
|
|
10361
10319
|
"path": "pressure",
|
|
10362
10320
|
"valueType": "number"
|
|
10363
10321
|
},
|
|
10364
|
-
{
|
|
10365
|
-
"path": "pressureUnit",
|
|
10366
|
-
"valueType": "string"
|
|
10367
|
-
},
|
|
10368
10322
|
{
|
|
10369
10323
|
"path": "windSpeed",
|
|
10370
10324
|
"valueType": "number"
|
|
10371
10325
|
},
|
|
10372
|
-
{
|
|
10373
|
-
"path": "windSpeedUnit",
|
|
10374
|
-
"valueType": "string"
|
|
10375
|
-
},
|
|
10376
10326
|
{
|
|
10377
10327
|
"path": "windBearing",
|
|
10378
10328
|
"valueType": "number"
|
|
@@ -18036,7 +17986,8 @@ var CompositionProblemSchema = object({
|
|
|
18036
17986
|
"item-field-reserved",
|
|
18037
17987
|
"target-missing",
|
|
18038
17988
|
"target-unreadable",
|
|
18039
|
-
"not-replaceable"
|
|
17989
|
+
"not-replaceable",
|
|
17990
|
+
"native-capability-replace"
|
|
18040
17991
|
]),
|
|
18041
17992
|
path: string(),
|
|
18042
17993
|
message: string()
|
|
@@ -18094,9 +18045,11 @@ var CompositionFieldPlanSchema = object({
|
|
|
18094
18045
|
reads: array(CompositionFieldReadSchema)
|
|
18095
18046
|
});
|
|
18096
18047
|
/**
|
|
18097
|
-
* What a feature does to its target (D663): `new` builds a capability on a
|
|
18098
|
-
* device; on an existing device it `add`s a capability the device lacks
|
|
18099
|
-
*
|
|
18048
|
+
* What a feature does to its target (D663, D944): `new` builds a capability on a
|
|
18049
|
+
* new device; on an existing device it `add`s a capability the device lacks.
|
|
18050
|
+
* Replacing a capability the device already serves is refused
|
|
18051
|
+
* (`native-capability-replace`), not planned. `replace` remains on the claim
|
|
18052
|
+
* wire for a claim the hub already holds.
|
|
18100
18053
|
*/
|
|
18101
18054
|
var CompositionFeatureModeSchema = _enum([
|
|
18102
18055
|
"new",
|
|
@@ -19982,12 +19935,12 @@ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema
|
|
|
19982
19935
|
* providers detect renames by matching `uniqueId` and patch `id`
|
|
19983
19936
|
* in-place so dispatch keeps working.
|
|
19984
19937
|
*
|
|
19985
|
-
* **
|
|
19986
|
-
*
|
|
19987
|
-
*
|
|
19988
|
-
*
|
|
19989
|
-
* (`ha-domain-mapping`)
|
|
19990
|
-
* stored after that point.
|
|
19938
|
+
* **Display unit and precision are NOT stored here.** They are a read-time
|
|
19939
|
+
* preference (D944). A polymorphic reading stores its `quantity` here once,
|
|
19940
|
+
* at adopt, and a date/time value stores `dateTimeShape` the same way —
|
|
19941
|
+
* neither is repeated on each sample. The `device_class` tag is an
|
|
19942
|
+
* HA-specific input consumed at the discovery boundary (`ha-domain-mapping`)
|
|
19943
|
+
* to derive the CamStack `DeviceRole`; it is never stored after that point.
|
|
19991
19944
|
*
|
|
19992
19945
|
* The `raw` escape hatch carries provider-specific attributes that don't
|
|
19993
19946
|
* fit the structured slots (HA `attributes` whitelist, Reolink `deviceCache`
|
|
@@ -20001,6 +19954,14 @@ var SourceInfoSchema = object({
|
|
|
20001
19954
|
/** Immutable upstream identifier when available (HA `unique_id`, … ).
|
|
20002
19955
|
* Used to detect rename when `id` changes. */
|
|
20003
19956
|
uniqueId: string().optional(),
|
|
19957
|
+
/** Quantity of a polymorphic reading, written once at adopt (D944). */
|
|
19958
|
+
quantity: ReadingQuantitySchema.optional(),
|
|
19959
|
+
/** Date / time / datetime shape of a string reading, written once at adopt. */
|
|
19960
|
+
dateTimeShape: _enum([
|
|
19961
|
+
"date",
|
|
19962
|
+
"time",
|
|
19963
|
+
"datetime"
|
|
19964
|
+
]).optional(),
|
|
20004
19965
|
/** Provider-specific extras that don't fit the structured slots.
|
|
20005
19966
|
* Whitelist what goes here per provider — do NOT dump entire HA
|
|
20006
19967
|
* attribute blobs (would explode the meta JSON column). */
|
|
@@ -40938,7 +40899,8 @@ method(object({
|
|
|
40938
40899
|
"enum"
|
|
40939
40900
|
]),
|
|
40940
40901
|
enumValues: array(string()).optional(),
|
|
40941
|
-
item: boolean().optional()
|
|
40902
|
+
item: boolean().optional(),
|
|
40903
|
+
quantity: ReadingQuantitySchema.optional()
|
|
40942
40904
|
})).readonly(),
|
|
40943
40905
|
itemArray: object({
|
|
40944
40906
|
path: string(),
|
|
@@ -44738,8 +44700,8 @@ var MaskPolygonShapeSchema = object({
|
|
|
44738
44700
|
/** Boolean cell grid — row-major, length === gridWidth*gridHeight. */
|
|
44739
44701
|
var MaskGridShapeSchema = object({
|
|
44740
44702
|
kind: literal("grid"),
|
|
44741
|
-
gridWidth: number(),
|
|
44742
|
-
gridHeight: number(),
|
|
44703
|
+
gridWidth: number().meta(readingMeta("none")),
|
|
44704
|
+
gridHeight: number().meta(readingMeta("none")),
|
|
44743
44705
|
cells: array(boolean())
|
|
44744
44706
|
});
|
|
44745
44707
|
discriminatedUnion("kind", [
|
|
@@ -56149,46 +56111,27 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56149
56111
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56150
56112
|
object({
|
|
56151
56113
|
/** Carbon dioxide concentration in ppm. */
|
|
56152
|
-
co2Ppm: number().min(0).optional(),
|
|
56114
|
+
co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56153
56115
|
/** Total volatile organic compounds in ppb. */
|
|
56154
|
-
vocPpb: number().min(0).optional(),
|
|
56116
|
+
vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56155
56117
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56156
|
-
pm25: number().min(0).optional(),
|
|
56118
|
+
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56157
56119
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
56158
|
-
pm10: number().min(0).optional(),
|
|
56120
|
+
pm10: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56159
56121
|
/** Composite AQI value (typically 0..500). */
|
|
56160
|
-
aqi: number().optional(),
|
|
56122
|
+
aqi: number().optional().meta(readingMeta("index")),
|
|
56161
56123
|
/** Ms epoch when the slice was last updated. */
|
|
56162
|
-
lastFetchedAt: number()
|
|
56163
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
56164
|
-
* `attributes.unit_of_measurement` → 'ppm' / 'ppb' / 'µg/m³'). Each
|
|
56165
|
-
* upstream `sensor.*` entity surfaces ONE device_class, so one unit
|
|
56166
|
-
* per slice is unambiguous. */
|
|
56167
|
-
unit: string().optional(),
|
|
56168
|
-
/** Suggested decimal places for numeric display.
|
|
56169
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56170
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56171
|
-
* auto-formatting when absent. */
|
|
56172
|
-
precision: number().int().min(0).max(10).optional()
|
|
56124
|
+
lastFetchedAt: number()
|
|
56173
56125
|
});
|
|
56174
56126
|
DeviceType.Sensor;
|
|
56175
56127
|
object({
|
|
56176
|
-
/** Current illuminance in lux (lx). */
|
|
56177
|
-
lux: number().min(0).meta({
|
|
56178
|
-
|
|
56128
|
+
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56129
|
+
lux: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56130
|
+
precision: 0,
|
|
56179
56131
|
label: "Illuminance"
|
|
56180
|
-
}),
|
|
56132
|
+
})),
|
|
56181
56133
|
/** Ms epoch when the slice was last updated. */
|
|
56182
|
-
lastFetchedAt: number()
|
|
56183
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
56184
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
56185
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
56186
|
-
unit: string().optional(),
|
|
56187
|
-
/** Suggested decimal places for numeric display.
|
|
56188
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
56189
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
56190
|
-
* auto-formatting when absent. */
|
|
56191
|
-
precision: number().int().min(0).max(10).optional()
|
|
56134
|
+
lastFetchedAt: number()
|
|
56192
56135
|
});
|
|
56193
56136
|
DeviceType.Sensor;
|
|
56194
56137
|
/**
|
|
@@ -56333,10 +56276,7 @@ var BatteryStatusSchema = object({
|
|
|
56333
56276
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
56334
56277
|
* declines to band a non-finite reading, which is the correct shape.
|
|
56335
56278
|
*/
|
|
56336
|
-
percentage: number().min(0).max(100).nullable().meta({
|
|
56337
|
-
unit: "%",
|
|
56338
|
-
label: "Charge"
|
|
56339
|
-
}),
|
|
56279
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
56340
56280
|
/**
|
|
56341
56281
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
56342
56282
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -56363,7 +56303,14 @@ var BatteryStatusSchema = object({
|
|
|
56363
56303
|
*/
|
|
56364
56304
|
sleeping: boolean().meta({ label: "Sleeping" }),
|
|
56365
56305
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
56366
|
-
lastUpdated: number(),
|
|
56306
|
+
lastUpdated: number().meta(readingMeta("none")),
|
|
56307
|
+
/**
|
|
56308
|
+
* Battery voltage in volts, for a cell the firmware reports as voltage
|
|
56309
|
+
* rather than a percentage (Ecowitt capacitor packs). Absent on cameras
|
|
56310
|
+
* that only report charge. A second reading on this cap, not a second
|
|
56311
|
+
* `numeric-sensor` on the same device.
|
|
56312
|
+
*/
|
|
56313
|
+
volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
56367
56314
|
/**
|
|
56368
56315
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
56369
56316
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -56435,7 +56382,7 @@ DeviceType.Sensor;
|
|
|
56435
56382
|
*/
|
|
56436
56383
|
var BrightnessStatusSchema = object({
|
|
56437
56384
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
56438
|
-
percentage: number().min(0).max(100),
|
|
56385
|
+
percentage: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
56439
56386
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
56440
56387
|
lastChangedAt: number()
|
|
56441
56388
|
});
|
|
@@ -56820,21 +56767,21 @@ var ClimateControlStatusSchema = object({
|
|
|
56820
56767
|
/** Single setpoint in Celsius. Used by single-target modes
|
|
56821
56768
|
* (heat / cool / dry). Null when the device is in a range mode
|
|
56822
56769
|
* (`heat_cool`) or has no setpoint at all (`fan_only`/`off`). */
|
|
56823
|
-
target: number().nullable(),
|
|
56770
|
+
target: number().nullable().meta(readingMeta("temperature")),
|
|
56824
56771
|
/** Upper bound of the dual setpoint in Celsius. Populated only
|
|
56825
56772
|
* in `heat_cool` mode. */
|
|
56826
|
-
targetHigh: number().nullable(),
|
|
56773
|
+
targetHigh: number().nullable().meta(readingMeta("temperature")),
|
|
56827
56774
|
/** Lower bound of the dual setpoint in Celsius. Populated only
|
|
56828
56775
|
* in `heat_cool` mode. */
|
|
56829
|
-
targetLow: number().nullable(),
|
|
56776
|
+
targetLow: number().nullable().meta(readingMeta("temperature")),
|
|
56830
56777
|
/** Target relative humidity (0..100). Null when the device has no
|
|
56831
56778
|
* humidity control. */
|
|
56832
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
56779
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
56833
56780
|
/** Current measured temperature in Celsius. Read-only — pushed by
|
|
56834
56781
|
* the device's internal sensor. */
|
|
56835
|
-
currentTemp: number().nullable(),
|
|
56782
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
56836
56783
|
/** Current measured relative humidity (0..100). Read-only. */
|
|
56837
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
56784
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
56838
56785
|
/** Vertical louver swing on/off. Null when the device has no vertical
|
|
56839
56786
|
* swing surface (gate with `DeviceFeature.ClimateSwingVertical`). */
|
|
56840
56787
|
swingVertical: boolean().nullable(),
|
|
@@ -56842,11 +56789,11 @@ var ClimateControlStatusSchema = object({
|
|
|
56842
56789
|
* horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
|
|
56843
56790
|
swingHorizontal: boolean().nullable(),
|
|
56844
56791
|
/** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
56845
|
-
minTemp: number().nullable().optional(),
|
|
56792
|
+
minTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
56846
56793
|
/** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
|
|
56847
|
-
maxTemp: number().nullable().optional(),
|
|
56794
|
+
maxTemp: number().nullable().optional().meta(readingMeta("temperature")),
|
|
56848
56795
|
/** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
|
|
56849
|
-
tempStep: number().positive().nullable().optional(),
|
|
56796
|
+
tempStep: number().positive().nullable().optional().meta(readingMeta("temperature")),
|
|
56850
56797
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
56851
56798
|
lastFetchedAt: number()
|
|
56852
56799
|
});
|
|
@@ -56925,17 +56872,17 @@ DeviceType.Thermostat, DeviceType.Climate, method(object({
|
|
|
56925
56872
|
* modes to expose in the picker without a slice fetch.
|
|
56926
56873
|
*/
|
|
56927
56874
|
var RgbTripletSchema = object({
|
|
56928
|
-
r: number().int().min(0).max(255),
|
|
56929
|
-
g: number().int().min(0).max(255),
|
|
56930
|
-
b: number().int().min(0).max(255)
|
|
56875
|
+
r: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
56876
|
+
g: number().int().min(0).max(255).meta(readingMeta("none")),
|
|
56877
|
+
b: number().int().min(0).max(255).meta(readingMeta("none"))
|
|
56931
56878
|
});
|
|
56932
56879
|
var HsvTripletSchema = object({
|
|
56933
56880
|
/** Hue in degrees, 0..360. */
|
|
56934
|
-
h: number().min(0).max(360),
|
|
56881
|
+
h: number().min(0).max(360).meta(readingMeta("none")),
|
|
56935
56882
|
/** Saturation as 0..100 inclusive. */
|
|
56936
|
-
s: number().min(0).max(100),
|
|
56883
|
+
s: number().min(0).max(100).meta(readingMeta("none")),
|
|
56937
56884
|
/** Value/brightness as 0..100 inclusive. */
|
|
56938
|
-
v: number().min(0).max(100)
|
|
56885
|
+
v: number().min(0).max(100).meta(readingMeta("none"))
|
|
56939
56886
|
});
|
|
56940
56887
|
var ColorInputSchema = discriminatedUnion("mode", [
|
|
56941
56888
|
object({
|
|
@@ -56964,7 +56911,7 @@ object({
|
|
|
56964
56911
|
/** Populated when `mode === 'hsv'`. */
|
|
56965
56912
|
hsv: HsvTripletSchema.optional(),
|
|
56966
56913
|
/** Populated when `mode === 'mired'`. */
|
|
56967
|
-
mireds: number().int().optional(),
|
|
56914
|
+
mireds: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
56968
56915
|
/** Ms epoch of the last operator-driven change. */
|
|
56969
56916
|
lastChangedAt: number()
|
|
56970
56917
|
});
|
|
@@ -57088,18 +57035,12 @@ _enum([
|
|
|
57088
57035
|
"empty",
|
|
57089
57036
|
"full"
|
|
57090
57037
|
]);
|
|
57091
|
-
/**
|
|
57092
|
-
|
|
57093
|
-
|
|
57094
|
-
"days",
|
|
57095
|
-
"hours",
|
|
57096
|
-
"cycles"
|
|
57097
|
-
]);
|
|
57098
|
-
/** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
|
|
57099
|
-
* days). `value` null = unknown (D393). */
|
|
57038
|
+
/** Whether `remaining.value` is a duration in seconds or a dimensionless count. */
|
|
57039
|
+
var ConsumableRemainingKindSchema = _enum(["duration", "count"]);
|
|
57040
|
+
/** Remaining life. `value` null = unknown (D393). Duration is seconds. */
|
|
57100
57041
|
var ConsumableRemainingSchema = object({
|
|
57101
|
-
value: number().min(0).nullable(),
|
|
57102
|
-
|
|
57042
|
+
value: number().min(0).nullable().meta(readingMeta("device")),
|
|
57043
|
+
kind: ConsumableRemainingKindSchema
|
|
57103
57044
|
});
|
|
57104
57045
|
var ConsumablesStatusSchema = object({
|
|
57105
57046
|
items: array(object({
|
|
@@ -57108,7 +57049,7 @@ var ConsumablesStatusSchema = object({
|
|
|
57108
57049
|
/** Display name. */
|
|
57109
57050
|
label: string().min(1),
|
|
57110
57051
|
/** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
|
|
57111
|
-
level: number().min(0).max(100).nullable(),
|
|
57052
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57112
57053
|
/** The provider's discrete verdict when known (binary mode). */
|
|
57113
57054
|
status: ConsumableStatusSchema.nullable(),
|
|
57114
57055
|
/** What the item is — decides whether low or full is bad. Absent = `wear`. */
|
|
@@ -57125,7 +57066,7 @@ var ConsumablesStatusSchema = object({
|
|
|
57125
57066
|
})),
|
|
57126
57067
|
lastChangedAt: number()
|
|
57127
57068
|
});
|
|
57128
|
-
Object.values(DeviceType), [...
|
|
57069
|
+
Object.values(DeviceType), [...ConsumableRemainingKindSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
|
|
57129
57070
|
Object.values(DeviceType), method(object({
|
|
57130
57071
|
deviceId: number().int().nonnegative(),
|
|
57131
57072
|
key: string().min(1)
|
|
@@ -57162,39 +57103,17 @@ object({
|
|
|
57162
57103
|
/** Current value. Numeric kind → number; select/text/datetime → string.
|
|
57163
57104
|
* Datetime values are ISO 8601 strings (full timestamp, date-only,
|
|
57164
57105
|
* or time-only — HA accepts all three forms). */
|
|
57165
|
-
value: union([number(), string()]),
|
|
57106
|
+
value: union([number().meta(readingMeta("device")), string()]),
|
|
57166
57107
|
/** Acceptable values when `kind === 'select'`. Empty for other kinds. */
|
|
57167
57108
|
options: array(string()),
|
|
57168
57109
|
/** Ms epoch when the slice was last updated. */
|
|
57169
57110
|
lastChangedAt: number(),
|
|
57170
|
-
/**
|
|
57171
|
-
|
|
57172
|
-
|
|
57173
|
-
|
|
57174
|
-
/**
|
|
57175
|
-
|
|
57176
|
-
min: number().optional(),
|
|
57177
|
-
/** Maximum allowed value. Populated live from HA `attributes.max`.
|
|
57178
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57179
|
-
max: number().optional(),
|
|
57180
|
-
/** Step increment. Populated live from HA `attributes.step`.
|
|
57181
|
-
* Meaningful for `kind === 'numeric'`; absent for other kinds. */
|
|
57182
|
-
step: number().optional(),
|
|
57183
|
-
/** Suggested decimal places for numeric display. Populated live from HA
|
|
57184
|
-
* `attributes.suggested_display_precision`, or derived from `step` when the
|
|
57185
|
-
* HA attribute is absent. Meaningful for `kind === 'numeric'`; absent for
|
|
57186
|
-
* other kinds. Falls back to auto-formatting when absent. */
|
|
57187
|
-
precision: number().int().min(0).max(10).optional(),
|
|
57188
|
-
/** Date-picker granularity for `kind === 'datetime'`. 'date' → date-only,
|
|
57189
|
-
* 'time' → time-only, 'datetime' → full timestamp. Absent for other kinds
|
|
57190
|
-
* (UI defaults to 'datetime'). Derived live from the device's HA domain
|
|
57191
|
-
* (date.* / time.* / datetime.*) or, for input_datetime, from the entity's
|
|
57192
|
-
* `has_date`/`has_time` attributes on each push. */
|
|
57193
|
-
format: _enum([
|
|
57194
|
-
"date",
|
|
57195
|
-
"time",
|
|
57196
|
-
"datetime"
|
|
57197
|
-
]).optional()
|
|
57111
|
+
/** Minimum allowed value, in the device quantity's base unit. */
|
|
57112
|
+
min: number().optional().meta(readingMeta("device")),
|
|
57113
|
+
/** Maximum allowed value, in the device quantity's base unit. */
|
|
57114
|
+
max: number().optional().meta(readingMeta("device")),
|
|
57115
|
+
/** Step increment, in the device quantity's base unit. */
|
|
57116
|
+
step: number().optional().meta(readingMeta("device"))
|
|
57198
57117
|
});
|
|
57199
57118
|
var ControlSetValueInputSchema = discriminatedUnion("kind", [
|
|
57200
57119
|
object({
|
|
@@ -57232,9 +57151,9 @@ var CoverStatusSchema = object({
|
|
|
57232
57151
|
]),
|
|
57233
57152
|
/** 0 = fully closed, 100 = fully open. Null when the device has
|
|
57234
57153
|
* no intermediate position surface. */
|
|
57235
|
-
position: number().min(0).max(100).nullable(),
|
|
57154
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57236
57155
|
/** 0 = closed slats, 100 = open slats. Null when no tilt support. */
|
|
57237
|
-
tiltPosition: number().min(0).max(100).nullable(),
|
|
57156
|
+
tiltPosition: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57238
57157
|
/** Ms epoch when the slice was last updated. */
|
|
57239
57158
|
lastChangedAt: number()
|
|
57240
57159
|
});
|
|
@@ -57292,9 +57211,9 @@ var NormalizedRangeSchema$1 = object({
|
|
|
57292
57211
|
object({
|
|
57293
57212
|
mode: DayNightModeSchema,
|
|
57294
57213
|
/** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
|
|
57295
|
-
sensitivity: number().optional(),
|
|
57214
|
+
sensitivity: number().optional().meta(readingMeta("none")),
|
|
57296
57215
|
/** Delay before the IR-cut filter flips, in seconds. */
|
|
57297
|
-
switchDelaySec: number().optional(),
|
|
57216
|
+
switchDelaySec: number().optional().meta(readingMeta("duration")),
|
|
57298
57217
|
lastFetchedAt: number()
|
|
57299
57218
|
});
|
|
57300
57219
|
/**
|
|
@@ -57449,11 +57368,11 @@ object({
|
|
|
57449
57368
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
57450
57369
|
availablePrograms: array(string()),
|
|
57451
57370
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
57452
|
-
remainingSeconds: number().int().nonnegative().nullable(),
|
|
57371
|
+
remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
57453
57372
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
57454
|
-
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
57373
|
+
delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
57455
57374
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
57456
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
57375
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57457
57376
|
/** True when the door is reported open; null when the door state is not known. */
|
|
57458
57377
|
doorOpen: boolean().nullable(),
|
|
57459
57378
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -57477,7 +57396,7 @@ object({
|
|
|
57477
57396
|
/** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
|
|
57478
57397
|
machineCareDue: boolean().nullable(),
|
|
57479
57398
|
/** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
|
|
57480
|
-
machineCareRemainingRuns: number().int().nonnegative().nullable(),
|
|
57399
|
+
machineCareRemainingRuns: number().int().nonnegative().nullable().meta(readingMeta("count")),
|
|
57481
57400
|
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
57482
57401
|
halfLoad: boolean().nullable(),
|
|
57483
57402
|
hygienePlus: boolean().nullable(),
|
|
@@ -57492,7 +57411,7 @@ object({
|
|
|
57492
57411
|
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
57493
57412
|
activeEvents: array(string()),
|
|
57494
57413
|
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
57495
|
-
errorCode: number().nullable(),
|
|
57414
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
57496
57415
|
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
57497
57416
|
errorLabel: string().nullable(),
|
|
57498
57417
|
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
@@ -57638,24 +57557,14 @@ object({
|
|
|
57638
57557
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
57639
57558
|
lastPressedAt: number().nullable(),
|
|
57640
57559
|
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
57641
|
-
pressCountSinceStart: number()
|
|
57560
|
+
pressCountSinceStart: number().meta(readingMeta("count"))
|
|
57642
57561
|
});
|
|
57643
57562
|
object({
|
|
57644
57563
|
deviceId: number(),
|
|
57645
57564
|
timestamp: number()
|
|
57646
57565
|
});
|
|
57647
57566
|
DeviceType.Button, DeviceType.Camera;
|
|
57648
|
-
|
|
57649
|
-
* Enum-state sensor — a string value picked from a finite option set.
|
|
57650
|
-
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
57651
|
-
* states, weather conditions, contact-source channels, mode strings).
|
|
57652
|
-
* The option set is stable across observations; it is persisted in the
|
|
57653
|
-
* device config blob (via the control slice at adoption) and is NOT
|
|
57654
|
-
* stored in `sourceInfo`.
|
|
57655
|
-
*/
|
|
57656
|
-
/** Locale-render shape for an ISO `value` carried by a `DateTimeSensor`-role
|
|
57657
|
-
* enum sensor: `date` (date-only), `time` (time-only), `datetime` (both). */
|
|
57658
|
-
var EnumSensorDateTimeFormatSchema = _enum([
|
|
57567
|
+
_enum([
|
|
57659
57568
|
"date",
|
|
57660
57569
|
"time",
|
|
57661
57570
|
"datetime"
|
|
@@ -57663,12 +57572,11 @@ var EnumSensorDateTimeFormatSchema = _enum([
|
|
|
57663
57572
|
object({
|
|
57664
57573
|
value: string(),
|
|
57665
57574
|
/**
|
|
57666
|
-
* Set
|
|
57667
|
-
* as
|
|
57668
|
-
*
|
|
57669
|
-
* a time-only sensor → `'time'`.
|
|
57575
|
+
* Set when `value` is a timestamp rather than an enum state, so history
|
|
57576
|
+
* does not learn ISO strings as states. The display shape (date / time /
|
|
57577
|
+
* datetime) lives on `SourceInfo.dateTimeShape`, written once at adopt.
|
|
57670
57578
|
*/
|
|
57671
|
-
|
|
57579
|
+
timestamp: boolean().optional(),
|
|
57672
57580
|
/** Ms epoch when the slice was last updated. */
|
|
57673
57581
|
lastFetchedAt: number()
|
|
57674
57582
|
});
|
|
@@ -57687,13 +57595,13 @@ var EventFireSchema = object({
|
|
|
57687
57595
|
deviceId: number(),
|
|
57688
57596
|
eventType: string(),
|
|
57689
57597
|
data: record(string(), unknown()).nullable(),
|
|
57690
|
-
timestamp: number(),
|
|
57691
|
-
seq: number()
|
|
57598
|
+
timestamp: number().meta(readingMeta("none")),
|
|
57599
|
+
seq: number().meta(readingMeta("count"))
|
|
57692
57600
|
});
|
|
57693
57601
|
object({
|
|
57694
57602
|
eventTypes: array(string()),
|
|
57695
57603
|
lastEvent: EventFireSchema.nullable(),
|
|
57696
|
-
eventCountSinceStart: number()
|
|
57604
|
+
eventCountSinceStart: number().meta(readingMeta("count"))
|
|
57697
57605
|
});
|
|
57698
57606
|
DeviceType.EventEmitter;
|
|
57699
57607
|
var IdentitySchema = object({
|
|
@@ -58082,10 +57990,10 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58082
57990
|
object({
|
|
58083
57991
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58084
57992
|
* speed surface (single-speed fan). */
|
|
58085
|
-
percentage: number().min(0).max(100).nullable(),
|
|
57993
|
+
percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58086
57994
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58087
57995
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58088
|
-
percentageStep: number().positive().optional(),
|
|
57996
|
+
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
58089
57997
|
/** Active preset mode (`auto` / `quiet` / `turbo` / vendor-specific)
|
|
58090
57998
|
* — empty string when no preset is active or supported. */
|
|
58091
57999
|
preset: string(),
|
|
@@ -58167,7 +58075,7 @@ var FeatureProbeStatusSchema = object({
|
|
|
58167
58075
|
/** Camera/firmware model string. `null` when the firmware doesn't expose it. */
|
|
58168
58076
|
model: string().nullable(),
|
|
58169
58077
|
/** Channel count for NVR/Hub devices; `1` for standalone cameras; `null` pre-probe. */
|
|
58170
|
-
channelCount: number().nullable(),
|
|
58078
|
+
channelCount: number().nullable().meta(readingMeta("count")),
|
|
58171
58079
|
/**
|
|
58172
58080
|
* Ms epoch of the last SUCCESSFUL probe. `0` before the first probe
|
|
58173
58081
|
* completes — drivers' `getAccessoryChildren()` should treat zero as
|
|
@@ -58201,7 +58109,7 @@ object({
|
|
|
58201
58109
|
DeviceType.Sensor;
|
|
58202
58110
|
object({
|
|
58203
58111
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58204
|
-
position: number().min(0).max(100).nullable(),
|
|
58112
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58205
58113
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
58206
58114
|
lastFetchedAt: number()
|
|
58207
58115
|
});
|
|
@@ -58210,9 +58118,9 @@ object({
|
|
|
58210
58118
|
/** Whether the humidifier is currently on. */
|
|
58211
58119
|
on: boolean(),
|
|
58212
58120
|
/** Current measured relative humidity (0..100). Null when not reported. */
|
|
58213
|
-
currentHumidity: number().min(0).max(100).nullable(),
|
|
58121
|
+
currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
58214
58122
|
/** Target relative humidity (0..100). Null when no setpoint surface. */
|
|
58215
|
-
targetHumidity: number().min(0).max(100).nullable(),
|
|
58123
|
+
targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
58216
58124
|
/** Active mode (`auto` / `normal` / `baby` / vendor). Null when the
|
|
58217
58125
|
* device has no mode surface. */
|
|
58218
58126
|
mode: string().nullable(),
|
|
@@ -58222,9 +58130,9 @@ object({
|
|
|
58222
58130
|
* `idle` / `off`). Null when the device doesn't report it. */
|
|
58223
58131
|
action: string().nullable(),
|
|
58224
58132
|
/** HA `min_humidity` attribute. Null → UI uses 0. */
|
|
58225
|
-
minHumidity: number().nullable(),
|
|
58133
|
+
minHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
58226
58134
|
/** HA `max_humidity` attribute. Null → UI uses 100. */
|
|
58227
|
-
maxHumidity: number().nullable(),
|
|
58135
|
+
maxHumidity: number().nullable().meta(readingMeta("humidity")),
|
|
58228
58136
|
/** Ms epoch when the slice was last updated. */
|
|
58229
58137
|
lastChangedAt: number()
|
|
58230
58138
|
});
|
|
@@ -58256,22 +58164,13 @@ DeviceType.Humidifier, method(object({
|
|
|
58256
58164
|
* `sourceInfo`.
|
|
58257
58165
|
*/
|
|
58258
58166
|
var HumiditySensorStatusSchema = object({
|
|
58259
|
-
/** Current relative humidity, 0..100. */
|
|
58260
|
-
percent: number().min(0).max(100).meta({
|
|
58261
|
-
|
|
58167
|
+
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58168
|
+
percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58169
|
+
precision: 0,
|
|
58262
58170
|
label: "Humidity"
|
|
58263
|
-
}),
|
|
58171
|
+
})),
|
|
58264
58172
|
/** Ms epoch when the slice was last updated. */
|
|
58265
|
-
lastFetchedAt: number()
|
|
58266
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
58267
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
58268
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
58269
|
-
unit: string().optional(),
|
|
58270
|
-
/** Suggested decimal places for numeric display.
|
|
58271
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
58272
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
58273
|
-
* auto-formatting when absent. */
|
|
58274
|
-
precision: number().int().min(0).max(10).optional()
|
|
58173
|
+
lastFetchedAt: number()
|
|
58275
58174
|
});
|
|
58276
58175
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
58277
58176
|
object({
|
|
@@ -58279,7 +58178,7 @@ object({
|
|
|
58279
58178
|
* entity exposes no `entity_picture` (yet). */
|
|
58280
58179
|
url: string().nullable(),
|
|
58281
58180
|
/** Ms epoch of the upstream last-updated timestamp. Null at cold-start. */
|
|
58282
|
-
lastUpdated: number().nullable()
|
|
58181
|
+
lastUpdated: number().nullable().meta(readingMeta("none"))
|
|
58283
58182
|
});
|
|
58284
58183
|
DeviceType.Image;
|
|
58285
58184
|
/**
|
|
@@ -58335,19 +58234,19 @@ var NormalizedRangeSchema = object({
|
|
|
58335
58234
|
});
|
|
58336
58235
|
object({
|
|
58337
58236
|
/** Normalized 0–100. */
|
|
58338
|
-
brightness: number().optional(),
|
|
58237
|
+
brightness: number().optional().meta(readingMeta("none")),
|
|
58339
58238
|
/** Normalized 0–100. */
|
|
58340
|
-
contrast: number().optional(),
|
|
58239
|
+
contrast: number().optional().meta(readingMeta("none")),
|
|
58341
58240
|
/** Normalized 0–100. */
|
|
58342
|
-
saturation: number().optional(),
|
|
58241
|
+
saturation: number().optional().meta(readingMeta("none")),
|
|
58343
58242
|
/** Normalized 0–100. */
|
|
58344
|
-
sharpness: number().optional(),
|
|
58243
|
+
sharpness: number().optional().meta(readingMeta("none")),
|
|
58345
58244
|
mirror: boolean().optional(),
|
|
58346
58245
|
flip: boolean().optional(),
|
|
58347
58246
|
rotate: ImageRotateSchema.optional(),
|
|
58348
58247
|
whiteBalance: WhiteBalanceModeSchema.optional(),
|
|
58349
58248
|
/** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
|
|
58350
|
-
warmth: number().optional(),
|
|
58249
|
+
warmth: number().optional().meta(readingMeta("none")),
|
|
58351
58250
|
exposureMode: ExposureModeSchema.optional(),
|
|
58352
58251
|
backlightMode: BacklightModeSchema.optional(),
|
|
58353
58252
|
lastFetchedAt: number()
|
|
@@ -58592,10 +58491,10 @@ var IntercomAbilitySchema = object({
|
|
|
58592
58491
|
/** Codecs accepted by firmware, in preference order. Driver-authored strings. */
|
|
58593
58492
|
codecs: array(string()),
|
|
58594
58493
|
/** Sample rate (Hz) the firmware expects. Reolink typical: 16000. */
|
|
58595
|
-
sampleRate: number(),
|
|
58494
|
+
sampleRate: number().meta(readingMeta("none")),
|
|
58596
58495
|
duplex: _enum(["half", "full"]),
|
|
58597
58496
|
/** Max in-flight audio backlog before drop (ms). Server uses this to bound latency. */
|
|
58598
|
-
maxBacklogMs: number()
|
|
58497
|
+
maxBacklogMs: number().meta(readingMeta("duration-ms"))
|
|
58599
58498
|
});
|
|
58600
58499
|
var IntercomStatusSchema = object({
|
|
58601
58500
|
/** True while a talk session is open. */
|
|
@@ -58706,13 +58605,13 @@ object({
|
|
|
58706
58605
|
activity: LawnMowerActivitySchema,
|
|
58707
58606
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
58708
58607
|
* reading. */
|
|
58709
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
58608
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58710
58609
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
58711
58610
|
* task is active / progress is unavailable. */
|
|
58712
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
58611
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58713
58612
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
58714
58613
|
* or null when unknown. */
|
|
58715
|
-
currentCode: number().nullable(),
|
|
58614
|
+
currentCode: number().nullable().meta(readingMeta("none")),
|
|
58716
58615
|
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
58717
58616
|
currentCodeLabel: string().nullable(),
|
|
58718
58617
|
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
@@ -59174,7 +59073,7 @@ object({
|
|
|
59174
59073
|
state: MediaPlayerStateSchema,
|
|
59175
59074
|
/** Volume as 0..100 inclusive. Null when the device has no volume
|
|
59176
59075
|
* surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
|
|
59177
|
-
volumeLevel: number().min(0).max(100).nullable(),
|
|
59076
|
+
volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59178
59077
|
/** Mute toggle distinct from volume=0. Null when no mute surface.
|
|
59179
59078
|
* Pair with `DeviceFeature.MediaPlayerMute`. */
|
|
59180
59079
|
isMuted: boolean().nullable(),
|
|
@@ -59187,10 +59086,10 @@ object({
|
|
|
59187
59086
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59188
59087
|
/** Current playback position in ms. Null when not seekable or
|
|
59189
59088
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59190
|
-
positionMs: number().int().nonnegative().nullable(),
|
|
59089
|
+
positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59191
59090
|
/** Total duration of the current media in ms. Null when unknown
|
|
59192
59091
|
* (live stream) or nothing is playing. */
|
|
59193
|
-
durationMs: number().int().nonnegative().nullable(),
|
|
59092
|
+
durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59194
59093
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59195
59094
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59196
59095
|
shuffle: boolean().nullable(),
|
|
@@ -59490,7 +59389,7 @@ var MotionStatusSchema = object({
|
|
|
59490
59389
|
* it, every provider seeded it at boot, and every session left it
|
|
59491
59390
|
* `detected: true` after its detach.
|
|
59492
59391
|
*/
|
|
59493
|
-
autoClearAfterMs: number().nullable()
|
|
59392
|
+
autoClearAfterMs: number().nullable().meta(readingMeta("duration-ms"))
|
|
59494
59393
|
});
|
|
59495
59394
|
/**
|
|
59496
59395
|
* Payload of `motion.onMotionChanged` event + the corresponding bus
|
|
@@ -59540,7 +59439,7 @@ var MotionZoneRegionSchema = object({
|
|
|
59540
59439
|
});
|
|
59541
59440
|
object({
|
|
59542
59441
|
enabled: boolean(),
|
|
59543
|
-
sensitivity: number(),
|
|
59442
|
+
sensitivity: number().meta(readingMeta("none")),
|
|
59544
59443
|
/** Grid region(s). Today exactly one `grid` shape. */
|
|
59545
59444
|
regions: array(MotionZoneRegionSchema),
|
|
59546
59445
|
lastFetchedAt: number()
|
|
@@ -59844,7 +59743,7 @@ var NavigationStatusSchema = object({
|
|
|
59844
59743
|
following: boolean(),
|
|
59845
59744
|
flash: boolean(),
|
|
59846
59745
|
lightMode: NavigationLightModeSchema,
|
|
59847
|
-
lightLevel: number().min(40).max(100),
|
|
59746
|
+
lightLevel: number().min(40).max(100).meta(readingMeta("none")),
|
|
59848
59747
|
/** Ms epoch when the slice was last updated. */
|
|
59849
59748
|
lastChangedAt: number()
|
|
59850
59749
|
});
|
|
@@ -59890,13 +59789,13 @@ var NetworkLinkStatusSchema = object({
|
|
|
59890
59789
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
59891
59790
|
* SKIP a null rather than coerce it.
|
|
59892
59791
|
*/
|
|
59893
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
59792
|
+
signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59894
59793
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
59895
|
-
rssiDbm: number().optional(),
|
|
59794
|
+
rssiDbm: number().optional().meta(readingMeta("signal-level")),
|
|
59896
59795
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
59897
59796
|
ssid: string().optional(),
|
|
59898
59797
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
59899
|
-
lastUpdated: number()
|
|
59798
|
+
lastUpdated: number().meta(readingMeta("none"))
|
|
59900
59799
|
});
|
|
59901
59800
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
59902
59801
|
deviceId: number(),
|
|
@@ -60215,7 +60114,7 @@ object({
|
|
|
60215
60114
|
lastError: string().nullable(),
|
|
60216
60115
|
/** Number of deliveries currently buffered server-side (rate-limited
|
|
60217
60116
|
* notifiers may queue). 0 when the provider sends synchronously. */
|
|
60218
|
-
queueDepth: number().int().nonnegative(),
|
|
60117
|
+
queueDepth: number().int().nonnegative().meta(readingMeta("count")),
|
|
60219
60118
|
/** Per-feature capability matrix — authoritative source for the
|
|
60220
60119
|
* compose-form field gating. */
|
|
60221
60120
|
supports: NotifierSupportsSchema
|
|
@@ -60265,15 +60164,8 @@ DeviceType.Notifier, method(NotifierSendInputSchema, NotifierSendResultSchema, {
|
|
|
60265
60164
|
acceptedAt: number()
|
|
60266
60165
|
});
|
|
60267
60166
|
object({
|
|
60268
|
-
|
|
60269
|
-
|
|
60270
|
-
* Populated live from the upstream source on each state push.
|
|
60271
|
-
* Absent for unitless sensors. */
|
|
60272
|
-
unit: string().optional(),
|
|
60273
|
-
/** Suggested decimal places for numeric display.
|
|
60274
|
-
* Populated live from the upstream source when provided.
|
|
60275
|
-
* Falls back to auto-formatting when absent. */
|
|
60276
|
-
precision: number().int().min(0).max(10).optional(),
|
|
60167
|
+
/** Reading in the device quantity's base unit. `null` when refused (D393). */
|
|
60168
|
+
value: number().nullable().meta(readingMeta("device")),
|
|
60277
60169
|
/** Ms epoch when the slice was last updated. */
|
|
60278
60170
|
lastFetchedAt: number()
|
|
60279
60171
|
});
|
|
@@ -60563,23 +60455,26 @@ object({
|
|
|
60563
60455
|
/** Food currently in the bowl (grams). Null when the device has not
|
|
60564
60456
|
* reported a reading yet. On dual-hopper models this is the combined
|
|
60565
60457
|
* bowl reading; per-hopper levels live in `food1`/`food2`. */
|
|
60566
|
-
foodLevel: number().nullable(),
|
|
60458
|
+
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
60567
60459
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
60568
60460
|
* single-hopper models. */
|
|
60569
|
-
food1: number().nullable(),
|
|
60461
|
+
food1: number().nullable().meta(readingMeta("none")),
|
|
60570
60462
|
/** Hopper-2 food level (grams) on dual-hopper feeders; null on
|
|
60571
60463
|
* single-hopper models. */
|
|
60572
|
-
food2: number().nullable(),
|
|
60464
|
+
food2: number().nullable().meta(readingMeta("none")),
|
|
60573
60465
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
60574
60466
|
* (`device_class: problem`, on = low). True when the bowl is empty /
|
|
60575
60467
|
* below the feeder's low threshold. */
|
|
60576
60468
|
lowFood: boolean(),
|
|
60577
60469
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
60578
60470
|
* device has no battery reading. */
|
|
60579
|
-
batteryPower: number().min(0).max(100).nullable(),
|
|
60580
|
-
/**
|
|
60581
|
-
*
|
|
60582
|
-
|
|
60471
|
+
batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60472
|
+
/**
|
|
60473
|
+
* Desiccant life remaining, stored in seconds (duration base, D944).
|
|
60474
|
+
* Providers convert from the days the feeder reports. Null when the
|
|
60475
|
+
* model has no desiccant sensor.
|
|
60476
|
+
*/
|
|
60477
|
+
desiccantLeftDays: number().nullable().meta(readingMeta("duration")),
|
|
60583
60478
|
/** True while a feed is in progress. */
|
|
60584
60479
|
feeding: boolean(),
|
|
60585
60480
|
/** Decoded connectivity / power status (HA petkit device-status enum).
|
|
@@ -60590,7 +60485,7 @@ object({
|
|
|
60590
60485
|
* with `errorCode` for consumers that want the raw integer. */
|
|
60591
60486
|
error: string().nullable(),
|
|
60592
60487
|
/** Raw device error code (0 / null = no error). */
|
|
60593
|
-
errorCode: number().nullable(),
|
|
60488
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
60594
60489
|
/** True for D4S/D4SH dual-hopper hardware — gates the per-hopper UI. */
|
|
60595
60490
|
isDualHopper: boolean(),
|
|
60596
60491
|
/** Child-lock (manual-lock) setting — buttons on the unit are disabled. */
|
|
@@ -60600,7 +60495,7 @@ object({
|
|
|
60600
60495
|
/** Play a chime when dispensing. */
|
|
60601
60496
|
feedSound: boolean(),
|
|
60602
60497
|
/** Speaker / prompt volume level (device-scaled integer). */
|
|
60603
|
-
volume: number(),
|
|
60498
|
+
volume: number().meta(readingMeta("none")),
|
|
60604
60499
|
/** Ms epoch when the slice was last refreshed from the cloud. */
|
|
60605
60500
|
lastFetchedAt: number()
|
|
60606
60501
|
});
|
|
@@ -61037,36 +60932,19 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61037
60932
|
});
|
|
61038
60933
|
object({
|
|
61039
60934
|
/** Instantaneous power draw in watts. */
|
|
61040
|
-
watts: number().optional().meta({
|
|
61041
|
-
unit: "W",
|
|
61042
|
-
label: "Power"
|
|
61043
|
-
}),
|
|
60935
|
+
watts: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61044
60936
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61045
|
-
kwhTotal: number().optional().meta({
|
|
61046
|
-
unit: "kWh",
|
|
61047
|
-
label: "Energy"
|
|
61048
|
-
}),
|
|
60937
|
+
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
61049
60938
|
/** Voltage in volts. */
|
|
61050
|
-
volts: number().optional(),
|
|
60939
|
+
volts: number().optional().meta(readingMeta("voltage")),
|
|
61051
60940
|
/** Current in amperes. */
|
|
61052
|
-
amps: number().optional(),
|
|
61053
|
-
/** Apparent power in volt-amperes
|
|
61054
|
-
va: number().optional(),
|
|
60941
|
+
amps: number().optional().meta(readingMeta("current")),
|
|
60942
|
+
/** Apparent power in volt-amperes. */
|
|
60943
|
+
va: number().optional().meta(readingMeta("apparent-power")),
|
|
61055
60944
|
/** Power factor (0..1) if reported. */
|
|
61056
|
-
powerFactor: number().min(0).max(1).optional(),
|
|
60945
|
+
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61057
60946
|
/** Ms epoch when the slice was last updated. */
|
|
61058
|
-
lastFetchedAt: number()
|
|
61059
|
-
/** Live display unit of the single metric this slice carries (e.g. HA
|
|
61060
|
-
* `attributes.unit_of_measurement` → 'V' / 'A' / 'W' / 'kW' / 'kWh').
|
|
61061
|
-
* Each upstream `sensor.*` entity surfaces ONE device_class, so one
|
|
61062
|
-
* unit per slice is unambiguous. The UI prefers this over the role's
|
|
61063
|
-
* canonical unit so a 'kW' / 'Wh' feed renders verbatim. */
|
|
61064
|
-
unit: string().optional(),
|
|
61065
|
-
/** Suggested decimal places for numeric display.
|
|
61066
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
61067
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
61068
|
-
* auto-formatting when absent. */
|
|
61069
|
-
precision: number().int().min(0).max(10).optional()
|
|
60947
|
+
lastFetchedAt: number()
|
|
61070
60948
|
});
|
|
61071
60949
|
DeviceType.Sensor;
|
|
61072
60950
|
/**
|
|
@@ -61087,11 +60965,11 @@ DeviceType.Sensor;
|
|
|
61087
60965
|
*/
|
|
61088
60966
|
var GpsLocationSchema = object({
|
|
61089
60967
|
/** Latitude in decimal degrees, -90..90. */
|
|
61090
|
-
latitude: number().min(-90).max(90),
|
|
60968
|
+
latitude: number().min(-90).max(90).meta(readingMeta("angle")),
|
|
61091
60969
|
/** Longitude in decimal degrees, -180..180. */
|
|
61092
|
-
longitude: number().min(-180).max(180),
|
|
60970
|
+
longitude: number().min(-180).max(180).meta(readingMeta("angle")),
|
|
61093
60971
|
/** Reported accuracy in meters (lower = better). */
|
|
61094
|
-
accuracyMeters: number().nonnegative()
|
|
60972
|
+
accuracyMeters: number().nonnegative().meta(readingMeta("length"))
|
|
61095
60973
|
});
|
|
61096
60974
|
var PresenceStatusSchema = object({
|
|
61097
60975
|
/** `home` / `not_home` / any user-defined zone name. */
|
|
@@ -61103,25 +60981,16 @@ var PresenceStatusSchema = object({
|
|
|
61103
60981
|
gps: GpsLocationSchema.nullable(),
|
|
61104
60982
|
/** Optional battery level of the tracking device (0..100). Null
|
|
61105
60983
|
* when not reported. */
|
|
61106
|
-
batteryPercent: number().min(0).max(100).nullable(),
|
|
60984
|
+
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61107
60985
|
/** Ms epoch when the slice was last updated. */
|
|
61108
60986
|
lastChangedAt: number()
|
|
61109
60987
|
});
|
|
61110
60988
|
DeviceType.Presence;
|
|
61111
60989
|
object({
|
|
61112
|
-
/** Current pressure in hPa. */
|
|
61113
|
-
hpa: number(),
|
|
60990
|
+
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
60991
|
+
hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61114
60992
|
/** Ms epoch when the slice was last updated. */
|
|
61115
|
-
lastFetchedAt: number()
|
|
61116
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
61117
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
61118
|
-
* role's canonical unit. Absent → fall back to the canonical unit. */
|
|
61119
|
-
unit: string().optional(),
|
|
61120
|
-
/** Suggested decimal places for numeric display.
|
|
61121
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
61122
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
61123
|
-
* auto-formatting when absent. */
|
|
61124
|
-
precision: number().int().min(0).max(10).optional()
|
|
60993
|
+
lastFetchedAt: number()
|
|
61125
60994
|
});
|
|
61126
60995
|
DeviceType.Sensor;
|
|
61127
60996
|
/**
|
|
@@ -61454,8 +61323,8 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
61454
61323
|
}), _void(), { kind: "mutation" });
|
|
61455
61324
|
var PtzAutotrackSettingsSchema = object({
|
|
61456
61325
|
targetType: string().describe("Vendor target string (people/vehicle/pet); empty = camera default"),
|
|
61457
|
-
stopDelaySeconds: number().int().min(0).max(300),
|
|
61458
|
-
disappearDelaySeconds: number().int().min(0).max(300)
|
|
61326
|
+
stopDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration")),
|
|
61327
|
+
disappearDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration"))
|
|
61459
61328
|
});
|
|
61460
61329
|
/**
|
|
61461
61330
|
* One option the camera advertises as a valid `targetType`. Drivers
|
|
@@ -61512,7 +61381,7 @@ object({
|
|
|
61512
61381
|
/** null = unknown — never coerced to false (D393). */
|
|
61513
61382
|
running: boolean().nullable(),
|
|
61514
61383
|
/** Epoch ms the current boolean began; null while `running` is null. */
|
|
61515
|
-
since: number().nullable(),
|
|
61384
|
+
since: number().nullable().meta(readingMeta("none")),
|
|
61516
61385
|
source: RunningStateSourceSchema.meta({ label: "Source" }),
|
|
61517
61386
|
phase: string().nullable(),
|
|
61518
61387
|
/** null until a reading has been published (D393). */
|
|
@@ -62710,9 +62579,9 @@ var RecordTriggerSchema = _enum([
|
|
|
62710
62579
|
*/
|
|
62711
62580
|
var RecordWindowSchema = object({
|
|
62712
62581
|
trigger: RecordTriggerSchema,
|
|
62713
|
-
day: number().int().min(0).max(6),
|
|
62714
|
-
startMinute: number().int().min(0).max(1439),
|
|
62715
|
-
endMinute: number().int().min(1).max(1440)
|
|
62582
|
+
day: number().int().min(0).max(6).meta(readingMeta("none")),
|
|
62583
|
+
startMinute: number().int().min(0).max(1439).meta(readingMeta("none")),
|
|
62584
|
+
endMinute: number().int().min(1).max(1440).meta(readingMeta("none"))
|
|
62716
62585
|
});
|
|
62717
62586
|
/** Status of one physical volume, as the camera itself describes it. */
|
|
62718
62587
|
var OnboardStorageVolumeSchema = object({
|
|
@@ -62781,10 +62650,10 @@ object({
|
|
|
62781
62650
|
/** Master "record to the card at all" switch. */
|
|
62782
62651
|
enabled: boolean().nullable(),
|
|
62783
62652
|
overwriteWhenFull: boolean().nullable(),
|
|
62784
|
-
preRecordSec: number().nullable(),
|
|
62785
|
-
postRecordSec: number().nullable(),
|
|
62653
|
+
preRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
62654
|
+
postRecordSec: number().nullable().meta(readingMeta("duration")),
|
|
62786
62655
|
/** Length of one recorded file, in minutes. */
|
|
62787
|
-
segmentMinutes: number().nullable(),
|
|
62656
|
+
segmentMinutes: number().nullable().meta(readingMeta("none")),
|
|
62788
62657
|
/** The primary track's weekly windows, flattened. */
|
|
62789
62658
|
windows: array(RecordWindowSchema),
|
|
62790
62659
|
/**
|
|
@@ -62800,7 +62669,7 @@ object({
|
|
|
62800
62669
|
* provider reporting a non-zero count also reports the schedule as not
|
|
62801
62670
|
* writable.
|
|
62802
62671
|
*/
|
|
62803
|
-
unreadableWindows: number(),
|
|
62672
|
+
unreadableWindows: number().meta(readingMeta("count")),
|
|
62804
62673
|
/**
|
|
62805
62674
|
* The camera is scheduled to record and has NO usable storage.
|
|
62806
62675
|
*
|
|
@@ -63437,7 +63306,7 @@ var CamStreamDescriptorSchema = object({
|
|
|
63437
63306
|
url: string().optional(),
|
|
63438
63307
|
codec: string().optional(),
|
|
63439
63308
|
resolution: CamStreamResolutionSchema.optional(),
|
|
63440
|
-
fps: number().positive().optional(),
|
|
63309
|
+
fps: number().positive().optional().meta(readingMeta("rate")),
|
|
63441
63310
|
label: string().optional(),
|
|
63442
63311
|
/** Device-level features (e.g. `battery-operated`) — drives broker policy. */
|
|
63443
63312
|
deviceFeatures: array(string()).optional(),
|
|
@@ -63467,18 +63336,18 @@ var StreamProfileSchema = _enum([
|
|
|
63467
63336
|
]);
|
|
63468
63337
|
/** The current encoding config of one stream profile. */
|
|
63469
63338
|
var StreamProfileConfigSchema = object({
|
|
63470
|
-
width: number(),
|
|
63471
|
-
height: number(),
|
|
63339
|
+
width: number().meta(readingMeta("none")),
|
|
63340
|
+
height: number().meta(readingMeta("none")),
|
|
63472
63341
|
codec: _enum(["h264", "h265"]),
|
|
63473
|
-
framerate: number(),
|
|
63474
|
-
bitrate: number(),
|
|
63342
|
+
framerate: number().meta(readingMeta("rate")),
|
|
63343
|
+
bitrate: number().meta(readingMeta("bitrate")),
|
|
63475
63344
|
bitrateMode: _enum(["vbr", "cbr"]).optional(),
|
|
63476
63345
|
encoderProfile: _enum([
|
|
63477
63346
|
"high",
|
|
63478
63347
|
"main",
|
|
63479
63348
|
"baseline"
|
|
63480
63349
|
]).optional(),
|
|
63481
|
-
gop: number().optional(),
|
|
63350
|
+
gop: number().optional().meta(readingMeta("none")),
|
|
63482
63351
|
/**
|
|
63483
63352
|
* Whether THIS profile currently carries an audio track. READ-ONLY here.
|
|
63484
63353
|
*
|
|
@@ -64132,35 +64001,21 @@ DeviceType.Sensor;
|
|
|
64132
64001
|
* entries with `device_class: temperature` and any future native
|
|
64133
64002
|
* thermometer.
|
|
64134
64003
|
*
|
|
64135
|
-
*
|
|
64136
|
-
*
|
|
64137
|
-
* (climate-control's `currentTemp`, energy analytics) can compose
|
|
64138
|
-
* without per-source unit fixups. The canonical display unit (`°C`) is
|
|
64139
|
-
* a descriptor constant in the UI (ROLE_DESCRIPTOR), not stored in
|
|
64140
|
-
* `sourceInfo`.
|
|
64004
|
+
* The number is Celsius (D944). Providers convert on ingest. A failed
|
|
64005
|
+
* conversion is `null`, never a guess. Display unit is a read-time preference.
|
|
64141
64006
|
*
|
|
64142
64007
|
* Status `lastFetchedAt` lets staleness-aware consumers detect a
|
|
64143
64008
|
* frozen feed (provider hung) distinct from a "temperature hasn't
|
|
64144
64009
|
* changed" steady state.
|
|
64145
64010
|
*/
|
|
64146
64011
|
var TemperatureSensorStatusSchema = object({
|
|
64147
|
-
/** Current temperature in Celsius. */
|
|
64148
|
-
celsius: number().meta({
|
|
64149
|
-
|
|
64012
|
+
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64013
|
+
celsius: number().nullable().meta(readingMeta("temperature", {
|
|
64014
|
+
precision: 1,
|
|
64150
64015
|
label: "Temperature"
|
|
64151
|
-
}),
|
|
64016
|
+
})),
|
|
64152
64017
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
64153
|
-
lastFetchedAt: number()
|
|
64154
|
-
/** Live display unit from the upstream source (e.g. HA
|
|
64155
|
-
* `attributes.unit_of_measurement`). The UI prefers this over the
|
|
64156
|
-
* role's canonical unit, so a Fahrenheit feed renders '°F' not '°C'.
|
|
64157
|
-
* Absent → the UI falls back to the role's canonical unit. */
|
|
64158
|
-
unit: string().optional(),
|
|
64159
|
-
/** Suggested decimal places for numeric display.
|
|
64160
|
-
* Populated live from the upstream source when provided (e.g. HA
|
|
64161
|
-
* `attributes.suggested_display_precision`). Falls back to
|
|
64162
|
-
* auto-formatting when absent. */
|
|
64163
|
-
precision: number().int().min(0).max(10).optional()
|
|
64018
|
+
lastFetchedAt: number()
|
|
64164
64019
|
});
|
|
64165
64020
|
DeviceType.Sensor, DeviceType.Thermostat;
|
|
64166
64021
|
/**
|
|
@@ -64412,16 +64267,16 @@ object({
|
|
|
64412
64267
|
]),
|
|
64413
64268
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
64414
64269
|
* reading. */
|
|
64415
|
-
batteryLevel: number().min(0).max(100).nullable(),
|
|
64270
|
+
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64416
64271
|
/** Current fan-speed token (provider-verbatim). Null when unknown or
|
|
64417
64272
|
* the vacuum has no speed control. */
|
|
64418
64273
|
fanSpeed: string().nullable(),
|
|
64419
64274
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
64420
64275
|
availableFanSpeeds: array(string()),
|
|
64421
64276
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
64422
|
-
progressPercent: number().min(0).max(100).nullable(),
|
|
64277
|
+
progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64423
64278
|
/** Current error code (0 / null = no error). */
|
|
64424
|
-
errorCode: number().nullable(),
|
|
64279
|
+
errorCode: number().nullable().meta(readingMeta("none")),
|
|
64425
64280
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
64426
64281
|
errorLabel: string().nullable(),
|
|
64427
64282
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -64460,7 +64315,7 @@ object({
|
|
|
64460
64315
|
]),
|
|
64461
64316
|
/** 0 = fully closed, 100 = fully open. Null when the device has no
|
|
64462
64317
|
* intermediate position surface. */
|
|
64463
|
-
position: number().min(0).max(100).nullable(),
|
|
64318
|
+
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64464
64319
|
/** Ms epoch when the slice was last updated. */
|
|
64465
64320
|
lastChangedAt: number()
|
|
64466
64321
|
});
|
|
@@ -64488,9 +64343,9 @@ object({
|
|
|
64488
64343
|
DeviceType.Sensor;
|
|
64489
64344
|
object({
|
|
64490
64345
|
/** Current measured temperature. Null when not reported. */
|
|
64491
|
-
currentTemp: number().nullable(),
|
|
64346
|
+
currentTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64492
64347
|
/** Target temperature setpoint. Null when no setpoint surface. */
|
|
64493
|
-
targetTemp: number().nullable(),
|
|
64348
|
+
targetTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64494
64349
|
/** Active operation mode = HA `state` (`eco` / `electric` / `gas` /
|
|
64495
64350
|
* `heat_pump` / `high_demand` / `performance` / `off`). Null when the
|
|
64496
64351
|
* device reports an unknown state. */
|
|
@@ -64501,9 +64356,9 @@ object({
|
|
|
64501
64356
|
* has no away surface. */
|
|
64502
64357
|
away: boolean().nullable(),
|
|
64503
64358
|
/** HA `min_temp` attribute. Null when not reported. */
|
|
64504
|
-
minTemp: number().nullable(),
|
|
64359
|
+
minTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64505
64360
|
/** HA `max_temp` attribute. Null when not reported. */
|
|
64506
|
-
maxTemp: number().nullable(),
|
|
64361
|
+
maxTemp: number().nullable().meta(readingMeta("temperature")),
|
|
64507
64362
|
/** Ms epoch when the slice was last updated. */
|
|
64508
64363
|
lastChangedAt: number()
|
|
64509
64364
|
});
|
|
@@ -64527,25 +64382,18 @@ DeviceType.WaterHeater, method(object({
|
|
|
64527
64382
|
auth: "protected"
|
|
64528
64383
|
});
|
|
64529
64384
|
object({
|
|
64530
|
-
/** Verbatim
|
|
64531
|
-
* when no condition has been reported yet. */
|
|
64385
|
+
/** Verbatim condition state (`sunny`, `cloudy`, `rainy`, …). Null when none yet. */
|
|
64532
64386
|
condition: string().nullable(),
|
|
64533
|
-
/** Current temperature in
|
|
64534
|
-
temperature: number().nullable(),
|
|
64535
|
-
/** Temperature unit string (e.g. `°C` / `°F`). Null when not provided. */
|
|
64536
|
-
temperatureUnit: string().nullable(),
|
|
64387
|
+
/** Current temperature in Celsius. Null when not provided or refused. */
|
|
64388
|
+
temperature: number().nullable().meta(readingMeta("temperature", { precision: 1 })),
|
|
64537
64389
|
/** Relative humidity (0..100). Null when not provided. */
|
|
64538
|
-
humidity: number().min(0).max(100).nullable(),
|
|
64539
|
-
/** Barometric pressure in
|
|
64540
|
-
pressure: number().nullable(),
|
|
64541
|
-
/**
|
|
64542
|
-
|
|
64543
|
-
/** Wind speed in the reported unit. Null when not provided. */
|
|
64544
|
-
windSpeed: number().nullable(),
|
|
64545
|
-
/** Wind-speed unit string (e.g. `km/h` / `mph`). Null when not provided. */
|
|
64546
|
-
windSpeedUnit: string().nullable(),
|
|
64390
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
|
|
64391
|
+
/** Barometric pressure in hPa. Null when not provided or refused. */
|
|
64392
|
+
pressure: number().nullable().meta(readingMeta("pressure")),
|
|
64393
|
+
/** Wind speed in metres per second. Null when not provided or refused. */
|
|
64394
|
+
windSpeed: number().nullable().meta(readingMeta("speed")),
|
|
64547
64395
|
/** Wind bearing in degrees (0..360, meteorological). Null when not provided. */
|
|
64548
|
-
windBearing: number().nullable(),
|
|
64396
|
+
windBearing: number().nullable().meta(readingMeta("angle")),
|
|
64549
64397
|
/** Ms epoch when the slice was last updated. */
|
|
64550
64398
|
lastFetchedAt: number()
|
|
64551
64399
|
});
|
|
@@ -78420,7 +78268,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78420
78268
|
field: "value",
|
|
78421
78269
|
quantity: t("the reading", "il valore"),
|
|
78422
78270
|
label: t("Reading", "Valore"),
|
|
78423
|
-
unitField: "unit",
|
|
78424
78271
|
icon: "gauge"
|
|
78425
78272
|
}]
|
|
78426
78273
|
},
|
|
@@ -78556,7 +78403,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78556
78403
|
field: "temperature",
|
|
78557
78404
|
quantity: t("the outdoor temperature", "la temperatura esterna"),
|
|
78558
78405
|
label: t("Temperature", "Temperatura"),
|
|
78559
|
-
|
|
78406
|
+
unit: "°C",
|
|
78560
78407
|
icon: "thermometer"
|
|
78561
78408
|
},
|
|
78562
78409
|
{
|
|
@@ -78572,7 +78419,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78572
78419
|
field: "windSpeed",
|
|
78573
78420
|
quantity: t("the wind speed", "la velocità del vento"),
|
|
78574
78421
|
label: t("Wind", "Vento"),
|
|
78575
|
-
|
|
78422
|
+
unit: "m/s",
|
|
78576
78423
|
icon: "wind"
|
|
78577
78424
|
},
|
|
78578
78425
|
{
|
|
@@ -78580,7 +78427,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78580
78427
|
field: "pressure",
|
|
78581
78428
|
quantity: t("the air pressure", "la pressione atmosferica"),
|
|
78582
78429
|
label: t("Pressure", "Pressione"),
|
|
78583
|
-
|
|
78430
|
+
unit: "hPa",
|
|
78584
78431
|
icon: "gauge"
|
|
78585
78432
|
}
|
|
78586
78433
|
]
|
|
@@ -84768,14 +84615,15 @@ var temperatureAdapter = {
|
|
|
84768
84615
|
}),
|
|
84769
84616
|
properties: (_cap, slice) => {
|
|
84770
84617
|
const p = TemperatureSensorStatusSchema.pick({ celsius: true }).safeParse(slice);
|
|
84771
|
-
|
|
84618
|
+
if (!p.success || p.data.celsius === null) return [];
|
|
84619
|
+
return [{
|
|
84772
84620
|
namespace: "Alexa.TemperatureSensor",
|
|
84773
84621
|
name: "temperature",
|
|
84774
84622
|
value: {
|
|
84775
84623
|
value: Math.round(p.data.celsius * 10) / 10,
|
|
84776
84624
|
scale: "CELSIUS"
|
|
84777
84625
|
}
|
|
84778
|
-
}]
|
|
84626
|
+
}];
|
|
84779
84627
|
},
|
|
84780
84628
|
directives: [],
|
|
84781
84629
|
shaping: () => ({
|
|
@@ -85518,11 +85366,12 @@ var humidityAdapter = {
|
|
|
85518
85366
|
}),
|
|
85519
85367
|
properties: (_cap, slice) => {
|
|
85520
85368
|
const p = HumiditySensorStatusSchema.pick({ percent: true }).safeParse(slice);
|
|
85521
|
-
|
|
85369
|
+
if (!p.success || p.data.percent === null) return [];
|
|
85370
|
+
return [{
|
|
85522
85371
|
namespace: "Alexa.HumiditySensor",
|
|
85523
85372
|
name: "relativeHumidity",
|
|
85524
85373
|
value: { value: Math.max(0, Math.min(100, p.data.percent)) }
|
|
85525
|
-
}]
|
|
85374
|
+
}];
|
|
85526
85375
|
},
|
|
85527
85376
|
directives: [],
|
|
85528
85377
|
shaping: () => ({
|