@camstack/addon-export-alexa 1.2.193 → 1.2.194

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.
@@ -808,7 +808,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
808
808
  return EventCategory;
809
809
  }({});
810
810
  //#endregion
811
- //#region ../types/dist/composed-stable-id-jnvhwGoH.mjs
811
+ //#region ../types/dist/composed-stable-id-CPp3votu.mjs
812
812
  /**
813
813
  import { errMsg } from '@camstack/types'
814
814
  * Extract a human-readable message from an unknown error value.
@@ -821,17 +821,18 @@ function errMsg$1(err) {
821
821
  }
822
822
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
823
823
  DeviceType["Camera"] = "camera";
824
+ /** Legacy stored value, read only by the hub-to-integration migrations; no live device carries it. */
824
825
  DeviceType["Hub"] = "hub";
825
826
  DeviceType["Light"] = "light";
826
827
  DeviceType["Siren"] = "siren";
827
828
  DeviceType["Switch"] = "switch";
828
829
  DeviceType["Sensor"] = "sensor";
829
- DeviceType["Thermostat"] = "thermostat";
830
- /** Air-conditioner / heat-pump climate device (HVAC) — shares the
831
- * `climate-control` cap surface with `Thermostat` but renders a
832
- * dedicated AC-appropriate control UI (mode chips, fan speed,
833
- * independent vertical/horizontal swing). Sources: native Gree, and
834
- * reusable by other AC integrations. */
830
+ /** Every climate device: an air conditioner, a room thermostat, a radiator
831
+ * valve, a floor-heating zone, a heat-pump circuit. They share one set of
832
+ * controls (`climate-control`), so they are one type; WHICH kind of climate
833
+ * device it is is its {@link DeviceRole} (`climate-*`), which the UI and the
834
+ * exports branch on. The retired `thermostat` type is read as this one
835
+ * (`canonicalStoredDeviceType`). */
835
836
  DeviceType["Climate"] = "climate";
836
837
  DeviceType["Button"] = "button";
837
838
  /** Generic stateless event emitter — carries a device's EXACT declared
@@ -922,10 +923,6 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
922
923
  /** Washing machine. A plug-built one is running while its power stays
923
924
  * above a threshold. No program cap — that surface is the dishwasher's. */
924
925
  DeviceType["Washer"] = "washer";
925
- /** A dumb plug-in stove or heater: a switch (and, with a meter, a power
926
- * reading) that only runs while the plug is on. Built from a smart plug;
927
- * the `timed-run` cap switches it off again after a chosen time. */
928
- DeviceType["Heater"] = "heater";
929
926
  /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
930
927
  DeviceType["Dryer"] = "dryer";
931
928
  /** The physical bridge box of a vendor ecosystem (Velux KLF-200, and later
@@ -1145,6 +1142,27 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1145
1142
  /** A smart plug: a `switch` whose source says it is an outlet (HA
1146
1143
  * `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
1147
1144
  DeviceRole["Outlet"] = "outlet";
1145
+ /** A dumb plug-in stove or heater behind a switch: it runs only while the
1146
+ * switch is on. Offered `timed-run`, which switches it off again after a
1147
+ * chosen time. */
1148
+ DeviceRole["SwitchHeater"] = "switch-heater";
1149
+ /** A plain fan behind a switch (a smart plug powering it): drawn as a fan,
1150
+ * with the switch's on/off only. Speed or oscillation appear only when the
1151
+ * device also has a fan cap (D1033). */
1152
+ DeviceRole["SwitchFan"] = "switch-fan";
1153
+ /** Air conditioner / split unit: cooling, fan speed, louvres. */
1154
+ DeviceRole["ClimateAc"] = "climate-ac";
1155
+ /** Room thermostat: a setpoint and a room temperature. The default. */
1156
+ DeviceRole["ClimateThermostat"] = "climate-thermostat";
1157
+ /** Floor-heating zone actuator. */
1158
+ DeviceRole["ClimateFloor"] = "climate-floor";
1159
+ /** Radiator valve (thermostatic radiator head). */
1160
+ DeviceRole["ClimateRadiator"] = "climate-radiator";
1161
+ /** A heater with its own thermostat (stove, convector). */
1162
+ DeviceRole["ClimateHeater"] = "climate-heater";
1163
+ /** One heating/cooling circuit of a heat pump: a water loop with comfort /
1164
+ * eco setpoints and a heat/cool mode, no room sensor. */
1165
+ DeviceRole["ClimateHeatPumpCircuit"] = "climate-heat-pump-circuit";
1148
1166
  /** Generic motion / occupancy / moving event source. Distinct from
1149
1167
  * the camera accessory PirSensor role: that one is a camera child;
1150
1168
  * this is a standalone HA / 3rd-party motion sensor. */
