@camstack/addon-export-hap 1.2.180 → 1.2.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,7 +49,7 @@ let node_fs_promises = require("node:fs/promises");
49
49
  node_fs_promises = __toESM(node_fs_promises, 1);
50
50
  let node_events = require("node:events");
51
51
  let node_dgram = require("node:dgram");
52
- //#region ../types/dist/event-category-DHXxB8t9.mjs
52
+ //#region ../types/dist/event-category-CT-hz5Rb.mjs
53
53
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
54
54
  EventCategory["SystemBoot"] = "system.boot";
55
55
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -375,6 +375,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
375
375
  /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
376
376
  EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
377
377
  /**
378
+ * A camera's package LLM confirm has failed closed three times in a row
379
+ * (D931, 2026-10-26). One edge per camera until
380
+ * {@link PipelinePackageLlmAnswered}.
381
+ */
382
+ EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
383
+ /** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
384
+ EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
385
+ /**
378
386
  * Per-camera pipeline config was mutated by the orchestrator
379
387
  * (a settings change via `setAgentInferenceDevices` /
380
388
  * `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
@@ -5484,7 +5492,7 @@ var ZodIssueCode = {
5484
5492
  var ZodFirstPartyTypeKind;
5485
5493
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5486
5494
  //#endregion
5487
- //#region ../types/dist/sleep-BErAxhul.mjs
5495
+ //#region ../types/dist/sleep-bykKrTgu.mjs
5488
5496
  /**
5489
5497
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5490
5498
  * window to float samples (D455).
@@ -7971,6 +7979,99 @@ var RecordKindDeclarationSchema = object({
7971
7979
  }).strict();
7972
7980
  /** The kind names: lower-case, dash separated, short enough for an index name. */
7973
7981
  var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
7982
+ var READING_QUANTITIES = [
7983
+ "temperature",
7984
+ "pressure",
7985
+ "speed",
7986
+ "precipitation",
7987
+ "precipitation-rate",
7988
+ "length",
7989
+ "area",
7990
+ "illuminance",
7991
+ "irradiance",
7992
+ "power",
7993
+ "energy",
7994
+ "voltage",
7995
+ "current",
7996
+ "apparent-power",
7997
+ "humidity",
7998
+ "percentage",
7999
+ "concentration-volume",
8000
+ "concentration-mass",
8001
+ "concentration-ppb",
8002
+ "volume",
8003
+ "duration",
8004
+ "duration-ms",
8005
+ "information",
8006
+ "sound-level",
8007
+ "signal-level",
8008
+ "colour-temperature",
8009
+ "angle",
8010
+ "bitrate",
8011
+ "rate",
8012
+ "mass",
8013
+ "index",
8014
+ "ratio",
8015
+ "count",
8016
+ "none",
8017
+ "device"
8018
+ ];
8019
+ var ReadingQuantitySchema = _enum(READING_QUANTITIES);
8020
+ new Set(READING_QUANTITIES);
8021
+ /**
8022
+ * Stored unit symbol for a quantity. `none` means the number is dimensionless
8023
+ * (or an index / ratio / count). `device` means the cap has no single unit.
8024
+ */
8025
+ var QUANTITY_BASE = {
8026
+ temperature: "°C",
8027
+ pressure: "hPa",
8028
+ speed: "m/s",
8029
+ precipitation: "mm",
8030
+ "precipitation-rate": "mm/h",
8031
+ length: "m",
8032
+ area: "m²",
8033
+ illuminance: "lx",
8034
+ irradiance: "W/m²",
8035
+ power: "W",
8036
+ energy: "kWh",
8037
+ voltage: "V",
8038
+ current: "A",
8039
+ "apparent-power": "VA",
8040
+ humidity: "%",
8041
+ percentage: "%",
8042
+ "concentration-volume": "ppm",
8043
+ "concentration-mass": "µg/m³",
8044
+ "concentration-ppb": "ppb",
8045
+ volume: "L",
8046
+ duration: "s",
8047
+ "duration-ms": "ms",
8048
+ information: "B",
8049
+ "sound-level": "dBFS",
8050
+ "signal-level": "dBm",
8051
+ "colour-temperature": "mired",
8052
+ angle: "°",
8053
+ bitrate: "kbps",
8054
+ rate: "fps",
8055
+ mass: "kg",
8056
+ index: "none",
8057
+ ratio: "none",
8058
+ count: "none",
8059
+ none: "none",
8060
+ device: "device"
8061
+ };
8062
+ /** The stored unit, or `undefined` when the quantity has no unit symbol. */
8063
+ function baseUnitOf(quantity) {
8064
+ const symbol = QUANTITY_BASE[quantity];
8065
+ if (symbol === "none" || symbol === "device") return void 0;
8066
+ return symbol;
8067
+ }
8068
+ function readingMeta(quantity, extras) {
8069
+ return {
8070
+ quantity,
8071
+ ...extras?.precision !== void 0 ? { precision: extras.precision } : {},
8072
+ ...extras?.label !== void 0 ? { label: extras.label } : {}
8073
+ };
8074
+ }
7974
8075
  /** Shared Zod schemas used across streaming capabilities. */
