@camstack/types 1.2.420 → 1.2.422

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.
Files changed (50) hide show
  1. package/dist/addon.js +2 -2
  2. package/dist/addon.mjs +2 -2
  3. package/dist/capabilities/composer.cap.d.ts +129 -21
  4. package/dist/capabilities/core-blocks.cap.d.ts +929 -151
  5. package/dist/capabilities/index.d.ts +3 -1
  6. package/dist/capabilities/meter.cap.d.ts +53 -0
  7. package/dist/capabilities/power-meter.cap.d.ts +1 -1
  8. package/dist/capabilities/running-state.cap.d.ts +1 -1
  9. package/dist/client.js +12 -1
  10. package/dist/client.mjs +12 -1
  11. package/dist/composition/composition-report.d.ts +45 -0
  12. package/dist/composition/composition.d.ts +196 -7
  13. package/dist/composition/helpers/appliance.d.ts +28 -0
  14. package/dist/composition/helpers/compile-history.d.ts +13 -0
  15. package/dist/composition/helpers/compile.d.ts +3 -2
  16. package/dist/composition/helpers/energy.d.ts +8 -0
  17. package/dist/composition/helpers/history-math.d.ts +39 -0
  18. package/dist/composition/helpers/history-window.d.ts +71 -0
  19. package/dist/composition/helpers/index.d.ts +7 -2
  20. package/dist/composition/helpers/save.d.ts +1 -1
  21. package/dist/composition/helpers/source-pick.d.ts +2 -0
  22. package/dist/composition/helpers/spec.d.ts +39 -6
  23. package/dist/{composition-re1aezX9.js → composition-CPRAP41h.js} +924 -7
  24. package/dist/{composition-OhpuespA.mjs → composition-CpETZ4HL.mjs} +679 -8
  25. package/dist/device/appliance-export.d.ts +25 -0
  26. package/dist/device/cap-vocabulary/entries/sensors.d.ts +1 -1
  27. package/dist/device/cap-vocabulary/types.d.ts +10 -0
  28. package/dist/device/device-type.d.ts +8 -2
  29. package/dist/{err-msg-BXKzRBwg.mjs → err-msg-DIorGYeC.mjs} +7 -1
  30. package/dist/{err-msg-BhVbr0NX.js → err-msg-U7lLUMNz.js} +7 -1
  31. package/dist/generated/addon-api.d.ts +14 -0
  32. package/dist/generated/addon-cap-facts.d.ts +1 -1
  33. package/dist/generated/cap-status-types.d.ts +3 -1
  34. package/dist/generated/capability-router-map.d.ts +5 -2
  35. package/dist/generated/customize-catalog.d.ts +2 -2
  36. package/dist/generated/device-local-state.d.ts +3 -0
  37. package/dist/generated/device-proxy.d.ts +3 -0
  38. package/dist/generated/device-scoped-caps.d.ts +1 -1
  39. package/dist/generated/history-catalog.d.ts +1 -1
  40. package/dist/generated/method-access-map.d.ts +1 -1
  41. package/dist/generated/method-device-selectors.d.ts +1 -1
  42. package/dist/generated/runtime-state-durability.d.ts +1 -1
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.js +1063 -562
  45. package/dist/index.mjs +1013 -563
  46. package/dist/node.js +2 -2
  47. package/dist/node.mjs +2 -2
  48. package/dist/{sleep-bykKrTgu.mjs → sleep-0sD_LHLI.mjs} +10 -1
  49. package/dist/{sleep-YJ6FVsUu.js → sleep-CEKGW7A5.js} +10 -1
  50. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-YJ6FVsUu.js");
2
+ const require_sleep = require("./sleep-CEKGW7A5.js");
3
3
  const require_event_category = require("./event-category-Ave2VSxY.js");
4
- const require_composition = require("./composition-re1aezX9.js");
4
+ const require_composition = require("./composition-CPRAP41h.js");
5
5
  const require_node_color = require("./node-color.js");
6
- const require_err_msg = require("./err-msg-BhVbr0NX.js");
6
+ const require_err_msg = require("./err-msg-U7lLUMNz.js");
7
7
  const require_enums = require("./enums.js");
8
8
  let zod = require("zod");
9
9
  //#region src/media/media-owner-key.ts
@@ -12627,7 +12627,8 @@ var CompositionProblemCodeSchema = zod.z.enum([
12627
12627
  "native-capability-replace",
12628
12628
  "mixed-quantity",
12629
12629
  "helper-mismatch",
12630
- "member-constraint"
12630
+ "member-constraint",
12631
+ "retention"
12631
12632
  ]);
12632
12633
  /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
