@camstack/addon-export-google 0.1.115 → 0.1.117

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.
@@ -10,7 +10,7 @@ async function dispatchCapCall(api, call) {
10
10
  case "brightness.setBrightness":
11
11
  await api.brightness.setBrightness.mutate({
12
12
  deviceId: call.deviceId,
13
- percentage: call.percentage
13
+ level: call.percentage
14
14
  });
15
15
  return;
16
16
  case "lockControl.lock":
@@ -73,7 +73,7 @@ function createApiDeviceGateway(deps) {
73
73
  };
74
74
  }
75
75
  //#endregion
76
- //#region ../types/dist/event-category-CT-hz5Rb.mjs
76
+ //#region ../types/dist/event-category-DmZDPDf_.mjs
77
77
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
78
78
  EventCategory["SystemBoot"] = "system.boot";
79
79
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -700,7 +700,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
700
700
  * (a track was promoted to a stationary-registry entry) or departs (the
701
701
  * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
702
702
  * the dedicated "Stationary" section — never the live event feed. Payload:
703
- * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
703
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
704
704
  */
705
705
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
706
706
  /**
@@ -838,6 +838,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
838
838
  */
839
839
  EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
840
840
  /**
841
+ * An action run started or ended. Emitted by the `actions` surface.
842
+ * Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
843
+ */
844
+ EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
845
+ /**
841
846
  * Progress update from a running model conversion job.
842
847
  * Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
843
848
  * Emitted by `addon-model-studio` on the converting node.
@@ -5516,7 +5521,7 @@ var ZodIssueCode = {
5516
5521
  var ZodFirstPartyTypeKind;
5517
5522
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5518
5523
  //#endregion
5519
- //#region ../types/dist/sleep-bykKrTgu.mjs
5524
+ //#region ../types/dist/sleep-Crlmu_tO.mjs
5520
5525
  /**
5521
5526
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5522
5527
  * window to float samples (D455).
@@ -8587,6 +8592,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
8587
8592
  /** Every capability name, so addon code can check a name without the schema graph. */
8588
8593
  var CAP_NAMES = Object.freeze([
8589
8594
  "accessories",
8595
+ "action-source",
8596
+ "actions",
8590
8597
  "addon-pages",
8591
8598
  "addon-pages-source",
8592
8599
  "addon-routes",
@@ -8660,6 +8667,7 @@ var CAP_NAMES = Object.freeze([
8660
8667
  "filesystem-browse",
8661
8668
  "flood",
8662
8669
  "gas",
8670
+ "group-active",
8663
8671
  "group-commands",
8664
8672
  "group-status",
8665
8673
  "heating-valve",
@@ -8682,6 +8690,7 @@ var CAP_NAMES = Object.freeze([
8682
8690
  "login-method",
8683
8691
  "media-player",
8684
8692
  "mesh-network",
8693
+ "meter",
8685
8694
  "metrics-provider",
8686
8695
  "model-convert",
8687
8696
  "model-distributor",
@@ -8773,11 +8782,11 @@ var CAP_NAMES = Object.freeze([
8773
8782
  Object.freeze({
8774
8783
  "air-quality-sensor": [
8775
8784
  {
8776
- "path": "co2Ppm",
8785
+ "path": "co2",
8777
8786
  "valueType": "number"
8778
8787
  },
8779
8788
  {
8780
- "path": "vocPpb",
8789
+ "path": "voc",
8781
8790
  "valueType": "number"
8782
8791
  },
8783
8792
  {
@@ -8827,7 +8836,7 @@ Object.freeze({
8827
8836
  }
8828
8837
  ],
8829
8838
  "ambient-light-sensor": [{
8830
- "path": "lux",
8839
+ "path": "illuminance",
8831
8840
  "valueType": "number"
8832
8841
  }],
8833
8842
  "audio-metrics": [
@@ -8888,7 +8897,7 @@ Object.freeze({
8888
8897
  ],
8889
8898
  "battery": [
8890
8899
  {
8891
- "path": "percentage",
8900
+ "path": "level",
8892
8901
  "valueType": "number"
8893
8902
  },
8894
8903
  {
@@ -8910,7 +8919,7 @@ Object.freeze({
8910
8919
  "valueType": "number"
8911
8920
  },
8912
8921
  {
8913
- "path": "volts",
8922
+ "path": "voltage",
8914
8923
  "valueType": "number"
8915
8924
  },
8916
8925
  {
@@ -8931,7 +8940,7 @@ Object.freeze({
8931
8940
  "valueType": "boolean"
8932
8941
  }],
8933
8942
  "brightness": [{
8934
- "path": "percentage",
8943
+ "path": "level",
8935
8944
  "valueType": "number"
8936
8945
  }],
8937
8946
  "broker": [{
@@ -9132,7 +9141,7 @@ Object.freeze({
9132
9141
  "valueType": "number"
9133
9142
  },
9134
9143
  {
9135
- "path": "mireds",
9144
+ "path": "colorTemperature",
9136
9145
  "valueType": "number"
9137
9146
  }
9138
9147
  ],
@@ -9311,15 +9320,15 @@ Object.freeze({
9311
9320
  "valueType": "string"
9312
9321
  },
9313
9322
  {
9314
- "path": "remainingSeconds",
9323
+ "path": "remaining",
9315
9324
  "valueType": "number"
9316
9325
  },
9317
9326
  {
9318
- "path": "delayedStartSeconds",
9327
+ "path": "delayedStart",
9319
9328
  "valueType": "number"
9320
9329
  },
9321
9330
  {
9322
- "path": "progressPercent",
9331
+ "path": "progress",
9323
9332
  "valueType": "number"
9324
9333
  },
9325
9334
  {
@@ -9433,7 +9442,7 @@ Object.freeze({
9433
9442
  ],
9434
9443
  "fan-control": [
9435
9444
  {
9436
- "path": "percentage",
9445
+ "path": "speed",
9437
9446
  "valueType": "number"
9438
9447
  },
9439
9448
  {
@@ -9480,6 +9489,10 @@ Object.freeze({
9480
9489
  "path": "detected",
9481
9490
  "valueType": "boolean"
9482
9491
  }],
9492
+ "group-active": [{
9493
+ "path": "active",
9494
+ "valueType": "boolean"
9495
+ }],
9483
9496
  "group-status": [
9484
9497
  {
9485
9498
  "path": "included",
@@ -9529,7 +9542,7 @@ Object.freeze({
9529
9542
  }
9530
9543
  ],
9531
9544
  "humidity-sensor": [{
9532
- "path": "percent",
9545
+ "path": "humidity",
9533
9546
  "valueType": "number"
9534
9547
  }],
9535
9548
  "image": [{
@@ -9639,7 +9652,7 @@ Object.freeze({
9639
9652
  "valueType": "number"
9640
9653
  },
9641
9654
  {
9642
- "path": "progressPercent",
9655
+ "path": "progress",
9643
9656
  "valueType": "number"
9644
9657
  },
9645
9658
  {
@@ -9718,11 +9731,11 @@ Object.freeze({
9718
9731
  "valueType": "string"
9719
9732
  },
9720
9733
  {
9721
- "path": "positionMs",
9734
+ "path": "position",
9722
9735
  "valueType": "number"
9723
9736
  },
9724
9737
  {
9725
- "path": "durationMs",
9738
+ "path": "duration",
9726
9739
  "valueType": "number"
9727
9740
  },
9728
9741
  {
@@ -9739,6 +9752,10 @@ Object.freeze({
9739
9752
  ]
9740
9753
  }
9741
9754
  ],
9755
+ "meter": [{
9756
+ "path": "value",
9757
+ "valueType": "number"
9758
+ }],
9742
9759
  "motion": [
9743
9760
  {
9744
9761
  "path": "detected",
@@ -9820,11 +9837,11 @@ Object.freeze({
9820
9837
  ]
9821
9838
  },
9822
9839
  {
9823
- "path": "signalPercent",
9840
+ "path": "signal",
9824
9841
  "valueType": "number"
9825
9842
  },
9826
9843
  {
9827
- "path": "rssiDbm",
9844
+ "path": "rssi",
9828
9845
  "valueType": "number"
9829
9846
  },
9830
9847
  {
@@ -9879,6 +9896,18 @@ Object.freeze({
9879
9896
  "path": "foodLevel",
9880
9897
  "valueType": "number"
9881
9898
  },
9899
+ {
9900
+ "path": "bowlFood",
9901
+ "valueType": "number"
9902
+ },
9903
+ {
9904
+ "path": "eating",
9905
+ "valueType": "boolean"
9906
+ },
9907
+ {
9908
+ "path": "supportsMarkRefilled",
9909
+ "valueType": "boolean"
9910
+ },
9882
9911
  {
9883
9912
  "path": "food1",
9884
9913
  "valueType": "number"
@@ -9943,23 +9972,23 @@ Object.freeze({
9943
9972
  ],
9944
9973
  "power-meter": [
9945
9974
  {
9946
- "path": "watts",
9975
+ "path": "power",
9947
9976
  "valueType": "number"
9948
9977
  },
9949
9978
  {
9950
- "path": "kwhTotal",
9979
+ "path": "energy",
9951
9980
  "valueType": "number"
9952
9981
  },
9953
9982
  {
9954
- "path": "volts",
9983
+ "path": "voltage",
9955
9984
  "valueType": "number"
9956
9985
  },
9957
9986
  {
9958
- "path": "amps",
9987
+ "path": "current",
9959
9988
  "valueType": "number"
9960
9989
  },
9961
9990
  {
9962
- "path": "va",
9991
+ "path": "apparentPower",
9963
9992
  "valueType": "number"
9964
9993
  },
9965
9994
  {
@@ -9987,14 +10016,10 @@ Object.freeze({
9987
10016
  {
9988
10017
  "path": "gps.accuracyMeters",
9989
10018
  "valueType": "number"
9990
- },
9991
- {
9992
- "path": "batteryPercent",
9993
- "valueType": "number"
9994
10019
  }
9995
10020
  ],
9996
10021
  "pressure-sensor": [{
9997
- "path": "hpa",
10022
+ "path": "pressure",
9998
10023
  "valueType": "number"
9999
10024
  }],
10000
10025
  "privacy-mask": [{
@@ -10308,7 +10333,7 @@ Object.freeze({
10308
10333
  "valueType": "boolean"
10309
10334
  }],
10310
10335
  "temperature-sensor": [{
10311
- "path": "celsius",
10336
+ "path": "temperature",
10312
10337
  "valueType": "number"
10313
10338
  }],
10314
10339
  "update": [
@@ -10356,7 +10381,7 @@ Object.freeze({
10356
10381
  "valueType": "string"
10357
10382
  },
10358
10383
  {
10359
- "path": "progressPercent",
10384
+ "path": "progress",
10360
10385
  "valueType": "number"
10361
10386
  },
10362
10387
  {
@@ -10841,7 +10866,7 @@ function errMsg(err) {
10841
10866
  return String(err);
10842
10867
  }
10843
10868
  //#endregion
10844
- //#region ../types/dist/composition-B2rw5L29.mjs
10869
+ //#region ../types/dist/composition-CZImLpOI.mjs
10845
10870
  /**
10846
10871
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10847
10872
  *
@@ -11156,6 +11181,13 @@ var table = {
11156
11181
  apply: () => {
11157
11182
  throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
11158
11183
  }
11184
+ },
11185
+ schmitt: {
11186
+ minArgs: 3,
11187
+ maxArgs: 5,
11188
+ apply: () => {
11189
+ throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
11190
+ }
11159
11191
  }
11160
11192
  };
11161
11193
  Object.freeze(Object.assign(Object.create(null), table));
@@ -11617,6 +11649,79 @@ var APPLIANCE_KINDS = [
11617
11649
  ];
11618
11650
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
11619
11651
  /**
11652
+ * Statistics and integrals over a history read (D944).
11653
+ *
11654
+ * Pure: the same points always give the same answer, so a restart recomputes
11655
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
11656
+ * never the mean of the samples. A hole with no held value is not integrated
11657
+ * as zero. A truncated read is not published.
11658
+ */
11659
+ var STATISTIC_STATS = [
11660
+ "min",
11661
+ "max",
11662
+ "mean",
11663
+ "sum",
11664
+ "count",
11665
+ "change"
11666
+ ];
11667
+ /**
11668
+ * The range a statistics or integral helper asks history for (D944).
11669
+ *
11670
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
11671
+ * or 25 hours across a DST change. A tier is eligible only when its retention
11672
+ * is strictly longer than the longest that range can be. Forever qualifies.
11673
+ * Equal to a tier's retention is a refusal, not a short answer.
11674
+ */
11675
+ var MINUTE_MS = 6e4;
11676
+ var HOUR_MS = 60 * MINUTE_MS;
11677
+ var DAY_MS = 24 * HOUR_MS;
11678
+ var ROLLING_SPANS = [
11679
+ "1h",
11680
+ "24h",
11681
+ "2d",
11682
+ "7d",
11683
+ "30d",
11684
+ "custom"
11685
+ ];
11686
+ var CALENDAR_PERIODS = [
11687
+ "today",
11688
+ "yesterday",
11689
+ "this-week",
11690
+ "this-month"
11691
+ ];
11692
+ var RESET_PERIODS = [
11693
+ "never",
11694
+ "daily",
11695
+ "weekly",
11696
+ "monthly"
11697
+ ];
11698
+ 5 * MINUTE_MS;
11699
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
11700
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
11701
+ var rollingWindowObject = object({
11702
+ kind: literal("rolling"),
11703
+ span: _enum(ROLLING_SPANS),
11704
+ customMinutes: number().int().min(5).optional()
11705
+ }).check((payload) => {
11706
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
11707
+ code: "custom",
11708
+ message: "a custom range needs a duration in minutes",
11709
+ path: ["customMinutes"],
11710
+ input: payload.value
11711
+ });
11712
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
11713
+ code: "custom",
11714
+ message: "only a custom range carries a duration",
11715
+ path: ["customMinutes"],
11716
+ input: payload.value
11717
+ });
11718
+ });
11719
+ var RollingWindowSchema = rollingWindowObject;
11720
+ var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
11721
+ kind: literal("calendar"),
11722
+ period: _enum(CALENDAR_PERIODS)
11723
+ })]);
11724
+ /**
11620
11725
  * A composition source identity: `(addonId, stableId)`, never a numeric device
11621
11726
  * id. Split out so helper schemas can name it without a cycle through
11622
11727
  * `composition.ts` (D659).
@@ -11642,7 +11747,13 @@ var GROUP_TEMPLATE_IDS = [
11642
11747
  "occupancy",
11643
11748
  "binary",
11644
11749
  "switch",
11645
- "light"
11750
+ "light",
11751
+ "fan",
11752
+ "cover",
11753
+ "valve",
11754
+ "lock",
11755
+ "media-player",
11756
+ "climate"
11646
11757
  ];
11647
11758
  var NUMERIC_AGGREGATES = [
11648
11759
  "mean",
@@ -11672,22 +11783,73 @@ var HelperMemberSchema = object({
11672
11783
  cap: string().min(1),
11673
11784
  fieldPath: string().min(1)
11674
11785
  });
11675
- var HelperSpecSchema = discriminatedUnion("kind", [object({
11676
- kind: literal("group"),
11677
- templateId: GroupTemplateIdSchema,
11678
- aggregate: AggregateReducerSchema,
11679
- members: array(HelperMemberSchema).min(1).max(64),
11680
- /** Actuator groups only. Readings leave this unset. */
11681
- active: ActiveCriterionSchema.optional()
11682
- }), object({
11683
- kind: literal("appliance"),
11684
- templateId: literal(APPLIANCE_TEMPLATE_ID),
11685
- appliance: _enum(APPLIANCE_KINDS),
11686
- thresholdWatts: number().positive(),
11687
- startDwellMs: number().int().nonnegative(),
11688
- stopDwellMs: number().int().nonnegative(),
11689
- member: HelperMemberSchema
11690
- })]);
11786
+ var HelperSpecSchema = discriminatedUnion("kind", [
11787
+ object({
11788
+ kind: literal("group"),
11789
+ templateId: GroupTemplateIdSchema,
11790
+ aggregate: AggregateReducerSchema,
11791
+ members: array(HelperMemberSchema).min(1).max(64),
11792
+ /** Actuator groups only. Readings leave this unset. */
11793
+ active: ActiveCriterionSchema.optional()
11794
+ }),
11795
+ object({
11796
+ kind: literal("appliance"),
11797
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
11798
+ appliance: _enum(APPLIANCE_KINDS),
11799
+ thresholdWatts: number().positive(),
11800
+ startDwellMs: number().int().nonnegative(),
11801
+ stopDwellMs: number().int().nonnegative(),
11802
+ member: HelperMemberSchema
11803
+ }),
11804
+ object({
11805
+ kind: literal("statistic"),
11806
+ stat: _enum(STATISTIC_STATS),
11807
+ window: StatisticWindowSchema,
11808
+ source: HelperMemberSchema
11809
+ }),
11810
+ object({
11811
+ kind: literal("integral"),
11812
+ reset: _enum(RESET_PERIODS),
11813
+ output: _enum(["energy", "meter"]),
11814
+ source: HelperMemberSchema
11815
+ }),
11816
+ object({
11817
+ kind: literal("threshold"),
11818
+ source: HelperMemberSchema,
11819
+ high: number(),
11820
+ low: number(),
11821
+ onForMs: number().int().nonnegative(),
11822
+ offForMs: number().int().nonnegative()
11823
+ }),
11824
+ object({
11825
+ kind: literal("arithmetic"),
11826
+ op: _enum([
11827
+ "sum",
11828
+ "difference",
11829
+ "ratio"
11830
+ ]),
11831
+ inputs: array(HelperMemberSchema).min(2).max(64)
11832
+ }),
11833
+ object({
11834
+ kind: literal("expression"),
11835
+ expr: string().min(1),
11836
+ inputs: array(object({
11837
+ name: string().min(1),
11838
+ member: HelperMemberSchema
11839
+ })).min(1).max(64),
11840
+ output: _enum(["number", "boolean"])
11841
+ }),
11842
+ object({
11843
+ kind: literal("derivative"),
11844
+ window: RollingWindowSchema,
11845
+ per: _enum([
11846
+ "second",
11847
+ "minute",
11848
+ "hour"
11849
+ ]),
11850
+ source: HelperMemberSchema
11851
+ })
11852
+ ]);
11691
11853
  /** A composed device's stableId is this prefix plus the block id. */
11692
11854
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11693
11855
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -11748,6 +11910,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11748
11910
  "all"
11749
11911
  ]),
11750
11912
  reads: array(CompositionFieldReadSchema).min(1).max(64),
11913
+ /**
11914
+ * Set when the reads are an enum state, not a yes/no: the listed states
11915
+ * count as active (a cover is `open`). A state outside the list is inactive;
11916
+ * a read that is not a state at all is left out. Only `any` / `all` use it.
11917
+ */
11918
+ activeWhen: array(string().min(1)).min(1).optional(),
11751
11919
  /** `value` is the reading; the others are the member counts. */
11752
11920
  publish: _enum([
11753
11921
  "value",
@@ -11761,6 +11929,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11761
11929
  "omit",
11762
11930
  "offline"
11763
11931
  ])
11932
+ }),
11933
+ object({
11934
+ kind: literal("series"),
11935
+ read: CompositionFieldReadSchema,
11936
+ /** `value` is the statistic or the integral. The others are the gap counts. */
11937
+ publish: _enum([
11938
+ "value",
11939
+ "included",
11940
+ "excluded",
11941
+ "total"
11942
+ ]),
11943
+ /**
11944
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
11945
+ * device unseeded until history answers, so a restart cannot publish 0.
11946
+ */
11947
+ empty: _enum([
11948
+ "null",
11949
+ "omit",
11950
+ "offline"
11951
+ ])
11764
11952
  })
11765
11953
  ]);
11766
11954
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -15322,6 +15510,14 @@ var AutomationConditionLeafSchema = object({
15322
15510
  array(union([string(), number()]))
15323
15511
  ])
15324
15512
  });
15513
+ var AutomationConditionStationaryPresentSchema = object({
15514
+ kind: literal("stationary-present"),
15515
+ deviceId: number().int().nonnegative(),
15516
+ /** Class names; a macro class matches every raw class that maps to it. */
15517
+ classes: array(string().min(1)).min(1).optional(),
15518
+ /** The parked object must be in at least one of these zones. */
15519
+ zones: array(string().min(1)).min(1).optional()
15520
+ });
15325
15521
  /**
15326
15522
  * The expression leaf, declared as a plain object rather than an intersection
15327
15523
  * with {@link ExpressionSourceSchema}: a discriminated union has to be able to
@@ -15355,7 +15551,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
15355
15551
  child: AutomationConditionSchema
15356
15552
  }),
15357
15553
  AutomationConditionLeafSchema,
15358
- AutomationConditionExpressionSchema
15554
+ AutomationConditionExpressionSchema,
15555
+ AutomationConditionStationaryPresentSchema
15359
15556
  ]));
15360
15557
  /**
15361
15558
  * What starts a run.
@@ -15396,7 +15593,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
15396
15593
  kind: literal("schedule"),
15397
15594
  cron: string().min(1).max(120)
15398
15595
  }),
15399
- object({ kind: literal("manual") })
15596
+ object({ kind: literal("manual") }),
15597
+ object({
15598
+ kind: literal("detection"),
15599
+ /** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
15600
+ * matches every raw class that maps to it; any other name matches
15601
+ * exactly. */
15602
+ classes: array(string().min(1)).min(1),
15603
+ deviceIds: array(number().int().nonnegative()).min(1),
15604
+ /** The track must have visited at least one of these zones. */
15605
+ zones: array(string().min(1)).min(1).optional(),
15606
+ /** Best-so-far confidence the track must reach. */
15607
+ minScore: number().min(0).max(1).optional()
15608
+ }),
15609
+ object({
15610
+ kind: literal("stationary"),
15611
+ deviceIds: array(number().int().nonnegative()).min(1),
15612
+ /** Class names; a macro class matches like the detection trigger. */
15613
+ classes: array(string().min(1)).min(1).optional(),
15614
+ /** The parked object must be in at least one of these zones. */
15615
+ zones: array(string().min(1)).min(1).optional(),
15616
+ /** `appeared`: it became parked. `departed`: the registry retired it.
15617
+ * The vocabulary of `PipelineAnalyticsStationaryChanged`. */
15618
+ phase: _enum(["appeared", "departed"])
15619
+ }),
15620
+ object({
15621
+ kind: literal("interval"),
15622
+ minutes: number().int().min(1).max(1440)
15623
+ })
15400
15624
  ]);
15401
15625
  /**
15402
15626
  * One action step.
@@ -15416,28 +15640,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
15416
15640
  * is called. The runner still receives a number and is untouched; the
15417
15641
  * resolution is the recipe's job, not the runner's.
15418
15642
  */
15643
+ var AutomationWaitStepSchema = object({
15644
+ kind: literal("wait"),
15645
+ seconds: number().min(0).max(300)
15646
+ });
15647
+ var AutomationCapStepSchema = object({
15648
+ kind: literal("cap"),
15649
+ /**
15650
+ * One device, several same-family devices (locks / climate family / …),
15651
+ * or `{ $var }` for the device that triggered the run. An array is
15652
+ * fan-out at codegen — each id gets the same cap.method call.
15653
+ */
15654
+ deviceId: union([
15655
+ number().int(),
15656
+ array(number().int()).min(1),
15657
+ object({ $var: string().min(1) })
15658
+ ]),
15659
+ cap: string().min(1),
15660
+ method: string().min(1),
15661
+ /** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
15662
+ * SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
15663
+ * the expression leaf. */
15664
+ args: record(string(), unknown()).optional()
15665
+ });
15666
+ /**
15667
+ * The steps an internal Action may contain: cap and wait, and nothing that can
15668
+ * call back into an Action — so an Action can never reach itself (no cycles).
15669
+ */
15670
+ var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
15419
15671
  var AutomationActionSchema = discriminatedUnion("kind", [
15672
+ AutomationWaitStepSchema,
15673
+ AutomationCapStepSchema,
15420
15674
  object({
15421
- kind: literal("wait"),
15422
- seconds: number().min(0).max(300)
15423
- }),
15424
- object({
15425
- kind: literal("cap"),
15426
- /**
15427
- * One device, several same-family devices (locks / climate family / …),
15428
- * or `{ $var }` for the device that triggered the run. An array is
15429
- * fan-out at codegen — each id gets the same cap.method call.
15430
- */
15431
- deviceId: union([
15432
- number().int(),
15433
- array(number().int()).min(1),
15434
- object({ $var: string().min(1) })
15435
- ]),
15436
- cap: string().min(1),
15437
- method: string().min(1),
15438
- /** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
15439
- * evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
15440
- args: record(string(), unknown()).optional()
15675
+ kind: literal("action"),
15676
+ /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
15677
+ actionId: string().min(1),
15678
+ /** Values for the action's declared variables; the others take their default. */
15679
+ variables: record(string(), union([
15680
+ string(),
15681
+ number(),
15682
+ boolean()
15683
+ ])).optional()
15441
15684
  }),
15442
15685
  object({
15443
15686
  kind: literal("code"),
@@ -15446,10 +15689,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
15446
15689
  code: string().min(1).max(2e4)
15447
15690
  })
15448
15691
  ]);
15692
+ /**
15693
+ * How a trigger that arrives while the automation is busy (or cooling down) is
15694
+ * handled. One of the automation's execution modes, never a property of its
15695
+ * actions. Absent means `single`.
15696
+ *
15697
+ * - `single` — drop the trigger while a run is in progress (traced + logged).
15698
+ * - `restart` — abort the run in progress (at its next step boundary), start fresh.
15699
+ * - `queued` — queue up to `max` triggers, drop the rest (traced).
15700
+ * - `parallel` — up to `max` runs at once, drop the rest (traced).
15701
+ * - `cooldown` — `single`, and no new run until `minutes` after the last run
15702
+ * STARTED; persisted across a restart. A manual trigger bypasses only this
15703
+ * wait, never the single/queued limits.
15704
+ */
15705
+ var AutomationRunModeSchema = discriminatedUnion("mode", [
15706
+ object({ mode: literal("single") }),
15707
+ object({ mode: literal("restart") }),
15708
+ object({
15709
+ mode: literal("queued"),
15710
+ max: number().int().min(1).max(10)
15711
+ }),
15712
+ object({
15713
+ mode: literal("parallel"),
15714
+ max: number().int().min(1).max(10)
15715
+ }),
15716
+ object({
15717
+ mode: literal("cooldown"),
15718
+ minutes: number().int().min(1).max(1440)
15719
+ })
15720
+ ]);
15449
15721
  var AutomationRecipeSchema = object({
15450
15722
  triggers: array(AutomationTriggerSchema),
15451
15723
  conditions: AutomationConditionSchema.optional(),
15452
- actions: array(AutomationActionSchema)
15724
+ actions: array(AutomationActionSchema),
15725
+ runMode: AutomationRunModeSchema.optional(),
15726
+ /** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
15727
+ keepTraces: number().int().min(1).max(100).optional()
15728
+ });
15729
+ new Set([
15730
+ {
15731
+ id: "person",
15732
+ name: "Person"
15733
+ },
15734
+ {
15735
+ id: "vehicle",
15736
+ name: "Vehicle"
15737
+ },
15738
+ {
15739
+ id: "animal",
15740
+ name: "Animal"
15741
+ },
15742
+ {
15743
+ id: "package",
15744
+ name: "Package"
15745
+ }
15746
+ ].map((l) => l.id));
15747
+ var COCO_TO_MACRO = {
15748
+ mapping: {
15749
+ person: "person",
15750
+ bicycle: "vehicle",
15751
+ car: "vehicle",
15752
+ motorcycle: "vehicle",
15753
+ airplane: "vehicle",
15754
+ bus: "vehicle",
15755
+ train: "vehicle",
15756
+ truck: "vehicle",
15757
+ boat: "vehicle",
15758
+ bird: "animal",
15759
+ cat: "animal",
15760
+ dog: "animal",
15761
+ horse: "animal",
15762
+ sheep: "animal",
15763
+ cow: "animal",
15764
+ elephant: "animal",
15765
+ bear: "animal",
15766
+ zebra: "animal",
15767
+ giraffe: "animal",
15768
+ suitcase: "package",
15769
+ backpack: "package",
15770
+ handbag: "package"
15771
+ },
15772
+ preserveOriginal: false
15773
+ };
15774
+ new Set(Object.values(COCO_TO_MACRO.mapping));
15775
+ /**
15776
+ * Run traces — what an automation (or, later, an Action run) DID, node by node,
15777
+ * so the editor can paint every block green or red with its reason.
15778
+ *
15779
+ * A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
15780
+ * every condition node (containers and leaves, including the ones a
15781
+ * short-circuit never reached), the run-mode verdict and every action step —
15782
+ * each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
15783
+ * for an Action run). Skipped
15784
+ * evaluations are traced too, and identical consecutive skips collapse into a
15785
+ * repeat count so a trigger that fails every 5 minutes cannot flush real runs.
15786
+ *
15787
+ * {@link AutomationStepTraceSchema} is deliberately free of automation
15788
+ * vocabulary so an Action run records the same step shape.
15789
+ */
15790
+ /** A value a trace may show: JSON primitives and short lists, nothing deeper. */
15791
+ var TraceValueSchema = union([
15792
+ string(),
15793
+ number(),
15794
+ boolean(),
15795
+ _null(),
15796
+ array(union([string(), number()]))
15797
+ ]);
15798
+ var AutomationRunOutcomeSchema = _enum([
15799
+ "ran",
15800
+ "skipped-trigger",
15801
+ "skipped-conditions",
15802
+ "skipped-cooldown",
15803
+ "skipped-overlap",
15804
+ "failed",
15805
+ "aborted"
15806
+ ]);
15807
+ /** `not-evaluated` = a short-circuit never reached the node. */
15808
+ var TraceNodeOutcomeSchema = _enum([
15809
+ "pass",
15810
+ "fail",
15811
+ "not-evaluated"
15812
+ ]);
15813
+ var AutomationTriggerTraceSchema = object({
15814
+ kind: string().min(1),
15815
+ outcome: _enum(["pass", "fail"]),
15816
+ /** Why an event was rejected ("class person not in [dog]") or what fired. */
15817
+ reason: string(),
15818
+ /** deviceId, className, trackId, score … — only what the trigger exposes. */
15819
+ vars: record(string(), TraceValueSchema)
15820
+ });
15821
+ var AutomationConditionTraceNodeSchema = object({
15822
+ /** `conditions` for the root, `conditions.<i>` for its i-th child, … */
15823
+ path: string().min(1),
15824
+ kind: _enum([
15825
+ "all",
15826
+ "any",
15827
+ "not",
15828
+ "condition",
15829
+ "expression",
15830
+ "stationary-present"
15831
+ ]),
15832
+ outcome: TraceNodeOutcomeSchema,
15833
+ reason: string(),
15834
+ deviceId: number().int().optional(),
15835
+ cap: string().optional(),
15836
+ fieldPath: string().optional(),
15837
+ operator: string().optional(),
15838
+ expected: TraceValueSchema.optional(),
15839
+ /** What the mirror held; `null` when it held nothing (unknown). */
15840
+ observed: TraceValueSchema.optional()
15841
+ });
15842
+ var AutomationRunVerdictSchema = object({
15843
+ mode: AutomationRunModeSchema,
15844
+ decision: _enum([
15845
+ "run",
15846
+ "queued",
15847
+ "restart",
15848
+ "drop",
15849
+ "cooldown",
15850
+ "bypass"
15851
+ ]),
15852
+ reason: string()
15853
+ });
15854
+ /** One executed (or not-run) step — shared by automations and Action runs. */
15855
+ var AutomationStepTraceSchema = object({
15856
+ /** `actions.<i>` */
15857
+ path: string().min(1),
15858
+ kind: string().min(1),
15859
+ cap: string().optional(),
15860
+ method: string().optional(),
15861
+ deviceId: number().int().optional(),
15862
+ startedAt: number().optional(),
15863
+ endedAt: number().optional(),
15864
+ outcome: _enum([
15865
+ "ok",
15866
+ "error",
15867
+ "not-run"
15868
+ ]),
15869
+ message: string().optional()
15870
+ });
15871
+ var AutomationRunTraceSchema = object({
15872
+ runId: string().min(1),
15873
+ startedAt: number(),
15874
+ endedAt: number(),
15875
+ trigger: AutomationTriggerTraceSchema,
15876
+ conditions: array(AutomationConditionTraceNodeSchema),
15877
+ verdict: AutomationRunVerdictSchema.optional(),
15878
+ steps: array(AutomationStepTraceSchema),
15879
+ outcome: AutomationRunOutcomeSchema,
15880
+ /** How many identical consecutive skips this trace stands for (>= 1). */
15881
+ repeat: number().int().min(1),
15882
+ /** When the latest of those repeats happened. */
15883
+ lastAt: number()
15884
+ });
15885
+ /**
15886
+ * What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
15887
+ * `action:<actionId>`): the cooldown stamp and the trace ring.
15888
+ */
15889
+ var AutomationStateDocSchema = object({
15890
+ version: literal(1),
15891
+ lastRunStartedAt: number().nullable(),
15892
+ traces: array(AutomationRunTraceSchema)
15893
+ });
15894
+ /**
15895
+ * Actions — named, runnable things an operator (or an automation) can start,
15896
+ * declared as LIST ENTRIES, never as devices.
15897
+ *
15898
+ * An entry is either **internal** (a short list of cap/wait steps kept in the
15899
+ * hub's `actions` record kind) or declared by an addon through the
15900
+ * `action-source` collection (a Home Assistant script, a scene …). The one
15901
+ * surface the UI and automations talk to is the `actions` cap; it keeps no
15902
+ * catalog of its own (D3) — every `list` asks the providers live.
15903
+ *
15904
+ * This file is the data half: the entry schema, the variables an entry may
15905
+ * declare, and the pure resolution of the values a run was given. It holds no
15906
+ * runtime.
15907
+ */
15908
+ /** What a variable's value is. `select` takes one of `options`. */
15909
+ var ActionVariableTypeSchema = _enum([
15910
+ "string",
15911
+ "number",
15912
+ "boolean",
15913
+ "select"
15914
+ ]);
15915
+ var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
15916
+ var ActionVariableValueSchema = union([
15917
+ string(),
15918
+ number(),
15919
+ boolean()
15920
+ ]);
15921
+ /**
15922
+ * One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
15923
+ * value) or `{{vars.name}}` (inside a string) in their args.
15924
+ */
15925
+ var ActionVariableSchema = object({
15926
+ name: string().regex(ACTION_VARIABLE_NAME_RE),
15927
+ label: string().min(1).max(120).optional(),
15928
+ type: ActionVariableTypeSchema,
15929
+ required: boolean().optional(),
15930
+ default: ActionVariableValueSchema.optional(),
15931
+ /** The allowed values of a `select`. */
15932
+ options: array(string().min(1)).min(1).optional()
15933
+ }).superRefine((v, ctx) => {
15934
+ if (v.type === "select" && v.options === void 0) ctx.addIssue({
15935
+ code: "custom",
15936
+ message: "a select variable needs options",
15937
+ path: ["options"]
15938
+ });
15939
+ if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
15940
+ code: "custom",
15941
+ message: variableValueError(v, v.default) ?? "invalid default",
15942
+ path: ["default"]
15943
+ });
15944
+ });
15945
+ /** Why `value` is not a legal value for the variable, or null when it is. */
15946
+ function variableValueError(variable, value) {
15947
+ switch (variable.type) {
15948
+ case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
15949
+ case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
15950
+ case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
15951
+ case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
15952
+ }
15953
+ }
15954
+ var ActionSourceKindSchema = _enum(["internal", "addon"]);
15955
+ function isInternalActionId(actionId) {
15956
+ return actionId.startsWith("internal:") && actionId.length > 9;
15957
+ }
15958
+ /** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
15959
+ function addonIdOfActionId(actionId) {
15960
+ if (isInternalActionId(actionId)) return null;
15961
+ const at = actionId.indexOf(":");
15962
+ return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
15963
+ }
15964
+ var ActionStatusSchema = object({
15965
+ isRunning: boolean(),
15966
+ /** Ms epoch the latest run STARTED; null when it never ran. */
15967
+ lastRunAt: number().nullable(),
15968
+ /** The latest run's failure; null on success or when it never ran. */
15969
+ lastError: string().nullable()
15970
+ });
15971
+ var ActionEntrySchema = object({
15972
+ /** `internal:<uuid>` or `<addonId>:<localId>`. */
15973
+ id: string().min(3),
15974
+ name: string().min(1).max(120),
15975
+ /** The addon that declared it; `core-blocks` for an internal one. */
15976
+ addonId: string().min(1),
15977
+ source: ActionSourceKindSchema,
15978
+ /** An addon-declared entry is edited where it was declared. */
15979
+ readOnly: boolean(),
15980
+ /** Internal only: cap and wait steps. No action-in-action, so no cycles. */
15981
+ steps: array(ActionStepSchema).min(1).max(50).optional(),
15982
+ variables: array(ActionVariableSchema).max(20).optional(),
15983
+ status: ActionStatusSchema
15984
+ }).superRefine((entry, ctx) => {
15985
+ if (entry.source === "internal") {
15986
+ if (!isInternalActionId(entry.id)) ctx.addIssue({
15987
+ code: "custom",
15988
+ message: "an internal action id is internal:<uuid>",
15989
+ path: ["id"]
15990
+ });
15991
+ return;
15992
+ }
15993
+ if (entry.steps !== void 0) ctx.addIssue({
15994
+ code: "custom",
15995
+ message: "only an internal action carries steps",
15996
+ path: ["steps"]
15997
+ });
15998
+ if (!entry.readOnly) ctx.addIssue({
15999
+ code: "custom",
16000
+ message: "an addon action is read-only here",
16001
+ path: ["readOnly"]
16002
+ });
16003
+ if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
16004
+ code: "custom",
16005
+ message: "an addon action id is <addonId>:<localId>",
16006
+ path: ["id"]
16007
+ });
16008
+ });
16009
+ /** What an operator writes for an internal action. */
16010
+ var ActionInputSchema = object({
16011
+ name: string().min(1).max(120),
16012
+ steps: array(ActionStepSchema).min(1).max(50),
16013
+ variables: array(ActionVariableSchema).max(20).optional()
16014
+ });
16015
+ /** Who started a run. Absent = the operator pressed it. */
16016
+ var ActionRunOriginSchema = object({
16017
+ /** The automation block whose step started it. */
16018
+ blockId: string().min(1).optional() });
16019
+ /** `started` = the caller did not ask to wait. */
16020
+ var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
16021
+ var ActionRunResultSchema = object({
16022
+ runId: string().min(1),
16023
+ outcome: ActionRunOutcomeSchema,
16024
+ /** Why it did not run, or what failed. */
16025
+ message: string().optional()
16026
+ });
16027
+ _enum([
16028
+ "not-found",
16029
+ "read-only",
16030
+ "invalid-variables",
16031
+ "invalid-steps",
16032
+ "not-linked",
16033
+ "busy"
16034
+ ]);
16035
+ object({
16036
+ actionId: string(),
16037
+ runId: string(),
16038
+ isRunning: boolean(),
16039
+ /** Set when the run ended. */
16040
+ outcome: AutomationRunOutcomeSchema.optional(),
16041
+ lastRunAt: number().nullable(),
16042
+ lastError: string().nullable()
15453
16043
  });
15454
16044
  /**
15455
16045
  * `addon-pages` — system-scoped singleton aggregator cap. Public-facing
@@ -17063,7 +17653,22 @@ var BrokerProviderInfoSchema = object({
17063
17653
  */
17064
17654
  interactiveConnectPath: string().min(1).optional(),
17065
17655
  /** Relative hub path to disconnect the linked account (same popup pattern). */
17066
- interactiveDisconnectPath: string().min(1).optional()
17656
+ interactiveDisconnectPath: string().min(1).optional(),
17657
+ /**
17658
+ * The kind signs in through a server-held interactive session instead of
17659
+ * (or before) typed credentials. `basePath` is a hub-relative route set
17660
+ * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
17661
+ * contract: `POST {basePath}/start` (body: the form's settings) answers
17662
+ * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
17663
+ * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
17664
+ * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
17665
+ * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
17666
+ * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
17667
+ * (`{ sessionId }`) drops the session. The dialog that edits a broker
17668
+ * offers it as the default path; the fields the session fills are
17669
+ * marked `filledBySignIn` in the kind's settings schema.
17670
+ */
17671
+ signIn: object({ basePath: string().min(1) }).optional()
17067
17672
  }))
17068
17673
  });
17069
17674
  var ListInputSchema = object({
@@ -18034,7 +18639,7 @@ var CompositionEventPlanSchema = object({
18034
18639
  stateField: string(),
18035
18640
  fieldKey: string()
18036
18641
  });
18037
- /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
18642
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
18038
18643
  var CompositionProblemSchema = object({
18039
18644
  code: _enum([
18040
18645
  "reserved-variant",
@@ -18062,7 +18667,8 @@ var CompositionProblemSchema = object({
18062
18667
  "native-capability-replace",
18063
18668
  "mixed-quantity",
18064
18669
  "helper-mismatch",
18065
- "member-constraint"
18670
+ "member-constraint",
18671
+ "retention"
18066
18672
  ]),
18067
18673
  path: string(),
18068
18674
  message: string()
@@ -18296,13 +18902,17 @@ Object.freeze({
18296
18902
  latchedAt: {
18297
18903
  kind: "fixed",
18298
18904
  result: ["number", "null"]
18905
+ },
18906
+ schmitt: {
18907
+ kind: "fixed",
18908
+ result: ["boolean", "null"]
18299
18909
  }
18300
18910
  });
18301
18911
  /**
18302
18912
  * One catalog row per base reading a group helper can build (D944 §3).
18303
18913
  * Data, not a form default written into the block.
18304
18914
  */
18305
- var NOW = {
18915
+ var NOW$2 = {
18306
18916
  fieldPath: "lastFetchedAt",
18307
18917
  expr: "now"
18308
18918
  };
@@ -18316,6 +18926,8 @@ function numeric(input) {
18316
18926
  family: "numeric",
18317
18927
  deviceType: DeviceType.Sensor,
18318
18928
  memberDeviceType: DeviceType.Sensor,
18929
+ memberDeviceTypes: [DeviceType.Sensor],
18930
+ activeWhen: void 0,
18319
18931
  commandCaps: [],
18320
18932
  baseUnit: baseUnitOf(input.quantity),
18321
18933
  aggregates: NUMERIC_AGGREGATES,
@@ -18331,6 +18943,8 @@ function binary(input) {
18331
18943
  family: "binary",
18332
18944
  deviceType: DeviceType.Sensor,
18333
18945
  memberDeviceType: DeviceType.Sensor,
18946
+ memberDeviceTypes: [DeviceType.Sensor],
18947
+ activeWhen: void 0,
18334
18948
  commandCaps: [],
18335
18949
  quantity: "none",
18336
18950
  baseUnit: void 0,
@@ -18344,73 +18958,73 @@ var GROUP_TEMPLATES = [
18344
18958
  summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
18345
18959
  role: DeviceRole.TemperatureSensor,
18346
18960
  outputCap: "temperature-sensor",
18347
- outputField: "celsius",
18961
+ outputField: "temperature",
18348
18962
  quantity: "temperature",
18349
18963
  defaultAggregate: "mean",
18350
18964
  empty: "null",
18351
- companions: [NOW]
18965
+ companions: [NOW$2]
18352
18966
  }),
18353
18967
  numeric({
18354
18968
  id: "humidity",
18355
18969
  summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
18356
18970
  role: DeviceRole.HumiditySensor,
18357
18971
  outputCap: "humidity-sensor",
18358
- outputField: "percent",
18972
+ outputField: "humidity",
18359
18973
  quantity: "humidity",
18360
18974
  defaultAggregate: "mean",
18361
18975
  empty: "null",
18362
- companions: [NOW]
18976
+ companions: [NOW$2]
18363
18977
  }),
18364
18978
  numeric({
18365
18979
  id: "pressure",
18366
18980
  summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
18367
18981
  role: DeviceRole.PressureSensor,
18368
18982
  outputCap: "pressure-sensor",
18369
- outputField: "hpa",
18983
+ outputField: "pressure",
18370
18984
  quantity: "pressure",
18371
18985
  defaultAggregate: "mean",
18372
18986
  empty: "null",
18373
- companions: [NOW]
18987
+ companions: [NOW$2]
18374
18988
  }),
18375
18989
  numeric({
18376
18990
  id: "illuminance",
18377
18991
  summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
18378
18992
  role: DeviceRole.AmbientLightSensor,
18379
18993
  outputCap: "ambient-light-sensor",
18380
- outputField: "lux",
18994
+ outputField: "illuminance",
18381
18995
  quantity: "illuminance",
18382
18996
  defaultAggregate: "mean",
18383
18997
  empty: "null",
18384
- companions: [NOW]
18998
+ companions: [NOW$2]
18385
18999
  }),
18386
19000
  numeric({
18387
19001
  id: "power",
18388
19002
  summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
18389
19003
  role: DeviceRole.PowerSensor,
18390
19004
  outputCap: "power-meter",
18391
- outputField: "watts",
19005
+ outputField: "power",
18392
19006
  quantity: "power",
18393
19007
  defaultAggregate: "sum",
18394
19008
  empty: "omit",
18395
- companions: [NOW]
19009
+ companions: [NOW$2]
18396
19010
  }),
18397
19011
  numeric({
18398
19012
  id: "energy",
18399
19013
  summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
18400
19014
  role: DeviceRole.EnergySensor,
18401
19015
  outputCap: "power-meter",
18402
- outputField: "kwhTotal",
19016
+ outputField: "energy",
18403
19017
  quantity: "energy",
18404
19018
  defaultAggregate: "sum",
18405
19019
  empty: "omit",
18406
- companions: [NOW]
19020
+ companions: [NOW$2]
18407
19021
  }),
18408
19022
  numeric({
18409
19023
  id: "battery",
18410
19024
  summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
18411
19025
  role: DeviceRole.BatterySensor,
18412
19026
  outputCap: "battery",
18413
- outputField: "percentage",
19027
+ outputField: "level",
18414
19028
  quantity: "percentage",
18415
19029
  defaultAggregate: "mean",
18416
19030
  empty: "null",
@@ -18438,7 +19052,7 @@ var GROUP_TEMPLATES = [
18438
19052
  quantity: "device",
18439
19053
  defaultAggregate: "mean",
18440
19054
  empty: "null",
18441
- companions: [NOW]
19055
+ companions: [NOW$2]
18442
19056
  }),
18443
19057
  binary({
18444
19058
  id: "motion",
@@ -18532,6 +19146,11 @@ var GROUP_TEMPLATES = [
18532
19146
  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.",
18533
19147
  deviceType: DeviceType.Switch,
18534
19148
  outputCap: "switch",
19149
+ outputField: "on",
19150
+ member: {
19151
+ cap: "switch",
19152
+ fieldPath: "on"
19153
+ },
18535
19154
  commandCaps: ["switch"]
18536
19155
  }),
18537
19156
  actuator({
@@ -18539,34 +19158,136 @@ var GROUP_TEMPLATES = [
18539
19158
  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.",
18540
19159
  deviceType: DeviceType.Light,
18541
19160
  outputCap: "switch",
19161
+ outputField: "on",
19162
+ member: {
19163
+ cap: "switch",
19164
+ fieldPath: "on"
19165
+ },
18542
19166
  commandCaps: [
18543
19167
  "switch",
18544
19168
  "brightness",
18545
19169
  "color"
18546
19170
  ]
19171
+ }),
19172
+ actuator({
19173
+ id: "fan",
19174
+ summary: "On when at least one fan is on, or when all of them are. Speed, preset, direction and oscillation are offered only when every fan has them. A command is not sent to a fan that lacks it.",
19175
+ deviceType: DeviceType.Fan,
19176
+ outputCap: "switch",
19177
+ outputField: "on",
19178
+ member: {
19179
+ cap: "switch",
19180
+ fieldPath: "on"
19181
+ },
19182
+ commandCaps: ["switch", "fan-control"]
19183
+ }),
19184
+ actuator({
19185
+ id: "cover",
19186
+ summary: "Open when at least one cover is open or part-open, or only when all of them are. Position and tilt are offered only when every cover has them. A cover that reports nothing is left out, never read as closed.",
19187
+ deviceType: DeviceType.Cover,
19188
+ outputCap: "group-active",
19189
+ outputField: "active",
19190
+ member: {
19191
+ cap: "cover",
19192
+ fieldPath: "state"
19193
+ },
19194
+ activeWhen: [
19195
+ "open",
19196
+ "opening",
19197
+ "stopped"
19198
+ ],
19199
+ commandCaps: ["cover"]
19200
+ }),
19201
+ actuator({
19202
+ id: "valve",
19203
+ summary: "Open when at least one valve is open or part-open, or only when all of them are. Position is offered only when every valve has it. A valve that reports nothing is left out, never read as closed.",
19204
+ deviceType: DeviceType.Valve,
19205
+ outputCap: "group-active",
19206
+ outputField: "active",
19207
+ member: {
19208
+ cap: "valve",
19209
+ fieldPath: "state"
19210
+ },
19211
+ activeWhen: [
19212
+ "open",
19213
+ "opening",
19214
+ "stopped"
19215
+ ],
19216
+ commandCaps: ["valve"]
19217
+ }),
19218
+ actuator({
19219
+ id: "lock",
19220
+ summary: "Locked when at least one lock is locked, or only when all of them are. A jammed or moving lock is not locked. Locking is one tap; unlocking the group needs a confirmation every time, and nothing is sent without it.",
19221
+ deviceType: DeviceType.Lock,
19222
+ outputCap: "group-active",
19223
+ outputField: "active",
19224
+ member: {
19225
+ cap: "lock-control",
19226
+ fieldPath: "state"
19227
+ },
19228
+ activeWhen: ["locked"],
19229
+ commandCaps: ["lock-control"]
19230
+ }),
19231
+ actuator({
19232
+ id: "media-player",
19233
+ summary: "Playing when at least one player is playing, or only when all of them are. Volume is offered only when every player has it. A player that reports nothing is left out, never read as stopped.",
19234
+ deviceType: DeviceType.MediaPlayer,
19235
+ outputCap: "group-active",
19236
+ outputField: "active",
19237
+ member: {
19238
+ cap: "media-player",
19239
+ fieldPath: "state"
19240
+ },
19241
+ activeWhen: ["playing", "buffering"],
19242
+ commandCaps: ["media-player"]
19243
+ }),
19244
+ actuator({
19245
+ id: "climate",
19246
+ summary: "Running when at least one thermostat or air conditioner is not off, or only when all of them are. Target temperature and fan are offered only when every device has them. A device that reports nothing is left out, never read as off.",
19247
+ deviceType: DeviceType.Thermostat,
19248
+ memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
19249
+ outputCap: "group-active",
19250
+ outputField: "active",
19251
+ member: {
19252
+ cap: "climate-control",
19253
+ fieldPath: "mode"
19254
+ },
19255
+ activeWhen: [
19256
+ "heat",
19257
+ "cool",
19258
+ "auto",
19259
+ "heat_cool",
19260
+ "fan_only",
19261
+ "dry"
19262
+ ],
19263
+ commandCaps: ["climate-control"]
18547
19264
  })
18548
19265
  ];
18549
19266
  function actuator(input) {
18550
19267
  return {
18551
- ...input,
19268
+ id: input.id,
19269
+ summary: input.summary,
19270
+ deviceType: input.deviceType,
19271
+ outputCap: input.outputCap,
19272
+ outputField: input.outputField,
19273
+ commandCaps: input.commandCaps,
18552
19274
  family: "actuator",
18553
19275
  role: void 0,
18554
19276
  memberDeviceType: input.deviceType,
18555
- outputField: "on",
19277
+ memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
19278
+ activeWhen: input.activeWhen,
18556
19279
  quantity: "none",
18557
19280
  baseUnit: void 0,
18558
19281
  aggregates: BINARY_AGGREGATES,
18559
19282
  defaultAggregate: "any",
18560
19283
  empty: "offline",
18561
- accept: [{
18562
- cap: "switch",
18563
- fieldPath: "on"
18564
- }],
19284
+ accept: [input.member],
18565
19285
  companions: [CHANGED]
18566
19286
  };
18567
19287
  }
18568
19288
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18569
19289
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
19290
+ DeviceType.Camera;
18570
19291
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18571
19292
  /**
18572
19293
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -18881,7 +19602,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
18881
19602
  kind: "mutation",
18882
19603
  auth: "admin",
18883
19604
  access: "view"
18884
- });
19605
+ }), method(object({
19606
+ blockId: string().min(1),
19607
+ trace: AutomationRunTraceSchema.optional(),
19608
+ runStartedAt: number().optional(),
19609
+ keepTraces: number().int().min(1).max(100).optional()
19610
+ }), _void(), {
19611
+ kind: "mutation",
19612
+ auth: "admin"
19613
+ }), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
19614
+ traces: array(AutomationRunTraceSchema),
19615
+ lastError: string().nullable()
19616
+ }), { auth: "admin" });
18885
19617
  /**
18886
19618
  * `custom-model-registry` — collection cap exposing operator-registered
18887
19619
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -43606,7 +44338,7 @@ var NetworkAccessStatusSchema = object({
43606
44338
  });
43607
44339
  /**
43608
44340
  * Optional, richer endpoint shape returned by providers that expose
43609
- * MORE than one ingress concurrently (Tailscale Ingress with mixed
44341
+ * MORE than one ingress concurrently (Tailscale Funnel with mixed
43610
44342
  * serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
43611
44343
  * the originating provider config (mode + sourcePort) so the
43612
44344
  * orchestrator UI can label rows distinctly. Providers that expose only
@@ -43999,51 +44731,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
43999
44731
  kind: "mutation",
44000
44732
  auth: "admin"
44001
44733
  });
44002
- new Set([
44003
- {
44004
- id: "person",
44005
- name: "Person"
44006
- },
44007
- {
44008
- id: "vehicle",
44009
- name: "Vehicle"
44010
- },
44011
- {
44012
- id: "animal",
44013
- name: "Animal"
44014
- },
44015
- {
44016
- id: "package",
44017
- name: "Package"
44018
- }
44019
- ].map((l) => l.id));
44020
- var COCO_TO_MACRO = {
44021
- mapping: {
44022
- person: "person",
44023
- bicycle: "vehicle",
44024
- car: "vehicle",
44025
- motorcycle: "vehicle",
44026
- airplane: "vehicle",
44027
- bus: "vehicle",
44028
- train: "vehicle",
44029
- truck: "vehicle",
44030
- boat: "vehicle",
44031
- bird: "animal",
44032
- cat: "animal",
44033
- dog: "animal",
44034
- horse: "animal",
44035
- sheep: "animal",
44036
- cow: "animal",
44037
- elephant: "animal",
44038
- bear: "animal",
44039
- zebra: "animal",
44040
- giraffe: "animal",
44041
- suitcase: "package",
44042
- backpack: "package",
44043
- handbag: "package"
44044
- },
44045
- preserveOriginal: false
44046
- };
44047
44734
  var AUDIO_MACRO_LABELS = [
44048
44735
  {
44049
44736
  id: "speech",
@@ -46249,7 +46936,20 @@ var NcRuleInputSchema = object({
46249
46936
  * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
46250
46937
  * path does not run Zod defaults.
46251
46938
  */
46252
- groupingSec: number().int().min(5).max(60).optional()
46939
+ groupingSec: number().int().min(5).max(60).optional(),
46940
+ /**
46941
+ * ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
46942
+ * carries "Correct" / "Wrong" buttons (and, where the channel has room, a
46943
+ * "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
46944
+ * same mark the Library writes, and records whose notification it was and
46945
+ * when. A channel with no buttons gets the same two choices as links.
46946
+ *
46947
+ * `.optional()`, never `.default()` (a Zod default does not run on the addon
46948
+ * cap path): absent and `false` both mean off, which is what every rule
46949
+ * authored before this field meant. An editor turns it off by writing
46950
+ * `false`, so it needs no `clear` key.
46951
+ */
46952
+ askVerdict: boolean().optional()
46253
46953
  });
46254
46954
  /**
46255
46955
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -56483,9 +57183,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
56483
57183
  }), LogStreamEntrySchema, { kind: "subscription" });
56484
57184
  object({
56485
57185
  /** Carbon dioxide concentration in ppm. */
56486
- co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
57186
+ co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
56487
57187
  /** Total volatile organic compounds in ppb. */
56488
- vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
57188
+ voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
56489
57189
  /** Particulate matter ≤ 2.5 μm in µg/m³. */
56490
57190
  pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
56491
57191
  /** Particulate matter ≤ 10 μm in µg/m³. */
@@ -56498,7 +57198,7 @@ object({
56498
57198
  DeviceType.Sensor;
56499
57199
  object({
56500
57200
  /** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
56501
- lux: number().min(0).nullable().meta(readingMeta("illuminance", {
57201
+ illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
56502
57202
  precision: 0,
56503
57203
  label: "Illuminance"
56504
57204
  })),
@@ -56595,6 +57295,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
56595
57295
  * would produce more than `maxPoints` samples. */
56596
57296
  sampleEveryMs: number().int().positive().optional()
56597
57297
  }), AudioMetricsHistorySchema);
57298
+ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
57299
+ actionId: string().min(1),
57300
+ variables: record(string(), ActionVariableValueSchema).optional()
57301
+ }), _void(), {
57302
+ kind: "mutation",
57303
+ auth: "admin"
57304
+ }), method(object({ actionId: string().min(1) }), _void(), {
57305
+ kind: "mutation",
57306
+ auth: "admin"
57307
+ });
57308
+ /**
57309
+ * actions — the ONE surface for runnable actions, for the UI and for
57310
+ * automations. Provided by the core-blocks builtin on the hub.
57311
+ *
57312
+ * An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
57313
+ * steps, kept in the hub's `actions` record kind) or declared by an addon over
57314
+ * `action-source`. `list` asks every `action-source` provider LIVE and overlays
57315
+ * the run status from the hub's `runs` ledger; there is no catalog here to
57316
+ * drift (D3).
57317
+ *
57318
+ * **Permissions follow the camera, as linked devices do.** An action is linked
57319
+ * to cameras by the operator (`setLinks`, D356: nothing links itself). A
57320
+ * non-admin may `get` / `run` an action only through a camera they may see that
57321
+ * links it: they name the camera (`deviceId`, a top-level field so the scope
57322
+ * gate sees it) and the provider refuses an action that camera does not link.
57323
+ * An admin, and an in-process caller (an automation block), may run any action.
57324
+ * Every refusal is typed (`[not-linked] …`) and logged.
57325
+ *
57326
+ * A second `run` of an action that is already running is REFUSED — traced and
57327
+ * logged — never queued.
57328
+ */
57329
+ var ActionIdInput = object({ actionId: string().min(1) });
57330
+ var ActionLinksSchema = object({
57331
+ deviceId: number().int().nonnegative(),
57332
+ actionIds: array(string().min(1)).max(100)
57333
+ });
57334
+ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
57335
+ actionId: string().min(1),
57336
+ deviceId: number().int().nonnegative().optional()
57337
+ }), object({ action: ActionEntrySchema.nullable() }), {
57338
+ role: "viewer",
57339
+ auth: "protected",
57340
+ kind: "query",
57341
+ caller: "required"
57342
+ }), method(object({
57343
+ actionId: string().min(1),
57344
+ variables: record(string(), ActionVariableValueSchema).optional(),
57345
+ wait: boolean().optional(),
57346
+ origin: ActionRunOriginSchema.optional(),
57347
+ deviceId: number().int().nonnegative().optional()
57348
+ }), ActionRunResultSchema, {
57349
+ role: "viewer",
57350
+ auth: "protected",
57351
+ kind: "mutation",
57352
+ caller: "required"
57353
+ }), method(ActionIdInput, _void(), {
57354
+ kind: "mutation",
57355
+ auth: "admin"
57356
+ }), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
57357
+ kind: "mutation",
57358
+ auth: "admin"
57359
+ }), method(object({
57360
+ actionId: string().min(1),
57361
+ action: ActionInputSchema.partial()
57362
+ }), object({ action: ActionEntrySchema }), {
57363
+ kind: "mutation",
57364
+ auth: "admin"
57365
+ }), method(ActionIdInput, _void(), {
57366
+ kind: "mutation",
57367
+ auth: "admin"
57368
+ }), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
57369
+ role: "viewer",
57370
+ auth: "protected",
57371
+ kind: "query"
57372
+ }), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
57373
+ kind: "mutation",
57374
+ auth: "admin"
57375
+ });
56598
57376
  object({
56599
57377
  /** Whether the automation is currently enabled. Disabled automations
56600
57378
  * ignore their trigger block — manual `trigger` still works. */
@@ -56648,7 +57426,7 @@ var BatteryStatusSchema = object({
56648
57426
  * Consumers must SKIP a null rather than coerce it — `battery-band` already
56649
57427
  * declines to band a non-finite reading, which is the correct shape.
56650
57428
  */
56651
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
57429
+ level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
56652
57430
  /**
56653
57431
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
56654
57432
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -56658,7 +57436,7 @@ var BatteryStatusSchema = object({
56658
57436
  * `'unknown'` is the absence of an answer: the provider has not read the
56659
57437
  * power fields yet, or the firmware reported neither. Before it existed,
56660
57438
  * two unreadable fields produced `'none'`, and a camera nobody had reached
56661
- * was drawn "on battery alone" — the same D315 defect `percentage` closed
57439
+ * was drawn "on battery alone" — the same D315 defect `level` closed
56662
57440
  * by going nullable. Consumers SKIP it (no charger state published, no
56663
57441
  * glyph, no HomeKit ChargingState) rather than coerce it either way.
56664
57442
  */
@@ -56682,7 +57460,7 @@ var BatteryStatusSchema = object({
56682
57460
  * that only report charge. A second reading on this cap, not a second
56683
57461
  * `numeric-sensor` on the same device.
56684
57462
  */
56685
- volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
57463
+ voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
56686
57464
  /**
56687
57465
  * Ms epoch of the last time the device PROVED it was reachable — a
56688
57466
  * completed firmware round-trip, an observed wake, or an inbound push
@@ -56716,13 +57494,13 @@ var BatteryStatusSchema = object({
56716
57494
  /**
56717
57495
  * True when the source is a BINARY low-battery indicator (HA
56718
57496
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
56719
- * charge level — `percentage` is then a coarse stand-in (100 = normal,
57497
+ * charge level — `level` is then a coarse stand-in (100 = normal,
56720
57498
  * sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
56721
57499
  * misleading exact percentage. Absent/false → genuine 0–100 % reading.
56722
57500
  */
56723
57501
  binary: boolean().optional().meta({ label: "Binary indicator" })
56724
57502
  });
56725
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
57503
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
56726
57504
  method(object({
56727
57505
  deviceId: number(),
56728
57506
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -56747,26 +57525,26 @@ DeviceType.Sensor;
56747
57525
  * controls to this single-method surface.
56748
57526
  *
56749
57527
  * The cap is intentionally minimal: a single `setBrightness({deviceId,
56750
- * percentage})` mutation plus the auto-injected `getStatus`. Drivers
57528
+ * level})` mutation plus the auto-injected `getStatus`. Drivers
56751
57529
  * that expose richer controls (color temperature, scenes, schedules)
56752
57530
  * should surface those via the device's `getSettingsUISchema()`
56753
57531
  * instead of bloating this cap.
56754
57532
  */
56755
57533
  var BrightnessStatusSchema = object({
56756
57534
  /** Current level as 0..100 inclusive. Firmware-reported. */
56757
- percentage: number().min(0).max(100).meta(readingMeta("percentage")),
57535
+ level: number().min(0).max(100).meta(readingMeta("percentage")),
56758
57536
  /** Ms epoch of the last operator-driven change. Useful for UI freshness. */
56759
57537
  lastChangedAt: number()
56760
57538
  });
56761
57539
  DeviceType.Light, method(object({
56762
57540
  deviceId: number().int().nonnegative(),
56763
- percentage: number().min(0).max(100)
57541
+ level: number().min(0).max(100)
56764
57542
  }), _void(), {
56765
57543
  kind: "mutation",
56766
57544
  auth: "protected"
56767
57545
  }), object({
56768
57546
  deviceId: number(),
56769
- percentage: number().min(0).max(100),
57547
+ level: number().min(0).max(100),
56770
57548
  lastChangedAt: number()
56771
57549
  });
56772
57550
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
@@ -57267,11 +58045,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
57267
58045
  }),
57268
58046
  object({
57269
58047
  mode: literal("mired"),
57270
- mireds: number().int().min(50).max(1e3)
58048
+ colorTemperature: number().int().min(50).max(1e3)
57271
58049
  })
57272
58050
  ]);
57273
58051
  object({
57274
- /** Active color mode — which of `rgb` / `hsv` / `mireds` reflects
58052
+ /** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
57275
58053
  * the bulb's current state. */
57276
58054
  mode: _enum([
57277
58055
  "rgb",
@@ -57283,7 +58061,7 @@ object({
57283
58061
  /** Populated when `mode === 'hsv'`. */
57284
58062
  hsv: HsvTripletSchema.optional(),
57285
58063
  /** Populated when `mode === 'mired'`. */
57286
- mireds: number().int().optional().meta(readingMeta("colour-temperature")),
58064
+ colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
57287
58065
  /** Ms epoch of the last operator-driven change. */
57288
58066
  lastChangedAt: number()
57289
58067
  });
@@ -57302,7 +58080,7 @@ DeviceType.Light, method(object({
57302
58080
  ]),
57303
58081
  rgb: RgbTripletSchema.optional(),
57304
58082
  hsv: HsvTripletSchema.optional(),
57305
- mireds: number().int().optional(),
58083
+ colorTemperature: number().int().optional(),
57306
58084
  lastChangedAt: number()
57307
58085
  });
57308
58086
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
@@ -57728,11 +58506,11 @@ object({
57728
58506
  /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
57729
58507
  availablePrograms: array(string()),
57730
58508
  /** Seconds remaining on the active cycle, or null when not running / not known. */
57731
- remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58509
+ remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
57732
58510
  /** Seconds the delayed start is set to (time until the cycle starts), or null. */
57733
- delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
58511
+ delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
57734
58512
  /** Cycle completion 0..100, or null when not applicable. */
57735
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58513
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
57736
58514
  /** True when the door is reported open; null when the door state is not known. */
57737
58515
  doorOpen: boolean().nullable(),
57738
58516
  /** True when the door is latched (locked) during a cycle; null when not reported. */
@@ -58350,7 +59128,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
58350
59128
  object({
58351
59129
  /** Active speed as 0..100 inclusive. Null when the device has no
58352
59130
  * speed surface (single-speed fan). */
58353
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59131
+ speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58354
59132
  /** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
58355
59133
  * a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
58356
59134
  percentageStep: number().positive().optional().meta(readingMeta("percentage")),
@@ -58370,7 +59148,7 @@ object({
58370
59148
  });
58371
59149
  DeviceType.Fan, method(object({
58372
59150
  deviceId: number().int().nonnegative(),
58373
- percentage: number().min(0).max(100)
59151
+ speed: number().min(0).max(100)
58374
59152
  }), _void(), {
58375
59153
  kind: "mutation",
58376
59154
  auth: "protected"
@@ -58478,7 +59256,13 @@ results: array(object({
58478
59256
  /** Ms epoch of the attempt. */
58479
59257
  at: number()
58480
59258
  })) });
58481
- DeviceType.Switch, DeviceType.Light;
59259
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
59260
+ object({
59261
+ active: boolean().meta({ label: "Active" }),
59262
+ /** Ms epoch when the slice was last updated. */
59263
+ lastChangedAt: number()
59264
+ });
59265
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
58482
59266
  object({
58483
59267
  /** Members whose current value entered the aggregate. */
58484
59268
  included: number().int().nonnegative().meta(readingMeta("count", {
@@ -58496,7 +59280,7 @@ object({
58496
59280
  label: "Members"
58497
59281
  }))
58498
59282
  });
58499
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
59283
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
58500
59284
  object({
58501
59285
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
58502
59286
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -58547,7 +59331,7 @@ DeviceType.Humidifier, method(object({
58547
59331
  });
58548
59332
  object({
58549
59333
  /** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
58550
- percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
59334
+ humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
58551
59335
  precision: 0,
58552
59336
  label: "Humidity"
58553
59337
  })),
@@ -58990,7 +59774,7 @@ object({
58990
59774
  batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58991
59775
  /** 0..100 mowing-completion percentage of the current task, or null when no
58992
59776
  * task is active / progress is unavailable. */
58993
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
59777
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
58994
59778
  /** Current device/event code (dynamic — mostly status, sometimes an error),
58995
59779
  * or null when unknown. */
58996
59780
  currentCode: number().nullable().meta(readingMeta("none")),
@@ -59403,7 +60187,14 @@ DeviceType.Lock, method(object({
59403
60187
  auth: "protected"
59404
60188
  }), method(object({
59405
60189
  deviceId: number().int().nonnegative(),
59406
- code: string().min(1).optional()
60190
+ code: string().min(1).optional(),
60191
+ /**
60192
+ * Honoured by a helper lock GROUP only (D944): unlocking several doors
60193
+ * with one call is refused unless the caller says it was confirmed. A
60194
+ * single lock ignores it. The refusal lives in the callee, so no
60195
+ * automation or API caller reaches the doors by skipping a dialog.
60196
+ */
60197
+ confirm: boolean().optional()
59407
60198
  }), _void(), {
59408
60199
  kind: "mutation",
59409
60200
  auth: "protected"
@@ -59411,6 +60202,11 @@ DeviceType.Lock, method(object({
59411
60202
  kind: "mutation",
59412
60203
  auth: "protected"
59413
60204
  });
60205
+ object({
60206
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
60207
+ lastFetchedAt: number()
60208
+ });
60209
+ DeviceType.Sensor;
59414
60210
  /**
59415
60211
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
59416
60212
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
@@ -59468,10 +60264,10 @@ object({
59468
60264
  currentMedia: MediaInfoSchema.nullable(),
59469
60265
  /** Current playback position in ms. Null when not seekable or
59470
60266
  * nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
59471
- positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
60267
+ position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
59472
60268
  /** Total duration of the current media in ms. Null when unknown
59473
60269
  * (live stream) or nothing is playing. */
59474
- durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
60270
+ duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
59475
60271
  /** Shuffle toggle. Null when no shuffle surface.
59476
60272
  * Pair with `DeviceFeature.MediaPlayerShuffle`. */
59477
60273
  shuffle: boolean().nullable(),
@@ -59498,7 +60294,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
59498
60294
  auth: "protected"
59499
60295
  }), method(object({
59500
60296
  deviceId: number().int().nonnegative(),
59501
- positionMs: number().int().nonnegative()
60297
+ position: number().int().nonnegative()
59502
60298
  }), _void(), {
59503
60299
  kind: "mutation",
59504
60300
  auth: "protected"
@@ -60171,9 +60967,9 @@ var NetworkLinkStatusSchema = object({
60171
60967
  * one whose reading has not landed must not be drawn at 0 %. Consumers
60172
60968
  * SKIP a null rather than coerce it.
60173
60969
  */
60174
- signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60970
+ signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60175
60971
  /** Raw received signal strength in dBm, when the firmware reports one. */
60176
- rssiDbm: number().optional().meta(readingMeta("signal-level")),
60972
+ rssi: number().optional().meta(readingMeta("signal-level")),
60177
60973
  /** Network name of a wireless link, when the firmware reports it. */
60178
60974
  ssid: string().optional(),
60179
60975
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
@@ -60834,10 +61630,20 @@ var PetFeederDeviceStatusSchema = _enum([
60834
61630
  ]);
60835
61631
  var gramsPortion = number().int().min(4).max(200);
60836
61632
  object({
60837
- /** Food currently in the bowl (grams). Null when the device has not
60838
- * reported a reading yet. On dual-hopper models this is the combined
60839
- * bowl reading; per-hopper levels live in `food1`/`food2`. */
61633
+ /** Food in the TANK (hopper), as the feeder's own sensor reports it
61634
+ * (`state.food`). A coarse level code, not grams — `0` is empty. The
61635
+ * amount in the bowl is `bowlFood`. On dual-hopper models this is the
61636
+ * combined reading; per-hopper levels live in `food1`/`food2`. Null when
61637
+ * the device has not reported yet. */
60840
61638
  foodLevel: number().nullable().meta(readingMeta("none")),
61639
+ /** Food in the BOWL as the feeder reports it (`state.bowl`), in the
61640
+ * feeder's own units. Null when the model reports none. */
61641
+ bowlFood: number().nullable().meta(readingMeta("none")),
61642
+ /** True while the pet is eating (`state.eating`). */
61643
+ eating: boolean(),
61644
+ /** Whether `markFoodReplenished` does anything on this model. When false
61645
+ * the client must not offer it. */
61646
+ supportsMarkRefilled: boolean(),
60841
61647
  /** Hopper-1 food level (grams) on dual-hopper feeders; null on
60842
61648
  * single-hopper models. */
60843
61649
  food1: number().nullable().meta(readingMeta("none")),
@@ -60845,8 +61651,8 @@ object({
60845
61651
  * single-hopper models. */
60846
61652
  food2: number().nullable().meta(readingMeta("none")),
60847
61653
  /** Derived low-food flag — mirrors the HA `food_level` binary_sensor
60848
- * (`device_class: problem`, on = low). True when the bowl is empty /
60849
- * below the feeder's low threshold. */
61654
+ * (`device_class: problem`, on = low). True when the tank reports empty,
61655
+ * or, on a dual-hopper model, when EITHER hopper is empty. */
60850
61656
  lowFood: boolean(),
60851
61657
  /** Battery charge 0..100 (%). Null on mains-powered models or when the
60852
61658
  * device has no battery reading. */
@@ -61313,22 +62119,38 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
61313
62119
  auth: "admin"
61314
62120
  });
61315
62121
  object({
61316
- /** Instantaneous power draw in watts. */
61317
- watts: number().optional().meta(readingMeta("power", { label: "Power" })),
62122
+ /** Instantaneous power draw (watts). */
62123
+ power: number().optional().meta(readingMeta("power", { label: "Power" })),
61318
62124
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
61319
- kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
61320
- /** Voltage in volts. */
61321
- volts: number().optional().meta(readingMeta("voltage")),
62125
+ energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
62126
+ /** Voltage (volts). */
62127
+ voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
61322
62128
  /** Current in amperes. */
61323
- amps: number().optional().meta(readingMeta("current")),
62129
+ current: number().optional().meta(readingMeta("current", { label: "Current" })),
61324
62130
  /** Apparent power in volt-amperes. */
61325
- va: number().optional().meta(readingMeta("apparent-power")),
62131
+ apparentPower: number().optional().meta(readingMeta("apparent-power")),
61326
62132
  /** Power factor (0..1) if reported. */
61327
62133
  powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
61328
62134
  /** Ms epoch when the slice was last updated. */
61329
62135
  lastFetchedAt: number()
61330
62136
  });
61331
- DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
62137
+ [
62138
+ DeviceType.Sensor,
62139
+ DeviceType.Switch,
62140
+ DeviceType.Light,
62141
+ DeviceType.Fan,
62142
+ DeviceType.Climate,
62143
+ DeviceType.Thermostat,
62144
+ DeviceType.Humidifier,
62145
+ DeviceType.WaterHeater,
62146
+ DeviceType.MediaPlayer,
62147
+ DeviceType.Washer,
62148
+ DeviceType.Dryer,
62149
+ DeviceType.Dishwasher,
62150
+ DeviceType.Vacuum,
62151
+ DeviceType.LawnMower,
62152
+ DeviceType.PetFeeder
62153
+ ].filter((type) => type !== DeviceType.Sensor);
61332
62154
  /**
61333
62155
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
61334
62156
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -61361,16 +62183,13 @@ object({
61361
62183
  location: string().nullable(),
61362
62184
  /** GPS coordinates when available. Null otherwise. */
61363
62185
  gps: GpsLocationSchema.nullable(),
61364
- /** Optional battery level of the tracking device (0..100). Null
61365
- * when not reported. */
61366
- batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61367
62186
  /** Ms epoch when the slice was last updated. */
61368
62187
  lastChangedAt: number()
61369
62188
  });
61370
62189
  DeviceType.Presence;
61371
62190
  object({
61372
62191
  /** Current pressure in hPa. `null` when the sample was refused (D393). */
61373
- hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
62192
+ pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
61374
62193
  /** Ms epoch when the slice was last updated. */
61375
62194
  lastFetchedAt: number()
61376
62195
  });
@@ -63821,7 +64640,7 @@ var SwitchStatusSchema = object({
63821
64640
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
63822
64641
  lastChangedAt: number()
63823
64642
  });
63824
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
64643
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
63825
64644
  deviceId: number(),
63826
64645
  on: boolean()
63827
64646
  }), _void(), {
@@ -64380,7 +65199,7 @@ object({
64380
65199
  DeviceType.Sensor;
64381
65200
  object({
64382
65201
  /** Current temperature in Celsius. `null` when the sample was refused (D393). */
64383
- celsius: number().nullable().meta(readingMeta("temperature", {
65202
+ temperature: number().nullable().meta(readingMeta("temperature", {
64384
65203
  precision: 1,
64385
65204
  label: "Temperature"
64386
65205
  })),
@@ -64644,7 +65463,7 @@ object({
64644
65463
  /** Speed tokens the hardware accepts — drives the UI selector. */
64645
65464
  availableFanSpeeds: array(string()),
64646
65465
  /** 0..100 cleaning-completion percentage of the current task, or null. */
64647
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
65466
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
64648
65467
  /** Current error code (0 / null = no error). */
64649
65468
  errorCode: number().nullable().meta(readingMeta("none")),
64650
65469
  /** Human label for {@link errorCode}, or null when none / undecodable. */
@@ -65513,8 +66332,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
65513
66332
  kind: "mutation",
65514
66333
  auth: "admin"
65515
66334
  });
66335
+ DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
65516
66336
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
65517
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
66337
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
65518
66338
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
65519
66339
  DeviceRole.BinarySensor, DeviceRole.MotionSensor;
65520
66340
  new Set(CAP_NAMES);
@@ -65584,6 +66404,104 @@ Object.freeze({
65584
66404
  access: "create",
65585
66405
  role: "admin"
65586
66406
  },
66407
+ "actions.create": {
66408
+ capName: "actions",
66409
+ capScope: "system",
66410
+ addonId: null,
66411
+ access: "create",
66412
+ role: "admin"
66413
+ },
66414
+ "actions.delete": {
66415
+ capName: "actions",
66416
+ capScope: "system",
66417
+ addonId: null,
66418
+ access: "delete",
66419
+ role: "admin"
66420
+ },
66421
+ "actions.get": {
66422
+ capName: "actions",
66423
+ capScope: "system",
66424
+ addonId: null,
66425
+ access: "view",
66426
+ role: "viewer"
66427
+ },
66428
+ "actions.getLinks": {
66429
+ capName: "actions",
66430
+ capScope: "system",
66431
+ addonId: null,
66432
+ access: "view",
66433
+ role: "admin"
66434
+ },
66435
+ "actions.getTraces": {
66436
+ capName: "actions",
66437
+ capScope: "system",
66438
+ addonId: null,
66439
+ access: "view",
66440
+ role: "admin"
66441
+ },
66442
+ "actions.list": {
66443
+ capName: "actions",
66444
+ capScope: "system",
66445
+ addonId: null,
66446
+ access: "view",
66447
+ role: "admin"
66448
+ },
66449
+ "actions.listForCamera": {
66450
+ capName: "actions",
66451
+ capScope: "system",
66452
+ addonId: null,
66453
+ access: "view",
66454
+ role: "viewer"
66455
+ },
66456
+ "actions.run": {
66457
+ capName: "actions",
66458
+ capScope: "system",
66459
+ addonId: null,
66460
+ access: "create",
66461
+ role: "viewer"
66462
+ },
66463
+ "actions.setLinks": {
66464
+ capName: "actions",
66465
+ capScope: "system",
66466
+ addonId: null,
66467
+ access: "create",
66468
+ role: "admin"
66469
+ },
66470
+ "actions.stop": {
66471
+ capName: "actions",
66472
+ capScope: "system",
66473
+ addonId: null,
66474
+ access: "create",
66475
+ role: "admin"
66476
+ },
66477
+ "actions.update": {
66478
+ capName: "actions",
66479
+ capScope: "system",
66480
+ addonId: null,
66481
+ access: "create",
66482
+ role: "admin"
66483
+ },
66484
+ "actionSource.listActions": {
66485
+ capName: "action-source",
66486
+ capScope: "system",
66487
+ addonId: null,
66488
+ access: "view",
66489
+ role: "admin"
66490
+ },
66491
+ "actionSource.runAction": {
66492
+ capName: "action-source",
66493
+ capScope: "system",
66494
+ addonId: null,
66495
+ access: "create",
66496
+ role: "admin"
66497
+ },
66498
+ "actionSource.stopAction": {
66499
+ capName: "action-source",
66500
+ capScope: "system",
66501
+ addonId: null,
66502
+ access: "create",
66503
+ role: "admin"
66504
+ },
65587
66505
  "addonPages.listPages": {
65588
66506
  capName: "addon-pages",
65589
66507
  capScope: "system",
@@ -66865,6 +67783,13 @@ Object.freeze({
66865
67783
  access: "view",
66866
67784
  role: "admin"
66867
67785
  },
67786
+ "coreBlocks.getAutomationRunState": {
67787
+ capName: "core-blocks",
67788
+ capScope: "system",
67789
+ addonId: null,
67790
+ access: "view",
67791
+ role: "admin"
67792
+ },
66868
67793
  "coreBlocks.getBlockSettings": {
66869
67794
  capName: "core-blocks",
66870
67795
  capScope: "system",
@@ -66886,6 +67811,13 @@ Object.freeze({
66886
67811
  access: "view",
66887
67812
  role: "admin"
66888
67813
  },
67814
+ "coreBlocks.getTraces": {
67815
+ capName: "core-blocks",
67816
+ capScope: "system",
67817
+ addonId: null,
67818
+ access: "view",
67819
+ role: "admin"
67820
+ },
66889
67821
  "coreBlocks.getTypeDefs": {
66890
67822
  capName: "core-blocks",
66891
67823
  capScope: "system",
@@ -66921,6 +67853,13 @@ Object.freeze({
66921
67853
  access: "create",
66922
67854
  role: "admin"
66923
67855
  },
67856
+ "coreBlocks.reportAutomationRun": {
67857
+ capName: "core-blocks",
67858
+ capScope: "system",
67859
+ addonId: null,
67860
+ access: "create",
67861
+ role: "admin"
67862
+ },
66924
67863
  "coreBlocks.restart": {
66925
67864
  capName: "core-blocks",
66926
67865
  capScope: "system",
@@ -68790,6 +69729,13 @@ Object.freeze({
68790
69729
  access: "view",
68791
69730
  role: "viewer"
68792
69731
  },
69732
+ "groupActive.getStatus": {
69733
+ capName: "group-active",
69734
+ capScope: "device",
69735
+ addonId: null,
69736
+ access: "view",
69737
+ role: "viewer"
69738
+ },
68793
69739
  "groupCommands.getStatus": {
68794
69740
  capName: "group-commands",
68795
69741
  capScope: "device",
@@ -69756,6 +70702,13 @@ Object.freeze({
69756
70702
  access: "create",
69757
70703
  role: "admin"
69758
70704
  },
70705
+ "meter.getStatus": {
70706
+ capName: "meter",
70707
+ capScope: "device",
70708
+ addonId: null,
70709
+ access: "view",
70710
+ role: "viewer"
70711
+ },
69759
70712
  "metricsProvider.collectSnapshot": {
69760
70713
  capName: "metrics-provider",
69761
70714
  capScope: "system",
@@ -75480,7 +76433,7 @@ var ACTUATOR_CAP_VOCABULARY = {
75480
76433
  label: t("Full brightness", "Luminosità massima"),
75481
76434
  phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
75482
76435
  icon: "sun",
75483
- args: { percentage: 100 }
76436
+ args: { level: 100 }
75484
76437
  },
75485
76438
  {
75486
76439
  id: "brightness.half",
@@ -75488,7 +76441,7 @@ var ACTUATOR_CAP_VOCABULARY = {
75488
76441
  label: t("Half brightness", "Luminosità a metà"),
75489
76442
  phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
75490
76443
  icon: "sun-dim",
75491
- args: { percentage: 50 }
76444
+ args: { level: 50 }
75492
76445
  },
75493
76446
  {
75494
76447
  id: "brightness.off",
@@ -75496,16 +76449,16 @@ var ACTUATOR_CAP_VOCABULARY = {
75496
76449
  label: t("Brightness off", "Luminosità a zero"),
75497
76450
  phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
75498
76451
  icon: "lightbulb-off",
75499
- args: { percentage: 0 }
76452
+ args: { level: 0 }
75500
76453
  },
75501
76454
  {
75502
76455
  id: "brightness.set",
75503
76456
  method: "setBrightness",
75504
76457
  label: t("Set brightness", "Imposta la luminosità"),
75505
- phrase: t("Set the brightness of {device} to {percentage}", "Imposta la luminosità di {device} a {percentage}"),
76458
+ phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
75506
76459
  icon: "sun-medium",
75507
76460
  openArgs: [{
75508
- key: "percentage",
76461
+ key: "level",
75509
76462
  label: PERCENT,
75510
76463
  offer: {
75511
76464
  kind: "number",
@@ -75519,13 +76472,13 @@ var ACTUATOR_CAP_VOCABULARY = {
75519
76472
  ],
75520
76473
  state: [{
75521
76474
  kind: "numeric",
75522
- field: "percentage",
76475
+ field: "level",
75523
76476
  quantity: t("the brightness", "la luminosità"),
75524
76477
  label: t("Brightness", "Luminosità"),
75525
76478
  unit: "%",
75526
76479
  icon: "sun"
75527
76480
  }],
75528
- events: { onBrightnessChanged: { notOperatorFacing: "the `percentage` state trigger reads the same change" } }
76481
+ events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
75529
76482
  },
75530
76483
  color: {
75531
76484
  scope: "device",
@@ -75539,7 +76492,7 @@ var ACTUATOR_CAP_VOCABULARY = {
75539
76492
  icon: "sun",
75540
76493
  args: { color: {
75541
76494
  mode: "mired",
75542
- mireds: 370
76495
+ colorTemperature: 370
75543
76496
  } }
75544
76497
  },
75545
76498
  {
@@ -75550,7 +76503,7 @@ var ACTUATOR_CAP_VOCABULARY = {
75550
76503
  icon: "snowflake",
75551
76504
  args: { color: {
75552
76505
  mode: "mired",
75553
- mireds: 200
76506
+ colorTemperature: 200
75554
76507
  } }
75555
76508
  },
75556
76509
  {
@@ -76164,7 +77117,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76164
77117
  label: t("Fan off", "Ventilatore spento"),
76165
77118
  phrase: t("Stop {device}", "Ferma {device}"),
76166
77119
  icon: "power-off",
76167
- args: { percentage: 0 }
77120
+ args: { speed: 0 }
76168
77121
  },
76169
77122
  {
76170
77123
  id: "fan.full",
@@ -76172,16 +77125,16 @@ var ACTUATOR_CAP_VOCABULARY = {
76172
77125
  label: t("Fan full", "Ventilatore al massimo"),
76173
77126
  phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
76174
77127
  icon: "fan",
76175
- args: { percentage: 100 }
77128
+ args: { speed: 100 }
76176
77129
  },
76177
77130
  {
76178
77131
  id: "fan.speed",
76179
77132
  method: "setPercentage",
76180
77133
  label: t("Set speed", "Imposta la velocità"),
76181
- phrase: t("Set the speed of {device} to {percentage}", "Imposta la velocità di {device} al {percentage}"),
77134
+ phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
76182
77135
  icon: "fan",
76183
77136
  openArgs: [{
76184
- key: "percentage",
77137
+ key: "speed",
76185
77138
  label: t("Speed", "Velocità"),
76186
77139
  offer: {
76187
77140
  kind: "number",
@@ -76243,7 +77196,7 @@ var ACTUATOR_CAP_VOCABULARY = {
76243
77196
  ],
76244
77197
  state: [{
76245
77198
  kind: "numeric",
76246
- field: "percentage",
77199
+ field: "speed",
76247
77200
  quantity: t("the speed", "la velocità"),
76248
77201
  label: t("Speed", "Velocità"),
76249
77202
  unit: "%",
@@ -77041,7 +77994,7 @@ var APPLIANCE_CAP_VOCABULARY = {
77041
77994
  },
77042
77995
  {
77043
77996
  kind: "numeric",
77044
- field: "progressPercent",
77997
+ field: "progress",
77045
77998
  quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
77046
77999
  label: t("Progress", "Avanzamento"),
77047
78000
  unit: "%",
@@ -77399,10 +78352,10 @@ var APPLIANCE_CAP_VOCABULARY = {
77399
78352
  id: "media.seek",
77400
78353
  method: "seek",
77401
78354
  label: t("Seek", "Vai al punto"),
77402
- phrase: t("Move {device} to {positionMs}", "Porta {device} al punto {positionMs}"),
78355
+ phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
77403
78356
  icon: "fast-forward",
77404
78357
  openArgs: [{
77405
- key: "positionMs",
78358
+ key: "position",
77406
78359
  label: t("Position", "Posizione"),
77407
78360
  offer: {
77408
78361
  kind: "number",
@@ -78451,7 +79404,7 @@ var SENSOR_CAP_VOCABULARY = {
78451
79404
  state: [
78452
79405
  {
78453
79406
  kind: "numeric",
78454
- field: "co2Ppm",
79407
+ field: "co2",
78455
79408
  quantity: t("the CO₂", "la CO₂"),
78456
79409
  label: t("CO₂", "CO₂"),
78457
79410
  unit: "ppm",
@@ -78459,7 +79412,7 @@ var SENSOR_CAP_VOCABULARY = {
78459
79412
  },
78460
79413
  {
78461
79414
  kind: "numeric",
78462
- field: "vocPpb",
79415
+ field: "voc",
78463
79416
  quantity: t("the VOC level", "il livello di COV"),
78464
79417
  label: t("VOC", "COV"),
78465
79418
  unit: "ppb",
@@ -78495,7 +79448,7 @@ var SENSOR_CAP_VOCABULARY = {
78495
79448
  noun: t("Light level", "Luminosità ambiente"),
78496
79449
  state: [{
78497
79450
  kind: "numeric",
78498
- field: "lux",
79451
+ field: "illuminance",
78499
79452
  quantity: t("the light level", "la luminosità"),
78500
79453
  label: t("Illuminance", "Illuminamento"),
78501
79454
  unit: "lx",
@@ -78658,6 +79611,10 @@ var SENSOR_CAP_VOCABULARY = {
78658
79611
  icon: "flame"
78659
79612
  }]
78660
79613
  },
79614
+ "group-active": {
79615
+ scope: "device",
79616
+ noun: t("Group state", "Stato del gruppo")
79617
+ },
78661
79618
  "group-commands": {
78662
79619
  scope: "device",
78663
79620
  noun: t("Group command", "Comando di gruppo")
@@ -78694,7 +79651,7 @@ var SENSOR_CAP_VOCABULARY = {
78694
79651
  noun: t("Humidity", "Umidità"),
78695
79652
  state: [{
78696
79653
  kind: "numeric",
78697
- field: "percent",
79654
+ field: "humidity",
78698
79655
  quantity: t("the humidity", "l’umidità"),
78699
79656
  label: t("Humidity", "Umidità"),
78700
79657
  unit: "%",
@@ -78714,6 +79671,17 @@ var SENSOR_CAP_VOCABULARY = {
78714
79671
  }],
78715
79672
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
78716
79673
  },
79674
+ meter: {
79675
+ scope: "device",
79676
+ noun: t("Meter", "Contatore"),
79677
+ state: [{
79678
+ kind: "numeric",
79679
+ field: "value",
79680
+ quantity: t("the total", "il totale"),
79681
+ label: t("Total", "Totale"),
79682
+ icon: "gauge"
79683
+ }]
79684
+ },
78717
79685
  "numeric-sensor": {
78718
79686
  scope: "device",
78719
79687
  noun: t("Sensor", "Sensore"),
@@ -78731,7 +79699,7 @@ var SENSOR_CAP_VOCABULARY = {
78731
79699
  state: [
78732
79700
  {
78733
79701
  kind: "numeric",
78734
- field: "watts",
79702
+ field: "power",
78735
79703
  quantity: t("the power draw", "il consumo"),
78736
79704
  label: t("Power", "Potenza"),
78737
79705
  unit: "W",
@@ -78739,7 +79707,7 @@ var SENSOR_CAP_VOCABULARY = {
78739
79707
  },
78740
79708
  {
78741
79709
  kind: "numeric",
78742
- field: "kwhTotal",
79710
+ field: "energy",
78743
79711
  quantity: t("the energy used", "l’energia consumata"),
78744
79712
  label: t("Energy", "Energia"),
78745
79713
  unit: "kWh",
@@ -78747,7 +79715,7 @@ var SENSOR_CAP_VOCABULARY = {
78747
79715
  },
78748
79716
  {
78749
79717
  kind: "numeric",
78750
- field: "volts",
79718
+ field: "voltage",
78751
79719
  quantity: t("the voltage", "la tensione"),
78752
79720
  label: t("Voltage", "Tensione"),
78753
79721
  unit: "V",
@@ -78755,7 +79723,7 @@ var SENSOR_CAP_VOCABULARY = {
78755
79723
  },
78756
79724
  {
78757
79725
  kind: "numeric",
78758
- field: "amps",
79726
+ field: "current",
78759
79727
  quantity: t("the current", "la corrente"),
78760
79728
  label: t("Current", "Corrente"),
78761
79729
  unit: "A",
@@ -78772,13 +79740,6 @@ var SENSOR_CAP_VOCABULARY = {
78772
79740
  label: t("Where", "Posizione"),
78773
79741
  phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
78774
79742
  icon: "map-pin"
78775
- }, {
78776
- kind: "numeric",
78777
- field: "batteryPercent",
78778
- quantity: t("the phone battery", "la batteria del telefono"),
78779
- label: t("Battery", "Batteria"),
78780
- unit: "%",
78781
- icon: "battery"
78782
79743
  }]
78783
79744
  },
78784
79745
  "pressure-sensor": {
@@ -78786,7 +79747,7 @@ var SENSOR_CAP_VOCABULARY = {
78786
79747
  noun: t("Pressure", "Pressione"),
78787
79748
  state: [{
78788
79749
  kind: "numeric",
78789
- field: "hpa",
79750
+ field: "pressure",
78790
79751
  quantity: t("the pressure", "la pressione"),
78791
79752
  label: t("Pressure", "Pressione"),
78792
79753
  unit: "hPa",
@@ -78822,7 +79783,7 @@ var SENSOR_CAP_VOCABULARY = {
78822
79783
  noun: t("Temperature", "Temperatura"),
78823
79784
  state: [{
78824
79785
  kind: "numeric",
78825
- field: "celsius",
79786
+ field: "temperature",
78826
79787
  quantity: t("the temperature", "la temperatura"),
78827
79788
  label: t("Temperature", "Temperatura"),
78828
79789
  unit: "°C",
@@ -78893,7 +79854,7 @@ var SENSOR_CAP_VOCABULARY = {
78893
79854
  state: [
78894
79855
  {
78895
79856
  kind: "numeric",
78896
- field: "percentage",
79857
+ field: "level",
78897
79858
  quantity: t("the battery level", "il livello della batteria"),
78898
79859
  label: t("Battery", "Batteria"),
78899
79860
  unit: "%",
@@ -78935,7 +79896,7 @@ var SENSOR_CAP_VOCABULARY = {
78935
79896
  icon: "battery-charging"
78936
79897
  }
78937
79898
  ],
78938
- events: { onStatusChanged: { notOperatorFacing: "the percentage / sleeping / charging state triggers each read one field of this change" } },
79899
+ events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
78939
79900
  extraEvents: [{
78940
79901
  category: EventCategory.DeviceAwake,
78941
79902
  label: t("Woke up", "Risvegliato"),
@@ -78953,7 +79914,7 @@ var SENSOR_CAP_VOCABULARY = {
78953
79914
  noun: t("Network link", "Collegamento di rete"),
78954
79915
  state: [{
78955
79916
  kind: "numeric",
78956
- field: "signalPercent",
79917
+ field: "signal",
78957
79918
  quantity: t("the signal strength", "l’intensità del segnale"),
78958
79919
  label: t("Signal", "Segnale"),
78959
79920
  unit: "%",
@@ -79046,6 +80007,8 @@ var ML = "model and training machinery — no device action";
79046
80007
  var INTERNAL = "internal plumbing between addons — never operator-facing";
79047
80008
  /** Every system-scoped cap, with why it is not a device's vocabulary. */
79048
80009
  var SYSTEM_CAP_VOCABULARY = {
80010
+ "action-source": system(INTERNAL),
80011
+ actions: system("declared actions — run from the Actions page and from the cameras that link them"),
79049
80012
  "addon-pages": system(UI_PLUMBING),
79050
80013
  "addon-pages-source": system(UI_PLUMBING),
79051
80014
  "addon-routes": system(UI_PLUMBING),
@@ -79267,6 +80230,31 @@ Object.freeze({
79267
80230
  form: "single",
79268
80231
  optional: false
79269
80232
  }],
80233
+ "actions.get": [{
80234
+ name: "deviceId",
80235
+ form: "single",
80236
+ optional: true
80237
+ }],
80238
+ "actions.getLinks": [{
80239
+ name: "deviceId",
80240
+ form: "single",
80241
+ optional: false
80242
+ }],
80243
+ "actions.listForCamera": [{
80244
+ name: "deviceId",
80245
+ form: "single",
80246
+ optional: false
80247
+ }],
80248
+ "actions.run": [{
80249
+ name: "deviceId",
80250
+ form: "single",
80251
+ optional: true
80252
+ }],
80253
+ "actions.setLinks": [{
80254
+ name: "deviceId",
80255
+ form: "single",
80256
+ optional: false
80257
+ }],
79270
80258
  "addonSettings.getDeviceSettings": [{
79271
80259
  name: "deviceId",
79272
80260
  form: "single",
@@ -80218,6 +81206,11 @@ Object.freeze({
80218
81206
  form: "single",
80219
81207
  optional: false
80220
81208
  }],
81209
+ "groupActive.getStatus": [{
81210
+ name: "deviceId",
81211
+ form: "single",
81212
+ optional: false
81213
+ }],
80221
81214
  "groupCommands.getStatus": [{
80222
81215
  name: "deviceId",
80223
81216
  form: "single",
@@ -80428,6 +81421,11 @@ Object.freeze({
80428
81421
  form: "single",
80429
81422
  optional: false
80430
81423
  }],
81424
+ "meter.getStatus": [{
81425
+ name: "deviceId",
81426
+ form: "single",
81427
+ optional: false
81428
+ }],
80431
81429
  "motion.getStatus": [{
80432
81430
  name: "deviceId",
80433
81431
  form: "single",
@@ -82035,7 +83033,6 @@ Object.freeze({
82035
83033
  "network-access": "ingress",
82036
83034
  "smtp-provider": "email"
82037
83035
  });
82038
- DeviceType.Camera;
82039
83036
  /**
82040
83037
  * A saved Customize assignment (D936). The schema is the type: callers use
82041
83038
  * `z.infer`, they do not restate the shape.
@@ -83339,12 +84336,13 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
83339
84336
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
83340
84337
  DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
83341
84338
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
84339
+ String.raw`(?<=^|["'(\s>,\[{])`;
83342
84340
  var MB = 1024 * 1024;
83343
84341
  1024 * MB, 3072 * MB;
83344
84342
  //#endregion
83345
84343
  //#region src/custom-actions.ts
83346
84344
  /**
83347
- * Google Home export — customActions catalog.
84345
+ * Google Home Export — customActions catalog.
83348
84346
  *
83349
84347
  * One entry. The settings form's `addon-action-button` dispatches through the
83350
84348
  * generic `api.addons.custom.mutate({ addonId, action, input })` channel and
@@ -83489,7 +84487,7 @@ var TRAIT_CATALOG = [
83489
84487
  attributes: () => ({}),
83490
84488
  projectState: (rawStatus) => {
83491
84489
  const parsed = BrightnessStatusSchema.safeParse(rawStatus);
83492
- return parsed.success ? { brightness: Math.round(parsed.data.percentage) } : null;
84490
+ return parsed.success ? { brightness: Math.round(parsed.data.level) } : null;
83493
84491
  },
83494
84492
  commands: ["action.devices.commands.BrightnessAbsolute"],
83495
84493
  resolveCommand: ({ deviceId, command, params }) => {
@@ -84423,7 +85421,7 @@ var DEFAULT_SETTINGS = {
84423
85421
  //#endregion
84424
85422
  //#region src/export-google.addon.ts
84425
85423
  /**
84426
- * Google Home export addon — hub-side.
85424
+ * Google Home Export addon — hub-side.
84427
85425
  *
84428
85426
  * Architecture:
84429
85427
  *