@@ -6032,7 +6050,7 @@ var ZodIssueCode = {
6032
6050
  var ZodFirstPartyTypeKind;
6033
6051
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6034
6052
  //#endregion
6035
- //#region ../types/dist/sleep-Cw1uUXvl.mjs
6053
+ //#region ../types/dist/sleep-Bn346wCJ.mjs
6036
6054
  /**
6037
6055
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6038
6056
  * window to float samples (D455).
@@ -11721,6 +11739,50 @@ var ACTUATOR_CAP_VOCABULARY = {
11721
11739
  value: false
11722
11740
  },
11723
11741
  args: { oscillating: false }
11742
+ },
11743
+ {
11744
+ id: "fan.horizontalOscillateOn",
11745
+ method: "setOscillationAxis",
11746
+ label: t("Horizontal oscillation on", "Oscillazione orizzontale attiva"),
11747
+ phrase: t("Start the horizontal oscillation of {device}", "Attiva l’oscillazione orizzontale di {device}"),
11748
+ icon: "move-horizontal",
11749
+ args: {
11750
+ axis: "horizontal",
11751
+ oscillating: true
11752
+ }
11753
+ },
11754
+ {
11755
+ id: "fan.horizontalOscillateOff",
11756
+ method: "setOscillationAxis",
11757
+ label: t("Horizontal oscillation off", "Oscillazione orizzontale spenta"),
11758
+ phrase: t("Stop the horizontal oscillation of {device}", "Ferma l’oscillazione orizzontale di {device}"),
11759
+ icon: "move-horizontal",
11760
+ args: {
11761
+ axis: "horizontal",
11762
+ oscillating: false
11763
+ }
11764
+ },
11765
+ {
11766
+ id: "fan.verticalOscillateOn",
11767
+ method: "setOscillationAxis",
11768
+ label: t("Vertical oscillation on", "Oscillazione verticale attiva"),
11769
+ phrase: t("Start the vertical oscillation of {device}", "Attiva l’oscillazione verticale di {device}"),
11770
+ icon: "move-vertical",
11771
+ args: {
11772
+ axis: "vertical",
11773
+ oscillating: true
11774
+ }
11775
+ },
11776
+ {
11777
+ id: "fan.verticalOscillateOff",
11778
+ method: "setOscillationAxis",
11779
+ label: t("Vertical oscillation off", "Oscillazione verticale spenta"),
11780
+ phrase: t("Stop the vertical oscillation of {device}", "Ferma l’oscillazione verticale di {device}"),
11781
+ icon: "move-vertical",
11782
+ args: {
11783
+ axis: "vertical",
11784
+ oscillating: false
11785
+ }
11724
11786
  }
11725
11787
  ],
11726
11788
  state: [{
@@ -13810,10 +13872,6 @@ var CAMERA_CAP_VOCABULARY = {
13810
13872
  scope: "device",
13811
13873
  noun: t("Admin link", "Link di amministrazione")
13812
13874
  },
13813
- "device-discovery": {
13814
- scope: "device",
13815
- noun: t("Discovery", "Rilevamento dispositivi")
13816
- },
13817
13875
  "device-extension": {
13818
13876
  scope: "device",
13819
13877
  noun: t("Device extension", "Estensione del dispositivo")
@@ -15293,7 +15351,6 @@ var CAP_NAMES = Object.freeze([
15293
15351
  "device-admin-link",
15294
15352
  "device-adoption",
15295
15353
  "device-credentials",
15296
- "device-discovery",
15297
15354
  "device-export",
15298
15355
  "device-extension",
15299
15356
  "device-history",
@@ -15915,13 +15972,6 @@ Object.freeze({
15915
15972
  "valueType": "string"
15916
15973
  }
15917
15974
  ],
15918
- "device-discovery": [{
15919
- "path": "lastDiscoveryAt",
15920
- "valueType": "number"
15921
- }, {
15922
- "path": "lastError",
15923
- "valueType": "string"
15924
- }],
15925
15975
  "device-export": [
15926
15976
  {
15927
15977
  "path": "linkState",
@@ -17373,7 +17423,7 @@ Object.freeze({
17373
17423
  }
17374
17424
  });
17375
17425
  //#endregion
17376
- //#region ../types/dist/implemented-methods-OitwyO1Y.mjs
17426
+ //#region ../types/dist/implemented-methods-5YMDeE3f.mjs
17377
17427
  /**
17378
17428
  * The ffmpeg build every CamStack node downloads, per platform and arch.
17379
17429
  *
@@ -44106,6 +44156,13 @@ var AutomationConditionOperatorSchema = _enum([
44106
44156
  "in"
44107
44157
  ]);
44108
44158
  /**
44159
+ * The stable name of an event leaf. A path (`when.0.1`) moves when a row is
44160
+ * reordered; the id does not, so a `triggered-by` leaf keeps pointing at the
44161
+ * same row. Optional: a leaf nothing refers to needs none.
44162
+ */
44163
+ var EVENT_LEAF_ID_RE = /^[A-Za-z0-9_-]{1,40}$/;
44164
+ var eventLeafId = { id: string().regex(EVENT_LEAF_ID_RE).optional() };
44165
+ /**
44109
44166
  * D8 compliance, and it is the reason a "becomes" leaf is not merely an event
44110
44167
  * subscription: it evaluates against the **state mirror**, which is reconciled,
44111
44168
  * and an event only WAKES the evaluation. A dropped event therefore DELAYS a
@@ -44113,6 +44170,7 @@ var AutomationConditionOperatorSchema = _enum([
44113
44170
  */
44114
44171
  var DeviceBecomesLeafSchema = object({
44115
44172
  kind: literal("device-becomes"),
44173
+ ...eventLeafId,
44116
44174
  deviceId: number$1().int().nonnegative(),
44117
44175
  cap: string().min(1),
44118
44176
  fieldPath: string().min(1),
@@ -44165,6 +44223,7 @@ var DeviceBecomesLeafSchema = object({
44165
44223
  });
44166
44224
  var DeviceEventLeafSchema = object({
44167
44225
  kind: literal("device-event"),
44226
+ ...eventLeafId,
44168
44227
  /** An `EventCategory` value. */
44169
44228
  category: string().min(1),
44170
44229
  deviceId: number$1().int().nonnegative().optional()
@@ -44177,18 +44236,24 @@ var DeviceEventLeafSchema = object({
44177
44236
  */
44178
44237
  var ScheduleLeafSchema = object({
44179
44238
  kind: literal("schedule"),
44239
+ ...eventLeafId,
44180
44240
  at: TimeSpecSchema.optional(),
44181
44241
  days: array(WeekdayKeySchema).min(1).max(7).optional(),
44182
44242
  /** @deprecated legacy cron — new schedules use `at`. */
44183
44243
  cron: string().min(1).max(120).optional()
44184
44244
  }).refine((leaf) => leaf.at === void 0 !== (leaf.cron === void 0), { message: "a schedule names exactly one of `at` (a time spec) and `cron` (legacy)" }).refine((leaf) => leaf.days === void 0 || leaf.at !== void 0, { message: "`days` goes with `at`; a cron expression carries its own days" });
44185
- var ManualLeafSchema = object({ kind: literal("manual") });
44245
+ var ManualLeafSchema = object({
44246
+ kind: literal("manual"),
44247
+ ...eventLeafId
44248
+ });
44186
44249
  var IntervalLeafSchema = object({
44187
44250
  kind: literal("interval"),
44251
+ ...eventLeafId,
44188
44252
  minutes: number$1().int().min(1).max(1440)
44189
44253
  });
44190
44254
  var DetectionLeafSchema = object({
44191
44255
  kind: literal("detection"),
44256
+ ...eventLeafId,
44192
44257
  /** One macro class each, optionally narrowed by a label; a track of any listed subject fires. */
44193
44258
  subjects: array(DetectionSubjectSchema).min(1),
44194
44259
  deviceIds: array(number$1().int().nonnegative()).min(1),
@@ -44199,6 +44264,7 @@ var DetectionLeafSchema = object({
44199
44264
  });
44200
44265
  var StationaryLeafSchema = object({
44201
44266
  kind: literal("stationary"),
44267
+ ...eventLeafId,
44202
44268
  deviceIds: array(number$1().int().nonnegative()).min(1),
44203
44269
  subjects: array(StationarySubjectSchema).min(1).optional(),
44204
44270
  zones: array(string().min(1)).min(1).optional(),
@@ -44244,6 +44310,41 @@ var StationaryPresentLeafSchema = object({
44244
44310
  minCount: number$1().int().positive().optional()
44245
44311
  });
44246
44312
  /**
44313
+ * True while the site-local clock is inside a daily window and/or on one of
44314
+ * the named days. `days` names the local day a window STARTS on, so
44315
+ * 22:00-06:00 on weekdays is still inside at 01:00 Saturday. A one-date spec
44316
+ * (`kind: 'date'`) is refused: only a clock time or a sun event makes a window
44317
+ * that repeats every day.
44318
+ */
44319
+ var TimeIsLeafSchema = object({
44320
+ kind: literal("time-is"),
44321
+ between: object({
44322
+ from: TimeSpecSchema,
44323
+ to: TimeSpecSchema
44324
+ }).optional(),
44325
+ days: array(WeekdayKeySchema).min(1).max(7).optional()
44326
+ }).superRefine((leaf, ctx) => {
44327
+ if (leaf.between === void 0 && leaf.days === void 0) ctx.addIssue({
44328
+ code: "custom",
44329
+ message: "a time-is leaf needs a between window, days, or both"
44330
+ });
44331
+ for (const end of ["from", "to"]) if (leaf.between?.[end].kind === "date") ctx.addIssue({
44332
+ code: "custom",
44333
+ message: "a one-date time cannot bound a daily window: use a clock time or a sun event",
44334
+ path: ["between", end]
44335
+ });
44336
+ });
44337
+ /**
44338
+ * True for the run that one of the named event leaves started. It reads the
44339
+ * run, not a device: in the tree it is judged against the leaf that fired, in
44340
+ * a step guard against the trigger the run carries. A run no event leaf
44341
+ * started (a state-only tree becoming true) is false.
44342
+ */
44343
+ var TriggeredByLeafSchema = object({
44344
+ kind: literal("triggered-by"),
44345
+ leafIds: array(string().regex(EVENT_LEAF_ID_RE)).min(1).max(20)
44346
+ });
44347
+ /**
44247
44348
  * The escape hatch: the bounded expression engine over named device bindings.
44248
44349
  * Declared as a plain object so a discriminated union can read `kind`; the
44249
44350
  * author-time validation is the SAME function `ExpressionSourceSchema` runs.
@@ -44289,7 +44390,9 @@ var AutomationWhenSchema = lazy(() => discriminatedUnion("kind", [
44289
44390
  StationaryLeafSchema,
44290
44391
  DeviceIsLeafSchema,
44291
44392
  StationaryPresentLeafSchema,
44292
- ExpressionLeafSchema
44393
+ ExpressionLeafSchema,
44394
+ TimeIsLeafSchema,
44395
+ TriggeredByLeafSchema
44293
44396
  ]));
44294
44397
  var EVENT_KINDS = new Set([
44295
44398
  "device-becomes",
@@ -44343,6 +44446,28 @@ function hasEventLeaves(node) {
44343
44446
  });
44344
44447
  return found;
44345
44448
  }
44449
+ /** The event leaves of the tree that carry an id, in tree order. */
44450
+ function identifiedEventLeaves(when) {
44451
+ const found = [];
44452
+ forEachLeaf(when, (leaf, path) => {
44453
+ if (isEventLeaf(leaf) && leaf.id !== void 0) found.push({
44454
+ id: leaf.id,
44455
+ path,
44456
+ leaf
44457
+ });
44458
+ });
44459
+ return found;
44460
+ }
44461
+ /** Does the tree hold a `triggered-by` leaf? */
44462
+ function hasTriggeredByLeaves(when) {
44463
+ let found = false;
44464
+ forEachLeaf(when, (leaf) => {
44465
+ if (leaf.kind === "triggered-by") found = true;
44466
+ });
44467
+ return found;
44468
+ }
44469
+ /** Why a `triggered-by` leaf is refused outside an automation: there is no trigger row to name. */
44470
+ var TRIGGERED_BY_NEEDS_AUTOMATION = "\"triggered by\" reads which trigger started an automation — an action or a scheduler has no trigger rows, so it could never be true here";
44346
44471
  function hasEmptyContainer(node) {
44347
44472
  if (isLeaf(node)) return false;
44348
44473
  if (node.kind === "not") return hasEmptyContainer(node.child);
@@ -44401,6 +44526,11 @@ function validateWhenTree(when) {
44401
44526
  if (depth > 4) return `the rules nest ${depth} levels deep — the limit is 4. "not (any of …)" is the same as "all of (not …)", which is one level shallower`;
44402
44527
  const leaves = countWhenLeaves(when);
44403
44528
  if (leaves > 32) return `the rules use ${leaves} rows — the limit is 32`;
44529
+ const seen = /* @__PURE__ */ new Set();
44530
+ for (const entry of identifiedEventLeaves(when)) {
44531
+ if (seen.has(entry.id)) return `two trigger rows share the id "${entry.id}" — an id names one row`;
44532
+ seen.add(entry.id);
44533
+ }
44404
44534
  const need = eventNeed(when, "when", false);
44405
44535
  if ("error" in need) return need.error;
44406
44536
  const [first, second] = need.paths;
@@ -44691,7 +44821,18 @@ var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).re
44691
44821
  message: "a domain target needs the vocabulary action it applies to (actionId)",
44692
44822
  path: ["actionId"]
44693
44823
  }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44694
- var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
44824
+ /**
44825
+ * A step of a STANDALONE list (an action, a scheduler point, a preset): the
44826
+ * same two step kinds an automation runs, minus a guard that reads the
44827
+ * automation's trigger, which such a list does not have.
44828
+ */
44829
+ var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]).superRefine((step, ctx) => {
44830
+ if (step.if !== void 0 && hasTriggeredByLeaves(step.if)) ctx.addIssue({
44831
+ code: "custom",
44832
+ message: TRIGGERED_BY_NEEDS_AUTOMATION,
44833
+ path: ["if"]
44834
+ });
44835
+ });
44695
44836
  var AutomationActionSchema = discriminatedUnion("kind", [
44696
44837
  GuardedWaitStepSchema,
44697
44838
  GuardedCapStepSchema,
@@ -44788,6 +44929,11 @@ var STATIONARY_DESCRIPTIONS = {
44788
44929
  phase: "appeared or departed",
44789
44930
  entryId: "the stopped object"
44790
44931
  };
44932
+ var BECOMES_DESCRIPTIONS = {
44933
+ deviceId: "the device that changed",
44934
+ from: "the value before the change, empty when it is not known",
44935
+ to: "the value it changed to"
44936
+ };
44791
44937
  function describe$1(descriptions) {
44792
44938
  return Object.entries(descriptions).map(([name, description]) => ({
44793
44939
  name,
@@ -44796,6 +44942,10 @@ function describe$1(descriptions) {
44796
44942
  }
44797
44943
  describe$1(DETECTION_DESCRIPTIONS);
44798
44944
  describe$1(STATIONARY_DESCRIPTIONS);
44945
+ describe$1(BECOMES_DESCRIPTIONS).map((v) => v.name === "deviceId" ? {
44946
+ ...v,
44947
+ hintKey: "becomesDeviceId"
44948
+ } : v);
44799
44949
  new Set(Object.values(COCO_TO_MACRO.mapping));
44800
44950
  /**
44801
44951
  * Schedulers (D983) — an entity that performs actions over the day.
@@ -44820,6 +44970,13 @@ var SchedulerStateTreeSchema = AutomationWhenSchema.superRefine((when, ctx) => {
44820
44970
  });
44821
44971
  return;
44822
44972
  }
44973
+ if (hasTriggeredByLeaves(when)) {
44974
+ ctx.addIssue({
44975
+ code: "custom",
44976
+ message: TRIGGERED_BY_NEEDS_AUTOMATION
44977
+ });
44978
+ return;
44979
+ }
44823
44980
  const problem = validateWhenTree(when);
44824
44981
  if (problem !== null) ctx.addIssue({
44825
44982
  code: "custom",
@@ -45040,6 +45197,8 @@ var AutomationConditionTraceNodeSchema = object({
45040
45197
  "device-is",
45041
45198
  "expression",
45042
45199
  "stationary-present",
45200
+ "time-is",
45201
+ "triggered-by",
45043
45202
  "device-becomes",
45044
45203
  "device-event",
45045
45204
  "schedule",
@@ -45456,7 +45615,7 @@ object({
45456
45615
  * is irrelevant; the array is treated as a set by consumers. */
45457
45616
  hiddenChildIds: array(number$1()).readonly()
45458
45617
  });
45459
- DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
45618
+ DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Climate, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
45460
45619
  deviceId: number$1().int().nonnegative(),
45461
45620
  childDeviceId: number$1().int().nonnegative(),
45462
45621
  hidden: boolean()
@@ -47567,7 +47726,7 @@ var BatteryStatusSchema = object({
47567
47726
  */
47568
47727
  binary: boolean().optional().meta({ label: "Binary indicator" })
47569
47728
  });
47570
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
47729
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter;
47571
47730
  method(object({
47572
47731
  deviceId: number$1(),
47573
47732
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -48990,7 +49149,7 @@ var ClimateControlStatusSchema = object({
48990
49149
  /** Ms epoch when the slice was last updated (push or command). */
48991
49150
  lastFetchedAt: number$1()
48992
49151
  });
48993
- DeviceType.Thermostat, DeviceType.Climate, method(object({
49152
+ DeviceType.Climate, method(object({
48994
49153
  deviceId: number$1().int().nonnegative(),
48995
49154
  mode: HvacModeSchema
48996
49155
  }), _void(), {
@@ -49281,6 +49440,7 @@ var CompositionProblemSchema = object({
49281
49440
  "nested-field",
49282
49441
  "missing-field",
49283
49442
  "kind-mismatch",
49443
+ "source-kind-mismatch",
49284
49444
  "may-be-null",
49285
49445
  "source-missing",
49286
49446
  "source-unreadable",
@@ -49302,7 +49462,8 @@ var CompositionProblemSchema = object({
49302
49462
  "command-method-unknown",
49303
49463
  "command-source-unknown",
49304
49464
  "command-input-unknown",
49305
- "command-input-missing"
49465
+ "command-input-missing",
49466
+ "power-source-is-actuator"
49306
49467
  ]),
49307
49468
  path: string(),
49308
49469
  message: string()
@@ -50125,7 +50286,7 @@ DeviceType.MediaPlayer, optionalMethod(deviceOnly, _void(), {
50125
50286
  kind: "mutation",
50126
50287
  auth: "protected"
50127
50288
  });
50128
- 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.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, 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.Heater, 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.Heater, 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.Heater, 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.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
50289
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, 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.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.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.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer;
50129
50290
  var NUMBER = {
50130
50291
  kind: "fixed",
50131
50292
  result: ["number"]
@@ -50208,7 +50369,7 @@ function numeric(input) {
50208
50369
  }, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
50209
50370
  };
50210
50371
  }
50211
- var CLIMATE_DEVICES = [DeviceType.Thermostat, DeviceType.Climate];
50372
+ var CLIMATE_DEVICES = [DeviceType.Climate];
50212
50373
  function binary(input) {
50213
50374
  return {
50214
50375
  ...input,
@@ -50530,8 +50691,8 @@ var GROUP_TEMPLATES = [
50530
50691
  actuator({
50531
50692
  id: "climate",
50532
50693
  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.",
50533
- deviceType: DeviceType.Thermostat,
50534
- memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
50694
+ deviceType: DeviceType.Climate,
50695
+ memberDeviceTypes: [DeviceType.Climate],
50535
50696
  outputCap: "group-active",
50536
50697
  outputField: "active",
50537
50698
  member: {
@@ -50574,6 +50735,50 @@ function actuator(input) {
50574
50735
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
50575
50736
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
50576
50737
  DeviceType.Camera;
50738
+ var PowerSourceRefusalReasonSchema = _enum([
50739
+ "no-power-source",
50740
+ "switch-missing",
50741
+ "switch-offline",
50742
+ "switch-unknown",
50743
+ "restart-in-progress",
50744
+ "switch-call-failed",
50745
+ "switch-is-actuator"
50746
+ ]);
50747
+ var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
50748
+ accepted: literal(false),
50749
+ reason: PowerSourceRefusalReasonSchema,
50750
+ /** One line for the operator, naming the switch. */
50751
+ message: string()
50752
+ })]);
50753
+ var PowerSourceInfoSchema = object({
50754
+ /** False when the device has no power source linked; the rest is then empty. */
50755
+ linked: boolean(),
50756
+ switchDeviceId: number$1().nullable(),
50757
+ switchName: string().nullable(),
50758
+ /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
50759
+ switchOn: boolean().nullable(),
50760
+ switchOnline: boolean().nullable(),
50761
+ restartInProgress: boolean(),
50762
+ offSeconds: number$1().int()
50763
+ });
50764
+ object({
50765
+ /** Null while the switch has not reported: unknown is never `false` (D393). */
50766
+ switchOn: boolean().nullable(),
50767
+ offSeconds: number$1().int(),
50768
+ lastFetchedAt: number$1()
50769
+ });
50770
+ DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
50771
+ var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
50772
+ systemMethod(deviceInput$2, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
50773
+ kind: "mutation",
50774
+ auth: "protected"
50775
+ }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
50776
+ kind: "mutation",
50777
+ auth: "protected"
50778
+ }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
50779
+ kind: "mutation",
50780
+ auth: "protected"
50781
+ });
50577
50782
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
50578
50783
  /**
50579
50784
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -51518,27 +51723,35 @@ var DeviceAdminLinkSchema = object({
51518
51723
  });
51519
51724
  method(object({ deviceId: number$1().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
51520
51725
  /**
51521
- * device-discovery — device-scoped capability for parents that host /
51522
- * enumerate child devices (Reolink Hub / NVR, ONVIF gateway, future
51523
- * integrations). The parent advertises a list of discoverable children,
51524
- * and the operator promotes a subset to real devices via `adoptDevice`.
51525
- * Child lifecycle (kernel device create/remove, parent reference) is
51526
- * owned by the framework so a single shared `<DiscoveryPanel />` can
51527
- * drive any integration.
51528
- *
51529
- * Boundaries:
51530
- * - The cap exposes ENUMERATION + ADOPT/RELEASE only. The protocol
51531
- * used to discover children (CGI poll, mDNS, push from hub, ...)
51532
- * is the integration's business; results land in `runtimeState`
51533
- * so the panel can render without a fresh round-trip.
51534
- * - `childNativeId` is integration-defined and must be stable across
51535
- * reboots so re-discovery doesn't duplicate adopted children.
51536
- * - `adoptDevice` returns the new `deviceId` so the UI can navigate
51537
- * directly to the freshly-created child's settings page.
51538
- */
51539
- /**
51540
- * Status enum for a discovered device. Mirrors the Reolink simpleEvent
51541
- * lifecycle (`online` / `sleeping` / `offline`) — generic enough for
51726
+ * `device-adoption` — generic discovery + adoption surface,
51727
+ * system-scoped collection (one provider per integration addon), routed
51728
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
51729
+ * pin model as `connection-test`. The admin UI keeps using
51730
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
51731
+ * successor to `ha-discovery`:
51732
+ * keyed by `integrationId` (the addon resolves integrationId → broker
51733
+ * internally) rather than a connection-specific `brokerId`, and it
51734
+ * OWNS the shared `DiscoveredChildDevice` candidate type
51735
+ * (declared below) so a single shared adoption modal renders any integration's
51736
+ * candidate tree.
51737
+ *
51738
+ * UI flow (Integrations page → integration detail):
51739
+ * 1. `listCandidates({integrationId, page, pageSize, filter})` →
51740
+ * paginated candidate list, each row collapsed.
51741
+ * 2. User expands a row → `getCandidate({integrationId,
51742
+ * childNativeId})` returns the single candidate (with its nested
51743
+ * `children`) for the accordion render.
51744
+ * 3. User clicks "Adopt" on one or more candidates →
51745
+ * `adopt({integrationId, childNativeIds, perCandidate?})`
51746
+ * materialises one parent CamStack device per candidate plus its
51747
+ * accessory children. `perCandidate[childNativeId]` carries an
51748
+ * optional display-name override + a `hiddenChildIds` pre-hide set
51749
+ * (the parent's `accessories.hiddenChildIds` gates UI visibility).
51750
+ * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
51751
+ * removes the parent + every child from the kernel registry.
51752
+ */
51753
+ /**
51754
+ * Status enum for a discovered device. Generic enough for
51542
51755
  * battery cams, awake cams, and unreachable cams alike.
51543
51756
  */
51544
51757
  var DiscoveredChildStatusSchema = _enum([
@@ -51555,12 +51768,12 @@ var DiscoveredChildDeviceSchema = lazy(() => object({
51555
51768
  /** DeviceType the child should be created with on adopt. */
51556
51769
  type: _enum(DeviceType),
51557
51770
  status: DiscoveredChildStatusSchema,
51558
- /** Free-form integration-specific metadata surfaced in the panel. */
51771
+ /** Free-form integration-specific metadata surfaced in the adoption modal. */
51559
51772
  metadata: object({
51560
51773
  model: string().optional(),
51561
51774
  serialNumber: string().optional(),
51562
51775
  uid: string().optional(),
51563
- /** Reolink: 0-based channel index inside the parent NVR/Hub. */
51776
+ /** Reolink: 0-based channel index inside the parent NVR. */
51564
51777
  rtspChannel: number$1().int().nonnegative().optional(),
51565
51778
  isBattery: boolean().optional(),
51566
51779
  isDoorbell: boolean().optional(),
@@ -51576,86 +51789,24 @@ var DiscoveredChildDeviceSchema = lazy(() => object({
51576
51789
  }).default({}),
51577
51790
  /**
51578
51791
  * `true` when the framework already created a child device for this
51579
- * `childNativeId` under the current parent. The panel uses it to
51792
+ * `childNativeId` under the current parent. The adoption modal uses it to
51580
51793
  * gate the Add/Remove button and surface the existing `deviceId`.
51581
51794
  */
51582
51795
  alreadyAdopted: boolean(),
51583
51796
  /** When `alreadyAdopted=true`, the framework-assigned child device id. */
51584
51797
  adoptedDeviceId: number$1().int().nonnegative().nullable(),
51585
- /** Capability names the candidate advertises — integrations populate, Hubs omit. */
51798
+ /** Capability names the candidate advertises — integrations populate, flat enumerations omit. */
51586
51799
  capabilities: array(string()).readonly().optional(),
51587
- /** Feature flags the candidate advertises — integrations populate, Hubs omit. */
51800
+ /** Feature flags the candidate advertises — integrations populate, flat enumerations omit. */
51588
51801
  features: array(string()).readonly().optional(),
51589
51802
  /** Upstream-system identity + rendering hints for the candidate. */
51590
51803
  sourceInfo: SourceInfoSchema.optional(),
51591
- /** Nested entity-children for accordion preview — integrations populate, Hubs omit. */
51804
+ /** Nested entity-children for accordion preview — integrations populate, flat enumerations omit. */
51592
51805
  children: array(DiscoveredChildDeviceSchema).readonly().optional(),
51593
51806
  /** `childNativeId` of the gateway candidate in the same list this device sits behind. */
51594
51807
  parentStableId: string().optional()
51595
51808
  }));
51596
51809
  /**
51597
- * Status block — populated by the integration after each
51598
- * `refreshDiscovery` (or push-driven update). The runtime-state slice
51599
- * is what the panel reads via the per-device proxy; `getStatus`
51600
- * returns the same payload via the codegen'd auto-injection.
51601
- */
51602
- var DeviceDiscoveryStatusSchema = object({
51603
- discovered: array(DiscoveredChildDeviceSchema),
51604
- /** Wall-clock ms of the last successful enumeration. */
51605
- lastDiscoveryAt: number$1().int().nonnegative().nullable(),
51606
- /** Last error surfaced from the source (rendered as a banner). */
51607
- lastError: string().nullable()
51608
- });
51609
- DeviceType.Hub, DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number$1().int().nonnegative() }), method(object({ deviceId: number$1().int().nonnegative() }), array(DiscoveredChildDeviceSchema).readonly()), method(object({ deviceId: number$1().int().nonnegative() }), array(DiscoveredChildDeviceSchema).readonly(), {
51610
- kind: "mutation",
51611
- auth: "admin"
51612
- }), method(object({
51613
- deviceId: number$1().int().nonnegative(),
51614
- childNativeId: string(),
51615
- /** Optional override for the child's display name. */
51616
- name: string().optional()
51617
- }), object({
51618
- deviceId: number$1().int().nonnegative(),
51619
- stableId: string()
51620
- }), {
51621
- kind: "mutation",
51622
- auth: "admin"
51623
- }), method(object({
51624
- deviceId: number$1().int().nonnegative(),
51625
- childDeviceId: number$1().int().nonnegative()
51626
- }), _void(), {
51627
- kind: "mutation",
51628
- auth: "admin"
51629
- });
51630
- /**
51631
- * `device-adoption` — generic discovery + adoption surface,
51632
- * system-scoped collection (one provider per integration addon), routed
51633
- * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
51634
- * pin model as `connection-test`. The admin UI keeps using
51635
- * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
51636
- * successor to `ha-discovery`:
51637
- * keyed by `integrationId` (the addon resolves integrationId → broker
51638
- * internally) rather than a connection-specific `brokerId`, and it
51639
- * REUSES the shared `DiscoveredChildDevice` candidate type from
51640
- * `device-discovery.cap.ts` so a single shared adoption panel renders
51641
- * any integration's candidate tree.
51642
- *
51643
- * UI flow (Integrations page → integration detail):
51644
- * 1. `listCandidates({integrationId, page, pageSize, filter})` →
51645
- * paginated candidate list, each row collapsed.
51646
- * 2. User expands a row → `getCandidate({integrationId,
51647
- * childNativeId})` returns the single candidate (with its nested
51648
- * `children`) for the accordion render.
51649
- * 3. User clicks "Adopt" on one or more candidates →
51650
- * `adopt({integrationId, childNativeIds, perCandidate?})`
51651
- * materialises one parent CamStack device per candidate plus its
51652
- * accessory children. `perCandidate[childNativeId]` carries an
51653
- * optional display-name override + a `hiddenChildIds` pre-hide set
51654
- * (the parent's `accessories.hiddenChildIds` gates UI visibility).
51655
- * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
51656
- * removes the parent + every child from the kernel registry.
51657
- */
51658
- /**
51659
51810
  * Provider-declared discovery *granularity* filter (the keystone of the
51660
51811
  * single-entity-import design). A provider advertises which discovery
51661
51812
  * granularities it supports via `listCandidateFilters`; the operator picks
@@ -53022,8 +53173,14 @@ method(object({
53022
53173
  "string",
53023
53174
  "number",
53024
53175
  "boolean",
53025
- "enum"
53176
+ "enum",
53177
+ "union"
53026
53178
  ]),
53179
+ unionMembers: array(_enum([
53180
+ "string",
53181
+ "number",
53182
+ "boolean"
53183
+ ])).optional(),
53027
53184
  enumValues: array(string()).optional(),
53028
53185
  item: boolean().optional(),
53029
53186
  quantity: ReadingQuantitySchema.optional()
@@ -55401,8 +55558,85 @@ method(_void(), array(FailureContributionSchema).readonly());
55401
55558
  * - `FanPreset` — preset selector
55402
55559
  * - `FanDirection` — direction toggle (ceiling fans)
55403
55560
  * - `FanOscillating` — oscillation toggle
55561
+ *
55562
+ * Per-axis oscillation (`oscillationAxes`, `setOscillationAxis`, D1034): an air
55563
+ * circulator sweeps horizontally and vertically, each axis with its own
55564
+ * switch, fixed angle, sweep bounds and limits. A provider may report them
55565
+ * natively; otherwise the OPERATOR links sibling devices to each field in
55566
+ * Customize (a `replace` over the fields listed in `overridable` — nothing is
55567
+ * linked or inferred by itself), and a write to a linked field is forwarded to
55568
+ * its source. `oscillating` stays the single summary flag: when axes exist it
55569
+ * means "any axis oscillates" (`anyAxisOscillating`).
55404
55570
  */
55405
55571
  var FanDirectionSchema = _enum(["forward", "reverse"]);
55572
+ var FAN_OSCILLATION_AXES = ["horizontal", "vertical"];
55573
+ var FanOscillationAxisNameSchema = _enum(FAN_OSCILLATION_AXES);
55574
+ var FanOscillationAxisFieldSchema = _enum([
55575
+ "oscillating",
55576
+ "angle",
55577
+ "sweepFrom",
55578
+ "sweepTo"
55579
+ ]);
55580
+ /** The limits of one axis, read from the source that serves its angle. */
55581
+ var FAN_OSCILLATION_AXIS_LIMITS = [
55582
+ "min",
55583
+ "max",
55584
+ "step"
55585
+ ];
55586
+ /**
55587
+ * One oscillation axis. Every reading the device has not reported is `null`,
55588
+ * never `0` (D393): `0°` is a real position. Each leaf defaults to `null`, so
55589
+ * a slice that names only the leaves it knows (a Customize link of one field)
55590
+ * is still a whole axis.
55591
+ */
55592
+ var FanOscillationAxisSchema = object({
55593
+ /** Whether the axis sweeps. */
55594
+ oscillating: boolean().nullable().default(null),
55595
+ /** The fixed position (degrees) the axis holds when it does not sweep. */
55596
+ angle: number$1().nullable().default(null),
55597
+ /** The sweep bounds (degrees): left → right, bottom → top. */
55598
+ sweepFrom: number$1().nullable().default(null),
55599
+ sweepTo: number$1().nullable().default(null),
55600
+ /** The angles the axis accepts. Null when the device states none. */
55601
+ min: number$1().nullable().default(null),
55602
+ max: number$1().nullable().default(null),
55603
+ step: number$1().nullable().default(null)
55604
+ });
55605
+ /** Both axes; an axis the device does not have is `null`. */
55606
+ var FanOscillationAxesSchema = object({
55607
+ horizontal: FanOscillationAxisSchema.nullable().default(null),
55608
+ vertical: FanOscillationAxisSchema.nullable().default(null)
55609
+ });
55610
+ var FanOscillationAxisRefusalSchema = _enum([
55611
+ "nothing-to-set",
55612
+ "axis-not-linked",
55613
+ "out-of-range",
55614
+ "source-gone",
55615
+ "source-unknown",
55616
+ "source-call-failed"
55617
+ ]);
55618
+ var FanOscillationAxisResultSchema = discriminatedUnion("status", [object({ status: literal("applied") }), object({
55619
+ status: literal("refused"),
55620
+ reason: FanOscillationAxisRefusalSchema,
55621
+ /** The field at fault, when one is. */
55622
+ field: FanOscillationAxisFieldSchema.optional(),
55623
+ /** One line for the operator, naming the axis, the field and the source. */
55624
+ detail: string(),
55625
+ /** Fields that DID land before the refusal (writes run in order, stop at the first failure). */
55626
+ applied: array(FanOscillationAxisFieldSchema)
55627
+ })]);
55628
+ var SetOscillationAxisInputSchema = object({
55629
+ deviceId: number$1().int().nonnegative(),
55630
+ axis: FanOscillationAxisNameSchema,
55631
+ oscillating: boolean().optional(),
55632
+ angle: number$1().optional(),
55633
+ sweepFrom: number$1().optional(),
55634
+ sweepTo: number$1().optional()
55635
+ });
55636
+ /** The state path of one axis field: `oscillationAxes.<axis>.<field>`. */
55637
+ function fanAxisPath(axis, field) {
55638
+ return `oscillationAxes.${axis}.${field}`;
55639
+ }
55406
55640
  var FanControlStatusSchema = object({
55407
55641
  /** Active speed as 0..100 inclusive. Null when the device has no
55408
55642
  * speed surface (single-speed fan). */
@@ -55421,9 +55655,91 @@ var FanControlStatusSchema = object({
55421
55655
  /** Oscillation toggle. Null when the device has no oscillation
55422
55656
  * surface. */
55423
55657
  oscillating: boolean().nullable(),
55658
+ /**
55659
+ * Per-axis oscillation (air circulators). Absent when the device has no
55660
+ * per-axis surface and nothing is linked in Customize.
55661
+ */
55662
+ oscillationAxes: FanOscillationAxesSchema.optional(),
55424
55663
  /** Ms epoch when the slice was last updated. */
55425
55664
  lastChangedAt: number$1()
55426
55665
  });
55666
+ var FAN_CUSTOMIZE_DEVICE_TYPES = [DeviceType.Fan];
55667
+ /** The Customize section the axis targets are listed under. */
55668
+ var AXES_SECTION = "oscillation-axes";
55669
+ function axisOscillatingTarget(axis) {
55670
+ return {
55671
+ id: `${axis}-oscillating`,
55672
+ cardinality: "scalar",
55673
+ vocabulary: {
55674
+ cap: "fan-control",
55675
+ stateField: "oscillating"
55676
+ },
55677
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
55678
+ apply: "replace",
55679
+ section: AXES_SECTION,
55680
+ path: fanAxisPath(axis, "oscillating"),
55681
+ sources: [{
55682
+ kind: "switch",
55683
+ transforms: [{ kind: "identity" }]
55684
+ }],
55685
+ sourceReport: { status: "assignment-status" }
55686
+ };
55687
+ }
55688
+ /**
55689
+ * A numeric axis field. The `angle` link also carries the axis limits, read
55690
+ * from the SAME linked control's own range (`min`/`max`/`step`), so the limits
55691
+ * are the source's, never guessed.
55692
+ */
55693
+ function axisNumericTarget(axis, field) {
55694
+ const base = {
55695
+ id: `${axis}-${field}`,
55696
+ cardinality: "scalar",
55697
+ vocabulary: { cap: "fan-control" },
55698
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
55699
+ apply: "replace",
55700
+ section: AXES_SECTION,
55701
+ path: fanAxisPath(axis, field),
55702
+ sources: [{
55703
+ kind: "numeric",
55704
+ transforms: [{ kind: "identity" }]
55705
+ }],
55706
+ sourceReport: { status: "assignment-status" }
55707
+ };
55708
+ if (field !== "angle") return base;
55709
+ return {
55710
+ ...base,
55711
+ companions: FAN_OSCILLATION_AXIS_LIMITS.map((limit) => ({
55712
+ kind: "source-field",
55713
+ path: fanAxisPath(axis, limit),
55714
+ field: limit
55715
+ }))
55716
+ };
55717
+ }
55718
+ var AXIS_TARGETS = FAN_OSCILLATION_AXES.flatMap((axis) => [
55719
+ axisOscillatingTarget(axis),
55720
+ axisNumericTarget(axis, "angle"),
55721
+ axisNumericTarget(axis, "sweepFrom"),
55722
+ axisNumericTarget(axis, "sweepTo")
55723
+ ]);
55724
+ /** A select (an enum control) the operator links to the fan's `preset`. */
55725
+ var PRESET_TARGET = {
55726
+ id: "preset",
55727
+ cardinality: "scalar",
55728
+ vocabulary: { cap: "fan-control" },
55729
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
55730
+ apply: "replace",
55731
+ path: "preset",
55732
+ sources: [{
55733
+ kind: "field",
55734
+ valueKinds: ["string"],
55735
+ transforms: [{ kind: "identity" }]
55736
+ }],
55737
+ sourceReport: { status: "assignment-status" }
55738
+ };
55739
+ [...AXIS_TARGETS, PRESET_TARGET].map((target) => ({
55740
+ path: target.path,
55741
+ by: target.id
55742
+ }));
55427
55743
  DeviceType.Fan, optionalMethod(object({
55428
55744
  deviceId: number$1().int().nonnegative(),
55429
55745
  speed: number$1().min(0).max(100)
@@ -55448,17 +55764,37 @@ DeviceType.Fan, optionalMethod(object({
55448
55764
  }), _void(), {
55449
55765
  kind: "mutation",
55450
55766
  auth: "protected"
55767
+ }), optionalMethod(SetOscillationAxisInputSchema, FanOscillationAxisResultSchema, {
55768
+ kind: "mutation",
55769
+ auth: "protected"
55770
+ });
55771
+ /** One axis as a preset wants it; an absent field is left as it is. */
55772
+ var FanPresetAxisSchema = object({
55773
+ oscillating: boolean().optional(),
55774
+ angle: number$1().optional(),
55775
+ sweepFrom: number$1().optional(),
55776
+ sweepTo: number$1().optional()
55777
+ });
55778
+ /** The fan-control state a preset sets; an absent field is left as it is. */
55779
+ var FanPresetStateSchema = object({
55780
+ speed: number$1().min(0).max(100).optional(),
55781
+ /** The fan's own preset mode (or the linked select's option). */
55782
+ preset: string().min(1).optional(),
55783
+ direction: FanDirectionSchema.optional(),
55784
+ oscillationAxes: object({
55785
+ horizontal: FanPresetAxisSchema.optional(),
55786
+ vertical: FanPresetAxisSchema.optional()
55787
+ }).optional()
55451
55788
  });
55452
55789
  var FanPresetSchema = object({
55453
55790
  /** Stable key; never reused after a delete within one device's list. */
55454
55791
  id: string().min(1).max(64),
55455
55792
  /** What the operator and a voice assistant call it. */
55456
55793
  name: string().trim().min(1).max(40),
55457
- steps: array(ActionStepSchema).min(1).max(20)
55794
+ state: FanPresetStateSchema
55458
55795
  });
55459
55796
  var FanPresetsRefusalSchema = _enum([
55460
- "not-sibling",
55461
- "bad-target",
55797
+ "empty-state",
55462
55798
  "duplicate-name",
55463
55799
  "duplicate-id",
55464
55800
  "too-many",
@@ -55470,72 +55806,55 @@ var FanPresetsSetResultSchema = discriminatedUnion("status", [object({
55470
55806
  }), object({
55471
55807
  status: literal("refused"),
55472
55808
  reason: FanPresetsRefusalSchema,
55473
- /** Names the preset and step at fault. */
55809
+ /** Names the preset at fault. */
55474
55810
  detail: string()
55475
55811
  })]);
55476
- var FanPresetStepResultSchema = object({
55477
- index: number$1().int().nonnegative(),
55812
+ var FanPresetFieldResultSchema = object({
55813
+ /** The state path: `speed`, `preset`, `direction`, `oscillationAxes.horizontal.angle`. */
55814
+ field: string(),
55478
55815
  outcome: _enum([
55479
55816
  "applied",
55480
55817
  "failed",
55481
55818
  "not-run",
55482
55819
  "refused"
55483
55820
  ]),
55484
- deviceId: number$1().int().nonnegative().optional(),
55485
- cap: string().optional(),
55486
- method: string().optional(),
55487
55821
  /** The cause, for every outcome but `applied`. */
55488
55822
  message: string().optional()
55489
55823
  });
55490
55824
  var FanPresetApplyResultSchema = object({
55491
- /** `applied`: every step ran. `partial`: some ran, one failed. `refused`: nothing ran. */
55825
+ /** `applied`: every field landed. `partial`: some did, one did not. `refused`: nothing ran. */
55492
55826
  status: _enum([
55493
55827
  "applied",
55494
55828
  "partial",
55495
55829
  "refused"
55496
55830
  ]),
55497
- steps: array(FanPresetStepResultSchema)
55831
+ fields: array(FanPresetFieldResultSchema)
55498
55832
  });
55499
55833
  var FanCaptureFieldSchema = _enum([
55500
55834
  "speed",
55501
- "oscillating",
55502
55835
  "direction",
55503
- "preset"
55836
+ "preset",
55837
+ "oscillationAxes"
55504
55838
  ]);
55505
- var FanCaptureOmissionSchema = object({
55506
- /** A fan field (`speed`) or `step <n>` for a sibling step. */
55507
- what: string(),
55508
- /** Why no value was taken: unknown reading (never stored as 0, D393), or a step that cannot be read. */
55509
- reason: string()
55510
- });
55511
- var FanCaptureItemSchema = object({
55512
- group: _enum([
55513
- "fan",
55514
- "oscillation",
55515
- "angles"
55516
- ]),
55517
- /** What the step sets, in the operator's words (a device name, a fan field). */
55518
- label: string()
55519
- });
55520
55839
  var FanPresetCaptureResultSchema = object({
55521
- /** The steps filled from the device's current values; NOT saved. */
55522
- steps: array(ActionStepSchema),
55523
- /** One entry per step, same order: its review group and label. */
55524
- items: array(FanCaptureItemSchema),
55525
- omitted: array(FanCaptureOmissionSchema)
55840
+ /** The fan's CURRENT fan-control state, as a preset; NOT saved. */
55841
+ state: FanPresetStateSchema,
55842
+ omitted: array(object({
55843
+ /** A state path (`speed`, `oscillationAxes.vertical.angle`). */
55844
+ what: string(),
55845
+ /** Why no value was taken: an unknown reading is never stored as 0 (D393). */
55846
+ reason: string()
55847
+ }))
55526
55848
  });
55527
- var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
55849
+ var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
55528
55850
  DeviceType.Fan;
55529
- method(deviceInput$2, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$2.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
55851
+ method(deviceInput$1, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$1.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
55530
55852
  kind: "mutation",
55531
55853
  auth: "admin"
55532
- }), method(deviceInput$2.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
55854
+ }), method(deviceInput$1.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
55533
55855
  kind: "mutation",
55534
55856
  auth: "protected"
55535
- }), method(deviceInput$2.extend({
55536
- fields: array(FanCaptureFieldSchema).optional(),
55537
- steps: array(ActionStepSchema).max(20).default([])
55538
- }), FanPresetCaptureResultSchema, { auth: "protected" });
55857
+ }), method(deviceInput$1.extend({ fields: array(FanCaptureFieldSchema).optional() }), FanPresetCaptureResultSchema, { auth: "protected" });
55539
55858
  /**
55540
55859
  * Per-device feature/identity probe slice. Holds the runtime-resolved
55541
55860
  * truth about what a device CAN do — which the kernel uses to:
@@ -55659,7 +55978,7 @@ var GroupActiveSchema = object({
55659
55978
  /** Ms epoch when the slice was last updated. */
55660
55979
  lastChangedAt: number$1()
55661
55980
  });
55662
- DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
55981
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
55663
55982
  var GroupCommandsSchema = object({
55664
55983
  /** One row per member that has been commanded. A later command replaces that member's row. */
55665
55984
  results: array(object({
@@ -55671,7 +55990,7 @@ results: array(object({
55671
55990
  /** Ms epoch of the attempt. */
55672
55991
  at: number$1()
55673
55992
  })) });
55674
- DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
55993
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
55675
55994
  /**
55676
55995
  * How many members of a helper group answered (D944). Counts are integers,
55677
55996
  * not measurements: zero included is a real count, never a stand-in reading.
@@ -55695,7 +56014,7 @@ var GroupStatusSchema = object({
55695
56014
  label: "Members"
55696
56015
  }))
55697
56016
  });
55698
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
56017
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
55699
56018
  /**
55700
56019
  * Heat pump settable surface (D1026): one typed method per parameter, never a
55701
56020
  * generic `set(key, value)`. The values a mode takes and the limits of a number
@@ -55903,7 +56222,7 @@ var HeatingValveStatusSchema = object({
55903
56222
  /** Ms epoch when the slice was last updated (push or poll). */
55904
56223
  lastFetchedAt: number$1()
55905
56224
  });
55906
- DeviceType.Thermostat;
56225
+ DeviceType.Climate;
55907
56226
  /**
55908
56227
  * timed-run - run a device for a chosen time, then stop it (D993).
55909
56228
  *
@@ -55919,13 +56238,13 @@ DeviceType.Thermostat;
55919
56238
  * retried in a loop - D49); a future one is re-armed.
55920
56239
  *
55921
56240
  * What a device may be run for, and for how long at most, is per device type
55922
- * ({@link TIMED_RUN_LIMITS}): the maximum is a safety bound, not a preference,
56241
+ * and role ({@link timedRunLimitOf}): the maximum is a safety bound, not a preference,
55923
56242
  * so a request above it is REFUSED with a typed reason, never clamped.
55924
56243
  */
55925
56244
  var TimedRunUnitSchema = _enum(["s", "min"]);
55926
56245
  _enum(["switch", "pet-fountain"]);
55927
- DeviceType.Heater, DeviceType.PetFountain;
55928
- DeviceType.Heater, DeviceType.PetFountain;
56246
+ DeviceType.Switch, DeviceType.PetFountain;
56247
+ DeviceType.Switch, DeviceRole.SwitchHeater;
55929
56248
  /** One duration, as the one-tap run asks for it. */
55930
56249
  var TimedRunQuickRunSchema = object({
55931
56250
  duration: number$1().positive().finite(),
@@ -56097,8 +56416,8 @@ var HeroSceneSchema = object({
56097
56416
  /** 0..1: volume, cover position, cycle progress. */
56098
56417
  level: number$1().min(0).max(1).nullable()
56099
56418
  });
56100
- 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
56101
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
56419
+ DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
56420
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
56102
56421
  /** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
56103
56422
  var HeroTextSchema = object({
56104
56423
  en: string(),
@@ -56483,8 +56802,8 @@ var HeroRowModelSchema = object({
56483
56802
  extras: array(HeroControlSchema).max(2).optional(),
56484
56803
  trailing: HeroFactSchema.nullable()
56485
56804
  });
56486
- DeviceType.Climate, DeviceType.Thermostat;
56487
- DeviceType.Climate, DeviceType.Thermostat, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer;
56805
+ DeviceType.Climate;
56806
+ DeviceType.Climate, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer;
56488
56807
  /**
56489
56808
  * hero-layout — what a device's hero says (D1023). Read-only: the FIXED
56490
56809
  * layouts live in `@camstack/types` and nothing here stores or edits one.
@@ -56516,7 +56835,10 @@ method(heroInput, HeroModelSchema.nullable(), {
56516
56835
  }), method(rowModelsInput, array(HeroRowModelSchema.nullable()), {
56517
56836
  auth: "protected",
56518
56837
  role: "viewer"
56519
- }), method(object({ deviceType: string() }), HeroLayoutRowsSchema, {
56838
+ }), method(object({
56839
+ deviceType: string(),
56840
+ role: string().nullable().optional()
56841
+ }), HeroLayoutRowsSchema, {
56520
56842
  auth: "protected",
56521
56843
  role: "viewer"
56522
56844
  });
@@ -56593,7 +56915,7 @@ var HumiditySensorStatusSchema = object({
56593
56915
  /** Ms epoch when the slice was last updated. */
56594
56916
  lastFetchedAt: number$1()
56595
56917
  });
56596
- DeviceType.Sensor, DeviceType.Thermostat;
56918
+ DeviceType.Sensor, DeviceType.Climate;
56597
56919
  /**
56598
56920
  * Image display cap. Models a single still image exposed by an integration —
56599
56921
  * a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
@@ -70887,7 +71209,6 @@ object({
70887
71209
  DeviceType.Light,
70888
71210
  DeviceType.Fan,
70889
71211
  DeviceType.Climate,
70890
- DeviceType.Thermostat,
70891
71212
  DeviceType.Humidifier,
70892
71213
  DeviceType.WaterHeater,
70893
71214
  DeviceType.MediaPlayer,
@@ -70896,52 +71217,8 @@ object({
70896
71217
  DeviceType.Dishwasher,
70897
71218
  DeviceType.Vacuum,
70898
71219
  DeviceType.LawnMower,
70899
- DeviceType.PetFeeder,
70900
- DeviceType.Heater
71220
+ DeviceType.PetFeeder
70901
71221
  ].filter((type) => type !== DeviceType.Sensor);
70902
- var PowerSourceRefusalReasonSchema = _enum([
70903
- "no-power-source",
70904
- "switch-missing",
70905
- "switch-offline",
70906
- "switch-unknown",
70907
- "restart-in-progress",
70908
- "switch-call-failed"
70909
- ]);
70910
- var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
70911
- accepted: literal(false),
70912
- reason: PowerSourceRefusalReasonSchema,
70913
- /** One line for the operator, naming the switch. */
70914
- message: string()
70915
- })]);
70916
- var PowerSourceInfoSchema = object({
70917
- /** False when the device has no power source linked; the rest is then empty. */
70918
- linked: boolean(),
70919
- switchDeviceId: number$1().nullable(),
70920
- switchName: string().nullable(),
70921
- /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
70922
- switchOn: boolean().nullable(),
70923
- switchOnline: boolean().nullable(),
70924
- restartInProgress: boolean(),
70925
- offSeconds: number$1().int()
70926
- });
70927
- object({
70928
- /** Null while the switch has not reported: unknown is never `false` (D393). */
70929
- switchOn: boolean().nullable(),
70930
- offSeconds: number$1().int(),
70931
- lastFetchedAt: number$1()
70932
- });
70933
- DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
70934
- var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
70935
- systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70936
- kind: "mutation",
70937
- auth: "protected"
70938
- }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70939
- kind: "mutation",
70940
- auth: "protected"
70941
- }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70942
- kind: "mutation",
70943
- auth: "protected"
70944
- });
70945
71222
  /**
70946
71223
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
70947
71224
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -74069,7 +74346,7 @@ object({
74069
74346
  phase: string().nullable()
74070
74347
  });
74071
74348
  Object.values(DeviceType);
74072
- DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater;
74349
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder;
74073
74350
  /**
74074
74351
  * scene-monitor — device-scoped reference-region state cap. An operator marks
74075
74352
  * a rect ROI on a camera frame and names one or more states; the engine
@@ -75770,7 +76047,7 @@ var SwitchStatusSchema = object({
75770
76047
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
75771
76048
  lastChangedAt: number$1()
75772
76049
  });
75773
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Heater, method(object({
76050
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
75774
76051
  deviceId: number$1(),
75775
76052
  on: boolean()
75776
76053
  }), _void(), {
@@ -76395,7 +76672,7 @@ var TemperatureSensorStatusSchema = object({
76395
76672
  /** Ms epoch when the slice was last updated (push or poll). */
76396
76673
  lastFetchedAt: number$1()
76397
76674
  });
76398
- DeviceType.Sensor, DeviceType.Thermostat;
76675
+ DeviceType.Sensor, DeviceType.Climate;
76399
76676
  var TemplateKindSchema = _enum(["remote"]);
76400
76677
  /**
76401
76678
  * template — the generic store of reusable, named operator data (D963). A
@@ -78952,7 +79229,9 @@ var AccessoryKind = {
78952
79229
  };
78953
79230
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
78954
79231
  DeviceType.HeatPump;
78955
- DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
79232
+ DeviceType.Climate;
79233
+ DeviceRole.ClimateThermostat, DeviceRole.ClimateAc, DeviceRole.ClimateRadiator, DeviceRole.ClimateFloor, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit;
79234
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
78956
79235
  new Set(Object.values(DeviceType));
78957
79236
  /** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
78958
79237
  function contribution(cap, schema, build) {
@@ -80958,7 +81237,7 @@ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pu
80958
81237
  ...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
80959
81238
  ...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
80960
81239
  ];
80961
- 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
81240
+ DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
80962
81241
  /**
80963
81242
  * Who looks like what (D1023). One look per {@link DeviceType}, refined by a
80964
81243
  * {@link DeviceRole} where the role changes how the device reads (a leak
@@ -81602,9 +81881,9 @@ lookOf({
81602
81881
  idle: INFO,
81603
81882
  standby: MUTED
81604
81883
  });
81605
- DeviceType.Climate, DeviceType.Thermostat;
81606
- 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
81607
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
81884
+ DeviceType.Climate;
81885
+ DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
81886
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
81608
81887
  Object.freeze({
81609
81888
  "accessories.getStatus": {
81610
81889
  capName: "accessories",
@@ -83454,41 +83733,6 @@ Object.freeze({
83454
83733
  access: "create",
83455
83734
  role: "admin"
83456
83735
  },
83457
- "deviceDiscovery.adoptDevice": {
83458
- capName: "device-discovery",
83459
- capScope: "device",
83460
- addonId: null,
83461
- access: "create",
83462
- role: "admin"
83463
- },
83464
- "deviceDiscovery.getStatus": {
83465
- capName: "device-discovery",
83466
- capScope: "device",
83467
- addonId: null,
83468
- access: "view",
83469
- role: "viewer"
83470
- },
83471
- "deviceDiscovery.listDiscovered": {
83472
- capName: "device-discovery",
83473
- capScope: "device",
83474
- addonId: null,
83475
- access: "view",
83476
- role: "viewer"
83477
- },
83478
- "deviceDiscovery.refreshDiscovery": {
83479
- capName: "device-discovery",
83480
- capScope: "device",
83481
- addonId: null,
83482
- access: "create",
83483
- role: "admin"
83484
- },
83485
- "deviceDiscovery.releaseDevice": {
83486
- capName: "device-discovery",
83487
- capScope: "device",
83488
- addonId: null,
83489
- access: "create",
83490
- role: "admin"
83491
- },
83492
83736
  "deviceExport.applyDeviceSettingsPatch": {
83493
83737
  capName: "device-export",
83494
83738
  capScope: "system",
@@ -85036,6 +85280,13 @@ Object.freeze({
85036
85280
  access: "create",
85037
85281
  role: "viewer"
85038
85282
  },
85283
+ "fanControl.setOscillationAxis": {
85284
+ capName: "fan-control",
85285
+ capScope: "device",
85286
+ addonId: null,
85287
+ access: "create",
85288
+ role: "viewer"
85289
+ },
85039
85290
  "fanControl.setPercentage": {
85040
85291
  capName: "fan-control",
85041
85292
  capScope: "device",
@@ -92057,7 +92308,7 @@ function projectAction(cap, action) {
92057
92308
  };
92058
92309
  }
92059
92310
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
92060
- 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
92311
+ DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
92061
92312
  DeviceFeature.BatteryOperated;
92062
92313
  function bound(cap, methods = [], authority = "reported") {
92063
92314
  return {
@@ -92571,35 +92822,6 @@ Object.freeze({
92571
92822
  form: "single",
92572
92823
  optional: false
92573
92824
  }],
92574
- "deviceDiscovery.adoptDevice": [{
92575
- name: "deviceId",
92576
- form: "single",
92577
- optional: false
92578
- }],
92579
- "deviceDiscovery.getStatus": [{
92580
- name: "deviceId",
92581
- form: "single",
92582
- optional: false
92583
- }],
92584
- "deviceDiscovery.listDiscovered": [{
92585
- name: "deviceId",
92586
- form: "single",
92587
- optional: false
92588
- }],
92589
- "deviceDiscovery.refreshDiscovery": [{
92590
- name: "deviceId",
92591
- form: "single",
92592
- optional: false
92593
- }],
92594
- "deviceDiscovery.releaseDevice": [{
92595
- name: "childDeviceId",
92596
- form: "single",
92597
- optional: false
92598
- }, {
92599
- name: "deviceId",
92600
- form: "single",
92601
- optional: false
92602
- }],
92603
92825
  "deviceExport.applyDeviceSettingsPatch": [{
92604
92826
  name: "deviceId",
92605
92827
  form: "single",
@@ -93163,6 +93385,11 @@ Object.freeze({
93163
93385
  form: "single",
93164
93386
  optional: false
93165
93387
  }],
93388
+ "fanControl.setOscillationAxis": [{
93389
+ name: "deviceId",
93390
+ form: "single",
93391
+ optional: false
93392
+ }],
93166
93393
  "fanControl.setPercentage": [{
93167
93394
  name: "deviceId",
93168
93395
  form: "single",
@@ -98076,9 +98303,14 @@ function thermostatCapability(slice, modes, features) {
98076
98303
  }
98077
98304
  };
98078
98305
  }
98079
- /** A thermostat is a THERMOSTAT, any other climate device an air conditioner. */
98080
- function climateCategoryFor(deviceType) {
98081
- return deviceType === "thermostat" ? "THERMOSTAT" : "AIR_CONDITIONER";
98306
+ /**
98307
+ * D1033 — one `climate` type, and the role says which thing it is: an air
98308
+ * conditioner is an AIR_CONDITIONER; a thermostat, a radiator, a floor loop, a
98309
+ * heat-pump circuit, a climate heater and a climate with no role yet are all a
98310
+ * THERMOSTAT.
98311
+ */
98312
+ function climateCategoryFor(role) {
98313
+ return role === DeviceRole.ClimateAc ? "AIR_CONDITIONER" : "THERMOSTAT";
98082
98314
  }
98083
98315
  function describeClimate(device) {
98084
98316
  const slice = readClimateSlice(device.slices["climate-control"]);
@@ -98112,7 +98344,7 @@ function describeClimate(device) {
98112
98344
  }] : [],
98113
98345
  ...extras
98114
98346
  ],
98115
- category: climateCategoryFor(device.type)
98347
+ category: climateCategoryFor(device.role)
98116
98348
  };
98117
98349
  }
98118
98350
  /** Amazon's `thermostatMode` for the state, or null while in a mode it lacks. */
@@ -99754,13 +99986,13 @@ async function applyCustom(c, deps, name) {
99754
99986
  tags: { deviceId: c.deviceId },
99755
99987
  meta: {
99756
99988
  preset: preset.name,
99757
- steps: result.steps.length
99989
+ fields: result.fields.length
99758
99990
  }
99759
99991
  });
99760
99992
  return successResponse$1(c, []);
99761
99993
  }
99762
- const bad = result.steps.find((s) => s.outcome === "failed" || s.outcome === "refused");
99763
- const detail = bad === void 0 ? result.status : `step ${bad.index}: ${bad.message ?? bad.outcome}`;
99994
+ const bad = result.fields.find((f) => f.outcome === "failed" || f.outcome === "refused");
99995
+ const detail = bad === void 0 ? result.status : `${bad.field}: ${bad.message ?? bad.outcome}`;
99764
99996
  deps.logger.warn("alexa fan-controller: custom preset did not fully apply", {
99765
99997
  tags: { deviceId: c.deviceId },
99766
99998
  meta: {
@@ -102727,18 +102959,17 @@ async function handleSetObjectDetectionClasses(header, endpoint, payloadRaw, ctx
102727
102959
  }] }
102728
102960
  };
102729
102961
  }
102730
- /** Device types this export may publish as a generic endpoint. `thermostat`
102731
- * (Home Assistant) and `climate` (an air conditioner, e.g. Gree) both carry
102732
- * the `climate-control` cap (D874). */
102962
+ /** Device types this export may publish as a generic endpoint. A `climate`
102963
+ * device carries the `climate-control` cap (D874); its role picks THERMOSTAT
102964
+ * or AIR_CONDITIONER (D1033). A plug-in heater is a `switch` (role
102965
+ * `switch-heater`). */
102733
102966
  var GENERIC_DEVICE_TYPES = [
102734
102967
  "light",
102735
102968
  "switch",
102736
- "heater",
102737
102969
  "siren",
102738
102970
  "sensor",
102739
102971
  "lock",
102740
102972
  "presence",
102741
- "thermostat",
102742
102973
  "climate",
102743
102974
  "cover",
102744
102975
  "fan",
@@ -110741,7 +110972,6 @@ var SUPPORTED_KINDS = [
110741
110972
  DeviceType.Sensor,
110742
110973
  DeviceType.Lock,
110743
110974
  DeviceType.Presence,
110744
- DeviceType.Thermostat,
110745
110975
  DeviceType.Climate,
110746
110976
  DeviceType.Cover,
110747
110977
  DeviceType.Generic