12633
12634
  var CompositionProblemSchema = zod.z.object({
@@ -13023,6 +13024,20 @@ function inferExpressionKinds(input) {
13023
13024
  * planner (`composition-items.ts`). Internal to the composition module — NOT
13024
13025
  * in the barrel: these are planner internals, not a published contract.
13025
13026
  */
13027
+ function seriesKinds(source) {
13028
+ if (source.publish !== "value") return {
13029
+ ok: true,
13030
+ kinds: new Set(["number"])
13031
+ };
13032
+ if (source.empty === "null") return {
13033
+ ok: true,
13034
+ kinds: new Set(["number", "null"])
13035
+ };
13036
+ return {
13037
+ ok: true,
13038
+ kinds: new Set(["number"])
13039
+ };
13040
+ }
13026
13041
  function aggregateKinds(source) {
13027
13042
  if (source.publish !== "value") return {
13028
13043
  ok: true,
@@ -13069,6 +13084,7 @@ function sourceKinds(source, lookupCap) {
13069
13084
  message: "code fields arrive in slice 4"
13070
13085
  };
13071
13086
  if (source.kind === "aggregate") return aggregateKinds(source);
13087
+ if (source.kind === "series") return seriesKinds(source);
13072
13088
  const bindingKinds = /* @__PURE__ */ new Map();
13073
13089
  for (const [name, binding] of Object.entries(source.bindings)) {
13074
13090
  if (binding.kind === "literal") {
@@ -13270,7 +13286,7 @@ function planItems(def, feature, featureIndex, lookupCap, mode = "new") {
13270
13286
  * One catalog row per base reading a group helper can build (D944 §3).
13271
13287
  * Data, not a form default written into the block.
13272
13288
  */
13273
- var NOW = {
13289
+ var NOW$1 = {
13274
13290
  fieldPath: "lastFetchedAt",
13275
13291
  expr: "now"
13276
13292
  };
@@ -13316,7 +13332,7 @@ var GROUP_TEMPLATES = [
13316
13332
  quantity: "temperature",
13317
13333
  defaultAggregate: "mean",
13318
13334
  empty: "null",
13319
- companions: [NOW]
13335
+ companions: [NOW$1]
13320
13336
  }),
13321
13337
  numeric({
13322
13338
  id: "humidity",
@@ -13327,7 +13343,7 @@ var GROUP_TEMPLATES = [
13327
13343
  quantity: "humidity",
13328
13344
  defaultAggregate: "mean",
13329
13345
  empty: "null",
13330
- companions: [NOW]
13346
+ companions: [NOW$1]
13331
13347
  }),
13332
13348
  numeric({
13333
13349
  id: "pressure",
@@ -13338,7 +13354,7 @@ var GROUP_TEMPLATES = [
13338
13354
  quantity: "pressure",
13339
13355
  defaultAggregate: "mean",
13340
13356
  empty: "null",
13341
- companions: [NOW]
13357
+ companions: [NOW$1]
13342
13358
  }),
13343
13359
  numeric({
13344
13360
  id: "illuminance",
@@ -13349,7 +13365,7 @@ var GROUP_TEMPLATES = [
13349
13365
  quantity: "illuminance",
13350
13366
  defaultAggregate: "mean",
13351
13367
  empty: "null",
13352
- companions: [NOW]
13368
+ companions: [NOW$1]
13353
13369
  }),
13354
13370
  numeric({
13355
13371
  id: "power",
@@ -13360,7 +13376,7 @@ var GROUP_TEMPLATES = [
13360
13376
  quantity: "power",
13361
13377
  defaultAggregate: "sum",
13362
13378
  empty: "omit",
13363
- companions: [NOW]
13379
+ companions: [NOW$1]
13364
13380
  }),
13365
13381
  numeric({
13366
13382
  id: "energy",
@@ -13371,7 +13387,7 @@ var GROUP_TEMPLATES = [
13371
13387
  quantity: "energy",
13372
13388
  defaultAggregate: "sum",
13373
13389
  empty: "omit",
13374
- companions: [NOW]
13390
+ companions: [NOW$1]
13375
13391
  }),
13376
13392
  numeric({
13377
13393
  id: "battery",
@@ -13406,7 +13422,7 @@ var GROUP_TEMPLATES = [
13406
13422
  quantity: "device",
13407
13423
  defaultAggregate: "mean",
13408
13424
  empty: "null",
13409
- companions: [NOW]
13425
+ companions: [NOW$1]
13410
13426
  }),
13411
13427
  binary({
13412
13428
  id: "motion",
@@ -13538,6 +13554,102 @@ function groupTemplate(id) {
13538
13554
  return BY_ID.get(id) ?? null;
13539
13555
  }
13540
13556
  //#endregion
13557
+ //#region src/composition/customize/scalar-expr.ts
13558
+ var UNSIGNED = /^\d+(?:\.\d+)?$/;
13559
+ var SIGNED = /^-?\d+(?:\.\d+)?$/;
13560
+ var DWELL = /^dwell\(x (>=|<=) (\d+(?:\.\d+)?), (\d+(?:\.\d+)?), (\d+(?:\.\d+)?)\)$/;
13561
+ var LINEAR_CLAMP = /^clamp\((x|number\(x\)) \* (-?\d+(?:\.\d+)?) \+ (-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\)$/;
13562
+ var LINEAR_BARE = /^(x|number\(x\)) \* (-?\d+(?:\.\d+)?) \+ (-?\d+(?:\.\d+)?)$/;
13563
+ var IDENT = /^[A-Za-z_][A-Za-z0-9_]*$/;
13564
+ function unsignedToken(value) {
13565
+ return token(value, UNSIGNED);
13566
+ }
13567
+ function signedToken(value) {
13568
+ return token(value, SIGNED);
13569
+ }
13570
+ function constantExpr(value) {
13571
+ if (typeof value === "string") return JSON.stringify(value);
13572
+ if (typeof value === "number") return signedToken(value);
13573
+ if (typeof value === "boolean") return value ? "true" : "false";
13574
+ return "null";
13575
+ }
13576
+ function isIdentifier(path) {
13577
+ return IDENT.test(path);
13578
+ }
13579
+ function dwellExpr(comparison, threshold, start, stop) {
13580
+ return `dwell(x ${comparison === "gte" ? ">=" : "<="} ${threshold}, ${start}, ${stop})`;
13581
+ }
13582
+ function linearExpr(inner, scale, offset, clampMin, clampMax) {
13583
+ const arithmetic = `${inner} * ${scale} + ${offset}`;
13584
+ if (clampMin === null || clampMax === null) return arithmetic;
13585
+ return `clamp(${arithmetic}, ${clampMin}, ${clampMax})`;
13586
+ }
13587
+ function parseDwell(expr) {
13588
+ const match = DWELL.exec(expr);
13589
+ if (match === null) return null;
13590
+ const threshold = Number(match[2]);
13591
+ const startDwellMs = Number(match[3]);
13592
+ const stopDwellMs = Number(match[4]);
13593
+ if (!Number.isFinite(threshold) || !Number.isFinite(startDwellMs) || !Number.isFinite(stopDwellMs)) return null;
13594
+ return {
13595
+ comparison: match[1] === "<=" ? "lte" : "gte",
13596
+ threshold,
13597
+ startDwellMs,
13598
+ stopDwellMs
13599
+ };
13600
+ }
13601
+ function parseLinear(expr) {
13602
+ const clamped = LINEAR_CLAMP.exec(expr);
13603
+ if (clamped !== null) return linearFrom(clamped[1], clamped[2], clamped[3], clamped[4], clamped[5]);
13604
+ const bare = LINEAR_BARE.exec(expr);
13605
+ if (bare === null) return null;
13606
+ return linearFrom(bare[1], bare[2], bare[3], void 0, void 0);
13607
+ }
13608
+ function singleFrom(source) {
13609
+ if (source.kind === "from") return {
13610
+ cap: source.cap,
13611
+ fieldPath: source.fieldPath,
13612
+ addonId: source.source.addonId,
13613
+ stableId: source.source.stableId
13614
+ };
13615
+ if (source.kind !== "expression" || Object.keys(source.bindings).length !== 1) return null;
13616
+ const bound = source.bindings["x"];
13617
+ if (bound === void 0 || bound.kind !== "from") return null;
13618
+ return {
13619
+ cap: bound.cap,
13620
+ fieldPath: bound.fieldPath,
13621
+ addonId: bound.source.addonId,
13622
+ stableId: bound.source.stableId
13623
+ };
13624
+ }
13625
+ function token(value, pattern) {
13626
+ if (!Number.isFinite(value)) return null;
13627
+ const text = Object.is(value, -0) ? "0" : String(value);
13628
+ return pattern.test(text) ? text : null;
13629
+ }
13630
+ function linearFrom(inner, scale, offset, clampMin, clampMax) {
13631
+ if (inner !== "x" && inner !== "number(x)") return null;
13632
+ if (scale === void 0 || offset === void 0) return null;
13633
+ const parsedScale = Number(scale);
13634
+ const parsedOffset = Number(offset);
13635
+ if (!Number.isFinite(parsedScale) || !Number.isFinite(parsedOffset)) return null;
13636
+ if (clampMin === void 0 || clampMax === void 0) return {
13637
+ inner,
13638
+ scale: parsedScale,
13639
+ offset: parsedOffset
13640
+ };
13641
+ const parsedMin = Number(clampMin);
13642
+ const parsedMax = Number(clampMax);
13643
+ if (!Number.isFinite(parsedMin) || !Number.isFinite(parsedMax)) return null;
13644
+ return {
13645
+ inner,
13646
+ scale: parsedScale,
13647
+ offset: parsedOffset,
13648
+ clampMin: parsedMin,
13649
+ clampMax: parsedMax
13650
+ };
13651
+ }
13652
+ //#endregion
13541
13653
  //#region src/composition/helpers/actuator.ts
13542
13654
  /**
13543
13655
  * Actuator groups (D944 phase 1b). The active boolean is the binary reducer
@@ -13627,6 +13739,545 @@ async function runFanOut(calls, invoke) {
13627
13739
  return results;
13628
13740
  }
13629
13741
  //#endregion
13742
+ //#region src/generated/history-catalog.ts
13743
+ /**
13744
+ * Cap history catalog, projected from every `*.cap.ts` `history` block.
13745
+ * 42 caps with series (76 series), 32 caps answered `'none'`.
13746
+ * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
13747
+ */
13748
+ var HISTORY_CATALOG = {
13749
+ "air-quality-sensor": {
13750
+ "co2Ppm": {
13751
+ kind: "gauge",
13752
+ unit: "ppm",
13753
+ deadband: 5
13754
+ },
13755
+ "vocPpb": {
13756
+ kind: "gauge",
13757
+ unit: "ppb",
13758
+ deadband: 5
13759
+ },
13760
+ "pm25": {
13761
+ kind: "gauge",
13762
+ unit: "µg/m³",
13763
+ deadband: 1
13764
+ },
13765
+ "pm10": {
13766
+ kind: "gauge",
13767
+ unit: "µg/m³",
13768
+ deadband: 1
13769
+ },
13770
+ "aqi": {
13771
+ kind: "gauge",
13772
+ unit: "count",
13773
+ deadband: 1
13774
+ }
13775
+ },
13776
+ "alarm-panel": { "state": {
13777
+ kind: "enum",
13778
+ values: [
13779
+ "disarmed",
13780
+ "armed_home",
13781
+ "armed_away",
13782
+ "armed_night",
13783
+ "armed_vacation",
13784
+ "armed_custom_bypass",
13785
+ "arming",
13786
+ "disarming",
13787
+ "pending",
13788
+ "triggered"
13789
+ ]
13790
+ } },
13791
+ "ambient-light-sensor": { "lux": {
13792
+ kind: "gauge",
13793
+ unit: "lx",
13794
+ deadbandPct: 10,
13795
+ minIntervalMs: 6e4
13796
+ } },
13797
+ "battery": {
13798
+ "percentage": {
13799
+ kind: "gauge",
13800
+ unit: "%"
13801
+ },
13802
+ "volts": {
13803
+ kind: "gauge",
13804
+ unit: "V"
13805
+ }
13806
+ },
13807
+ "binary": { "on": { kind: "boolean" } },
13808
+ "brightness": { "percentage": {
13809
+ kind: "gauge",
13810
+ unit: "%",
13811
+ minIntervalMs: 0
13812
+ } },
13813
+ "carbon-monoxide": { "detected": { kind: "boolean" } },
13814
+ "climate-control": {
13815
+ "currentTemp": {
13816
+ kind: "gauge",
13817
+ unit: "°C",
13818
+ deadband: .1
13819
+ },
13820
+ "currentHumidity": {
13821
+ kind: "gauge",
13822
+ unit: "%",
13823
+ deadband: .5
13824
+ },
13825
+ "target": {
13826
+ kind: "gauge",
13827
+ unit: "°C",
13828
+ minIntervalMs: 0
13829
+ },
13830
+ "targetHigh": {
13831
+ kind: "gauge",
13832
+ unit: "°C",
13833
+ minIntervalMs: 0
13834
+ },
13835
+ "targetLow": {
13836
+ kind: "gauge",
13837
+ unit: "°C",
13838
+ minIntervalMs: 0
13839
+ }
13840
+ },
13841
+ "connectivity": { "connected": { kind: "boolean" } },
13842
+ "contact": { "entryOpen": { kind: "boolean" } },
13843
+ "cover": { "position": {
13844
+ kind: "gauge",
13845
+ unit: "%",
13846
+ minIntervalMs: 0
13847
+ } },
13848
+ "device-status": { "online": { kind: "boolean" } },
13849
+ "dishwasher": {
13850
+ "progressPercent": {
13851
+ kind: "gauge",
13852
+ unit: "%",
13853
+ deadband: 2
13854
+ },
13855
+ "state": {
13856
+ kind: "enum",
13857
+ values: [
13858
+ "idle",
13859
+ "running",
13860
+ "paused",
13861
+ "finished",
13862
+ "error",
13863
+ "unavailable"
13864
+ ]
13865
+ },
13866
+ "operationState": {
13867
+ kind: "enum",
13868
+ values: [
13869
+ "Inactive",
13870
+ "Ready",
13871
+ "DelayedStart",
13872
+ "Run",
13873
+ "Pause",
13874
+ "ActionRequired",
13875
+ "Finished",
13876
+ "Error",
13877
+ "Aborting"
13878
+ ]
13879
+ },
13880
+ "remainingSeconds": {
13881
+ kind: "gauge",
13882
+ unit: "s",
13883
+ minIntervalMs: 6e4
13884
+ },
13885
+ "doorOpen": { kind: "boolean" },
13886
+ "powerOn": { kind: "boolean" }
13887
+ },
13888
+ "enum-sensor": { "value": {
13889
+ kind: "enum",
13890
+ skipWhenSet: "timestamp"
13891
+ } },
13892
+ "fan-control": {
13893
+ "percentage": {
13894
+ kind: "gauge",
13895
+ unit: "%",
13896
+ minIntervalMs: 0
13897
+ },
13898
+ "oscillating": { kind: "boolean" }
13899
+ },
13900
+ "flood": { "flooded": { kind: "boolean" } },
13901
+ "gas": { "detected": { kind: "boolean" } },
13902
+ "heating-valve": { "position": {
13903
+ kind: "gauge",
13904
+ unit: "%",
13905
+ deadband: 1
13906
+ } },
13907
+ "humidifier": {
13908
+ "currentHumidity": {
13909
+ kind: "gauge",
13910
+ unit: "%",
13911
+ deadband: .5
13912
+ },
13913
+ "on": { kind: "boolean" }
13914
+ },
13915
+ "humidity-sensor": { "percent": {
13916
+ kind: "gauge",
13917
+ unit: "%",
13918
+ deadband: .5
13919
+ } },
13920
+ "lawn-mower-control": { "batteryLevel": {
13921
+ kind: "gauge",
13922
+ unit: "%",
13923
+ deadband: 2
13924
+ } },
13925
+ "lock-control": { "state": {
13926
+ kind: "enum",
13927
+ values: [
13928
+ "locked",
13929
+ "unlocked",
13930
+ "locking",
13931
+ "unlocking",
13932
+ "jammed"
13933
+ ]
13934
+ } },
13935
+ "media-player": {
13936
+ "volumeLevel": {
13937
+ kind: "gauge",
13938
+ unit: "%",
13939
+ deadband: 1
13940
+ },
13941
+ "isMuted": { kind: "boolean" }
13942
+ },
13943
+ "meter": { "value": {
13944
+ kind: "counter",
13945
+ deadband: .001,
13946
+ minIntervalMs: 6e4
13947
+ } },
13948
+ "motion": { "detected": {
13949
+ kind: "boolean",
13950
+ excludeDeviceTypes: [require_err_msg.DeviceType.Camera]
13951
+ } },
13952
+ "network-link": {
13953
+ "signalPercent": {
13954
+ kind: "gauge",
13955
+ unit: "%",
13956
+ deadband: 3,
13957
+ minIntervalMs: 6e4
13958
+ },
13959
+ "rssiDbm": {
13960
+ kind: "gauge",
13961
+ unit: "dBm",
13962
+ deadband: 2,
13963
+ minIntervalMs: 6e4
13964
+ }
13965
+ },
13966
+ "numeric-sensor": { "value": {
13967
+ kind: "gauge",
13968
+ minIntervalMs: 3e4
13969
+ } },
13970
+ "pet-feeder": {
13971
+ "foodLevel": { kind: "gauge" },
13972
+ "food1": { kind: "gauge" },
13973
+ "food2": { kind: "gauge" },
13974
+ "batteryPower": {
13975
+ kind: "gauge",
13976
+ unit: "%",
13977
+ deadband: 2
13978
+ },
13979
+ "desiccantLeftDays": {
13980
+ kind: "gauge",
13981
+ unit: "s"
13982
+ }
13983
+ },
13984
+ "power-meter": {
13985
+ "watts": {
13986
+ kind: "gauge",
13987
+ unit: "W",
13988
+ deadband: 1,
13989
+ minIntervalMs: 3e4
13990
+ },
13991
+ "kwhTotal": {
13992
+ kind: "counter",
13993
+ unit: "kWh",
13994
+ deadband: .01,
13995
+ minIntervalMs: 6e4
13996
+ },
13997
+ "volts": {
13998
+ kind: "gauge",
13999
+ unit: "V",
14000
+ deadband: 1,
14001
+ minIntervalMs: 3e4
14002
+ },
14003
+ "amps": {
14004
+ kind: "gauge",
14005
+ unit: "A",
14006
+ deadband: .05,
14007
+ minIntervalMs: 3e4
14008
+ },
14009
+ "va": {
14010
+ kind: "gauge",
14011
+ unit: "VA",
14012
+ deadband: 1,
14013
+ minIntervalMs: 3e4
14014
+ },
14015
+ "powerFactor": {
14016
+ kind: "gauge",
14017
+ unit: "ratio",
14018
+ deadband: .01,
14019
+ minIntervalMs: 6e4
14020
+ }
14021
+ },
14022
+ "presence": { "batteryPercent": {
14023
+ kind: "gauge",
14024
+ unit: "%",
14025
+ deadband: 1
14026
+ } },
14027
+ "pressure-sensor": { "hpa": {
14028
+ kind: "gauge",
14029
+ unit: "hPa",
14030
+ deadband: .1
14031
+ } },
14032
+ "running-state": { "running": { kind: "boolean" } },
14033
+ "smoke": { "detected": { kind: "boolean" } },
14034
+ "stream-params": {
14035
+ "main.bitrate": {
14036
+ kind: "gauge",
14037
+ unit: "kbps"
14038
+ },
14039
+ "main.framerate": {
14040
+ kind: "gauge",
14041
+ unit: "fps"
14042
+ },
14043
+ "sub.bitrate": {
14044
+ kind: "gauge",
14045
+ unit: "kbps"
14046
+ },
14047
+ "sub.framerate": {
14048
+ kind: "gauge",
14049
+ unit: "fps"
14050
+ }
14051
+ },
14052
+ "switch": { "on": { kind: "boolean" } },
14053
+ "tamper": { "tampered": { kind: "boolean" } },
14054
+ "temperature-sensor": { "celsius": {
14055
+ kind: "gauge",
14056
+ unit: "°C",
14057
+ deadband: .1
14058
+ } },
14059
+ "vacuum-control": { "batteryLevel": {
14060
+ kind: "gauge",
14061
+ unit: "%",
14062
+ deadband: 2
14063
+ } },
14064
+ "valve": { "position": {
14065
+ kind: "gauge",
14066
+ unit: "%",
14067
+ minIntervalMs: 0
14068
+ } },
14069
+ "vibration": { "detected": { kind: "boolean" } },
14070
+ "water-heater": {
14071
+ "currentTemp": {
14072
+ kind: "gauge",
14073
+ unit: "°C",
14074
+ deadband: .5
14075
+ },
14076
+ "targetTemp": {
14077
+ kind: "gauge",
14078
+ unit: "°C",
14079
+ minIntervalMs: 0
14080
+ }
14081
+ },
14082
+ "weather": {
14083
+ "temperature": {
14084
+ kind: "gauge",
14085
+ unit: "°C",
14086
+ deadband: .2
14087
+ },
14088
+ "humidity": {
14089
+ kind: "gauge",
14090
+ unit: "%",
14091
+ deadband: 1
14092
+ },
14093
+ "pressure": {
14094
+ kind: "gauge",
14095
+ unit: "hPa",
14096
+ deadband: .5
14097
+ },
14098
+ "windSpeed": {
14099
+ kind: "gauge",
14100
+ unit: "m/s",
14101
+ deadband: .5
14102
+ }
14103
+ }
14104
+ };
14105
+ /**
14106
+ * Keyed-array series (D917), projected from every `history.items` block:
14107
+ * 1 caps (3 item fields). The item key is the series SCOPE;
14108
+ * the series key is `cap:<capName>.<path>[].<field>`.
14109
+ */
14110
+ var HISTORY_ITEM_CATALOG = { "consumables": {
14111
+ path: "items",
14112
+ key: "key",
14113
+ label: "label",
14114
+ fields: {
14115
+ "level": {
14116
+ kind: "gauge",
14117
+ unit: "%",
14118
+ deadband: 2,
14119
+ displayName: "Level"
14120
+ },
14121
+ "status": {
14122
+ kind: "enum",
14123
+ displayName: "Status",
14124
+ values: [
14125
+ "ok",
14126
+ "low",
14127
+ "empty",
14128
+ "full",
14129
+ "replace"
14130
+ ]
14131
+ },
14132
+ "remaining.value": {
14133
+ kind: "gauge",
14134
+ deadband: 1,
14135
+ displayName: "Remaining"
14136
+ }
14137
+ }
14138
+ } };
14139
+ /** Caps that declared `history: 'none'`, sorted. */
14140
+ var HISTORY_NONE_CAPS = [
14141
+ "audio-metrics",
14142
+ "automation-control",
14143
+ "camera-streams",
14144
+ "color",
14145
+ "control",
14146
+ "day-night",
14147
+ "device-discovery",
14148
+ "doorbell",
14149
+ "event-emitter",
14150
+ "feature-probe",
14151
+ "group-commands",
14152
+ "group-status",
14153
+ "image",
14154
+ "image-settings",
14155
+ "intercom",
14156
+ "motion-trigger",
14157
+ "motion-zones",
14158
+ "native-object-detection",
14159
+ "navigation",
14160
+ "notifier",
14161
+ "privacy-mask",
14162
+ "ptz-autotrack",
14163
+ "recording-onboard",
14164
+ "recording-signal",
14165
+ "scene-monitor",
14166
+ "script-runner",
14167
+ "stream-catalog",
14168
+ "stream-signals",
14169
+ "update",
14170
+ "zone-analytics",
14171
+ "zone-rules",
14172
+ "zones"
14173
+ ];
14174
+ /** The series specs of `capName`; empty for a `'none'` cap or an unknown one. */
14175
+ function historyFieldsFor(capName) {
14176
+ return HISTORY_CATALOG[capName] ?? {};
14177
+ }
14178
+ //#endregion
14179
+ //#region src/composition/helpers/compile-history.ts
14180
+ /**
14181
+ * Project a statistics or integral helper onto a new device (D944 §3).
14182
+ * The value field is `series`: the composer fills it from history.
14183
+ */
14184
+ var NOW = {
14185
+ kind: "expression",
14186
+ expr: "now",
14187
+ bindings: {}
14188
+ };
14189
+ function series(member, publish, empty) {
14190
+ return {
14191
+ kind: "series",
14192
+ read: {
14193
+ source: member.source,
14194
+ cap: member.cap,
14195
+ fieldPath: member.fieldPath
14196
+ },
14197
+ publish,
14198
+ empty
14199
+ };
14200
+ }
14201
+ function counts(member) {
14202
+ return {
14203
+ included: series(member, "included", "offline"),
14204
+ excluded: series(member, "excluded", "offline"),
14205
+ total: series(member, "total", "offline")
14206
+ };
14207
+ }
14208
+ function declaredSeriesKind(member) {
14209
+ const field = historyFieldsFor(member.cap)[member.fieldPath];
14210
+ if (field === void 0) return null;
14211
+ return field.kind;
14212
+ }
14213
+ function historyProblems(member) {
14214
+ if (declaredSeriesKind(member) !== null) return [];
14215
+ return [problem("member-constraint", "helper.source", `${member.cap}.${member.fieldPath} has no history declaration`)];
14216
+ }
14217
+ function draft(input) {
14218
+ return {
14219
+ target: {
14220
+ kind: "new",
14221
+ type: require_err_msg.DeviceType.Sensor,
14222
+ role: input.role
14223
+ },
14224
+ helper: input.spec,
14225
+ features: [{
14226
+ kind: "fields",
14227
+ cap: input.cap,
14228
+ fields: {
14229
+ [input.field]: series(input.member, "value", input.empty),
14230
+ lastFetchedAt: NOW
14231
+ }
14232
+ }, {
14233
+ kind: "fields",
14234
+ cap: "group-status",
14235
+ fields: counts(input.member)
14236
+ }]
14237
+ };
14238
+ }
14239
+ function statisticDraft(spec, retention = require_composition.DEFAULT_HISTORY_RETENTION) {
14240
+ const problems = [...historyProblems(spec.source)];
14241
+ const kind = declaredSeriesKind(spec.source);
14242
+ if (kind === "enum") problems.push(problem("kind-mismatch", "helper.source", "a statistic reads a number or a boolean, not a state"));
14243
+ if (spec.stat === "sum" && kind !== "counter") problems.push(problem("kind-mismatch", "helper.stat", "a gauge has no sum — that is the integral template"));
14244
+ const tier = require_composition.planStatisticTier(spec.window, retention);
14245
+ if (!tier.ok) problems.push(problem("retention", "helper.window", tier.reason));
14246
+ return {
14247
+ problems,
14248
+ draft: draft({
14249
+ role: require_err_msg.DeviceRole.NumericSensor,
14250
+ cap: "numeric-sensor",
14251
+ field: "value",
14252
+ empty: "null",
14253
+ spec,
14254
+ member: spec.source
14255
+ })
14256
+ };
14257
+ }
14258
+ function integralDraft(spec, retention = require_composition.DEFAULT_HISTORY_RETENTION) {
14259
+ const problems = [...historyProblems(spec.source)];
14260
+ const kind = declaredSeriesKind(spec.source);
14261
+ const watts = spec.source.cap === "power-meter" && spec.source.fieldPath === "watts";
14262
+ if (kind === "counter" || kind === "boolean" || kind === "enum") problems.push(problem("kind-mismatch", "helper.source", "an integral reads an instantaneous gauge, not a counter or a state"));
14263
+ if (spec.output === "energy" && !watts) problems.push(problem("kind-mismatch", "helper.output", "energy is the integral of power-meter.watts; another reading uses the meter"));
14264
+ if (spec.output === "meter" && watts) problems.push(problem("kind-mismatch", "helper.output", "power integrates to power-meter.kwhTotal, which energy dashboards already read"));
14265
+ const tier = require_composition.planResetTier(spec.reset, retention);
14266
+ if (!tier.ok) problems.push(problem("retention", "helper.reset", tier.reason));
14267
+ const energy = spec.output === "energy";
14268
+ return {
14269
+ problems,
14270
+ draft: draft({
14271
+ role: energy ? require_err_msg.DeviceRole.EnergySensor : require_err_msg.DeviceRole.NumericSensor,
14272
+ cap: energy ? "power-meter" : "meter",
14273
+ field: energy ? "kwhTotal" : "value",
14274
+ empty: "offline",
14275
+ spec,
14276
+ member: spec.source
14277
+ })
14278
+ };
14279
+ }
14280
+ //#endregion
13630
14281
  //#region src/composition/helpers/compile.ts
13631
14282
  function sameSource(a, b) {
13632
14283
  return a.addonId === b.addonId && a.stableId === b.stableId;
@@ -13658,13 +14309,6 @@ function aggregateSource(template, spec, reads, publish) {
13658
14309
  empty: template.empty
13659
14310
  };
13660
14311
  }
13661
- function expressionSource(expr) {
13662
- return {
13663
- kind: "expression",
13664
- expr,
13665
- bindings: {}
13666
- };
13667
- }
13668
14312
  function draftOf$1(template, spec) {
13669
14313
  const reads = spec.members.map((member) => ({
13670
14314
  source: member.source,
@@ -13718,8 +14362,88 @@ function parseDraft(draft) {
13718
14362
  problems: [problem("helper-mismatch", "helper", `the template did not compile: ${parsed.error.issues.map((issue) => issue.message).join("; ")}`)]
13719
14363
  };
13720
14364
  }
13721
- /** Compile a group template to a new-device composition. Refusals are named. */
13722
- function compileHelper(spec) {
14365
+ function expressionSource(expr, bindings = {}) {
14366
+ return {
14367
+ kind: "expression",
14368
+ expr,
14369
+ bindings
14370
+ };
14371
+ }
14372
+ function compileAppliance(spec) {
14373
+ const member = spec.member;
14374
+ if (member.cap !== "power-meter" || member.fieldPath !== "watts") return {
14375
+ ok: false,
14376
+ problems: [problem("member-constraint", "helper.member", "an appliance helper reads power-meter.watts")]
14377
+ };
14378
+ const threshold = unsignedToken(spec.thresholdWatts);
14379
+ const start = unsignedToken(spec.startDwellMs);
14380
+ const stop = unsignedToken(spec.stopDwellMs);
14381
+ if (threshold === null || spec.thresholdWatts <= 0) return {
14382
+ ok: false,
14383
+ problems: [problem("kind-mismatch", "helper.thresholdWatts", "the threshold is watts above which the appliance is running")]
14384
+ };
14385
+ if (start === null || stop === null) return {
14386
+ ok: false,
14387
+ problems: [problem("kind-mismatch", "helper.startDwellMs", "start and stop dwells are a non-negative number of milliseconds")]
14388
+ };
14389
+ const read = {
14390
+ kind: "from",
14391
+ source: member.source,
14392
+ cap: member.cap,
14393
+ fieldPath: member.fieldPath
14394
+ };
14395
+ const dwell = dwellExpr("gte", threshold, start, stop);
14396
+ const clock = expressionSource("now");
14397
+ return parseDraft({
14398
+ target: {
14399
+ kind: "new",
14400
+ type: require_composition.applianceDeviceType(spec.appliance)
14401
+ },
14402
+ helper: spec,
14403
+ features: [{
14404
+ kind: "fields",
14405
+ cap: "running-state",
14406
+ fields: {
14407
+ running: expressionSource(dwell, { x: read }),
14408
+ source: expressionSource("\"assigned\""),
14409
+ phase: expressionSource("null"),
14410
+ lastFetchedAt: clock,
14411
+ since: expressionSource(`latchedAt(${dwell})`, { x: read })
14412
+ }
14413
+ }, {
14414
+ kind: "fields",
14415
+ cap: "power-meter",
14416
+ fields: {
14417
+ watts: read,
14418
+ lastFetchedAt: clock
14419
+ }
14420
+ }]
14421
+ });
14422
+ }
14423
+ /** Compile a helper template to a new-device composition. Refusals are named. */
14424
+ function compileHelper(spec, retention = require_composition.DEFAULT_HISTORY_RETENTION) {
14425
+ switch (spec.kind) {
14426
+ case "group": return compileGroup(spec);
14427
+ case "appliance": return compileAppliance(spec);
14428
+ case "statistic": {
14429
+ const built = statisticDraft(spec, retention);
14430
+ if (built.problems.length > 0) return {
14431
+ ok: false,
14432
+ problems: built.problems
14433
+ };
14434
+ return parseDraft(built.draft);
14435
+ }
14436
+ case "integral": {
14437
+ const built = integralDraft(spec, retention);
14438
+ if (built.problems.length > 0) return {
14439
+ ok: false,
14440
+ problems: built.problems
14441
+ };
14442
+ return parseDraft(built.draft);
14443
+ }
14444
+ }
14445
+ }
14446
+ function compileGroup(spec) {
13723
14447
  const template = groupTemplate(spec.templateId);
13724
14448
  if (template === null) return {
13725
14449
  ok: false,
@@ -13749,11 +14473,18 @@ function sameHelperBody(stored, compiled) {
13749
14473
  return JSON.stringify(stored.target) === JSON.stringify(compiled.target) && JSON.stringify(stored.features) === JSON.stringify(compiled.features);
13750
14474
  }
13751
14475
  function templateDeviceType(spec) {
14476
+ if (spec.kind === "appliance") return require_composition.applianceDeviceType(spec.appliance);
14477
+ if (spec.kind !== "group") return null;
13752
14478
  return groupTemplate(spec.templateId)?.memberDeviceType ?? null;
13753
14479
  }
13754
14480
  //#endregion
13755
14481
  //#region src/composition/helpers/save.ts
14482
+ /**
14483
+ * Save-time checks a pure compile cannot make: the compiled features must be
14484
+ * this spec's, and members that report a quantity must share one (D944 §4).
14485
+ */
13756
14486
  function quantityProblems(spec, facts) {
14487
+ if (spec.kind !== "group") return [];
13757
14488
  const template = groupTemplate(spec.templateId);
13758
14489
  if (template === null || template.family !== "numeric") return [];
13759
14490
  const known = spec.members.flatMap((member, index) => {
@@ -13769,6 +14500,7 @@ function quantityProblems(spec, facts) {
13769
14500
  return [problem("mixed-quantity", "helper.members", `a numeric group requires one quantity; members report ${distinct.join(" and ")}`)];
13770
14501
  }
13771
14502
  function deviceTypeProblems(spec, facts) {
14503
+ if (spec.kind !== "group") return [];
13772
14504
  const template = groupTemplate(spec.templateId);
13773
14505
  if (template === null) return [];
13774
14506
  return spec.members.flatMap((member, index) => {
@@ -13787,8 +14519,18 @@ function helperSaveProblems(composition, facts) {
13787
14519
  const compiled = compileHelper(spec);
13788
14520
  if (!compiled.ok) return compiled.problems;
13789
14521
  if (!sameHelperBody(composition, compiled.composition)) return [problem("helper-mismatch", "helper", "the stored features are not this template — the helper spec is the only writer")];
14522
+ if (spec.kind === "appliance") return applianceMemberProblems(spec.member, facts);
14523
+ if (spec.kind !== "group") return [];
13790
14524
  return [...quantityProblems(spec, facts), ...deviceTypeProblems(spec, facts)];
13791
14525
  }
14526
+ function applianceMemberProblems(member, facts) {
14527
+ const fact = facts.get(require_composition.compositionSourceKey(member.source));
14528
+ if (fact === void 0) return [];
14529
+ const problems = [];
14530
+ if (fact.deviceType !== void 0 && fact.deviceType !== require_err_msg.DeviceType.Sensor && fact.deviceType !== require_err_msg.DeviceType.Switch) problems.push(problem("member-constraint", "helper.member", `an appliance helper reads a sensor or a switch; this member is a ${fact.deviceType}`));
14531
+ if (fact.quantity !== void 0 && fact.quantity !== "power") problems.push(problem("mixed-quantity", "helper.member", `an appliance helper reads power (W); this member is ${fact.quantity}`));
14532
+ return problems;
14533
+ }
13792
14534
  //#endregion
13793
14535
  //#region src/composition/composition-graph.ts
13794
14536
  /**
@@ -14002,7 +14744,7 @@ function composableCap(feature, at, lookupCap) {
14002
14744
  */
14003
14745
  function actuatorCommandCaps(composition) {
14004
14746
  const spec = composition.helper;
14005
- if (spec === void 0) return /* @__PURE__ */ new Set();
14747
+ if (spec === void 0 || spec.kind !== "group") return /* @__PURE__ */ new Set();
14006
14748
  const template = groupTemplate(spec.templateId);
14007
14749
  if (template === null || template.family !== "actuator") return /* @__PURE__ */ new Set();
14008
14750
  return new Set(template.commandCaps);
@@ -66531,6 +67273,46 @@ var lockControlCapability = {
66531
67273
  volatileStateFields: ["lastChangedAt"]
66532
67274
  };
66533
67275
  //#endregion
67276
+ //#region src/capabilities/meter.cap.ts
67277
+ /**
67278
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
67279
+ * so dashboards keep one series; every other instantaneous reading lands here.
67280
+ * `value` is the time integral in the source quantity's accumulated base
67281
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
67282
+ */
67283
+ var MeterStatusSchema = zod.z.object({
67284
+ value: zod.z.number().nullable().meta(require_sleep.readingMeta("device", { label: "Total" })),
67285
+ lastFetchedAt: zod.z.number()
67286
+ });
67287
+ var meterCapability = {
67288
+ name: "meter",
67289
+ scope: "device",
67290
+ deviceNative: true,
67291
+ mode: "singleton",
67292
+ deviceTypes: [require_err_msg.DeviceType.Sensor],
67293
+ methods: {},
67294
+ status: {
67295
+ schema: MeterStatusSchema,
67296
+ kind: "push"
67297
+ },
67298
+ runtimeState: MeterStatusSchema,
67299
+ /**
67300
+ * Runtime-state durability: **restored** — the total is a cache of the
67301
+ * history integral. A restart shows it only until the history pass
67302
+ * recomputes the open period; it is not an in-memory buffer.
67303
+ *
67304
+ * See `RuntimeStateDurability`. Enforced by
67305
+ * `scripts/check-runtime-state-durability.ts`.
67306
+ */
67307
+ durability: "restored",
67308
+ history: { fields: { value: {
67309
+ kind: "counter",
67310
+ deadband: .001,
67311
+ minIntervalMs: 6e4
67312
+ } } },
67313
+ volatileStateFields: ["lastFetchedAt"]
67314
+ };
67315
+ //#endregion
66534
67316
  //#region src/capabilities/media-player.cap.ts
66535
67317
  /**
66536
67318
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -70385,7 +71167,12 @@ var powerMeterCapability = {
70385
71167
  scope: "device",
70386
71168
  deviceNative: true,
70387
71169
  mode: "singleton",
70388
- deviceTypes: [require_err_msg.DeviceType.Sensor],
71170
+ deviceTypes: [
71171
+ require_err_msg.DeviceType.Sensor,
71172
+ require_err_msg.DeviceType.Washer,
71173
+ require_err_msg.DeviceType.Dryer,
71174
+ require_err_msg.DeviceType.Dishwasher
71175
+ ],
70389
71176
  methods: {},
70390
71177
  status: {
70391
71178
  schema: PowerMeterStatusSchema,
@@ -71293,6 +72080,8 @@ var runningCustomize = {
71293
72080
  stateField: "running"
71294
72081
  },
71295
72082
  deviceTypes: [
72083
+ require_err_msg.DeviceType.Washer,
72084
+ require_err_msg.DeviceType.Dryer,
71296
72085
  require_err_msg.DeviceType.Dishwasher,
71297
72086
  require_err_msg.DeviceType.Vacuum,
71298
72087
  require_err_msg.DeviceType.LawnMower,
@@ -77984,6 +78773,35 @@ function sourcePickForTemplate(template) {
77984
78773
  exclude: []
77985
78774
  };
77986
78775
  }
78776
+ /** A statistic or integral reads one field that declares history. */
78777
+ function sourcePickForHistory(kind) {
78778
+ return {
78779
+ purpose: "historised",
78780
+ multiple: false,
78781
+ max: 1,
78782
+ deviceTypes: [],
78783
+ accept: historyAccept(kind),
78784
+ history: {
78785
+ required: true,
78786
+ minRetentionMs: null
78787
+ },
78788
+ mustBindCaps: [],
78789
+ exclude: []
78790
+ };
78791
+ }
78792
+ function historyAccept(kind) {
78793
+ const fields = [];
78794
+ for (const cap of Object.keys(HISTORY_CATALOG)) for (const [fieldPath, field] of Object.entries(historyFieldsFor(cap))) {
78795
+ if (field.kind === "enum") continue;
78796
+ if (kind === "integral" && field.kind !== "gauge") continue;
78797
+ fields.push({
78798
+ cap,
78799
+ fieldPath,
78800
+ valueKind: field.kind === "boolean" ? "boolean" : "number"
78801
+ });
78802
+ }
78803
+ return fields;
78804
+ }
77987
78805
  //#endregion
77988
78806
  //#region src/units/unit-table.ts
77989
78807
  /**
@@ -78610,6 +79428,13 @@ function evaluateCompositionField(input) {
78610
79428
  case "from": return fromReading(input.read(source), source);
78611
79429
  case "expression": return expressionOutcome(source, input.read, input.now, input.stateful);
78612
79430
  case "aggregate": return aggregateField(source, input.read);
79431
+ case "series": return {
79432
+ state: "unavailable",
79433
+ value: null,
79434
+ reason: "a series field is written from device history",
79435
+ fatal: false,
79436
+ confirmed: false
79437
+ };
78613
79438
  case "code": return {
78614
79439
  state: "unavailable",
78615
79440
  value: null,
@@ -79138,7 +79963,9 @@ var CAP_CUSTOMIZE_CATALOG = {
79138
79963
  require_err_msg.DeviceType.Container,
79139
79964
  require_err_msg.DeviceType.Image,
79140
79965
  require_err_msg.DeviceType.PetFeeder,
79141
- require_err_msg.DeviceType.Dishwasher
79966
+ require_err_msg.DeviceType.Dishwasher,
79967
+ require_err_msg.DeviceType.Washer,
79968
+ require_err_msg.DeviceType.Dryer
79142
79969
  ],
79143
79970
  apply: "add",
79144
79971
  vocabularyCap: "consumables",
@@ -79312,6 +80139,8 @@ var CAP_CUSTOMIZE_CATALOG = {
79312
80139
  id: "running",
79313
80140
  cardinality: "scalar",
79314
80141
  deviceTypes: [
80142
+ require_err_msg.DeviceType.Washer,
80143
+ require_err_msg.DeviceType.Dryer,
79315
80144
  require_err_msg.DeviceType.Dishwasher,
79316
80145
  require_err_msg.DeviceType.Vacuum,
79317
80146
  require_err_msg.DeviceType.LawnMower,
@@ -79430,102 +80259,6 @@ function isLiteral(source, expr) {
79430
80259
  return source?.kind === "expression" && source.expr === expr && Object.keys(source.bindings).length === 0;
79431
80260
  }
79432
80261
  //#endregion
79433
- //#region src/composition/customize/scalar-expr.ts
79434
- var UNSIGNED = /^\d+(?:\.\d+)?$/;
79435
- var SIGNED = /^-?\d+(?:\.\d+)?$/;
79436
- var DWELL = /^dwell\(x (>=|<=) (\d+(?:\.\d+)?), (\d+(?:\.\d+)?), (\d+(?:\.\d+)?)\)$/;
79437
- var LINEAR_CLAMP = /^clamp\((x|number\(x\)) \* (-?\d+(?:\.\d+)?) \+ (-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\)$/;
79438
- var LINEAR_BARE = /^(x|number\(x\)) \* (-?\d+(?:\.\d+)?) \+ (-?\d+(?:\.\d+)?)$/;
79439
- var IDENT = /^[A-Za-z_][A-Za-z0-9_]*$/;
79440
- function unsignedToken(value) {
79441
- return token(value, UNSIGNED);
79442
- }
79443
- function signedToken(value) {
79444
- return token(value, SIGNED);
79445
- }
79446
- function constantExpr(value) {
79447
- if (typeof value === "string") return JSON.stringify(value);
79448
- if (typeof value === "number") return signedToken(value);
79449
- if (typeof value === "boolean") return value ? "true" : "false";
79450
- return "null";
79451
- }
79452
- function isIdentifier(path) {
79453
- return IDENT.test(path);
79454
- }
79455
- function dwellExpr(comparison, threshold, start, stop) {
79456
- return `dwell(x ${comparison === "gte" ? ">=" : "<="} ${threshold}, ${start}, ${stop})`;
79457
- }
79458
- function linearExpr(inner, scale, offset, clampMin, clampMax) {
79459
- const arithmetic = `${inner} * ${scale} + ${offset}`;
79460
- if (clampMin === null || clampMax === null) return arithmetic;
79461
- return `clamp(${arithmetic}, ${clampMin}, ${clampMax})`;
79462
- }
79463
- function parseDwell(expr) {
79464
- const match = DWELL.exec(expr);
79465
- if (match === null) return null;
79466
- const threshold = Number(match[2]);
79467
- const startDwellMs = Number(match[3]);
79468
- const stopDwellMs = Number(match[4]);
79469
- if (!Number.isFinite(threshold) || !Number.isFinite(startDwellMs) || !Number.isFinite(stopDwellMs)) return null;
79470
- return {
79471
- comparison: match[1] === "<=" ? "lte" : "gte",
79472
- threshold,
79473
- startDwellMs,
79474
- stopDwellMs
79475
- };
79476
- }
79477
- function parseLinear(expr) {
79478
- const clamped = LINEAR_CLAMP.exec(expr);
79479
- if (clamped !== null) return linearFrom(clamped[1], clamped[2], clamped[3], clamped[4], clamped[5]);
79480
- const bare = LINEAR_BARE.exec(expr);
79481
- if (bare === null) return null;
79482
- return linearFrom(bare[1], bare[2], bare[3], void 0, void 0);
79483
- }
79484
- function singleFrom(source) {
79485
- if (source.kind === "from") return {
79486
- cap: source.cap,
79487
- fieldPath: source.fieldPath,
79488
- addonId: source.source.addonId,
79489
- stableId: source.source.stableId
79490
- };
79491
- if (source.kind !== "expression" || Object.keys(source.bindings).length !== 1) return null;
79492
- const bound = source.bindings["x"];
79493
- if (bound === void 0 || bound.kind !== "from") return null;
79494
- return {
79495
- cap: bound.cap,
79496
- fieldPath: bound.fieldPath,
79497
- addonId: bound.source.addonId,
79498
- stableId: bound.source.stableId
79499
- };
79500
- }
79501
- function token(value, pattern) {
79502
- if (!Number.isFinite(value)) return null;
79503
- const text = Object.is(value, -0) ? "0" : String(value);
79504
- return pattern.test(text) ? text : null;
79505
- }
79506
- function linearFrom(inner, scale, offset, clampMin, clampMax) {
79507
- if (inner !== "x" && inner !== "number(x)") return null;
79508
- if (scale === void 0 || offset === void 0) return null;
79509
- const parsedScale = Number(scale);
79510
- const parsedOffset = Number(offset);
79511
- if (!Number.isFinite(parsedScale) || !Number.isFinite(parsedOffset)) return null;
79512
- if (clampMin === void 0 || clampMax === void 0) return {
79513
- inner,
79514
- scale: parsedScale,
79515
- offset: parsedOffset
79516
- };
79517
- const parsedMin = Number(clampMin);
79518
- const parsedMax = Number(clampMax);
79519
- if (!Number.isFinite(parsedMin) || !Number.isFinite(parsedMax)) return null;
79520
- return {
79521
- inner,
79522
- scale: parsedScale,
79523
- offset: parsedOffset,
79524
- clampMin: parsedMin,
79525
- clampMax: parsedMax
79526
- };
79527
- }
79528
- //#endregion
79529
80262
  //#region src/composition/customize/event-compile.ts
79530
80263
  var catalog$4 = CAP_CUSTOMIZE_CATALOG;
79531
80264
  function compilePulseOverride(input) {
@@ -81476,6 +82209,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
81476
82209
  lawnMowerControl: lawnMowerControlCapability,
81477
82210
  lockControl: lockControlCapability,
81478
82211
  mediaPlayer: mediaPlayerCapability,
82212
+ meter: meterCapability,
81479
82213
  motion: motionCapability,
81480
82214
  motionTrigger: motionTriggerCapability,
81481
82215
  motionZones: motionZonesCapability,
@@ -82857,6 +83591,8 @@ var CONTAINER_CHILD_PRIORITY = [
82857
83591
  "fan",
82858
83592
  "vacuum",
82859
83593
  "lawn-mower",
83594
+ "washer",
83595
+ "dryer",
82860
83596
  "dishwasher",
82861
83597
  "light",
82862
83598
  "switch",
@@ -83471,7 +84207,9 @@ var DEVICE_TYPE_CONTROL_KIND = {
83471
84207
  [require_err_msg.DeviceType.Container]: "dummy",
83472
84208
  [require_err_msg.DeviceType.Image]: "image",
83473
84209
  [require_err_msg.DeviceType.PetFeeder]: "pet-feeder",
83474
- [require_err_msg.DeviceType.Dishwasher]: "dishwasher"
84210
+ [require_err_msg.DeviceType.Dishwasher]: "dishwasher",
84211
+ [require_err_msg.DeviceType.Washer]: "dummy",
84212
+ [require_err_msg.DeviceType.Dryer]: "dummy"
83475
84213
  };
83476
84214
  var DEVICE_TYPE_VALUES = new Set(Object.values(require_err_msg.DeviceType));
83477
84215
  /**
@@ -87765,6 +88503,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
87765
88503
  access: "create",
87766
88504
  role: "admin"
87767
88505
  },
88506
+ "meter.getStatus": {
88507
+ capName: "meter",
88508
+ capScope: "device",
88509
+ addonId: null,
88510
+ access: "view",
88511
+ role: "viewer"
88512
+ },
87768
88513
  "metricsProvider.collectSnapshot": {
87769
88514
  capName: "metrics-provider",
87770
88515
  capScope: "system",
@@ -93373,6 +94118,7 @@ var KNOWN_CAP_NAMES = [
93373
94118
  "login-method",
93374
94119
  "media-player",
93375
94120
  "mesh-network",
94121
+ "meter",
93376
94122
  "metrics-provider",
93377
94123
  "model-convert",
93378
94124
  "model-distributor",
@@ -93512,6 +94258,7 @@ var DEVICE_CAP_NAMES = [
93512
94258
  "lawn-mower-control",
93513
94259
  "lock-control",
93514
94260
  "media-player",
94261
+ "meter",
93515
94262
  "motion",
93516
94263
  "motion-detection",
93517
94264
  "motion-trigger",
@@ -96244,7 +96991,39 @@ var APPLIANCE_CAP_VOCABULARY = {
96244
96991
  phrase: t("When {device} finishes", "Quando {device} finisce"),
96245
96992
  icon: "square"
96246
96993
  }
96247
- }
96994
+ },
96995
+ overrides: { byType: {
96996
+ [require_err_msg.DeviceType.Washer]: {
96997
+ state: { running: {
96998
+ whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
96999
+ whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
97000
+ } },
97001
+ events: {
97002
+ onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
97003
+ onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
97004
+ }
97005
+ },
97006
+ [require_err_msg.DeviceType.Dryer]: {
97007
+ state: { running: {
97008
+ whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
97009
+ whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
97010
+ } },
97011
+ events: {
97012
+ onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
97013
+ onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
97014
+ }
97015
+ },
97016
+ [require_err_msg.DeviceType.Dishwasher]: {
97017
+ state: { running: {
97018
+ whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
97019
+ whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
97020
+ } },
97021
+ events: {
97022
+ onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
97023
+ onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
97024
+ }
97025
+ }
97026
+ } }
96248
97027
  },
96249
97028
  update: {
96250
97029
  scope: "device",
@@ -97076,6 +97855,17 @@ var SENSOR_CAP_VOCABULARY = {
97076
97855
  }],
97077
97856
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
97078
97857
  },
97858
+ meter: {
97859
+ scope: "device",
97860
+ noun: t("Meter", "Contatore"),
97861
+ state: [{
97862
+ kind: "numeric",
97863
+ field: "value",
97864
+ quantity: t("the total", "il totale"),
97865
+ label: t("Total", "Totale"),
97866
+ icon: "gauge"
97867
+ }]
97868
+ },
97079
97869
  "numeric-sensor": {
97080
97870
  scope: "device",
97081
97871
  noun: t("Sensor", "Sensore"),
@@ -97669,7 +98459,9 @@ var DEVICE_TYPE_DO_CAPS = {
97669
98459
  [require_err_msg.DeviceType.Container]: [],
97670
98460
  [require_err_msg.DeviceType.Image]: [],
97671
98461
  [require_err_msg.DeviceType.PetFeeder]: ["pet-feeder"],
97672
- [require_err_msg.DeviceType.Dishwasher]: ["dishwasher"]
98462
+ [require_err_msg.DeviceType.Dishwasher]: ["dishwasher"],
98463
+ [require_err_msg.DeviceType.Washer]: [],
98464
+ [require_err_msg.DeviceType.Dryer]: []
97673
98465
  };
97674
98466
  /**
97675
98467
  * Whether a device type belongs in a Do / automation action device picker.
@@ -97866,6 +98658,12 @@ function stateWording(wordings, field) {
97866
98658
  ...w.state?.[field]
97867
98659
  }), {});
97868
98660
  }
98661
+ function eventWording(wordings, name) {
98662
+ return wordings.reduce((acc, w) => ({
98663
+ ...acc,
98664
+ ...w.events?.[name]
98665
+ }), {});
98666
+ }
97869
98667
  function accessOf(cap, method) {
97870
98668
  return METHOD_ACCESS_MAP[`${kebabToCamel(cap)}.${method}`]?.access;
97871
98669
  }
@@ -97976,18 +98774,19 @@ function resolveState(cap, trigger, wordings) {
97976
98774
  offer: trigger.offer ?? null
97977
98775
  };
97978
98776
  }
97979
- function eventTriggersOf(cap, entry) {
98777
+ function eventTriggersOf(cap, entry, wordings) {
97980
98778
  const out = [];
97981
- for (const ev of Object.values(entry.events ?? {})) {
98779
+ for (const [name, ev] of Object.entries(entry.events ?? {})) {
97982
98780
  if ("notOperatorFacing" in ev) continue;
98781
+ const wording = eventWording(wordings, name);
97983
98782
  out.push({
97984
98783
  kind: "event",
97985
98784
  id: `${cap}.event.${ev.category}`,
97986
98785
  cap,
97987
98786
  category: ev.category,
97988
- label: ev.label,
97989
- phrase: ev.phrase,
97990
- icon: ev.icon
98787
+ label: wording.label ?? ev.label,
98788
+ phrase: wording.phrase ?? ev.phrase,
98789
+ icon: wording.icon ?? ev.icon
97991
98790
  });
97992
98791
  }
97993
98792
  for (const ev of entry.extraEvents ?? []) out.push({
@@ -98011,7 +98810,7 @@ function triggersForDevice(bindings, deviceType, role) {
98011
98810
  for (const [cap, entry] of boundEntries(bindings)) {
98012
98811
  const wordings = wordingsFor(entry, deviceType, role);
98013
98812
  for (const trigger of entry.state ?? []) state.push(resolveState(cap, trigger, wordings));
98014
- events.push(...eventTriggersOf(cap, entry));
98813
+ events.push(...eventTriggersOf(cap, entry, wordings));
98015
98814
  }
98016
98815
  return [...state, ...events];
98017
98816
  }
@@ -98064,6 +98863,72 @@ function resolveDeviceProfile(features) {
98064
98863
  return null;
98065
98864
  }
98066
98865
  //#endregion
98866
+ //#region src/device/appliance-export.ts
98867
+ /**
98868
+ * How a washer, dryer or dishwasher leaves CamStack.
98869
+ *
98870
+ * Home Assistant has no laundry domain: the device is offered, and what
98871
+ * travels is its power reading. The others have a laundry type that this
98872
+ * export cannot honour yet, so they are named and withheld.
98873
+ */
98874
+ var PLUG_APPLIANCE_TYPES = [
98875
+ require_err_msg.DeviceType.Washer,
98876
+ require_err_msg.DeviceType.Dryer,
98877
+ require_err_msg.DeviceType.Dishwasher
98878
+ ];
98879
+ var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
98880
+ var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
98881
+ var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
98882
+ var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
98883
+ var MATTER_REASON = "No Matter export is built. The closest device types are Laundry Washer (0x0073) and Laundry Dryer (0x0074); a power threshold is not the Laundry Washer Mode cluster.";
98884
+ function withheld(reason) {
98885
+ return {
98886
+ [require_err_msg.DeviceType.Washer]: {
98887
+ exported: false,
98888
+ reason
98889
+ },
98890
+ [require_err_msg.DeviceType.Dryer]: {
98891
+ exported: false,
98892
+ reason
98893
+ },
98894
+ [require_err_msg.DeviceType.Dishwasher]: {
98895
+ exported: false,
98896
+ reason
98897
+ }
98898
+ };
98899
+ }
98900
+ function offered(received) {
98901
+ return {
98902
+ [require_err_msg.DeviceType.Washer]: {
98903
+ exported: true,
98904
+ as: received
98905
+ },
98906
+ [require_err_msg.DeviceType.Dryer]: {
98907
+ exported: true,
98908
+ as: received
98909
+ },
98910
+ [require_err_msg.DeviceType.Dishwasher]: {
98911
+ exported: true,
98912
+ as: received
98913
+ }
98914
+ };
98915
+ }
98916
+ var APPLIANCE_EXPORT = {
98917
+ ha: offered(HA_AS),
98918
+ homekit: withheld(HOMEKIT_REASON),
98919
+ alexa: withheld(ALEXA_REASON),
98920
+ google: withheld(GOOGLE_REASON),
98921
+ matter: withheld(MATTER_REASON)
98922
+ };
98923
+ function isPlugApplianceType(deviceType) {
98924
+ return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
98925
+ }
98926
+ /** The decision for this ecosystem, or null when the type is not an appliance. */
98927
+ function applianceExport(ecosystem, deviceType) {
98928
+ if (!isPlugApplianceType(deviceType)) return null;
98929
+ return APPLIANCE_EXPORT[ecosystem][deviceType];
98930
+ }
98931
+ //#endregion
98067
98932
  //#region src/device/path-util.ts
98068
98933
  /** Returns true when `x` is a non-null, non-array plain object. */
98069
98934
  function isRecord$1(x) {
@@ -99199,6 +100064,7 @@ var CAP_NAMES_WITH_STATUS = [
99199
100064
  "lawn-mower-control",
99200
100065
  "lock-control",
99201
100066
  "media-player",
100067
+ "meter",
99202
100068
  "motion",
99203
100069
  "motion-trigger",
99204
100070
  "motion-zones",
@@ -99334,6 +100200,7 @@ var CAPABILITY_NAMES = {
99334
100200
  loginMethod: "login-method",
99335
100201
  mediaPlayer: "media-player",
99336
100202
  meshNetwork: "mesh-network",
100203
+ meter: "meter",
99337
100204
  metricsProvider: "metrics-provider",
99338
100205
  modelConvert: "model-convert",
99339
100206
  modelDistributor: "model-distributor",
@@ -99808,6 +100675,10 @@ var CAPABILITY_ROUTER_KEYS = [
99808
100675
  key: "meshNetwork",
99809
100676
  name: "mesh-network"
99810
100677
  },
100678
+ {
100679
+ key: "meter",
100680
+ name: "meter"
100681
+ },
99811
100682
  {
99812
100683
  key: "metricsProvider",
99813
100684
  name: "metrics-provider"
@@ -100263,6 +101134,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
100263
101134
  loginMethodCapability,
100264
101135
  mediaPlayerCapability,
100265
101136
  meshNetworkCapability,
101137
+ meterCapability,
100266
101138
  metricsProviderCapability,
100267
101139
  modelConvertCapability,
100268
101140
  modelDistributorCapability,
@@ -101529,6 +102401,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
101529
102401
  form: "single",
101530
102402
  optional: false
101531
102403
  }],
102404
+ "meter.getStatus": [{
102405
+ name: "deviceId",
102406
+ form: "single",
102407
+ optional: false
102408
+ }],
101532
102409
  "motion.getStatus": [{
101533
102410
  name: "deviceId",
101534
102411
  form: "single",
@@ -103340,7 +104217,7 @@ function getCapsByProviderKind(kind) {
103340
104217
  //#region src/generated/runtime-state-durability.ts
103341
104218
  /**
103342
104219
  * Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
103343
- * `runtimeState`. 74 caps: 38 `restored`, 36 `session`.
104220
+ * `runtimeState`. 75 caps: 39 `restored`, 36 `session`.
103344
104221
  *
103345
104222
  * A cap absent from this map has no runtime-state slice at all. A cap PRESENT
103346
104223
  * with `durability: 'session'` has one and has decided not to keep it.
@@ -103502,6 +104379,10 @@ var RUNTIME_STATE_POLICY = {
103502
104379
  durability: "session",
103503
104380
  volatileFields: []
103504
104381
  },
104382
+ "meter": {
104383
+ durability: "restored",
104384
+ volatileFields: ["lastFetchedAt"]
104385
+ },
103505
104386
  "motion": {
103506
104387
  durability: "session",
103507
104388
  volatileFields: []
@@ -103683,6 +104564,7 @@ var RESTORED_CAP_NAMES = [
103683
104564
  "humidity-sensor",
103684
104565
  "image-settings",
103685
104566
  "lock-control",
104567
+ "meter",
103686
104568
  "motion-zones",
103687
104569
  "native-object-detection",
103688
104570
  "network-link",
@@ -103805,438 +104687,6 @@ var BucketAccumulator = class {
103805
104687
  }
103806
104688
  };
103807
104689
  //#endregion
103808
- //#region src/generated/history-catalog.ts
103809
- /**
103810
- * Cap history catalog, projected from every `*.cap.ts` `history` block.
103811
- * 41 caps with series (75 series), 32 caps answered `'none'`.
103812
- * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
103813
- */
103814
- var HISTORY_CATALOG = {
103815
- "air-quality-sensor": {
103816
- "co2Ppm": {
103817
- kind: "gauge",
103818
- unit: "ppm",
103819
- deadband: 5
103820
- },
103821
- "vocPpb": {
103822
- kind: "gauge",
103823
- unit: "ppb",
103824
- deadband: 5
103825
- },
103826
- "pm25": {
103827
- kind: "gauge",
103828
- unit: "µg/m³",
103829
- deadband: 1
103830
- },
103831
- "pm10": {
103832
- kind: "gauge",
103833
- unit: "µg/m³",
103834
- deadband: 1
103835
- },
103836
- "aqi": {
103837
- kind: "gauge",
103838
- unit: "count",
103839
- deadband: 1
103840
- }
103841
- },
103842
- "alarm-panel": { "state": {
103843
- kind: "enum",
103844
- values: [
103845
- "disarmed",
103846
- "armed_home",
103847
- "armed_away",
103848
- "armed_night",
103849
- "armed_vacation",
103850
- "armed_custom_bypass",
103851
- "arming",
103852
- "disarming",
103853
- "pending",
103854
- "triggered"
103855
- ]
103856
- } },
103857
- "ambient-light-sensor": { "lux": {
103858
- kind: "gauge",
103859
- unit: "lx",
103860
- deadbandPct: 10,
103861
- minIntervalMs: 6e4
103862
- } },
103863
- "battery": {
103864
- "percentage": {
103865
- kind: "gauge",
103866
- unit: "%"
103867
- },
103868
- "volts": {
103869
- kind: "gauge",
103870
- unit: "V"
103871
- }
103872
- },
103873
- "binary": { "on": { kind: "boolean" } },
103874
- "brightness": { "percentage": {
103875
- kind: "gauge",
103876
- unit: "%",
103877
- minIntervalMs: 0
103878
- } },
103879
- "carbon-monoxide": { "detected": { kind: "boolean" } },
103880
- "climate-control": {
103881
- "currentTemp": {
103882
- kind: "gauge",
103883
- unit: "°C",
103884
- deadband: .1
103885
- },
103886
- "currentHumidity": {
103887
- kind: "gauge",
103888
- unit: "%",
103889
- deadband: .5
103890
- },
103891
- "target": {
103892
- kind: "gauge",
103893
- unit: "°C",
103894
- minIntervalMs: 0
103895
- },
103896
- "targetHigh": {
103897
- kind: "gauge",
103898
- unit: "°C",
103899
- minIntervalMs: 0
103900
- },
103901
- "targetLow": {
103902
- kind: "gauge",
103903
- unit: "°C",
103904
- minIntervalMs: 0
103905
- }
103906
- },
103907
- "connectivity": { "connected": { kind: "boolean" } },
103908
- "contact": { "entryOpen": { kind: "boolean" } },
103909
- "cover": { "position": {
103910
- kind: "gauge",
103911
- unit: "%",
103912
- minIntervalMs: 0
103913
- } },
103914
- "device-status": { "online": { kind: "boolean" } },
103915
- "dishwasher": {
103916
- "progressPercent": {
103917
- kind: "gauge",
103918
- unit: "%",
103919
- deadband: 2
103920
- },
103921
- "state": {
103922
- kind: "enum",
103923
- values: [
103924
- "idle",
103925
- "running",
103926
- "paused",
103927
- "finished",
103928
- "error",
103929
- "unavailable"
103930
- ]
103931
- },
103932
- "operationState": {
103933
- kind: "enum",
103934
- values: [
103935
- "Inactive",
103936
- "Ready",
103937
- "DelayedStart",
103938
- "Run",
103939
- "Pause",
103940
- "ActionRequired",
103941
- "Finished",
103942
- "Error",
103943
- "Aborting"
103944
- ]
103945
- },
103946
- "remainingSeconds": {
103947
- kind: "gauge",
103948
- unit: "s",
103949
- minIntervalMs: 6e4
103950
- },
103951
- "doorOpen": { kind: "boolean" },
103952
- "powerOn": { kind: "boolean" }
103953
- },
103954
- "enum-sensor": { "value": {
103955
- kind: "enum",
103956
- skipWhenSet: "timestamp"
103957
- } },
103958
- "fan-control": {
103959
- "percentage": {
103960
- kind: "gauge",
103961
- unit: "%",
103962
- minIntervalMs: 0
103963
- },
103964
- "oscillating": { kind: "boolean" }
103965
- },
103966
- "flood": { "flooded": { kind: "boolean" } },
103967
- "gas": { "detected": { kind: "boolean" } },
103968
- "heating-valve": { "position": {
103969
- kind: "gauge",
103970
- unit: "%",
103971
- deadband: 1
103972
- } },
103973
- "humidifier": {
103974
- "currentHumidity": {
103975
- kind: "gauge",
103976
- unit: "%",
103977
- deadband: .5
103978
- },
103979
- "on": { kind: "boolean" }
103980
- },
103981
- "humidity-sensor": { "percent": {
103982
- kind: "gauge",
103983
- unit: "%",
103984
- deadband: .5
103985
- } },
103986
- "lawn-mower-control": { "batteryLevel": {
103987
- kind: "gauge",
103988
- unit: "%",
103989
- deadband: 2
103990
- } },
103991
- "lock-control": { "state": {
103992
- kind: "enum",
103993
- values: [
103994
- "locked",
103995
- "unlocked",
103996
- "locking",
103997
- "unlocking",
103998
- "jammed"
103999
- ]
104000
- } },
104001
- "media-player": {
104002
- "volumeLevel": {
104003
- kind: "gauge",
104004
- unit: "%",
104005
- deadband: 1
104006
- },
104007
- "isMuted": { kind: "boolean" }
104008
- },
104009
- "motion": { "detected": {
104010
- kind: "boolean",
104011
- excludeDeviceTypes: [require_err_msg.DeviceType.Camera]
104012
- } },
104013
- "network-link": {
104014
- "signalPercent": {
104015
- kind: "gauge",
104016
- unit: "%",
104017
- deadband: 3,
104018
- minIntervalMs: 6e4
104019
- },
104020
- "rssiDbm": {
104021
- kind: "gauge",
104022
- unit: "dBm",
104023
- deadband: 2,
104024
- minIntervalMs: 6e4
104025
- }
104026
- },
104027
- "numeric-sensor": { "value": {
104028
- kind: "gauge",
104029
- minIntervalMs: 3e4
104030
- } },
104031
- "pet-feeder": {
104032
- "foodLevel": { kind: "gauge" },
104033
- "food1": { kind: "gauge" },
104034
- "food2": { kind: "gauge" },
104035
- "batteryPower": {
104036
- kind: "gauge",
104037
- unit: "%",
104038
- deadband: 2
104039
- },
104040
- "desiccantLeftDays": {
104041
- kind: "gauge",
104042
- unit: "s"
104043
- }
104044
- },
104045
- "power-meter": {
104046
- "watts": {
104047
- kind: "gauge",
104048
- unit: "W",
104049
- deadband: 1,
104050
- minIntervalMs: 3e4
104051
- },
104052
- "kwhTotal": {
104053
- kind: "counter",
104054
- unit: "kWh",
104055
- deadband: .01,
104056
- minIntervalMs: 6e4
104057
- },
104058
- "volts": {
104059
- kind: "gauge",
104060
- unit: "V",
104061
- deadband: 1,
104062
- minIntervalMs: 3e4
104063
- },
104064
- "amps": {
104065
- kind: "gauge",
104066
- unit: "A",
104067
- deadband: .05,
104068
- minIntervalMs: 3e4
104069
- },
104070
- "va": {
104071
- kind: "gauge",
104072
- unit: "VA",
104073
- deadband: 1,
104074
- minIntervalMs: 3e4
104075
- },
104076
- "powerFactor": {
104077
- kind: "gauge",
104078
- unit: "ratio",
104079
- deadband: .01,
104080
- minIntervalMs: 6e4
104081
- }
104082
- },
104083
- "presence": { "batteryPercent": {
104084
- kind: "gauge",
104085
- unit: "%",
104086
- deadband: 1
104087
- } },
104088
- "pressure-sensor": { "hpa": {
104089
- kind: "gauge",
104090
- unit: "hPa",
104091
- deadband: .1
104092
- } },
104093
- "running-state": { "running": { kind: "boolean" } },
104094
- "smoke": { "detected": { kind: "boolean" } },
104095
- "stream-params": {
104096
- "main.bitrate": {
104097
- kind: "gauge",
104098
- unit: "kbps"
104099
- },
104100
- "main.framerate": {
104101
- kind: "gauge",
104102
- unit: "fps"
104103
- },
104104
- "sub.bitrate": {
104105
- kind: "gauge",
104106
- unit: "kbps"
104107
- },
104108
- "sub.framerate": {
104109
- kind: "gauge",
104110
- unit: "fps"
104111
- }
104112
- },
104113
- "switch": { "on": { kind: "boolean" } },
104114
- "tamper": { "tampered": { kind: "boolean" } },
104115
- "temperature-sensor": { "celsius": {
104116
- kind: "gauge",
104117
- unit: "°C",
104118
- deadband: .1
104119
- } },
104120
- "vacuum-control": { "batteryLevel": {
104121
- kind: "gauge",
104122
- unit: "%",
104123
- deadband: 2
104124
- } },
104125
- "valve": { "position": {
104126
- kind: "gauge",
104127
- unit: "%",
104128
- minIntervalMs: 0
104129
- } },
104130
- "vibration": { "detected": { kind: "boolean" } },
104131
- "water-heater": {
104132
- "currentTemp": {
104133
- kind: "gauge",
104134
- unit: "°C",
104135
- deadband: .5
104136
- },
104137
- "targetTemp": {
104138
- kind: "gauge",
104139
- unit: "°C",
104140
- minIntervalMs: 0
104141
- }
104142
- },
104143
- "weather": {
104144
- "temperature": {
104145
- kind: "gauge",
104146
- unit: "°C",
104147
- deadband: .2
104148
- },
104149
- "humidity": {
104150
- kind: "gauge",
104151
- unit: "%",
104152
- deadband: 1
104153
- },
104154
- "pressure": {
104155
- kind: "gauge",
104156
- unit: "hPa",
104157
- deadband: .5
104158
- },
104159
- "windSpeed": {
104160
- kind: "gauge",
104161
- unit: "m/s",
104162
- deadband: .5
104163
- }
104164
- }
104165
- };
104166
- /**
104167
- * Keyed-array series (D917), projected from every `history.items` block:
104168
- * 1 caps (3 item fields). The item key is the series SCOPE;
104169
- * the series key is `cap:<capName>.<path>[].<field>`.
104170
- */
104171
- var HISTORY_ITEM_CATALOG = { "consumables": {
104172
- path: "items",
104173
- key: "key",
104174
- label: "label",
104175
- fields: {
104176
- "level": {
104177
- kind: "gauge",
104178
- unit: "%",
104179
- deadband: 2,
104180
- displayName: "Level"
104181
- },
104182
- "status": {
104183
- kind: "enum",
104184
- displayName: "Status",
104185
- values: [
104186
- "ok",
104187
- "low",
104188
- "empty",
104189
- "full",
104190
- "replace"
104191
- ]
104192
- },
104193
- "remaining.value": {
104194
- kind: "gauge",
104195
- deadband: 1,
104196
- displayName: "Remaining"
104197
- }
104198
- }
104199
- } };
104200
- /** Caps that declared `history: 'none'`, sorted. */
104201
- var HISTORY_NONE_CAPS = [
104202
- "audio-metrics",
104203
- "automation-control",
104204
- "camera-streams",
104205
- "color",
104206
- "control",
104207
- "day-night",
104208
- "device-discovery",
104209
- "doorbell",
104210
- "event-emitter",
104211
- "feature-probe",
104212
- "group-commands",
104213
- "group-status",
104214
- "image",
104215
- "image-settings",
104216
- "intercom",
104217
- "motion-trigger",
104218
- "motion-zones",
104219
- "native-object-detection",
104220
- "navigation",
104221
- "notifier",
104222
- "privacy-mask",
104223
- "ptz-autotrack",
104224
- "recording-onboard",
104225
- "recording-signal",
104226
- "scene-monitor",
104227
- "script-runner",
104228
- "stream-catalog",
104229
- "stream-signals",
104230
- "update",
104231
- "zone-analytics",
104232
- "zone-rules",
104233
- "zones"
104234
- ];
104235
- /** The series specs of `capName`; empty for a `'none'` cap or an unknown one. */
104236
- function historyFieldsFor(capName) {
104237
- return HISTORY_CATALOG[capName] ?? {};
104238
- }
104239
- //#endregion
104240
104690
  //#region src/capabilities/runtime-field-unit.ts
104241
104691
  /**
104242
104692
  * The unit a composed-device field row offers convert-unit from (D941, D944).
@@ -115501,6 +115951,10 @@ exports.APPEARANCE_BLOCKS = APPEARANCE_BLOCKS;
115501
115951
  exports.APPEARANCE_DESCRIPTOR_VERSION = APPEARANCE_DESCRIPTOR_VERSION;
115502
115952
  exports.APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT = APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT;
115503
115953
  exports.APPLE_SA_TO_MACRO = APPLE_SA_TO_MACRO;
115954
+ exports.APPLIANCE_DEFAULTS = require_composition.APPLIANCE_DEFAULTS;
115955
+ exports.APPLIANCE_EXPORT = APPLIANCE_EXPORT;
115956
+ exports.APPLIANCE_KINDS = require_composition.APPLIANCE_KINDS;
115957
+ exports.APPLIANCE_TEMPLATE_ID = require_composition.APPLIANCE_TEMPLATE_ID;
115504
115958
  exports.APP_AUTH_CALLBACK_MAX_LENGTH = APP_AUTH_CALLBACK_MAX_LENGTH;
115505
115959
  exports.APP_AUTH_CALLBACK_URLS = APP_AUTH_CALLBACK_URLS;
115506
115960
  exports.APP_FLOW_DEFAULT_REDIRECT = APP_FLOW_DEFAULT_REDIRECT;
@@ -115564,6 +116018,7 @@ exports.AppLoginPathSchema = AppLoginPathSchema;
115564
116018
  exports.AppPageLangSchema = AppPageLangSchema;
115565
116019
  exports.AppleFmAvailabilitySchema = AppleFmAvailabilitySchema;
115566
116020
  exports.AppleFmUnavailableReasonSchema = AppleFmUnavailableReasonSchema;
116021
+ exports.ApplianceHelperSpecSchema = require_composition.ApplianceHelperSpecSchema;
115567
116022
  exports.ArchiveEntrySchema = ArchiveEntrySchema;
115568
116023
  exports.ArchiveManifestSchema = ArchiveManifestSchema;
115569
116024
  exports.ArchiveSqliteSnapshotSchema = ArchiveSqliteSnapshotSchema;
@@ -115662,6 +116117,7 @@ exports.BrokerTestConnectionResultSchema = TestConnectionResultSchema;
115662
116117
  exports.BrokerUnsubscribeInputSchema = UnsubscribeInputSchema;
115663
116118
  exports.BucketAccumulator = BucketAccumulator;
115664
116119
  exports.BulkRecordSchema = BulkRecordSchema;
116120
+ exports.CALENDAR_PERIODS = require_composition.CALENDAR_PERIODS;
115665
116121
  exports.CALLER_STAMPED_CAPABILITIES = require_sleep.CALLER_STAMPED_CAPABILITIES;
115666
116122
  exports.CAMERA_SENSORS_NOT_LOADED = CAMERA_SENSORS_NOT_LOADED;
115667
116123
  exports.CAMERA_SENSORS_SETTINGS_KEY = CAMERA_SENSORS_SETTINGS_KEY;
@@ -115730,6 +116186,7 @@ exports.CalendarPreferenceEntrySchema = CalendarPreferenceEntrySchema;
115730
116186
  exports.CalendarPreferencesSchema = CalendarPreferencesSchema;
115731
116187
  exports.CalendarSetPreferenceInputSchema = CalendarSetPreferenceInputSchema;
115732
116188
  exports.CalendarSourceKindSchema = CalendarSourceKindSchema;
116189
+ exports.CalendarWindowSchema = require_composition.CalendarWindowSchema;
115733
116190
  exports.CamProfileSchema = require_sleep.CamProfileSchema;
115734
116191
  exports.CamStreamDescriptorSchema = CamStreamDescriptorSchema;
115735
116192
  exports.CamStreamKindSchema = require_sleep.CamStreamKindSchema;
@@ -115860,6 +116317,7 @@ exports.CompositionProblemCodeSchema = CompositionProblemCodeSchema;
115860
116317
  exports.CompositionProblemSchema = CompositionProblemSchema;
115861
116318
  exports.CompositionRunStatusSchema = CompositionRunStatusSchema;
115862
116319
  exports.CompositionSchema = require_composition.CompositionSchema;
116320
+ exports.CompositionSeriesSourceSchema = require_composition.CompositionSeriesSourceSchema;
115863
116321
  exports.CompositionSourceRefSchema = require_composition.CompositionSourceRefSchema;
115864
116322
  exports.CompositionStateReadSchema = CompositionStateReadSchema;
115865
116323
  exports.CompositionTargetSchema = require_composition.CompositionTargetSchema;
@@ -115911,6 +116369,7 @@ exports.DATABASE_SNAPSHOT_TIMEOUT_MS = DATABASE_SNAPSHOT_TIMEOUT_MS;
115911
116369
  exports.DATAPLANE_SECRET_HEADER = require_sleep.DATAPLANE_SECRET_HEADER;
115912
116370
  exports.DATA_STORE_DATABASES = DATA_STORE_DATABASES;
115913
116371
  exports.DAYS_PER_WEEK = DAYS_PER_WEEK;
116372
+ exports.DAY_MS = require_composition.DAY_MS;
115914
116373
  exports.DAY_NAMES = DAY_NAMES;
115915
116374
  exports.DECLARED_DEVICE_SWEEP_LIMIT = DECLARED_DEVICE_SWEEP_LIMIT;
115916
116375
  exports.DECLARED_INTEGRATION_FIXED_KEY = DECLARED_INTEGRATION_FIXED_KEY;
@@ -115930,6 +116389,7 @@ exports.DEFAULT_EVENT_COLOR = DEFAULT_EVENT_COLOR;
115930
116389
  exports.DEFAULT_FEATURES = DEFAULT_FEATURES;
115931
116390
  exports.DEFAULT_FIRST_SIGHTING_FRESHNESS_MS = require_composition.DEFAULT_FIRST_SIGHTING_FRESHNESS_MS;
115932
116391
  exports.DEFAULT_HEADROOM = DEFAULT_HEADROOM;
116392
+ exports.DEFAULT_HISTORY_RETENTION = require_composition.DEFAULT_HISTORY_RETENTION;
115933
116393
  exports.DEFAULT_MIN_LANDMARK_FACE_SIZE_PX = DEFAULT_MIN_LANDMARK_FACE_SIZE_PX;
115934
116394
  exports.DEFAULT_MIN_SESSIONS_PER_DEVICE = DEFAULT_MIN_SESSIONS_PER_DEVICE;
115935
116395
  exports.DEFAULT_NATIVE_LEASE_SETTINGS = DEFAULT_NATIVE_LEASE_SETTINGS;
@@ -116225,10 +116685,14 @@ exports.HF_REPO = require_sleep.HF_REPO;
116225
116685
  exports.HISTORY_BUCKET_MS = HISTORY_BUCKET_MS;
116226
116686
  exports.HISTORY_CATALOG = HISTORY_CATALOG;
116227
116687
  exports.HISTORY_DEFAULT_MIN_INTERVAL_MS = require_sleep.HISTORY_DEFAULT_MIN_INTERVAL_MS;
116688
+ exports.HISTORY_FAST_MS = require_composition.HISTORY_FAST_MS;
116228
116689
  exports.HISTORY_ITEM_CATALOG = HISTORY_ITEM_CATALOG;
116229
116690
  exports.HISTORY_NONE_CAPS = HISTORY_NONE_CAPS;
116691
+ exports.HISTORY_SLOW_MS = require_composition.HISTORY_SLOW_MS;
116692
+ exports.HISTORY_TIERS = require_composition.HISTORY_TIERS;
116230
116693
  exports.HISTORY_UNIT_LABELS = require_sleep.HISTORY_UNIT_LABELS;
116231
116694
  exports.HOURS_PER_DAY = HOURS_PER_DAY;
116695
+ exports.HOUR_MS = require_composition.HOUR_MS;
116232
116696
  exports.HUB_ADDRESS_ROLES = HUB_ADDRESS_ROLES;
116233
116697
  exports.HUB_MDNS_QUERY_NAME = HUB_MDNS_QUERY_NAME;
116234
116698
  exports.HUB_MDNS_ROLE = HUB_MDNS_ROLE;
@@ -116257,6 +116721,7 @@ exports.ICON_VIEWER_MODULES = ICON_VIEWER_MODULES;
116257
116721
  exports.INFERENCE_DEVICE_EXCLUSION_REASONS = INFERENCE_DEVICE_EXCLUSION_REASONS;
116258
116722
  exports.INITIAL_PULSE = INITIAL_PULSE;
116259
116723
  exports.INITIAL_SPAN = INITIAL_SPAN;
116724
+ exports.INTEGRAL_OUTPUTS = require_composition.INTEGRAL_OUTPUTS;
116260
116725
  exports.INVERTIBLE_CAPS = INVERTIBLE_CAPS;
116261
116726
  exports.IconKeySchema = IconKeySchema;
116262
116727
  exports.ImageContractSchema = ImageContractSchema;
@@ -116271,6 +116736,7 @@ exports.ImportModelBundleResultSchema = ImportModelBundleResultSchema;
116271
116736
  exports.InferenceDeviceExclusionReasonSchema = InferenceDeviceExclusionReasonSchema;
116272
116737
  exports.IngestOwnerSchema = IngestOwnerSchema;
116273
116738
  exports.InstalledPackageSchema = InstalledPackageSchema;
116739
+ exports.IntegralHelperSpecSchema = require_composition.IntegralHelperSpecSchema;
116274
116740
  exports.IntegrationLiteSchema = IntegrationLiteSchema;
116275
116741
  exports.IntegrationWithStateSchema = IntegrationWithStateSchema;
116276
116742
  exports.IntercomAbilitySchema = IntercomAbilitySchema;
@@ -116280,6 +116746,7 @@ exports.KEYCHAIN_MAX_REFS_PER_CALL = KEYCHAIN_MAX_REFS_PER_CALL;
116280
116746
  exports.KEYCHAIN_RESET_CONFIRMATION = KEYCHAIN_RESET_CONFIRMATION;
116281
116747
  exports.KEYCHAIN_RESET_TRIGGER_ACTOR = KEYCHAIN_RESET_TRIGGER_ACTOR;
116282
116748
  exports.KNOWN_CAP_NAMES = KNOWN_CAP_NAMES;
116749
+ exports.KWH_PER_WATT_MS = require_composition.KWH_PER_WATT_MS;
116283
116750
  exports.KeptReasonSchema = KeptReasonSchema;
116284
116751
  exports.KeyEventSchema = KeyEventSchema;
116285
116752
  exports.KeychainAdminSecretSchema = KeychainAdminSecretSchema;
@@ -116429,6 +116896,8 @@ exports.MEDIA_PRESENCE_OWNER_KINDS = MEDIA_PRESENCE_OWNER_KINDS;
116429
116896
  exports.METHOD_ACCESS_MAP = METHOD_ACCESS_MAP;
116430
116897
  exports.METHOD_DEVICE_SELECTORS = METHOD_DEVICE_SELECTORS;
116431
116898
  exports.MINUTES_PER_DAY = MINUTES_PER_DAY;
116899
+ exports.MINUTE_MS = require_composition.MINUTE_MS;
116900
+ exports.MIN_CUSTOM_MINUTES = require_composition.MIN_CUSTOM_MINUTES;
116432
116901
  exports.MIN_SCRUBBED_LENGTH = require_sleep.MIN_SCRUBBED_LENGTH;
116433
116902
  exports.MIN_SESSIONS_PER_DEVICE_RANGE = MIN_SESSIONS_PER_DEVICE_RANGE;
116434
116903
  exports.MODEL_FORMATS = require_sleep.MODEL_FORMATS;
@@ -116467,6 +116936,7 @@ exports.MediaRelocateModeSchema = MediaRelocateModeSchema;
116467
116936
  exports.MeshLeafInfoSchema = MeshLeafInfoSchema;
116468
116937
  exports.MeshPeerSchema = MeshPeerSchema;
116469
116938
  exports.MeshStatusSchema = MeshStatusSchema;
116939
+ exports.MeterStatusSchema = MeterStatusSchema;
116470
116940
  exports.MethodAccessSchema = MethodAccessSchema;
116471
116941
  exports.MigrateDeviceResultSchema = MigrateDeviceResultSchema;
116472
116942
  exports.MigrateSwitchOutcomeSchema = MigrateSwitchOutcomeSchema;
@@ -116836,6 +117306,7 @@ exports.PIPELINE_ANALYTICS_CAP_NAME = PIPELINE_ANALYTICS_CAP_NAME;
116836
117306
  exports.PIPELINE_FLOW_CAPABILITY_NAMES = PIPELINE_FLOW_CAPABILITY_NAMES;
116837
117307
  exports.PIPELINE_OWNER_CAPABILITY_NAMES = PIPELINE_OWNER_CAPABILITY_NAMES;
116838
117308
  exports.PIPELINE_RAMP = PIPELINE_RAMP;
117309
+ exports.PLUG_APPLIANCE_TYPES = PLUG_APPLIANCE_TYPES;
116839
117310
  exports.PLUS_CATALOG_CLASS_FLOORS = PLUS_CATALOG_CLASS_FLOORS;
116840
117311
  exports.PLUS_CATALOG_STOCK_CLASS_FLOORS = PLUS_CATALOG_STOCK_CLASS_FLOORS;
116841
117312
  exports.PLUS_CATALOG_TO_MACRO = PLUS_CATALOG_TO_MACRO;
@@ -116976,12 +117447,14 @@ exports.REMOVED_MODEL_IDS = REMOVED_MODEL_IDS;
116976
117447
  exports.REMOVE_LEAF = require_sleep.REMOVE_LEAF;
116977
117448
  exports.RESERVED_BINDING_NAMES = require_composition.RESERVED_BINDING_NAMES;
116978
117449
  exports.RESERVED_COLLECTION_SOURCES = RESERVED_COLLECTION_SOURCES;
117450
+ exports.RESET_PERIODS = require_composition.RESET_PERIODS;
116979
117451
  exports.RESTORED_CAP_NAMES = RESTORED_CAP_NAMES;
116980
117452
  exports.RETRAIN_REVIEW_ADJUSTED_IOU = RETRAIN_REVIEW_ADJUSTED_IOU;
116981
117453
  exports.RETRAIN_REVIEW_MATCH_IOU = RETRAIN_REVIEW_MATCH_IOU;
116982
117454
  exports.RETRAIN_REVIEW_STATUSES = RETRAIN_REVIEW_STATUSES;
116983
117455
  exports.RETRAIN_REVISION_CONFLICT = RETRAIN_REVISION_CONFLICT;
116984
117456
  exports.REVALIDATE_AFTER_MS = require_sleep.REVALIDATE_AFTER_MS;
117457
+ exports.ROLLING_SPANS = require_composition.ROLLING_SPANS;
116985
117458
  exports.ROOM_EXAMPLE_MOTION_SOURCES = ROOM_EXAMPLE_MOTION_SOURCES;
116986
117459
  exports.ROOM_EXAMPLE_TEMPERATURE_SOURCES = ROOM_EXAMPLE_TEMPERATURE_SOURCES;
116987
117460
  exports.ROOM_OCCUPANCY_WINDOW_MS = ROOM_OCCUPANCY_WINDOW_MS;
@@ -117134,6 +117607,7 @@ exports.RetrainTransitionResultSchema = RetrainTransitionResultSchema;
117134
117607
  exports.RevConflictError = require_sleep.RevConflictError;
117135
117608
  exports.RevokeOwnDeviceCertificateResultSchema = RevokeOwnDeviceCertificateResultSchema;
117136
117609
  exports.RingBuffer = RingBuffer;
117610
+ exports.RollingWindowSchema = require_composition.RollingWindowSchema;
117137
117611
  exports.RootStepSupplySchema = RootStepSupplySchema;
117138
117612
  exports.RtpSourceSchema = RtpSourceSchema;
117139
117613
  exports.RtspRestreamEntrySchema = RtspRestreamEntrySchema;
@@ -117165,6 +117639,7 @@ exports.SECRET_REF_SCHEME = require_sleep.SECRET_REF_SCHEME;
117165
117639
  exports.SENSOR_FEATURES = SENSOR_FEATURES;
117166
117640
  exports.SENSOR_MAP = SENSOR_MAP;
117167
117641
  exports.SERIAL_CAPACITY_CAMERA_FPS = SERIAL_CAPACITY_CAMERA_FPS;
117642
+ exports.SERIES_KINDS = require_composition.SERIES_KINDS;
117168
117643
  exports.SERVER_NAME_MAX_LENGTH = SERVER_NAME_MAX_LENGTH;
117169
117644
  exports.SERVER_NAME_SETTING_KEY = SERVER_NAME_SETTING_KEY;
117170
117645
  exports.SESSION_PLACEMENT_SETTING_KEY = SESSION_PLACEMENT_SETTING_KEY;
@@ -117183,6 +117658,7 @@ exports.SSO_STATE_COOKIE_MAX_AGE_SEC = SSO_STATE_COOKIE_MAX_AGE_SEC;
117183
117658
  exports.STATE_LABELS = STATE_LABELS;
117184
117659
  exports.STATE_LABEL_KEYS = STATE_LABEL_KEYS;
117185
117660
  exports.STATIONARY_OVERLAY_STYLE = STATIONARY_OVERLAY_STYLE;
117661
+ exports.STATISTIC_STATS = require_composition.STATISTIC_STATS;
117186
117662
  exports.STORAGE_ACCESS_FALLBACK = STORAGE_ACCESS_FALLBACK;
117187
117663
  exports.STORAGE_BYTES_PER_GB = STORAGE_BYTES_PER_GB;
117188
117664
  exports.STORAGE_LOCATION_MODES = STORAGE_LOCATION_MODES;
@@ -117253,6 +117729,8 @@ exports.StaleDevicePinSchema = StaleDevicePinSchema;
117253
117729
  exports.StartEmbeddedInputSchema = StartEmbeddedInputSchema;
117254
117730
  exports.StartEnrollmentOutputSchema = StartEnrollmentOutputSchema;
117255
117731
  exports.StationaryObjectSchema = StationaryObjectSchema;
117732
+ exports.StatisticHelperSpecSchema = require_composition.StatisticHelperSpecSchema;
117733
+ exports.StatisticWindowSchema = require_composition.StatisticWindowSchema;
117256
117734
  exports.StorageAbortUploadInputSchema = AbortUploadInputSchema;
117257
117735
  exports.StorageAccessSchema = StorageAccessSchema;
117258
117736
  exports.StorageBeginDownloadInputSchema = BeginDownloadInputSchema;
@@ -117538,6 +118016,8 @@ exports.allowedSuppliedEffect = allowedSuppliedEffect;
117538
118016
  exports.ambientLightSensorCapability = ambientLightSensorCapability;
117539
118017
  exports.annotateClipsWithEventLabels = annotateClipsWithEventLabels;
117540
118018
  exports.appFlowLocation = appFlowLocation;
118019
+ exports.applianceDeviceType = require_composition.applianceDeviceType;
118020
+ exports.applianceExport = applianceExport;
117541
118021
  exports.applyBlockingEdit = applyBlockingEdit;
117542
118022
  exports.applyCropClassFloors = applyCropClassFloors;
117543
118023
  exports.applyModeDelaysEdits = applyModeDelaysEdits;
@@ -117735,6 +118215,7 @@ exports.dayOfWeekToIndex = dayOfWeekToIndex;
117735
118215
  exports.declarationOwnerNodeId = declarationOwnerNodeId;
117736
118216
  exports.declarationsOf = require_sleep.declarationsOf;
117737
118217
  exports.declareLogChannel = declareLogChannel;
118218
+ exports.declaredSeriesKind = declaredSeriesKind;
117738
118219
  exports.decodeCompositionToCards = decodeCompositionToCards;
117739
118220
  exports.decodeKeyedArrayOverride = decodeKeyedArrayOverride;
117740
118221
  exports.decodePulseOverride = decodePulseOverride;
@@ -117837,6 +118318,7 @@ exports.evaluateRose = require_composition.evaluateRose;
117837
118318
  exports.evaluateSensorEdge = require_composition.evaluateSensorEdge;
117838
118319
  exports.evaluateSensorLevelEdge = require_composition.evaluateSensorLevelEdge;
117839
118320
  exports.evaluateStatefulExpressionCall = require_composition.evaluateStatefulExpressionCall;
118321
+ exports.evaluateStatistic = require_composition.evaluateStatistic;
117840
118322
  exports.evaluateZoneRules = evaluateZoneRules;
117841
118323
  exports.event = require_sleep.event;
117842
118324
  exports.eventEmitterCapability = eventEmitterCapability;
@@ -117909,6 +118391,7 @@ exports.hasModelBoundOverrides = hasModelBoundOverrides;
117909
118391
  exports.hasMotionTrigger = hasMotionTrigger;
117910
118392
  exports.hasUrlScheme = hasUrlScheme;
117911
118393
  exports.heatingValveCapability = heatingValveCapability;
118394
+ exports.helperMembers = require_composition.helperMembers;
117912
118395
  exports.helperSaveProblems = helperSaveProblems;
117913
118396
  exports.hfModelUrl = require_sleep.hfModelUrl;
117914
118397
  exports.historyFieldsFor = historyFieldsFor;
@@ -117930,6 +118413,9 @@ exports.inferExpressionKinds = inferExpressionKinds;
117930
118413
  exports.inferModelProvider = inferModelProvider;
117931
118414
  exports.ingestReading = ingestReading;
117932
118415
  exports.initialPoolMemoryState = initialPoolMemoryState;
118416
+ exports.integralCadenceMs = require_composition.integralCadenceMs;
118417
+ exports.integralDraft = integralDraft;
118418
+ exports.integrateReading = require_composition.integrateReading;
117933
118419
  exports.integrationsCapability = integrationsCapability;
117934
118420
  exports.intercomCapability = intercomCapability;
117935
118421
  exports.interpolate = interpolate;
@@ -117943,6 +118429,7 @@ exports.isAlertEpisodeOpen = isAlertEpisodeOpen;
117943
118429
  exports.isAlertEpisodeSeverity = isAlertEpisodeSeverity;
117944
118430
  exports.isAppLinkBase = isAppLinkBase;
117945
118431
  exports.isAppStartRefusal = isAppStartRefusal;
118432
+ exports.isApplianceKind = require_composition.isApplianceKind;
117946
118433
  exports.isArrayOutputSchema = isArrayOutputSchema;
117947
118434
  exports.isAudioChunkFormat = require_sleep.isAudioChunkFormat;
117948
118435
  exports.isAudioClassName = isAudioClassName;
@@ -117983,6 +118470,7 @@ exports.isOauthLandingReason = isOauthLandingReason;
117983
118470
  exports.isObjectInput = isObjectInput;
117984
118471
  exports.isOccupancyRule = isOccupancyRule;
117985
118472
  exports.isOwnerOnlyEventCategory = require_event_category.isOwnerOnlyEventCategory;
118473
+ exports.isPlugApplianceType = isPlugApplianceType;
117986
118474
  exports.isReadingQuantity = require_sleep.isReadingQuantity;
117987
118475
  exports.isRemovedModelId = isRemovedModelId;
117988
118476
  exports.isRestoredCap = isRestoredCap;
@@ -118057,6 +118545,7 @@ exports.markdownToHtmlLite = markdownToHtmlLite;
118057
118545
  exports.markdownToText = markdownToText;
118058
118546
  exports.maskUrlCredentials = require_sleep.maskUrlCredentials;
118059
118547
  exports.matchDoAction = matchDoAction;
118548
+ exports.maxDurationMs = require_composition.maxDurationMs;
118060
118549
  exports.mayReadLocation = mayReadLocation;
118061
118550
  exports.mayWriteToLocation = mayWriteToLocation;
118062
118551
  exports.measuredCapacityFromResults = measuredCapacityFromResults;
@@ -118070,6 +118559,7 @@ exports.mergeSecretStatePaths = require_sleep.mergeSecretStatePaths;
118070
118559
  exports.mergeSettingsBags = mergeSettingsBags;
118071
118560
  exports.mergeSourceInfo = mergeSourceInfo;
118072
118561
  exports.meshNetworkCapability = meshNetworkCapability;
118562
+ exports.meterCapability = meterCapability;
118073
118563
  exports.method = require_sleep.method;
118074
118564
  exports.methodAccessForHttpMethod = methodAccessForHttpMethod;
118075
118565
  exports.methodRoleOf = methodRoleOf;
@@ -118096,6 +118586,7 @@ exports.ncMediaPolicyError = ncMediaPolicyError;
118096
118586
  exports.networkAccessCapability = networkAccessCapability;
118097
118587
  exports.networkLinkCapability = networkLinkCapability;
118098
118588
  exports.networkQualityCapability = networkQualityCapability;
118589
+ exports.nextLocalMidnight = require_composition.nextLocalMidnight;
118099
118590
  exports.nodeBenchmarkRefusals = nodeBenchmarkRefusals;
118100
118591
  exports.nodeCertificatesCapability = nodeCertificatesCapability;
118101
118592
  exports.nodePickerItems = nodePickerItems;
@@ -118122,6 +118613,8 @@ exports.objectInputDeclaresRequiredDeviceId = objectInputDeclaresRequiredDeviceI
118122
118613
  exports.occupancyScope = occupancyScope;
118123
118614
  exports.oidcConnectionsCapability = oidcConnectionsCapability;
118124
118615
  exports.omitTransientConfig = require_sleep.omitTransientConfig;
118616
+ exports.openReset = require_composition.openReset;
118617
+ exports.openStatistic = require_composition.openStatistic;
118125
118618
  exports.optionalAncestors = optionalAncestors;
118126
118619
  exports.optionalMethod = require_sleep.optionalMethod;
118127
118620
  exports.osdCapability = osdCapability;
@@ -118190,6 +118683,8 @@ exports.planItems = planItems;
118190
118683
  exports.planMotionCropRegions = planMotionCropRegions;
118191
118684
  exports.planMotionCrops = planMotionCrops;
118192
118685
  exports.planRecoveryCrops = planRecoveryCrops;
118686
+ exports.planResetTier = require_composition.planResetTier;
118687
+ exports.planStatisticTier = require_composition.planStatisticTier;
118193
118688
  exports.plateGalleryCapability = plateGalleryCapability;
118194
118689
  exports.platformProbeCapability = platformProbeCapability;
118195
118690
  exports.plusCatalogDefaultClassFloors = plusCatalogDefaultClassFloors;
@@ -118312,6 +118807,7 @@ exports.resultStandings = resultStandings;
118312
118807
  exports.retrainBoxIou = retrainBoxIou;
118313
118808
  exports.retrainRevisionConflictMessage = retrainRevisionConflictMessage;
118314
118809
  exports.roleSpec = roleSpec;
118810
+ exports.rollingDurationMs = require_composition.rollingDurationMs;
118315
118811
  exports.roomCompositionExample = roomCompositionExample;
118316
118812
  exports.rootSuppliesOf = rootSuppliesOf;
118317
118813
  exports.rootSupplyServes = rootSupplyServes;
@@ -118392,6 +118888,8 @@ exports.sliceChangedAt = require_composition.sliceChangedAt;
118392
118888
  exports.smokeCapability = smokeCapability;
118393
118889
  exports.smtpProviderCapability = smtpProviderCapability;
118394
118890
  exports.snapshotCapability = snapshotCapability;
118891
+ exports.sourcePickForAppliance = require_composition.sourcePickForAppliance;
118892
+ exports.sourcePickForHistory = sourcePickForHistory;
118395
118893
  exports.sourcePickForTemplate = sourcePickForTemplate;
118396
118894
  exports.splitTranslationRef = splitTranslationRef;
118397
118895
  exports.squareAround = squareAround;
@@ -118400,6 +118898,8 @@ exports.startMoverUnderClearance = startMoverUnderClearance;
118400
118898
  exports.startReachabilityPoll = startReachabilityPoll;
118401
118899
  exports.stateLabel = stateLabel;
118402
118900
  exports.stateVocabularyFor = stateVocabularyFor;
118901
+ exports.statisticCadenceMs = require_composition.statisticCadenceMs;
118902
+ exports.statisticDraft = statisticDraft;
118403
118903
  exports.stepModelRunsOnFormat = stepModelRunsOnFormat;
118404
118904
  exports.stepPulse = stepPulse;
118405
118905
  exports.stepSettingSource = stepSettingSource;
@@ -118511,6 +119011,7 @@ exports.viewerUiCapability = require_sleep.viewerUiCapability;
118511
119011
  exports.vocabularyActionsForDevice = actionsForDevice$1;
118512
119012
  exports.vocabularyTriggersForDevice = triggersForDevice;
118513
119013
  exports.waterHeaterCapability = waterHeaterCapability;
119014
+ exports.wattMillisecondsToKwh = require_composition.wattMillisecondsToKwh;
118514
119015
  exports.weatherCapability = weatherCapability;
118515
119016
  exports.webrtcClientHintsSchema = webrtcClientHintsSchema;
118516
119017
  exports.webrtcSessionCapability = webrtcSessionCapability;