7975
8076
  var CamProfileSchema = _enum([
7976
8077
  "high",
@@ -7998,8 +8099,8 @@ var CamStreamKindSchema = _enum([
7998
8099
  "derived"
7999
8100
  ]);
8000
8101
  var CamStreamResolutionSchema = object({
8001
- width: number().int().positive(),
8002
- height: number().int().positive()
8102
+ width: number().int().positive().meta(readingMeta("none")),
8103
+ height: number().int().positive().meta(readingMeta("none"))
8003
8104
  });
8004
8105
  var CameraStreamSchema = object({
8005
8106
  /** Stable, provider-assigned id unique within the (deviceId) scope. */
@@ -8572,6 +8673,8 @@ var CAP_NAMES = Object.freeze([
8572
8673
  "filesystem-browse",
8573
8674
  "flood",
8574
8675
  "gas",
8676
+ "group-commands",
8677
+ "group-status",
8575
8678
  "heating-valve",
8576
8679
  "humidifier",
8577
8680
  "humidity-sensor",
@@ -8701,14 +8804,6 @@ Object.freeze({
8701
8804
  {
8702
8805
  "path": "aqi",
8703
8806
  "valueType": "number"
8704
- },
8705
- {
8706
- "path": "unit",
8707
- "valueType": "string"
8708
- },
8709
- {
8710
- "path": "precision",
8711
- "valueType": "number"
8712
8807
  }
8713
8808
  ],
8714
8809
  "alarm-panel": [
@@ -8744,20 +8839,10 @@ Object.freeze({
8744
8839
  "valueType": "boolean"
8745
8840
  }
8746
8841
  ],
8747
- "ambient-light-sensor": [
8748
- {
8749
- "path": "lux",
8750
- "valueType": "number"
8751
- },
8752
- {
8753
- "path": "unit",
8754
- "valueType": "string"
8755
- },
8756
- {
8757
- "path": "precision",
8758
- "valueType": "number"
8759
- }
8760
- ],
8842
+ "ambient-light-sensor": [{
8843
+ "path": "lux",
8844
+ "valueType": "number"
8845
+ }],
8761
8846
  "audio-metrics": [
8762
8847
  {
8763
8848
  "path": "ts",
@@ -8837,6 +8922,10 @@ Object.freeze({
8837
8922
  "path": "lastUpdated",
8838
8923
  "valueType": "number"
8839
8924
  },
8925
+ {
8926
+ "path": "volts",
8927
+ "valueType": "number"
8928
+ },
8840
8929
  {
8841
8930
  "path": "lastContactAt",
8842
8931
  "valueType": "number"
@@ -9079,10 +9168,6 @@ Object.freeze({
9079
9168
  "datetime"
9080
9169
  ]
9081
9170
  },
9082
- {
9083
- "path": "unit",
9084
- "valueType": "string"
9085
- },
9086
9171
  {
9087
9172
  "path": "min",
9088
9173
  "valueType": "number"
@@ -9094,19 +9179,6 @@ Object.freeze({
9094
9179
  {
9095
9180
  "path": "step",
9096
9181
  "valueType": "number"
9097
- },
9098
- {
9099
- "path": "precision",
9100
- "valueType": "number"
9101
- },
9102
- {
9103
- "path": "format",
9104
- "valueType": "enum",
9105
- "enumValues": [
9106
- "date",
9107
- "time",
9108
- "datetime"
9109
- ]
9110
9182
  }
9111
9183
  ],
9112
9184
  "cover": [
@@ -9347,13 +9419,8 @@ Object.freeze({
9347
9419
  "path": "value",
9348
9420
  "valueType": "string"
9349
9421
  }, {
9350
- "path": "format",
9351
- "valueType": "enum",
9352
- "enumValues": [
9353
- "date",
9354
- "time",
9355
- "datetime"
9356
- ]
9422
+ "path": "timestamp",
9423
+ "valueType": "boolean"
9357
9424
  }],
9358
9425
  "event-emitter": [
9359
9426
  {
@@ -9426,6 +9493,20 @@ Object.freeze({
9426
9493
  "path": "detected",
9427
9494
  "valueType": "boolean"
9428
9495
  }],
9496
+ "group-status": [
9497
+ {
9498
+ "path": "included",
9499
+ "valueType": "number"
9500
+ },
9501
+ {
9502
+ "path": "excluded",
9503
+ "valueType": "number"
9504
+ },
9505
+ {
9506
+ "path": "total",
9507
+ "valueType": "number"
9508
+ }
9509
+ ],
9429
9510
  "heating-valve": [{
9430
9511
  "path": "position",
9431
9512
  "valueType": "number"
@@ -9460,20 +9541,10 @@ Object.freeze({
9460
9541
  "valueType": "number"
9461
9542
  }
9462
9543
  ],
9463
- "humidity-sensor": [
9464
- {
9465
- "path": "percent",
9466
- "valueType": "number"
9467
- },
9468
- {
9469
- "path": "unit",
9470
- "valueType": "string"
9471
- },
9472
- {
9473
- "path": "precision",
9474
- "valueType": "number"
9475
- }
9476
- ],
9544
+ "humidity-sensor": [{
9545
+ "path": "percent",
9546
+ "valueType": "number"
9547
+ }],
9477
9548
  "image": [{
9478
9549
  "path": "url",
9479
9550
  "valueType": "string"
@@ -9812,20 +9883,10 @@ Object.freeze({
9812
9883
  "valueType": "boolean"
9813
9884
  }
9814
9885
  ],
9815
- "numeric-sensor": [
9816
- {
9817
- "path": "value",
9818
- "valueType": "number"
9819
- },
9820
- {
9821
- "path": "unit",
9822
- "valueType": "string"
9823
- },
9824
- {
9825
- "path": "precision",
9826
- "valueType": "number"
9827
- }
9828
- ],
9886
+ "numeric-sensor": [{
9887
+ "path": "value",
9888
+ "valueType": "number"
9889
+ }],
9829
9890
  "pet-feeder": [
9830
9891
  {
9831
9892
  "path": "foodLevel",
@@ -9917,14 +9978,6 @@ Object.freeze({
9917
9978
  {
9918
9979
  "path": "powerFactor",
9919
9980
  "valueType": "number"
9920
- },
9921
- {
9922
- "path": "unit",
9923
- "valueType": "string"
9924
- },
9925
- {
9926
- "path": "precision",
9927
- "valueType": "number"
9928
9981
  }
9929
9982
  ],
9930
9983
  "presence": [
@@ -9953,20 +10006,10 @@ Object.freeze({
9953
10006
  "valueType": "number"
9954
10007
  }
9955
10008
  ],
9956
- "pressure-sensor": [
9957
- {
9958
- "path": "hpa",
9959
- "valueType": "number"
9960
- },
9961
- {
9962
- "path": "unit",
9963
- "valueType": "string"
9964
- },
9965
- {
9966
- "path": "precision",
9967
- "valueType": "number"
9968
- }
9969
- ],
10009
+ "pressure-sensor": [{
10010
+ "path": "hpa",
10011
+ "valueType": "number"
10012
+ }],
9970
10013
  "privacy-mask": [{
9971
10014
  "path": "enabled",
9972
10015
  "valueType": "boolean"
@@ -10277,20 +10320,10 @@ Object.freeze({
10277
10320
  "path": "tampered",
10278
10321
  "valueType": "boolean"
10279
10322
  }],
10280
- "temperature-sensor": [
10281
- {
10282
- "path": "celsius",
10283
- "valueType": "number"
10284
- },
10285
- {
10286
- "path": "unit",
10287
- "valueType": "string"
10288
- },
10289
- {
10290
- "path": "precision",
10291
- "valueType": "number"
10292
- }
10293
- ],
10323
+ "temperature-sensor": [{
10324
+ "path": "celsius",
10325
+ "valueType": "number"
10326
+ }],
10294
10327
  "update": [
10295
10328
  {
10296
10329
  "path": "currentVersion",
@@ -10401,10 +10434,6 @@ Object.freeze({
10401
10434
  "path": "temperature",
10402
10435
  "valueType": "number"
10403
10436
  },
10404
- {
10405
- "path": "temperatureUnit",
10406
- "valueType": "string"
10407
- },
10408
10437
  {
10409
10438
  "path": "humidity",
10410
10439
  "valueType": "number"
@@ -10413,18 +10442,10 @@ Object.freeze({
10413
10442
  "path": "pressure",
10414
10443
  "valueType": "number"
10415
10444
  },
10416
- {
10417
- "path": "pressureUnit",
10418
- "valueType": "string"
10419
- },
10420
10445
  {
10421
10446
  "path": "windSpeed",
10422
10447
  "valueType": "number"
10423
10448
  },
10424
- {
10425
- "path": "windSpeedUnit",
10426
- "valueType": "string"
10427
- },
10428
10449
  {
10429
10450
  "path": "windBearing",
10430
10451
  "valueType": "number"
@@ -10827,7 +10848,7 @@ function errMsg$16(err) {
10827
10848
  return String(err);
10828
10849
  }
10829
10850
  //#endregion
10830
- //#region ../types/dist/composition-kEl9mevu.mjs
10851
+ //#region ../types/dist/composition-OhpuespA.mjs
10831
10852
  var AUDIO_ENCODER_BY_CODEC = {
10832
10853
  opus: "libopus",
10833
10854
  aac: "aac",
@@ -12177,15 +12198,74 @@ function validateExpressionSource(src) {
12177
12198
  }
12178
12199
  return null;
12179
12200
  }
12180
- /** A composed device's stableId is this prefix plus the block id. */
12181
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
12182
- /** Longest snippet a `code` source may carry (slice 4). */
12183
- var MAX_COMPOSITION_CODE_LENGTH = 2e4;
12201
+ /**
12202
+ * A composition source identity: `(addonId, stableId)`, never a numeric device
12203
+ * id. Split out so helper schemas can name it without a cycle through
12204
+ * `composition.ts` (D659).
12205
+ */
12184
12206
  var CompositionSourceRefSchema = object({
12185
12207
  /** The owning addon; `stableId` is unique only within it. */
12186
12208
  addonId: string().min(1),
12187
12209
  stableId: string().min(1)
12188
12210
  });
12211
+ var GROUP_TEMPLATE_IDS = [
12212
+ "temperature",
12213
+ "humidity",
12214
+ "pressure",
12215
+ "illuminance",
12216
+ "power",
12217
+ "energy",
12218
+ "battery",
12219
+ "numeric",
12220
+ "motion",
12221
+ "contact",
12222
+ "leak",
12223
+ "smoke",
12224
+ "occupancy",
12225
+ "binary",
12226
+ "switch",
12227
+ "light"
12228
+ ];
12229
+ var NUMERIC_AGGREGATES = [
12230
+ "mean",
12231
+ "median",
12232
+ "min",
12233
+ "max",
12234
+ "sum"
12235
+ ];
12236
+ var BINARY_AGGREGATES = ["any", "all"];
12237
+ /** How an actuator group decides it is on. Unknown members never count as off. */
12238
+ var ACTIVE_CRITERIA = ["at-least-one", "all"];
12239
+ var AGGREGATE_REDUCERS = [
12240
+ "mean",
12241
+ "median",
12242
+ "min",
12243
+ "max",
12244
+ "sum",
12245
+ "any",
12246
+ "all"
12247
+ ];
12248
+ var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
12249
+ var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
12250
+ var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
12251
+ /** One member. The field is stored so occupancy can name motion or binary. */
12252
+ var HelperMemberSchema = object({
12253
+ source: CompositionSourceRefSchema,
12254
+ cap: string().min(1),
12255
+ fieldPath: string().min(1)
12256
+ });
12257
+ var HelperSpecSchema = discriminatedUnion("kind", [object({
12258
+ kind: literal("group"),
12259
+ templateId: GroupTemplateIdSchema,
12260
+ aggregate: AggregateReducerSchema,
12261
+ members: array(HelperMemberSchema).min(1).max(64),
12262
+ /** Actuator groups only. Readings leave this unset. */
12263
+ active: ActiveCriterionSchema.optional()
12264
+ })]);
12265
+ /** A composed device's stableId is this prefix plus the block id. */
12266
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
12267
+ /** Longest snippet a `code` source may carry (slice 4). */
12268
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
12189
12269
  /** One field of one capability of one source device. */
12190
12270
  var CompositionFieldReadSchema = object({
12191
12271
  source: CompositionSourceRefSchema,
@@ -12229,7 +12309,33 @@ var CompositionCodeSourceSchema = object({
12229
12309
  var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12230
12310
  CompositionFromSourceSchema,
12231
12311
  CompositionExpressionSourceSchema,
12232
- CompositionCodeSourceSchema
12312
+ CompositionCodeSourceSchema,
12313
+ object({
12314
+ kind: literal("aggregate"),
12315
+ reducer: _enum([
12316
+ "mean",
12317
+ "median",
12318
+ "min",
12319
+ "max",
12320
+ "sum",
12321
+ "any",
12322
+ "all"
12323
+ ]),
12324
+ reads: array(CompositionFieldReadSchema).min(1).max(64),
12325
+ /** `value` is the reading; the others are the member counts. */
12326
+ publish: _enum([
12327
+ "value",
12328
+ "included",
12329
+ "excluded",
12330
+ "total"
12331
+ ]),
12332
+ /** What a `value` publish does when nobody is included. Counts ignore this. */
12333
+ empty: _enum([
12334
+ "null",
12335
+ "omit",
12336
+ "offline"
12337
+ ])
12338
+ })
12233
12339
  ]);
12234
12340
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
12235
12341
  kind: literal("forward"),
@@ -12275,7 +12381,13 @@ var CompositionSchema = object({
12275
12381
  kind: literal("existing"),
12276
12382
  device: CompositionSourceRefSchema
12277
12383
  })]),
12278
- features: array(CompositionFeatureSchema).min(1).max(16)
12384
+ features: array(CompositionFeatureSchema).min(1).max(16),
12385
+ /**
12386
+ * Present when the block is a helper template. Absent on a free
12387
+ * composition (the room example, device 4603). The editor reads this,
12388
+ * never the compiled features.
12389
+ */
12390
+ helper: HelperSpecSchema.optional()
12279
12391
  }).superRefine((composition, ctx) => {
12280
12392
  const seen = /* @__PURE__ */ new Set();
12281
12393
  composition.features.forEach((feature, index) => {
@@ -18601,7 +18713,11 @@ var CompositionProblemSchema = object({
18601
18713
  "item-field-reserved",
18602
18714
  "target-missing",
18603
18715
  "target-unreadable",
18604
- "not-replaceable"
18716
+ "not-replaceable",
18717
+ "native-capability-replace",
18718
+ "mixed-quantity",
18719
+ "helper-mismatch",
18720
+ "member-constraint"
18605
18721
  ]),
18606
18722
  path: string(),
18607
18723
  message: string()
@@ -18622,7 +18738,8 @@ var CompositionUnavailableModeSchema = _enum([
18622
18738
  "null",
18623
18739
  "offline",
18624
18740
  "unknown",
18625
- "release"
18741
+ "release",
18742
+ "omit"
18626
18743
  ]);
18627
18744
  /**
18628
18745
  * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
@@ -18659,9 +18776,11 @@ var CompositionFieldPlanSchema = object({
18659
18776
  reads: array(CompositionFieldReadSchema)
18660
18777
  });
18661
18778
  /**
18662
- * What a feature does to its target (D663): `new` builds a capability on a new
18663
- * device; on an existing device it `add`s a capability the device lacks, or
18664
- * `replace`s named fields of one it has natively.
18779
+ * What a feature does to its target (D663, D944): `new` builds a capability on a
18780
+ * new device; on an existing device it `add`s a capability the device lacks.
18781
+ * Replacing a capability the device already serves is refused
18782
+ * (`native-capability-replace`), not planned. `replace` remains on the claim
18783
+ * wire for a claim the hub already holds.
18665
18784
  */
18666
18785
  var CompositionFeatureModeSchema = _enum([
18667
18786
  "new",
@@ -18834,6 +18953,275 @@ Object.freeze({
18834
18953
  result: ["number", "null"]
18835
18954
  }
18836
18955
  });
18956
+ /**
18957
+ * One catalog row per base reading a group helper can build (D944 §3).
18958
+ * Data, not a form default written into the block.
18959
+ */
18960
+ var NOW = {
18961
+ fieldPath: "lastFetchedAt",
18962
+ expr: "now"
18963
+ };
18964
+ var CHANGED = {
18965
+ fieldPath: "lastChangedAt",
18966
+ expr: "now"
18967
+ };
18968
+ function numeric(input) {
18969
+ return {
18970
+ ...input,
18971
+ family: "numeric",
18972
+ deviceType: DeviceType.Sensor,
18973
+ memberDeviceType: DeviceType.Sensor,
18974
+ commandCaps: [],
18975
+ baseUnit: baseUnitOf(input.quantity),
18976
+ aggregates: NUMERIC_AGGREGATES,
18977
+ accept: [{
18978
+ cap: input.outputCap,
18979
+ fieldPath: input.outputField
18980
+ }]
18981
+ };
18982
+ }
18983
+ function binary(input) {
18984
+ return {
18985
+ ...input,
18986
+ family: "binary",
18987
+ deviceType: DeviceType.Sensor,
18988
+ memberDeviceType: DeviceType.Sensor,
18989
+ commandCaps: [],
18990
+ quantity: "none",
18991
+ baseUnit: void 0,
18992
+ aggregates: BINARY_AGGREGATES,
18993
+ empty: "offline"
18994
+ };
18995
+ }
18996
+ var GROUP_TEMPLATES = [
18997
+ numeric({
18998
+ id: "temperature",
18999
+ summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
19000
+ role: DeviceRole.TemperatureSensor,
19001
+ outputCap: "temperature-sensor",
19002
+ outputField: "celsius",
19003
+ quantity: "temperature",
19004
+ defaultAggregate: "mean",
19005
+ empty: "null",
19006
+ companions: [NOW]
19007
+ }),
19008
+ numeric({
19009
+ id: "humidity",
19010
+ summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
19011
+ role: DeviceRole.HumiditySensor,
19012
+ outputCap: "humidity-sensor",
19013
+ outputField: "percent",
19014
+ quantity: "humidity",
19015
+ defaultAggregate: "mean",
19016
+ empty: "null",
19017
+ companions: [NOW]
19018
+ }),
19019
+ numeric({
19020
+ id: "pressure",
19021
+ summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
19022
+ role: DeviceRole.PressureSensor,
19023
+ outputCap: "pressure-sensor",
19024
+ outputField: "hpa",
19025
+ quantity: "pressure",
19026
+ defaultAggregate: "mean",
19027
+ empty: "null",
19028
+ companions: [NOW]
19029
+ }),
19030
+ numeric({
19031
+ id: "illuminance",
19032
+ summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
19033
+ role: DeviceRole.AmbientLightSensor,
19034
+ outputCap: "ambient-light-sensor",
19035
+ outputField: "lux",
19036
+ quantity: "illuminance",
19037
+ defaultAggregate: "mean",
19038
+ empty: "null",
19039
+ companions: [NOW]
19040
+ }),
19041
+ numeric({
19042
+ id: "power",
19043
+ summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
19044
+ role: DeviceRole.PowerSensor,
19045
+ outputCap: "power-meter",
19046
+ outputField: "watts",
19047
+ quantity: "power",
19048
+ defaultAggregate: "sum",
19049
+ empty: "omit",
19050
+ companions: [NOW]
19051
+ }),
19052
+ numeric({
19053
+ id: "energy",
19054
+ summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
19055
+ role: DeviceRole.EnergySensor,
19056
+ outputCap: "power-meter",
19057
+ outputField: "kwhTotal",
19058
+ quantity: "energy",
19059
+ defaultAggregate: "sum",
19060
+ empty: "omit",
19061
+ companions: [NOW]
19062
+ }),
19063
+ numeric({
19064
+ id: "battery",
19065
+ summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
19066
+ role: DeviceRole.BatterySensor,
19067
+ outputCap: "battery",
19068
+ outputField: "percentage",
19069
+ quantity: "percentage",
19070
+ defaultAggregate: "mean",
19071
+ empty: "null",
19072
+ companions: [
19073
+ {
19074
+ fieldPath: "charging",
19075
+ expr: "\"unknown\""
19076
+ },
19077
+ {
19078
+ fieldPath: "sleeping",
19079
+ expr: "false"
19080
+ },
19081
+ {
19082
+ fieldPath: "lastUpdated",
19083
+ expr: "now"
19084
+ }
19085
+ ]
19086
+ }),
19087
+ numeric({
19088
+ id: "numeric",
19089
+ summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
19090
+ role: DeviceRole.NumericSensor,
19091
+ outputCap: "numeric-sensor",
19092
+ outputField: "value",
19093
+ quantity: "device",
19094
+ defaultAggregate: "mean",
19095
+ empty: "null",
19096
+ companions: [NOW]
19097
+ }),
19098
+ binary({
19099
+ id: "motion",
19100
+ summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
19101
+ role: DeviceRole.MotionSensor,
19102
+ outputCap: "motion",
19103
+ outputField: "detected",
19104
+ defaultAggregate: "any",
19105
+ accept: [{
19106
+ cap: "motion",
19107
+ fieldPath: "detected"
19108
+ }],
19109
+ companions: [{
19110
+ fieldPath: "lastDetectedAt",
19111
+ expr: "null"
19112
+ }, {
19113
+ fieldPath: "autoClearAfterMs",
19114
+ expr: "null"
19115
+ }]
19116
+ }),
19117
+ binary({
19118
+ id: "contact",
19119
+ summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
19120
+ role: DeviceRole.ContactSensor,
19121
+ outputCap: "contact",
19122
+ outputField: "entryOpen",
19123
+ defaultAggregate: "any",
19124
+ accept: [{
19125
+ cap: "contact",
19126
+ fieldPath: "entryOpen"
19127
+ }],
19128
+ companions: [CHANGED]
19129
+ }),
19130
+ binary({
19131
+ id: "leak",
19132
+ summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
19133
+ role: DeviceRole.LeakSensor,
19134
+ outputCap: "flood",
19135
+ outputField: "flooded",
19136
+ defaultAggregate: "any",
19137
+ accept: [{
19138
+ cap: "flood",
19139
+ fieldPath: "flooded"
19140
+ }],
19141
+ companions: [CHANGED]
19142
+ }),
19143
+ binary({
19144
+ id: "smoke",
19145
+ summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
19146
+ role: DeviceRole.SmokeSensor,
19147
+ outputCap: "smoke",
19148
+ outputField: "detected",
19149
+ defaultAggregate: "any",
19150
+ accept: [{
19151
+ cap: "smoke",
19152
+ fieldPath: "detected"
19153
+ }],
19154
+ companions: [CHANGED]
19155
+ }),
19156
+ binary({
19157
+ id: "occupancy",
19158
+ summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
19159
+ role: DeviceRole.BinarySensor,
19160
+ outputCap: "binary",
19161
+ outputField: "on",
19162
+ defaultAggregate: "any",
19163
+ accept: [{
19164
+ cap: "motion",
19165
+ fieldPath: "detected"
19166
+ }, {
19167
+ cap: "binary",
19168
+ fieldPath: "on"
19169
+ }],
19170
+ companions: [CHANGED]
19171
+ }),
19172
+ binary({
19173
+ id: "binary",
19174
+ summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
19175
+ role: DeviceRole.BinarySensor,
19176
+ outputCap: "binary",
19177
+ outputField: "on",
19178
+ defaultAggregate: "any",
19179
+ accept: [{
19180
+ cap: "binary",
19181
+ fieldPath: "on"
19182
+ }],
19183
+ companions: [CHANGED]
19184
+ }),
19185
+ actuator({
19186
+ id: "switch",
19187
+ summary: "On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.",
19188
+ deviceType: DeviceType.Switch,
19189
+ outputCap: "switch",
19190
+ commandCaps: ["switch"]
19191
+ }),
19192
+ actuator({
19193
+ id: "light",
19194
+ summary: "On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.",
19195
+ deviceType: DeviceType.Light,
19196
+ outputCap: "switch",
19197
+ commandCaps: [
19198
+ "switch",
19199
+ "brightness",
19200
+ "color"
19201
+ ]
19202
+ })
19203
+ ];
19204
+ function actuator(input) {
19205
+ return {
19206
+ ...input,
19207
+ family: "actuator",
19208
+ role: void 0,
19209
+ memberDeviceType: input.deviceType,
19210
+ outputField: "on",
19211
+ quantity: "none",
19212
+ baseUnit: void 0,
19213
+ aggregates: BINARY_AGGREGATES,
19214
+ defaultAggregate: "any",
19215
+ empty: "offline",
19216
+ accept: [{
19217
+ cap: "switch",
19218
+ fieldPath: "on"
19219
+ }],
19220
+ companions: [CHANGED]
19221
+ };
19222
+ }
19223
+ new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
19224
+ DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18837
19225
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18838
19226
  /**
18839
19227
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -20603,12 +20991,12 @@ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema
20603
20991
  * providers detect renames by matching `uniqueId` and patch `id`
20604
20992
  * in-place so dispatch keeps working.
20605
20993
  *
20606
- * **Rendering metadata is NOT stored here.** Display fields (`unit`,
20607
- * `precision`) live in the cap STATUS SLICE so they flow live with every
20608
- * state push and are the single source of truth. The `device_class` tag is
20609
- * an HA-specific input that is consumed at the discovery boundary
20610
- * (`ha-domain-mapping`) to derive the CamStack `DeviceRole`; it is never
20611
- * stored after that point.
20994
+ * **Display unit and precision are NOT stored here.** They are a read-time
20995
+ * preference (D944). A polymorphic reading stores its `quantity` here once,
20996
+ * at adopt, and a date/time value stores `dateTimeShape` the same way —
20997
+ * neither is repeated on each sample. The `device_class` tag is an
20998
+ * HA-specific input consumed at the discovery boundary (`ha-domain-mapping`)
20999
+ * to derive the CamStack `DeviceRole`; it is never stored after that point.
20612
21000
  *
20613
21001
  * The `raw` escape hatch carries provider-specific attributes that don't
20614
21002
  * fit the structured slots (HA `attributes` whitelist, Reolink `deviceCache`
@@ -20622,6 +21010,14 @@ var SourceInfoSchema = object({
20622
21010
  /** Immutable upstream identifier when available (HA `unique_id`, … ).
20623
21011
  * Used to detect rename when `id` changes. */
20624
21012
  uniqueId: string().optional(),
21013
+ /** Quantity of a polymorphic reading, written once at adopt (D944). */
21014
+ quantity: ReadingQuantitySchema.optional(),
21015
+ /** Date / time / datetime shape of a string reading, written once at adopt. */
21016
+ dateTimeShape: _enum([
21017
+ "date",
21018
+ "time",
21019
+ "datetime"
21020
+ ]).optional(),
20625
21021
  /** Provider-specific extras that don't fit the structured slots.
20626
21022
  * Whitelist what goes here per provider — do NOT dump entire HA
20627
21023
  * attribute blobs (would explode the meta JSON column). */
@@ -41559,7 +41955,8 @@ method(object({
41559
41955
  "enum"
41560
41956
  ]),
41561
41957
  enumValues: array(string()).optional(),
41562
- item: boolean().optional()
41958
+ item: boolean().optional(),
41959
+ quantity: ReadingQuantitySchema.optional()
41563
41960
  })).readonly(),
41564
41961
  itemArray: object({
41565
41962
  path: string(),
@@ -45359,8 +45756,8 @@ var MaskPolygonShapeSchema = object({
45359
45756
  /** Boolean cell grid — row-major, length === gridWidth*gridHeight. */
45360
45757
  var MaskGridShapeSchema = object({
45361
45758
  kind: literal("grid"),
45362
- gridWidth: number(),
45363
- gridHeight: number(),
45759
+ gridWidth: number().meta(readingMeta("none")),
45760
+ gridHeight: number().meta(readingMeta("none")),
45364
45761
  cells: array(boolean())
45365
45762
  });
45366
45763
  discriminatedUnion("kind", [
@@ -45472,6 +45869,8 @@ var NcSystemEventKindSchema = _enum([
45472
45869
  "detection-blind",
45473
45870
  "motion-noisy",
45474
45871
  "motion-calm",
45872
+ "package-llm-silent",
45873
+ "package-llm-answered",
45475
45874
  "recording-stalled",
45476
45875
  "recording-healthy",
45477
45876
  "recording-degraded",
@@ -56679,6 +57078,28 @@ var PackageVersionInfoSchema = object({
56679
57078
  deprecated: string().optional(),
56680
57079
  distTags: array(string()).readonly()
56681
57080
  });
57081
+ /**
57082
+ * One published document. `ok` is markdown from the registry. `missing` means
57083
+ * the registry answered and the file was not there. `error` is a registry or
57084
+ * tarball failure — never an empty string standing in for either.
57085
+ */
57086
+ var PackageDocBodySchema = discriminatedUnion("status", [
57087
+ object({
57088
+ status: literal("ok"),
57089
+ markdown: string()
57090
+ }),
57091
+ object({ status: literal("missing") }),
57092
+ object({
57093
+ status: literal("error"),
57094
+ message: string()
57095
+ })
57096
+ ]);
57097
+ var PackageDocsSchema = object({
57098
+ name: string(),
57099
+ version: string(),
57100
+ readme: PackageDocBodySchema,
57101
+ changelog: PackageDocBodySchema
57102
+ });
56682
57103
  var SearchResultSchema = object({
56683
57104
  name: string(),
56684
57105
  version: string(),
@@ -56897,7 +57318,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
56897
57318
  }), object({ success: literal(true) }), {
56898
57319
  kind: "mutation",
56899
57320
  auth: "admin"
56900
- }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
57321
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
57322
+ name: string().min(1),
57323
+ version: string().min(1).optional()
57324
+ }), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
56901
57325
  kind: "mutation",
56902
57326
  auth: "admin"
56903
57327
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -56947,27 +57371,17 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
56947
57371
  }), LogStreamEntrySchema, { kind: "subscription" });
56948
57372
  object({
56949
57373
  /** Carbon dioxide concentration in ppm. */
56950
- co2Ppm: number().min(0).optional(),
57374
+ co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
56951
57375
  /** Total volatile organic compounds in ppb. */
56952
- vocPpb: number().min(0).optional(),
57376
+ vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
56953
57377
  /** Particulate matter ≤ 2.5 μm in µg/m³. */
56954
- pm25: number().min(0).optional(),
57378
+ pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
56955
57379
  /** Particulate matter ≤ 10 μm in µg/m³. */
56956
- pm10: number().min(0).optional(),
57380
+ pm10: number().min(0).optional().meta(readingMeta("concentration-mass")),
56957
57381
  /** Composite AQI value (typically 0..500). */
56958
- aqi: number().optional(),
57382
+ aqi: number().optional().meta(readingMeta("index")),
56959
57383
  /** Ms epoch when the slice was last updated. */
56960
- lastFetchedAt: number(),
56961
- /** Live display unit of the single metric this slice carries (e.g. HA
56962
- * `attributes.unit_of_measurement` → 'ppm' / 'ppb' / 'µg/m³'). Each
56963
- * upstream `sensor.*` entity surfaces ONE device_class, so one unit
56964
- * per slice is unambiguous. */
56965
- unit: string().optional(),
56966
- /** Suggested decimal places for numeric display.
56967
- * Populated live from the upstream source when provided (e.g. HA
56968
- * `attributes.suggested_display_precision`). Falls back to
56969
- * auto-formatting when absent. */
56970
- precision: number().int().min(0).max(10).optional()
57384
+ lastFetchedAt: number()
56971
57385
  });
56972
57386
  DeviceType.Sensor;
56973
57387
  /**
@@ -56975,22 +57389,13 @@ DeviceType.Sensor;
56975
57389
  * entries with `device_class: illuminance`.
56976
57390
  */
56977
57391
  var AmbientLightSensorStatusSchema = object({
56978
- /** Current illuminance in lux (lx). */
56979
- lux: number().min(0).meta({
56980
- unit: "lx",
57392
+ /** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
57393
+ lux: number().min(0).nullable().meta(readingMeta("illuminance", {
57394
+ precision: 0,
56981
57395
  label: "Illuminance"
56982
- }),
57396
+ })),
56983
57397
  /** Ms epoch when the slice was last updated. */
56984
- lastFetchedAt: number(),
56985
- /** Live display unit from the upstream source (e.g. HA
56986
- * `attributes.unit_of_measurement`). The UI prefers this over the
56987
- * role's canonical unit. Absent → fall back to the canonical unit. */
56988
- unit: string().optional(),
56989
- /** Suggested decimal places for numeric display.
56990
- * Populated live from the upstream source when provided (e.g. HA
56991
- * `attributes.suggested_display_precision`). Falls back to
56992
- * auto-formatting when absent. */
56993
- precision: number().int().min(0).max(10).optional()
57398
+ lastFetchedAt: number()
56994
57399
  });
56995
57400
  DeviceType.Sensor;
56996
57401
  /**
@@ -57135,10 +57540,7 @@ var BatteryStatusSchema = object({
57135
57540
  * Consumers must SKIP a null rather than coerce it — `battery-band` already
57136
57541
  * declines to band a non-finite reading, which is the correct shape.
57137
57542
  */
57138
- percentage: number().min(0).max(100).nullable().meta({
57139
- unit: "%",
57140
- label: "Charge"
57141
- }),
57543
+ percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
57142
57544
  /**
57143
57545
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
57144
57546
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -57165,7 +57567,14 @@ var BatteryStatusSchema = object({
57165
57567
  */
57166
57568
  sleeping: boolean().meta({ label: "Sleeping" }),
57167
57569
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
57168
- lastUpdated: number(),
57570
+ lastUpdated: number().meta(readingMeta("none")),
57571
+ /**
57572
+ * Battery voltage in volts, for a cell the firmware reports as voltage
57573
+ * rather than a percentage (Ecowitt capacitor packs). Absent on cameras
57574
+ * that only report charge. A second reading on this cap, not a second
57575
+ * `numeric-sensor` on the same device.
57576
+ */
57577
+ volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
57169
57578
  /**
57170
57579
  * Ms epoch of the last time the device PROVED it was reachable — a
57171
57580
  * completed firmware round-trip, an observed wake, or an inbound push
@@ -57225,7 +57634,7 @@ object({
57225
57634
  DeviceType.Sensor;
57226
57635
  object({
57227
57636
  /** Current level as 0..100 inclusive. Firmware-reported. */
57228
- percentage: number().min(0).max(100),
57637
+ percentage: number().min(0).max(100).meta(readingMeta("percentage")),
57229
57638
  /** Ms epoch of the last operator-driven change. Useful for UI freshness. */
57230
57639
  lastChangedAt: number()
57231
57640
  });
@@ -57614,21 +58023,21 @@ object({
57614
58023
  /** Single setpoint in Celsius. Used by single-target modes
57615
58024
  * (heat / cool / dry). Null when the device is in a range mode
57616
58025
  * (`heat_cool`) or has no setpoint at all (`fan_only`/`off`). */
57617
- target: number().nullable(),
58026
+ target: number().nullable().meta(readingMeta("temperature")),
57618
58027
  /** Upper bound of the dual setpoint in Celsius. Populated only
57619
58028
  * in `heat_cool` mode. */
57620
- targetHigh: number().nullable(),
58029
+ targetHigh: number().nullable().meta(readingMeta("temperature")),
57621
58030
  /** Lower bound of the dual setpoint in Celsius. Populated only
57622
58031
  * in `heat_cool` mode. */
57623
- targetLow: number().nullable(),
58032
+ targetLow: number().nullable().meta(readingMeta("temperature")),
57624
58033
  /** Target relative humidity (0..100). Null when the device has no
57625
58034
  * humidity control. */
57626
- targetHumidity: number().min(0).max(100).nullable(),
58035
+ targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
57627
58036
  /** Current measured temperature in Celsius. Read-only — pushed by
57628
58037
  * the device's internal sensor. */
57629
- currentTemp: number().nullable(),
58038
+ currentTemp: number().nullable().meta(readingMeta("temperature")),
57630
58039
  /** Current measured relative humidity (0..100). Read-only. */
57631
- currentHumidity: number().min(0).max(100).nullable(),
58040
+ currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
57632
58041
  /** Vertical louver swing on/off. Null when the device has no vertical
57633
58042
  * swing surface (gate with `DeviceFeature.ClimateSwingVertical`). */
57634
58043
  swingVertical: boolean().nullable(),
@@ -57636,11 +58045,11 @@ object({
57636
58045
  * horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
57637
58046
  swingHorizontal: boolean().nullable(),
57638
58047
  /** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
57639
- minTemp: number().nullable().optional(),
58048
+ minTemp: number().nullable().optional().meta(readingMeta("temperature")),
57640
58049
  /** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
57641
- maxTemp: number().nullable().optional(),
58050
+ maxTemp: number().nullable().optional().meta(readingMeta("temperature")),
57642
58051
  /** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
57643
- tempStep: number().positive().nullable().optional(),
58052
+ tempStep: number().positive().nullable().optional().meta(readingMeta("temperature")),
57644
58053
  /** Ms epoch when the slice was last updated (push or command). */
57645
58054
  lastFetchedAt: number()
57646
58055
  });
@@ -57719,17 +58128,17 @@ DeviceType.Thermostat, DeviceType.Climate, method(object({
57719
58128
  * modes to expose in the picker without a slice fetch.
57720
58129
  */
57721
58130
  var RgbTripletSchema = object({
57722
- r: number().int().min(0).max(255),
57723
- g: number().int().min(0).max(255),
57724
- b: number().int().min(0).max(255)
58131
+ r: number().int().min(0).max(255).meta(readingMeta("none")),
58132
+ g: number().int().min(0).max(255).meta(readingMeta("none")),
58133
+ b: number().int().min(0).max(255).meta(readingMeta("none"))
57725
58134
  });
57726
58135
  var HsvTripletSchema = object({
57727
58136
  /** Hue in degrees, 0..360. */
57728
- h: number().min(0).max(360),
58137
+ h: number().min(0).max(360).meta(readingMeta("none")),
57729
58138
  /** Saturation as 0..100 inclusive. */
57730
- s: number().min(0).max(100),
58139
+ s: number().min(0).max(100).meta(readingMeta("none")),
57731
58140
  /** Value/brightness as 0..100 inclusive. */
57732
- v: number().min(0).max(100)
58141
+ v: number().min(0).max(100).meta(readingMeta("none"))
57733
58142
  });
57734
58143
  var ColorInputSchema = discriminatedUnion("mode", [
57735
58144
  object({
@@ -57758,7 +58167,7 @@ object({
57758
58167
  /** Populated when `mode === 'hsv'`. */
57759
58168
  hsv: HsvTripletSchema.optional(),
57760
58169
  /** Populated when `mode === 'mired'`. */
57761
- mireds: number().int().optional(),
58170
+ mireds: number().int().optional().meta(readingMeta("colour-temperature")),
57762
58171
  /** Ms epoch of the last operator-driven change. */
57763
58172
  lastChangedAt: number()
57764
58173
  });
@@ -57882,18 +58291,12 @@ _enum([
57882
58291
  "empty",
57883
58292
  "full"
57884
58293
  ]);
57885
- /** Units a remaining-life counter is reported in. Closed: the panel renders
57886
- * each. */
57887
- var ConsumableRemainingUnitSchema = _enum([
57888
- "days",
57889
- "hours",
57890
- "cycles"
57891
- ]);
57892
- /** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
57893
- * days). `value` null = unknown (D393). */
58294
+ /** Whether `remaining.value` is a duration in seconds or a dimensionless count. */
58295
+ var ConsumableRemainingKindSchema = _enum(["duration", "count"]);
58296
+ /** Remaining life. `value` null = unknown (D393). Duration is seconds. */
57894
58297
  var ConsumableRemainingSchema = object({
57895
- value: number().min(0).nullable(),
57896
- unit: ConsumableRemainingUnitSchema
58298
+ value: number().min(0).nullable().meta(readingMeta("device")),
58299
+ kind: ConsumableRemainingKindSchema
57897
58300
  });
57898
58301
  var ConsumablesStatusSchema = object({
57899
58302
  items: array(object({
@@ -57902,7 +58305,7 @@ var ConsumablesStatusSchema = object({
57902
58305
  /** Display name. */
57903
58306
  label: string().min(1),
57904
58307
  /** Remaining life % (`wear`) or fill % (`supply`, `waste`) when known (0..100). */
57905
- level: number().min(0).max(100).nullable(),
58308
+ level: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
57906
58309
  /** The provider's discrete verdict when known (binary mode). */
57907
58310
  status: ConsumableStatusSchema.nullable(),
57908
58311
  /** What the item is — decides whether low or full is bad. Absent = `wear`. */
@@ -57919,7 +58322,7 @@ var ConsumablesStatusSchema = object({
57919
58322
  })),
57920
58323
  lastChangedAt: number()
57921
58324
  });
57922
- Object.values(DeviceType), [...ConsumableRemainingUnitSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
58325
+ Object.values(DeviceType), [...ConsumableRemainingKindSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
57923
58326
  Object.values(DeviceType), method(object({
57924
58327
  deviceId: number().int().nonnegative(),
57925
58328
  key: string().min(1)
@@ -57956,39 +58359,17 @@ object({
57956
58359
  /** Current value. Numeric kind → number; select/text/datetime → string.
57957
58360
  * Datetime values are ISO 8601 strings (full timestamp, date-only,
57958
58361
  * or time-only — HA accepts all three forms). */
57959
- value: union([number(), string()]),
58362
+ value: union([number().meta(readingMeta("device")), string()]),
57960
58363
  /** Acceptable values when `kind === 'select'`. Empty for other kinds. */
57961
58364
  options: array(string()),
57962
58365
  /** Ms epoch when the slice was last updated. */
57963
58366
  lastChangedAt: number(),
57964
- /** Display unit-of-measurement (e.g. '°C', '%', 'lx').
57965
- * Populated live from HA `attributes.unit_of_measurement` on each push.
57966
- * Meaningful for `kind === 'numeric'`; absent for other kinds. */
57967
- unit: string().optional(),
57968
- /** Minimum allowed value. Populated live from HA `attributes.min`.
57969
- * Meaningful for `kind === 'numeric'`; absent for other kinds. */
57970
- min: number().optional(),
57971
- /** Maximum allowed value. Populated live from HA `attributes.max`.
57972
- * Meaningful for `kind === 'numeric'`; absent for other kinds. */
57973
- max: number().optional(),
57974
- /** Step increment. Populated live from HA `attributes.step`.
57975
- * Meaningful for `kind === 'numeric'`; absent for other kinds. */
57976
- step: number().optional(),
57977
- /** Suggested decimal places for numeric display. Populated live from HA
57978
- * `attributes.suggested_display_precision`, or derived from `step` when the
57979
- * HA attribute is absent. Meaningful for `kind === 'numeric'`; absent for
57980
- * other kinds. Falls back to auto-formatting when absent. */
57981
- precision: number().int().min(0).max(10).optional(),
57982
- /** Date-picker granularity for `kind === 'datetime'`. 'date' → date-only,
57983
- * 'time' → time-only, 'datetime' → full timestamp. Absent for other kinds
57984
- * (UI defaults to 'datetime'). Derived live from the device's HA domain
57985
- * (date.* / time.* / datetime.*) or, for input_datetime, from the entity's
57986
- * `has_date`/`has_time` attributes on each push. */
57987
- format: _enum([
57988
- "date",
57989
- "time",
57990
- "datetime"
57991
- ]).optional()
58367
+ /** Minimum allowed value, in the device quantity's base unit. */
58368
+ min: number().optional().meta(readingMeta("device")),
58369
+ /** Maximum allowed value, in the device quantity's base unit. */
58370
+ max: number().optional().meta(readingMeta("device")),
58371
+ /** Step increment, in the device quantity's base unit. */
58372
+ step: number().optional().meta(readingMeta("device"))
57992
58373
  });
57993
58374
  var ControlSetValueInputSchema = discriminatedUnion("kind", [
57994
58375
  object({
@@ -58026,9 +58407,9 @@ object({
58026
58407
  ]),
58027
58408
  /** 0 = fully closed, 100 = fully open. Null when the device has
58028
58409
  * no intermediate position surface. */
58029
- position: number().min(0).max(100).nullable(),
58410
+ position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58030
58411
  /** 0 = closed slats, 100 = open slats. Null when no tilt support. */
58031
- tiltPosition: number().min(0).max(100).nullable(),
58412
+ tiltPosition: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58032
58413
  /** Ms epoch when the slice was last updated. */
58033
58414
  lastChangedAt: number()
58034
58415
  });
@@ -58086,9 +58467,9 @@ var NormalizedRangeSchema$1 = object({
58086
58467
  object({
58087
58468
  mode: DayNightModeSchema,
58088
58469
  /** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
58089
- sensitivity: number().optional(),
58470
+ sensitivity: number().optional().meta(readingMeta("none")),
58090
58471
  /** Delay before the IR-cut filter flips, in seconds. */
58091
- switchDelaySec: number().optional(),
58472
+ switchDelaySec: number().optional().meta(readingMeta("duration")),
58092
58473
  lastFetchedAt: number()
58093
58474
  });
58094
58475
  /**
@@ -58243,11 +58624,11 @@ object({
58243
58624
  /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
58244
58625
  availablePrograms: array(string()),
58245
58626
  /** Seconds remaining on the active cycle, or null when not running / not known. */
58246
- remainingSeconds: number().int().nonnegative().nullable(),
58627
+ remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58247
58628
  /** Seconds the delayed start is set to (time until the cycle starts), or null. */
58248
- delayedStartSeconds: number().int().nonnegative().nullable(),
58629
+ delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58249
58630
  /** Cycle completion 0..100, or null when not applicable. */
58250
- progressPercent: number().min(0).max(100).nullable(),
58631
+ progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58251
58632
  /** True when the door is reported open; null when the door state is not known. */
58252
58633
  doorOpen: boolean().nullable(),
58253
58634
  /** True when the door is latched (locked) during a cycle; null when not reported. */
@@ -58271,7 +58652,7 @@ object({
58271
58652
  /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
58272
58653
  machineCareDue: boolean().nullable(),
58273
58654
  /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
58274
- machineCareRemainingRuns: number().int().nonnegative().nullable(),
58655
+ machineCareRemainingRuns: number().int().nonnegative().nullable().meta(readingMeta("count")),
58275
58656
  /** Option states: null when the appliance does not expose the option or has not said. */
58276
58657
  halfLoad: boolean().nullable(),
58277
58658
  hygienePlus: boolean().nullable(),
@@ -58286,7 +58667,7 @@ object({
58286
58667
  /** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
58287
58668
  activeEvents: array(string()),
58288
58669
  /** Numeric error code when the appliance reports one; null otherwise. */
58289
- errorCode: number().nullable(),
58670
+ errorCode: number().nullable().meta(readingMeta("none")),
58290
58671
  /** Name of the raised alert-level event while the appliance is in error; null otherwise. */
58291
58672
  errorLabel: string().nullable(),
58292
58673
  /** Ms epoch of the last value received from the appliance; 0 = never. */
@@ -58432,24 +58813,14 @@ object({
58432
58813
  /** Ms epoch of the last press. null = never observed since this provider started. */
58433
58814
  lastPressedAt: number().nullable(),
58434
58815
  /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
58435
- pressCountSinceStart: number()
58816
+ pressCountSinceStart: number().meta(readingMeta("count"))
58436
58817
  });
58437
58818
  object({
58438
58819
  deviceId: number(),
58439
58820
  timestamp: number()
58440
58821
  });
58441
58822
  DeviceType.Button, DeviceType.Camera;
58442
- /**
58443
- * Enum-state sensor — a string value picked from a finite option set.
58444
- * Drives HA `sensor` entries with `state_class: enum` (HVAC action
58445
- * states, weather conditions, contact-source channels, mode strings).
58446
- * The option set is stable across observations; it is persisted in the
58447
- * device config blob (via the control slice at adoption) and is NOT
58448
- * stored in `sourceInfo`.
58449
- */
58450
- /** Locale-render shape for an ISO `value` carried by a `DateTimeSensor`-role
58451
- * enum sensor: `date` (date-only), `time` (time-only), `datetime` (both). */
58452
- var EnumSensorDateTimeFormatSchema = _enum([
58823
+ _enum([
58453
58824
  "date",
58454
58825
  "time",
58455
58826
  "datetime"
@@ -58457,12 +58828,11 @@ var EnumSensorDateTimeFormatSchema = _enum([
58457
58828
  object({
58458
58829
  value: string(),
58459
58830
  /**
58460
- * Set for `DateTimeSensor`-role sensors so the UI renders the ISO `value`
58461
- * as a locale date/time/datetime; absent for plain enum sensors. HA
58462
- * `device_class=timestamp` → `'datetime'`, `device_class=date` → `'date'`,
58463
- * a time-only sensor → `'time'`.
58831
+ * Set when `value` is a timestamp rather than an enum state, so history
58832
+ * does not learn ISO strings as states. The display shape (date / time /
58833
+ * datetime) lives on `SourceInfo.dateTimeShape`, written once at adopt.
58464
58834
  */
58465
- format: EnumSensorDateTimeFormatSchema.optional(),
58835
+ timestamp: boolean().optional(),
58466
58836
  /** Ms epoch when the slice was last updated. */
58467
58837
  lastFetchedAt: number()
58468
58838
  });
@@ -58481,13 +58851,13 @@ var EventFireSchema = object({
58481
58851
  deviceId: number(),
58482
58852
  eventType: string(),
58483
58853
  data: record(string(), unknown()).nullable(),
58484
- timestamp: number(),
58485
- seq: number()
58854
+ timestamp: number().meta(readingMeta("none")),
58855
+ seq: number().meta(readingMeta("count"))
58486
58856
  });
58487
58857
  object({
58488
58858
  eventTypes: array(string()),
58489
58859
  lastEvent: EventFireSchema.nullable(),
58490
- eventCountSinceStart: number()
58860
+ eventCountSinceStart: number().meta(readingMeta("count"))
58491
58861
  });
58492
58862
  DeviceType.EventEmitter;
58493
58863
  var IdentitySchema = object({
@@ -58876,10 +59246,10 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
58876
59246
  object({
58877
59247
  /** Active speed as 0..100 inclusive. Null when the device has no
58878
59248
  * speed surface (single-speed fan). */
58879
- percentage: number().min(0).max(100).nullable(),
59249
+ percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58880
59250
  /** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
58881
59251
  * a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
58882
- percentageStep: number().positive().optional(),
59252
+ percentageStep: number().positive().optional().meta(readingMeta("percentage")),
58883
59253
  /** Active preset mode (`auto` / `quiet` / `turbo` / vendor-specific)
58884
59254
  * — empty string when no preset is active or supported. */
58885
59255
  preset: string(),
@@ -58961,7 +59331,7 @@ var FeatureProbeStatusSchema = object({
58961
59331
  /** Camera/firmware model string. `null` when the firmware doesn't expose it. */
58962
59332
  model: string().nullable(),
58963
59333
  /** Channel count for NVR/Hub devices; `1` for standalone cameras; `null` pre-probe. */
58964
- channelCount: number().nullable(),
59334
+ channelCount: number().nullable().meta(readingMeta("count")),
58965
59335
  /**
58966
59336
  * Ms epoch of the last SUCCESSFUL probe. `0` before the first probe
58967
59337
  * completes — drivers' `getAccessoryChildren()` should treat zero as
@@ -59001,9 +59371,39 @@ object({
59001
59371
  lastChangedAt: number()
59002
59372
  });
59003
59373
  DeviceType.Sensor;
59374
+ object({
59375
+ /** One row per member that has been commanded. A later command replaces that member's row. */
59376
+ results: array(object({
59377
+ deviceId: number().int().nonnegative(),
59378
+ cap: string().min(1),
59379
+ method: string().min(1),
59380
+ ok: boolean(),
59381
+ error: string().optional(),
59382
+ /** Ms epoch of the attempt. */
59383
+ at: number()
59384
+ })) });
59385
+ DeviceType.Switch, DeviceType.Light;
59386
+ object({
59387
+ /** Members whose current value entered the aggregate. */
59388
+ included: number().int().nonnegative().meta(readingMeta("count", {
59389
+ precision: 0,
59390
+ label: "Reporting"
59391
+ })),
59392
+ /** Members left out: offline, unknown, or not a finite reading (D393). */
59393
+ excluded: number().int().nonnegative().meta(readingMeta("count", {
59394
+ precision: 0,
59395
+ label: "Excluded"
59396
+ })),
59397
+ /** `included` + `excluded`. */
59398
+ total: number().int().nonnegative().meta(readingMeta("count", {
59399
+ precision: 0,
59400
+ label: "Members"
59401
+ }))
59402
+ });
59403
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
59004
59404
  object({
59005
59405
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
59006
- position: number().min(0).max(100).nullable(),
59406
+ position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59007
59407
  /** Ms epoch when the slice was last updated (push or poll). */
59008
59408
  lastFetchedAt: number()
59009
59409
  });
@@ -59012,9 +59412,9 @@ object({
59012
59412
  /** Whether the humidifier is currently on. */
59013
59413
  on: boolean(),
59014
59414
  /** Current measured relative humidity (0..100). Null when not reported. */
59015
- currentHumidity: number().min(0).max(100).nullable(),
59415
+ currentHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
59016
59416
  /** Target relative humidity (0..100). Null when no setpoint surface. */
59017
- targetHumidity: number().min(0).max(100).nullable(),
59417
+ targetHumidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
59018
59418
  /** Active mode (`auto` / `normal` / `baby` / vendor). Null when the
59019
59419
  * device has no mode surface. */
59020
59420
  mode: string().nullable(),
@@ -59024,9 +59424,9 @@ object({
59024
59424
  * `idle` / `off`). Null when the device doesn't report it. */
59025
59425
  action: string().nullable(),
59026
59426
  /** HA `min_humidity` attribute. Null → UI uses 0. */
59027
- minHumidity: number().nullable(),
59427
+ minHumidity: number().nullable().meta(readingMeta("humidity")),
59028
59428
  /** HA `max_humidity` attribute. Null → UI uses 100. */
59029
- maxHumidity: number().nullable(),
59429
+ maxHumidity: number().nullable().meta(readingMeta("humidity")),
59030
59430
  /** Ms epoch when the slice was last updated. */
59031
59431
  lastChangedAt: number()
59032
59432
  });
@@ -59058,22 +59458,13 @@ DeviceType.Humidifier, method(object({
59058
59458
  * `sourceInfo`.
59059
59459
  */
59060
59460
  var HumiditySensorStatusSchema = object({
59061
- /** Current relative humidity, 0..100. */
59062
- percent: number().min(0).max(100).meta({
59063
- unit: "%",
59461
+ /** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
59462
+ percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
59463
+ precision: 0,
59064
59464
  label: "Humidity"
59065
- }),
59465
+ })),
59066
59466
  /** Ms epoch when the slice was last updated. */
59067
- lastFetchedAt: number(),
59068
- /** Live display unit from the upstream source (e.g. HA
59069
- * `attributes.unit_of_measurement`). The UI prefers this over the
59070
- * role's canonical unit. Absent → fall back to the canonical unit. */
59071
- unit: string().optional(),
59072
- /** Suggested decimal places for numeric display.
59073
- * Populated live from the upstream source when provided (e.g. HA
59074
- * `attributes.suggested_display_precision`). Falls back to
59075
- * auto-formatting when absent. */
59076
- precision: number().int().min(0).max(10).optional()
59467
+ lastFetchedAt: number()
59077
59468
  });
59078
59469
  DeviceType.Sensor, DeviceType.Thermostat;
59079
59470
  object({
@@ -59081,7 +59472,7 @@ object({
59081
59472
  * entity exposes no `entity_picture` (yet). */
59082
59473
  url: string().nullable(),
59083
59474
  /** Ms epoch of the upstream last-updated timestamp. Null at cold-start. */
59084
- lastUpdated: number().nullable()
59475
+ lastUpdated: number().nullable().meta(readingMeta("none"))
59085
59476
  });
59086
59477
  DeviceType.Image;
59087
59478
  /**
@@ -59137,19 +59528,19 @@ var NormalizedRangeSchema = object({
59137
59528
  });
59138
59529
  object({
59139
59530
  /** Normalized 0–100. */
59140
- brightness: number().optional(),
59531
+ brightness: number().optional().meta(readingMeta("none")),
59141
59532
  /** Normalized 0–100. */
59142
- contrast: number().optional(),
59533
+ contrast: number().optional().meta(readingMeta("none")),
59143
59534
  /** Normalized 0–100. */
59144
- saturation: number().optional(),
59535
+ saturation: number().optional().meta(readingMeta("none")),
59145
59536
  /** Normalized 0–100. */
59146
- sharpness: number().optional(),
59537
+ sharpness: number().optional().meta(readingMeta("none")),
59147
59538
  mirror: boolean().optional(),
59148
59539
  flip: boolean().optional(),
59149
59540
  rotate: ImageRotateSchema.optional(),
59150
59541
  whiteBalance: WhiteBalanceModeSchema.optional(),
59151
59542
  /** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
59152
- warmth: number().optional(),
59543
+ warmth: number().optional().meta(readingMeta("none")),
59153
59544
  exposureMode: ExposureModeSchema.optional(),
59154
59545
  backlightMode: BacklightModeSchema.optional(),
59155
59546
  lastFetchedAt: number()
@@ -59394,10 +59785,10 @@ var IntercomAbilitySchema = object({
59394
59785
  /** Codecs accepted by firmware, in preference order. Driver-authored strings. */
59395
59786
  codecs: array(string()),
59396
59787
  /** Sample rate (Hz) the firmware expects. Reolink typical: 16000. */
59397
- sampleRate: number(),
59788
+ sampleRate: number().meta(readingMeta("none")),
59398
59789
  duplex: _enum(["half", "full"]),
59399
59790
  /** Max in-flight audio backlog before drop (ms). Server uses this to bound latency. */
59400
- maxBacklogMs: number()
59791
+ maxBacklogMs: number().meta(readingMeta("duration-ms"))
59401
59792
  });
59402
59793
  var IntercomStatusSchema = object({
59403
59794
  /** True while a talk session is open. */
@@ -59508,13 +59899,13 @@ object({
59508
59899
  activity: LawnMowerActivitySchema,
59509
59900
  /** 0..100 battery percentage. Null when the device has no battery
59510
59901
  * reading. */
59511
- batteryLevel: number().min(0).max(100).nullable(),
59902
+ batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59512
59903
  /** 0..100 mowing-completion percentage of the current task, or null when no
59513
59904
  * task is active / progress is unavailable. */
59514
- progressPercent: number().min(0).max(100).nullable(),
59905
+ progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59515
59906
  /** Current device/event code (dynamic — mostly status, sometimes an error),
59516
59907
  * or null when unknown. */
59517
- currentCode: number().nullable(),
59908
+ currentCode: number().nullable().meta(readingMeta("none")),
59518
59909
  /** Human label for {@link currentCode}, or null when undecodable. */
59519
59910
  currentCodeLabel: string().nullable(),
59520
59911
  /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
@@ -59976,7 +60367,7 @@ object({
59976
60367
  state: MediaPlayerStateSchema,
59977
60368
  /** Volume as 0..100 inclusive. Null when the device has no volume
59978
60369
  * surface. Pair with `DeviceFeature.MediaPlayerVolume`. */
59979
- volumeLevel: number().min(0).max(100).nullable(),
60370
+ volumeLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59980
60371
  /** Mute toggle distinct from volume=0. Null when no mute surface.
59981
60372
  * Pair with `DeviceFeature.MediaPlayerMute`. */
59982
60373
  isMuted: boolean().nullable(),
@@ -59989,10 +60380,10 @@ object({
59989
60380
  currentMedia: MediaInfoSchema.nullable(),
59990
60381
  /** Current playback position in ms. Null when not seekable or
59991
60382
  * nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
59992
- positionMs: number().int().nonnegative().nullable(),
60383
+ positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
59993
60384
  /** Total duration of the current media in ms. Null when unknown
59994
60385
  * (live stream) or nothing is playing. */
59995
- durationMs: number().int().nonnegative().nullable(),
60386
+ durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
59996
60387
  /** Shuffle toggle. Null when no shuffle surface.
59997
60388
  * Pair with `DeviceFeature.MediaPlayerShuffle`. */
59998
60389
  shuffle: boolean().nullable(),
@@ -60292,7 +60683,7 @@ var MotionStatusSchema = object({
60292
60683
  * it, every provider seeded it at boot, and every session left it
60293
60684
  * `detected: true` after its detach.
60294
60685
  */
60295
- autoClearAfterMs: number().nullable()
60686
+ autoClearAfterMs: number().nullable().meta(readingMeta("duration-ms"))
60296
60687
  });
60297
60688
  /**
60298
60689
  * Payload of `motion.onMotionChanged` event + the corresponding bus
@@ -60342,7 +60733,7 @@ var MotionZoneRegionSchema = object({
60342
60733
  });
60343
60734
  object({
60344
60735
  enabled: boolean(),
60345
- sensitivity: number(),
60736
+ sensitivity: number().meta(readingMeta("none")),
60346
60737
  /** Grid region(s). Today exactly one `grid` shape. */
60347
60738
  regions: array(MotionZoneRegionSchema),
60348
60739
  lastFetchedAt: number()
@@ -60646,7 +61037,7 @@ var NavigationStatusSchema = object({
60646
61037
  following: boolean(),
60647
61038
  flash: boolean(),
60648
61039
  lightMode: NavigationLightModeSchema,
60649
- lightLevel: number().min(40).max(100),
61040
+ lightLevel: number().min(40).max(100).meta(readingMeta("none")),
60650
61041
  /** Ms epoch when the slice was last updated. */
60651
61042
  lastChangedAt: number()
60652
61043
  });
@@ -60692,13 +61083,13 @@ var NetworkLinkStatusSchema = object({
60692
61083
  * one whose reading has not landed must not be drawn at 0 %. Consumers
60693
61084
  * SKIP a null rather than coerce it.
60694
61085
  */
60695
- signalPercent: number().min(0).max(100).nullable(),
61086
+ signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60696
61087
  /** Raw received signal strength in dBm, when the firmware reports one. */
60697
- rssiDbm: number().optional(),
61088
+ rssiDbm: number().optional().meta(readingMeta("signal-level")),
60698
61089
  /** Network name of a wireless link, when the firmware reports it. */
60699
61090
  ssid: string().optional(),
60700
61091
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
60701
- lastUpdated: number()
61092
+ lastUpdated: number().meta(readingMeta("none"))
60702
61093
  });
60703
61094
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
60704
61095
  deviceId: number(),
@@ -61017,7 +61408,7 @@ object({
61017
61408
  lastError: string().nullable(),
61018
61409
  /** Number of deliveries currently buffered server-side (rate-limited
61019
61410
  * notifiers may queue). 0 when the provider sends synchronously. */
61020
- queueDepth: number().int().nonnegative(),
61411
+ queueDepth: number().int().nonnegative().meta(readingMeta("count")),
61021
61412
  /** Per-feature capability matrix — authoritative source for the
61022
61413
  * compose-form field gating. */
61023
61414
  supports: NotifierSupportsSchema
@@ -61067,15 +61458,8 @@ DeviceType.Notifier, method(NotifierSendInputSchema, NotifierSendResultSchema, {
61067
61458
  acceptedAt: number()
61068
61459
  });
61069
61460
  object({
61070
- value: number(),
61071
- /** Display unit-of-measurement (e.g. 'dBm', 's', 'rpm', 'steps').
61072
- * Populated live from the upstream source on each state push.
61073
- * Absent for unitless sensors. */
61074
- unit: string().optional(),
61075
- /** Suggested decimal places for numeric display.
61076
- * Populated live from the upstream source when provided.
61077
- * Falls back to auto-formatting when absent. */
61078
- precision: number().int().min(0).max(10).optional(),
61461
+ /** Reading in the device quantity's base unit. `null` when refused (D393). */
61462
+ value: number().nullable().meta(readingMeta("device")),
61079
61463
  /** Ms epoch when the slice was last updated. */
61080
61464
  lastFetchedAt: number()
61081
61465
  });
@@ -61365,23 +61749,26 @@ object({
61365
61749
  /** Food currently in the bowl (grams). Null when the device has not
61366
61750
  * reported a reading yet. On dual-hopper models this is the combined
61367
61751
  * bowl reading; per-hopper levels live in `food1`/`food2`. */
61368
- foodLevel: number().nullable(),
61752
+ foodLevel: number().nullable().meta(readingMeta("none")),
61369
61753
  /** Hopper-1 food level (grams) on dual-hopper feeders; null on
61370
61754
  * single-hopper models. */
61371
- food1: number().nullable(),
61755
+ food1: number().nullable().meta(readingMeta("none")),
61372
61756
  /** Hopper-2 food level (grams) on dual-hopper feeders; null on
61373
61757
  * single-hopper models. */
61374
- food2: number().nullable(),
61758
+ food2: number().nullable().meta(readingMeta("none")),
61375
61759
  /** Derived low-food flag — mirrors the HA `food_level` binary_sensor
61376
61760
  * (`device_class: problem`, on = low). True when the bowl is empty /
61377
61761
  * below the feeder's low threshold. */
61378
61762
  lowFood: boolean(),
61379
61763
  /** Battery charge 0..100 (%). Null on mains-powered models or when the
61380
61764
  * device has no battery reading. */
61381
- batteryPower: number().min(0).max(100).nullable(),
61382
- /** Days of desiccant life remaining. Null when the model has no
61383
- * desiccant sensor. */
61384
- desiccantLeftDays: number().nullable(),
61765
+ batteryPower: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61766
+ /**
61767
+ * Desiccant life remaining, stored in seconds (duration base, D944).
61768
+ * Providers convert from the days the feeder reports. Null when the
61769
+ * model has no desiccant sensor.
61770
+ */
61771
+ desiccantLeftDays: number().nullable().meta(readingMeta("duration")),
61385
61772
  /** True while a feed is in progress. */
61386
61773
  feeding: boolean(),
61387
61774
  /** Decoded connectivity / power status (HA petkit device-status enum).
@@ -61392,7 +61779,7 @@ object({
61392
61779
  * with `errorCode` for consumers that want the raw integer. */
61393
61780
  error: string().nullable(),
61394
61781
  /** Raw device error code (0 / null = no error). */
61395
- errorCode: number().nullable(),
61782
+ errorCode: number().nullable().meta(readingMeta("none")),
61396
61783
  /** True for D4S/D4SH dual-hopper hardware — gates the per-hopper UI. */
61397
61784
  isDualHopper: boolean(),
61398
61785
  /** Child-lock (manual-lock) setting — buttons on the unit are disabled. */
@@ -61402,7 +61789,7 @@ object({
61402
61789
  /** Play a chime when dispensing. */
61403
61790
  feedSound: boolean(),
61404
61791
  /** Speaker / prompt volume level (device-scaled integer). */
61405
- volume: number(),
61792
+ volume: number().meta(readingMeta("none")),
61406
61793
  /** Ms epoch when the slice was last refreshed from the cloud. */
61407
61794
  lastFetchedAt: number()
61408
61795
  });
@@ -61839,36 +62226,19 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
61839
62226
  });
61840
62227
  object({
61841
62228
  /** Instantaneous power draw in watts. */
61842
- watts: number().optional().meta({
61843
- unit: "W",
61844
- label: "Power"
61845
- }),
62229
+ watts: number().optional().meta(readingMeta("power", { label: "Power" })),
61846
62230
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
61847
- kwhTotal: number().optional().meta({
61848
- unit: "kWh",
61849
- label: "Energy"
61850
- }),
62231
+ kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
61851
62232
  /** Voltage in volts. */
61852
- volts: number().optional(),
62233
+ volts: number().optional().meta(readingMeta("voltage")),
61853
62234
  /** Current in amperes. */
61854
- amps: number().optional(),
61855
- /** Apparent power in volt-amperes (W × power-factor reciprocal). */
61856
- va: number().optional(),
62235
+ amps: number().optional().meta(readingMeta("current")),
62236
+ /** Apparent power in volt-amperes. */
62237
+ va: number().optional().meta(readingMeta("apparent-power")),
61857
62238
  /** Power factor (0..1) if reported. */
61858
- powerFactor: number().min(0).max(1).optional(),
62239
+ powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
61859
62240
  /** Ms epoch when the slice was last updated. */
61860
- lastFetchedAt: number(),
61861
- /** Live display unit of the single metric this slice carries (e.g. HA
61862
- * `attributes.unit_of_measurement` → 'V' / 'A' / 'W' / 'kW' / 'kWh').
61863
- * Each upstream `sensor.*` entity surfaces ONE device_class, so one
61864
- * unit per slice is unambiguous. The UI prefers this over the role's
61865
- * canonical unit so a 'kW' / 'Wh' feed renders verbatim. */
61866
- unit: string().optional(),
61867
- /** Suggested decimal places for numeric display.
61868
- * Populated live from the upstream source when provided (e.g. HA
61869
- * `attributes.suggested_display_precision`). Falls back to
61870
- * auto-formatting when absent. */
61871
- precision: number().int().min(0).max(10).optional()
62241
+ lastFetchedAt: number()
61872
62242
  });
61873
62243
  DeviceType.Sensor;
61874
62244
  /**
@@ -61889,11 +62259,11 @@ DeviceType.Sensor;
61889
62259
  */
61890
62260
  var GpsLocationSchema = object({
61891
62261
  /** Latitude in decimal degrees, -90..90. */
61892
- latitude: number().min(-90).max(90),
62262
+ latitude: number().min(-90).max(90).meta(readingMeta("angle")),
61893
62263
  /** Longitude in decimal degrees, -180..180. */
61894
- longitude: number().min(-180).max(180),
62264
+ longitude: number().min(-180).max(180).meta(readingMeta("angle")),
61895
62265
  /** Reported accuracy in meters (lower = better). */
61896
- accuracyMeters: number().nonnegative()
62266
+ accuracyMeters: number().nonnegative().meta(readingMeta("length"))
61897
62267
  });
61898
62268
  var PresenceStatusSchema = object({
61899
62269
  /** `home` / `not_home` / any user-defined zone name. */
@@ -61905,25 +62275,16 @@ var PresenceStatusSchema = object({
61905
62275
  gps: GpsLocationSchema.nullable(),
61906
62276
  /** Optional battery level of the tracking device (0..100). Null
61907
62277
  * when not reported. */
61908
- batteryPercent: number().min(0).max(100).nullable(),
62278
+ batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61909
62279
  /** Ms epoch when the slice was last updated. */
61910
62280
  lastChangedAt: number()
61911
62281
  });
61912
62282
  DeviceType.Presence;
61913
62283
  object({
61914
- /** Current pressure in hPa. */
61915
- hpa: number(),
62284
+ /** Current pressure in hPa. `null` when the sample was refused (D393). */
62285
+ hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
61916
62286
  /** Ms epoch when the slice was last updated. */
61917
- lastFetchedAt: number(),
61918
- /** Live display unit from the upstream source (e.g. HA
61919
- * `attributes.unit_of_measurement`). The UI prefers this over the
61920
- * role's canonical unit. Absent → fall back to the canonical unit. */
61921
- unit: string().optional(),
61922
- /** Suggested decimal places for numeric display.
61923
- * Populated live from the upstream source when provided (e.g. HA
61924
- * `attributes.suggested_display_precision`). Falls back to
61925
- * auto-formatting when absent. */
61926
- precision: number().int().min(0).max(10).optional()
62287
+ lastFetchedAt: number()
61927
62288
  });
61928
62289
  DeviceType.Sensor;
61929
62290
  /**
@@ -62256,8 +62617,8 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
62256
62617
  }), _void(), { kind: "mutation" });
62257
62618
  var PtzAutotrackSettingsSchema = object({
62258
62619
  targetType: string().describe("Vendor target string (people/vehicle/pet); empty = camera default"),
62259
- stopDelaySeconds: number().int().min(0).max(300),
62260
- disappearDelaySeconds: number().int().min(0).max(300)
62620
+ stopDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration")),
62621
+ disappearDelaySeconds: number().int().min(0).max(300).meta(readingMeta("duration"))
62261
62622
  });
62262
62623
  /**
62263
62624
  * One option the camera advertises as a valid `targetType`. Drivers
@@ -62314,7 +62675,7 @@ object({
62314
62675
  /** null = unknown — never coerced to false (D393). */
62315
62676
  running: boolean().nullable(),
62316
62677
  /** Epoch ms the current boolean began; null while `running` is null. */
62317
- since: number().nullable(),
62678
+ since: number().nullable().meta(readingMeta("none")),
62318
62679
  source: RunningStateSourceSchema.meta({ label: "Source" }),
62319
62680
  phase: string().nullable(),
62320
62681
  /** null until a reading has been published (D393). */
@@ -63512,9 +63873,9 @@ var RecordTriggerSchema = _enum([
63512
63873
  */
63513
63874
  var RecordWindowSchema = object({
63514
63875
  trigger: RecordTriggerSchema,
63515
- day: number().int().min(0).max(6),
63516
- startMinute: number().int().min(0).max(1439),
63517
- endMinute: number().int().min(1).max(1440)
63876
+ day: number().int().min(0).max(6).meta(readingMeta("none")),
63877
+ startMinute: number().int().min(0).max(1439).meta(readingMeta("none")),
63878
+ endMinute: number().int().min(1).max(1440).meta(readingMeta("none"))
63518
63879
  });
63519
63880
  /** Status of one physical volume, as the camera itself describes it. */
63520
63881
  var OnboardStorageVolumeSchema = object({
@@ -63583,10 +63944,10 @@ object({
63583
63944
  /** Master "record to the card at all" switch. */
63584
63945
  enabled: boolean().nullable(),
63585
63946
  overwriteWhenFull: boolean().nullable(),
63586
- preRecordSec: number().nullable(),
63587
- postRecordSec: number().nullable(),
63947
+ preRecordSec: number().nullable().meta(readingMeta("duration")),
63948
+ postRecordSec: number().nullable().meta(readingMeta("duration")),
63588
63949
  /** Length of one recorded file, in minutes. */
63589
- segmentMinutes: number().nullable(),
63950
+ segmentMinutes: number().nullable().meta(readingMeta("none")),
63590
63951
  /** The primary track's weekly windows, flattened. */
63591
63952
  windows: array(RecordWindowSchema),
63592
63953
  /**
@@ -63602,7 +63963,7 @@ object({
63602
63963
  * provider reporting a non-zero count also reports the schedule as not
63603
63964
  * writable.
63604
63965
  */
63605
- unreadableWindows: number(),
63966
+ unreadableWindows: number().meta(readingMeta("count")),
63606
63967
  /**
63607
63968
  * The camera is scheduled to record and has NO usable storage.
63608
63969
  *
@@ -64248,7 +64609,7 @@ var CamStreamDescriptorSchema = object({
64248
64609
  url: string().optional(),
64249
64610
  codec: string().optional(),
64250
64611
  resolution: CamStreamResolutionSchema.optional(),
64251
- fps: number().positive().optional(),
64612
+ fps: number().positive().optional().meta(readingMeta("rate")),
64252
64613
  label: string().optional(),
64253
64614
  /** Device-level features (e.g. `battery-operated`) — drives broker policy. */
64254
64615
  deviceFeatures: array(string()).optional(),
@@ -64278,18 +64639,18 @@ var StreamProfileSchema = _enum([
64278
64639
  ]);
64279
64640
  /** The current encoding config of one stream profile. */
64280
64641
  var StreamProfileConfigSchema = object({
64281
- width: number(),
64282
- height: number(),
64642
+ width: number().meta(readingMeta("none")),
64643
+ height: number().meta(readingMeta("none")),
64283
64644
  codec: _enum(["h264", "h265"]),
64284
- framerate: number(),
64285
- bitrate: number(),
64645
+ framerate: number().meta(readingMeta("rate")),
64646
+ bitrate: number().meta(readingMeta("bitrate")),
64286
64647
  bitrateMode: _enum(["vbr", "cbr"]).optional(),
64287
64648
  encoderProfile: _enum([
64288
64649
  "high",
64289
64650
  "main",
64290
64651
  "baseline"
64291
64652
  ]).optional(),
64292
- gop: number().optional(),
64653
+ gop: number().optional().meta(readingMeta("none")),
64293
64654
  /**
64294
64655
  * Whether THIS profile currently carries an audio track. READ-ONLY here.
64295
64656
  *
@@ -64936,35 +65297,21 @@ DeviceType.Sensor;
64936
65297
  * entries with `device_class: temperature` and any future native
64937
65298
  * thermometer.
64938
65299
  *
64939
- * Unit normalisation: providers convert to Celsius before storing.
64940
- * The slice value is always Celsius so cross-cap aggregators
64941
- * (climate-control's `currentTemp`, energy analytics) can compose
64942
- * without per-source unit fixups. The canonical display unit (`°C`) is
64943
- * a descriptor constant in the UI (ROLE_DESCRIPTOR), not stored in
64944
- * `sourceInfo`.
65300
+ * The number is Celsius (D944). Providers convert on ingest. A failed
65301
+ * conversion is `null`, never a guess. Display unit is a read-time preference.
64945
65302
  *
64946
65303
  * Status `lastFetchedAt` lets staleness-aware consumers detect a
64947
65304
  * frozen feed (provider hung) distinct from a "temperature hasn't
64948
65305
  * changed" steady state.
64949
65306
  */
64950
65307
  var TemperatureSensorStatusSchema = object({
64951
- /** Current temperature in Celsius. */
64952
- celsius: number().meta({
64953
- unit: "°C",
65308
+ /** Current temperature in Celsius. `null` when the sample was refused (D393). */
65309
+ celsius: number().nullable().meta(readingMeta("temperature", {
65310
+ precision: 1,
64954
65311
  label: "Temperature"
64955
- }),
65312
+ })),
64956
65313
  /** Ms epoch when the slice was last updated (push or poll). */
64957
- lastFetchedAt: number(),
64958
- /** Live display unit from the upstream source (e.g. HA
64959
- * `attributes.unit_of_measurement`). The UI prefers this over the
64960
- * role's canonical unit, so a Fahrenheit feed renders '°F' not '°C'.
64961
- * Absent → the UI falls back to the role's canonical unit. */
64962
- unit: string().optional(),
64963
- /** Suggested decimal places for numeric display.
64964
- * Populated live from the upstream source when provided (e.g. HA
64965
- * `attributes.suggested_display_precision`). Falls back to
64966
- * auto-formatting when absent. */
64967
- precision: number().int().min(0).max(10).optional()
65314
+ lastFetchedAt: number()
64968
65315
  });
64969
65316
  DeviceType.Sensor, DeviceType.Thermostat;
64970
65317
  /**
@@ -65216,16 +65563,16 @@ object({
65216
65563
  ]),
65217
65564
  /** 0..100 battery percentage. Null when the device has no battery
65218
65565
  * reading. */
65219
- batteryLevel: number().min(0).max(100).nullable(),
65566
+ batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
65220
65567
  /** Current fan-speed token (provider-verbatim). Null when unknown or
65221
65568
  * the vacuum has no speed control. */
65222
65569
  fanSpeed: string().nullable(),
65223
65570
  /** Speed tokens the hardware accepts — drives the UI selector. */
65224
65571
  availableFanSpeeds: array(string()),
65225
65572
  /** 0..100 cleaning-completion percentage of the current task, or null. */
65226
- progressPercent: number().min(0).max(100).nullable(),
65573
+ progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
65227
65574
  /** Current error code (0 / null = no error). */
65228
- errorCode: number().nullable(),
65575
+ errorCode: number().nullable().meta(readingMeta("none")),
65229
65576
  /** Human label for {@link errorCode}, or null when none / undecodable. */
65230
65577
  errorLabel: string().nullable(),
65231
65578
  /** Ms epoch when the slice was last updated. */
@@ -65264,7 +65611,7 @@ object({
65264
65611
  ]),
65265
65612
  /** 0 = fully closed, 100 = fully open. Null when the device has no
65266
65613
  * intermediate position surface. */
65267
- position: number().min(0).max(100).nullable(),
65614
+ position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
65268
65615
  /** Ms epoch when the slice was last updated. */
65269
65616
  lastChangedAt: number()
65270
65617
  });
@@ -65292,9 +65639,9 @@ object({
65292
65639
  DeviceType.Sensor;
65293
65640
  object({
65294
65641
  /** Current measured temperature. Null when not reported. */
65295
- currentTemp: number().nullable(),
65642
+ currentTemp: number().nullable().meta(readingMeta("temperature")),
65296
65643
  /** Target temperature setpoint. Null when no setpoint surface. */
65297
- targetTemp: number().nullable(),
65644
+ targetTemp: number().nullable().meta(readingMeta("temperature")),
65298
65645
  /** Active operation mode = HA `state` (`eco` / `electric` / `gas` /
65299
65646
  * `heat_pump` / `high_demand` / `performance` / `off`). Null when the
65300
65647
  * device reports an unknown state. */
@@ -65305,9 +65652,9 @@ object({
65305
65652
  * has no away surface. */
65306
65653
  away: boolean().nullable(),
65307
65654
  /** HA `min_temp` attribute. Null when not reported. */
65308
- minTemp: number().nullable(),
65655
+ minTemp: number().nullable().meta(readingMeta("temperature")),
65309
65656
  /** HA `max_temp` attribute. Null when not reported. */
65310
- maxTemp: number().nullable(),
65657
+ maxTemp: number().nullable().meta(readingMeta("temperature")),
65311
65658
  /** Ms epoch when the slice was last updated. */
65312
65659
  lastChangedAt: number()
65313
65660
  });
@@ -65331,25 +65678,18 @@ DeviceType.WaterHeater, method(object({
65331
65678
  auth: "protected"
65332
65679
  });
65333
65680
  object({
65334
- /** Verbatim HA condition state (`sunny`, `cloudy`, `rainy`, …). Null
65335
- * when no condition has been reported yet. */
65681
+ /** Verbatim condition state (`sunny`, `cloudy`, `rainy`, …). Null when none yet. */
65336
65682
  condition: string().nullable(),
65337
- /** Current temperature in the reported unit. Null when not provided. */
65338
- temperature: number().nullable(),
65339
- /** Temperature unit string (e.g. `°C` / `°F`). Null when not provided. */
65340
- temperatureUnit: string().nullable(),
65683
+ /** Current temperature in Celsius. Null when not provided or refused. */
65684
+ temperature: number().nullable().meta(readingMeta("temperature", { precision: 1 })),
65341
65685
  /** Relative humidity (0..100). Null when not provided. */
65342
- humidity: number().min(0).max(100).nullable(),
65343
- /** Barometric pressure in the reported unit. Null when not provided. */
65344
- pressure: number().nullable(),
65345
- /** Pressure unit string (e.g. `hPa` / `inHg`). Null when not provided. */
65346
- pressureUnit: string().nullable(),
65347
- /** Wind speed in the reported unit. Null when not provided. */
65348
- windSpeed: number().nullable(),
65349
- /** Wind-speed unit string (e.g. `km/h` / `mph`). Null when not provided. */
65350
- windSpeedUnit: string().nullable(),
65686
+ humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity")),
65687
+ /** Barometric pressure in hPa. Null when not provided or refused. */
65688
+ pressure: number().nullable().meta(readingMeta("pressure")),
65689
+ /** Wind speed in metres per second. Null when not provided or refused. */
65690
+ windSpeed: number().nullable().meta(readingMeta("speed")),
65351
65691
  /** Wind bearing in degrees (0..360, meteorological). Null when not provided. */
65352
- windBearing: number().nullable(),
65692
+ windBearing: number().nullable().meta(readingMeta("angle")),
65353
65693
  /** Ms epoch when the slice was last updated. */
65354
65694
  lastFetchedAt: number()
65355
65695
  });
@@ -66261,6 +66601,13 @@ Object.freeze({
66261
66601
  access: "view",
66262
66602
  role: "admin"
66263
66603
  },
66604
+ "addons.getPackageDocs": {
66605
+ capName: "addons",
66606
+ capScope: "system",
66607
+ addonId: null,
66608
+ access: "view",
66609
+ role: "admin"
66610
+ },
66264
66611
  "addons.getVersions": {
66265
66612
  capName: "addons",
66266
66613
  capScope: "system",
@@ -69369,6 +69716,20 @@ Object.freeze({
69369
69716
  access: "view",
69370
69717
  role: "viewer"
69371
69718
  },
69719
+ "groupCommands.getStatus": {
69720
+ capName: "group-commands",
69721
+ capScope: "device",
69722
+ addonId: null,
69723
+ access: "view",
69724
+ role: "viewer"
69725
+ },
69726
+ "groupStatus.getStatus": {
69727
+ capName: "group-status",
69728
+ capScope: "device",
69729
+ addonId: null,
69730
+ access: "view",
69731
+ role: "viewer"
69732
+ },
69372
69733
  "heatingValve.getStatus": {
69373
69734
  capName: "heating-valve",
69374
69735
  capScope: "device",
@@ -79191,6 +79552,37 @@ var SENSOR_CAP_VOCABULARY = {
79191
79552
  icon: "flame"
79192
79553
  }]
79193
79554
  },
79555
+ "group-commands": {
79556
+ scope: "device",
79557
+ noun: t("Group command", "Comando di gruppo")
79558
+ },
79559
+ "group-status": {
79560
+ scope: "device",
79561
+ noun: t("Group", "Gruppo"),
79562
+ state: [
79563
+ {
79564
+ kind: "numeric",
79565
+ field: "included",
79566
+ quantity: t("the members reporting", "i membri che rispondono"),
79567
+ label: t("Reporting", "Rispondono"),
79568
+ icon: "users"
79569
+ },
79570
+ {
79571
+ kind: "numeric",
79572
+ field: "excluded",
79573
+ quantity: t("the members left out", "i membri esclusi"),
79574
+ label: t("Excluded", "Esclusi"),
79575
+ icon: "users"
79576
+ },
79577
+ {
79578
+ kind: "numeric",
79579
+ field: "total",
79580
+ quantity: t("the member count", "il numero di membri"),
79581
+ label: t("Members", "Membri"),
79582
+ icon: "sigma"
79583
+ }
79584
+ ]
79585
+ },
79194
79586
  "humidity-sensor": {
79195
79587
  scope: "device",
79196
79588
  noun: t("Humidity", "Umidità"),
@@ -79224,7 +79616,6 @@ var SENSOR_CAP_VOCABULARY = {
79224
79616
  field: "value",
79225
79617
  quantity: t("the reading", "il valore"),
79226
79618
  label: t("Reading", "Valore"),
79227
- unitField: "unit",
79228
79619
  icon: "gauge"
79229
79620
  }]
79230
79621
  },
@@ -79360,7 +79751,7 @@ var SENSOR_CAP_VOCABULARY = {
79360
79751
  field: "temperature",
79361
79752
  quantity: t("the outdoor temperature", "la temperatura esterna"),
79362
79753
  label: t("Temperature", "Temperatura"),
79363
- unitField: "temperatureUnit",
79754
+ unit: "°C",
79364
79755
  icon: "thermometer"
79365
79756
  },
79366
79757
  {
@@ -79376,7 +79767,7 @@ var SENSOR_CAP_VOCABULARY = {
79376
79767
  field: "windSpeed",
79377
79768
  quantity: t("the wind speed", "la velocità del vento"),
79378
79769
  label: t("Wind", "Vento"),
79379
- unitField: "windSpeedUnit",
79770
+ unit: "m/s",
79380
79771
  icon: "wind"
79381
79772
  },
79382
79773
  {
@@ -79384,7 +79775,7 @@ var SENSOR_CAP_VOCABULARY = {
79384
79775
  field: "pressure",
79385
79776
  quantity: t("the air pressure", "la pressione atmosferica"),
79386
79777
  label: t("Pressure", "Pressione"),
79387
- unitField: "pressureUnit",
79778
+ unit: "hPa",
79388
79779
  icon: "gauge"
79389
79780
  }
79390
79781
  ]
@@ -80657,6 +81048,16 @@ Object.freeze({
80657
81048
  form: "single",
80658
81049
  optional: false
80659
81050
  }],
81051
+ "groupCommands.getStatus": [{
81052
+ name: "deviceId",
81053
+ form: "single",
81054
+ optional: false
81055
+ }],
81056
+ "groupStatus.getStatus": [{
81057
+ name: "deviceId",
81058
+ form: "single",
81059
+ optional: false
81060
+ }],
80660
81061
  "heatingValve.getStatus": [{
80661
81062
  name: "deviceId",
80662
81063
  form: "single",
@@ -82641,6 +83042,8 @@ new Map(Object.entries({
82641
83042
  "detection-blind": "device-events",
82642
83043
  "motion-noisy": "device-events",
82643
83044
  "motion-calm": "device-events",
83045
+ "package-llm-silent": "device-events",
83046
+ "package-llm-answered": "device-events",
82644
83047
  "recording-stalled": "device-events",
82645
83048
  "recording-healthy": "device-events",
82646
83049
  "recording-degraded": "device-events",
@@ -82724,6 +83127,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
82724
83127
  label: "Motion without a subject",
82725
83128
  kinds: ["motion-noisy", "motion-calm"]
82726
83129
  },
83130
+ {
83131
+ id: "package-llm",
83132
+ family: "device-events",
83133
+ label: "Package confirm",
83134
+ kinds: ["package-llm-silent", "package-llm-answered"]
83135
+ },
82727
83136
  {
82728
83137
  id: "recording",
82729
83138
  family: "device-events",
@@ -82905,6 +83314,8 @@ var DEVICE_EVENTS = [
82905
83314
  "detection-blind",
82906
83315
  "motion-noisy",
82907
83316
  "motion-calm",
83317
+ "package-llm-silent",
83318
+ "package-llm-answered",
82908
83319
  "recording-stalled",
82909
83320
  "recording-healthy",
82910
83321
  "recording-degraded",
@@ -83173,6 +83584,15 @@ new Map([
83173
83584
  snapshotLabel: "Cameras with constant motion now",
83174
83585
  snapshotSection: null
83175
83586
  },
83587
+ {
83588
+ id: "package-llm-confirm",
83589
+ family: "device-events",
83590
+ label: "Package confirm (not answering / answering again)",
83591
+ bad: ["package-llm-silent"],
83592
+ recovery: ["package-llm-answered"],
83593
+ snapshotLabel: "Cameras whose package confirm is not answering",
83594
+ snapshotSection: null
83595
+ },
83176
83596
  {
83177
83597
  id: "recording-health",
83178
83598
  family: "device-events",
@@ -133745,7 +134165,7 @@ var SENSOR_SPECS = {
133745
134165
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.TemperatureSensor, name, subtype),
133746
134166
  getStatus: (proxy) => proxy.temperatureSensor?.getStatus({}),
133747
134167
  subscribe: (proxy, onValue) => proxy.state.temperatureSensor?.subscribe(onValue) ?? null,
133748
- read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => [{
134168
+ read: reader(TemperatureSensorStatusSchema.pick({ celsius: true }), (status) => status.celsius === null ? [] : [{
133749
134169
  characteristic: import_dist.Characteristic.CurrentTemperature,
133750
134170
  value: status.celsius
133751
134171
  }])
@@ -133755,7 +134175,7 @@ var SENSOR_SPECS = {
133755
134175
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.HumiditySensor, name, subtype),
133756
134176
  getStatus: (proxy) => proxy.humiditySensor?.getStatus({}),
133757
134177
  subscribe: (proxy, onValue) => proxy.state.humiditySensor?.subscribe(onValue) ?? null,
133758
- read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => [{
134178
+ read: reader(HumiditySensorStatusSchema.pick({ percent: true }), (status) => status.percent === null ? [] : [{
133759
134179
  characteristic: import_dist.Characteristic.CurrentRelativeHumidity,
133760
134180
  value: status.percent
133761
134181
  }])
@@ -133765,7 +134185,7 @@ var SENSOR_SPECS = {
133765
134185
  addService: (accessory, name, subtype) => accessory.addService(import_dist.Service.LightSensor, name, subtype),
133766
134186
  getStatus: (proxy) => proxy.ambientLightSensor?.getStatus({}),
133767
134187
  subscribe: (proxy, onValue) => proxy.state.ambientLightSensor?.subscribe(onValue) ?? null,
133768
- read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => [{
134188
+ read: reader(AmbientLightSensorStatusSchema.pick({ lux: true }), (status) => status.lux === null ? [] : [{
133769
134189
  characteristic: import_dist.Characteristic.CurrentAmbientLightLevel,
133770
134190
  value: Math.max(MIN_LUX, status.lux)
133771
134191
  }])