@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.
@@ -837,7 +837,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
837
837
  return EventCategory;
838
838
  }({});
839
839
  //#endregion
840
- //#region ../types/dist/composed-stable-id-jnvhwGoH.mjs
840
+ //#region ../types/dist/composed-stable-id-CPp3votu.mjs
841
841
  /**
842
842
  import { errMsg } from '@camstack/types'
843
843
  * Extract a human-readable message from an unknown error value.
@@ -850,17 +850,18 @@ function errMsg$1(err) {
850
850
  }
851
851
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
852
852
  DeviceType["Camera"] = "camera";
853
+ /** Legacy stored value, read only by the hub-to-integration migrations; no live device carries it. */
853
854
  DeviceType["Hub"] = "hub";
854
855
  DeviceType["Light"] = "light";
855
856
  DeviceType["Siren"] = "siren";
856
857
  DeviceType["Switch"] = "switch";
857
858
  DeviceType["Sensor"] = "sensor";
858
- DeviceType["Thermostat"] = "thermostat";
859
- /** Air-conditioner / heat-pump climate device (HVAC) — shares the
860
- * `climate-control` cap surface with `Thermostat` but renders a
861
- * dedicated AC-appropriate control UI (mode chips, fan speed,
862
- * independent vertical/horizontal swing). Sources: native Gree, and
863
- * reusable by other AC integrations. */
859
+ /** Every climate device: an air conditioner, a room thermostat, a radiator
860
+ * valve, a floor-heating zone, a heat-pump circuit. They share one set of
861
+ * controls (`climate-control`), so they are one type; WHICH kind of climate
862
+ * device it is is its {@link DeviceRole} (`climate-*`), which the UI and the
863
+ * exports branch on. The retired `thermostat` type is read as this one
864
+ * (`canonicalStoredDeviceType`). */
864
865
  DeviceType["Climate"] = "climate";
865
866
  DeviceType["Button"] = "button";
866
867
  /** Generic stateless event emitter — carries a device's EXACT declared
@@ -951,10 +952,6 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
951
952
  /** Washing machine. A plug-built one is running while its power stays
952
953
  * above a threshold. No program cap — that surface is the dishwasher's. */
953
954
  DeviceType["Washer"] = "washer";
954
- /** A dumb plug-in stove or heater: a switch (and, with a meter, a power
955
- * reading) that only runs while the plug is on. Built from a smart plug;
956
- * the `timed-run` cap switches it off again after a chosen time. */
957
- DeviceType["Heater"] = "heater";
958
955
  /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
959
956
  DeviceType["Dryer"] = "dryer";
960
957
  /** The physical bridge box of a vendor ecosystem (Velux KLF-200, and later
@@ -1174,6 +1171,27 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1174
1171
  /** A smart plug: a `switch` whose source says it is an outlet (HA
1175
1172
  * `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
1176
1173
  DeviceRole["Outlet"] = "outlet";
1174
+ /** A dumb plug-in stove or heater behind a switch: it runs only while the
1175
+ * switch is on. Offered `timed-run`, which switches it off again after a
1176
+ * chosen time. */
1177
+ DeviceRole["SwitchHeater"] = "switch-heater";
1178
+ /** A plain fan behind a switch (a smart plug powering it): drawn as a fan,
1179
+ * with the switch's on/off only. Speed or oscillation appear only when the
1180
+ * device also has a fan cap (D1033). */
1181
+ DeviceRole["SwitchFan"] = "switch-fan";
1182
+ /** Air conditioner / split unit: cooling, fan speed, louvres. */
1183
+ DeviceRole["ClimateAc"] = "climate-ac";
1184
+ /** Room thermostat: a setpoint and a room temperature. The default. */
1185
+ DeviceRole["ClimateThermostat"] = "climate-thermostat";
1186
+ /** Floor-heating zone actuator. */
1187
+ DeviceRole["ClimateFloor"] = "climate-floor";
1188
+ /** Radiator valve (thermostatic radiator head). */
1189
+ DeviceRole["ClimateRadiator"] = "climate-radiator";
1190
+ /** A heater with its own thermostat (stove, convector). */
1191
+ DeviceRole["ClimateHeater"] = "climate-heater";
1192
+ /** One heating/cooling circuit of a heat pump: a water loop with comfort /
1193
+ * eco setpoints and a heat/cool mode, no room sensor. */
1194
+ DeviceRole["ClimateHeatPumpCircuit"] = "climate-heat-pump-circuit";
1177
1195
  /** Generic motion / occupancy / moving event source. Distinct from
1178
1196
  * the camera accessory PirSensor role: that one is a camera child;
1179
1197
  * this is a standalone HA / 3rd-party motion sensor. */
@@ -6061,7 +6079,7 @@ var ZodIssueCode = {
6061
6079
  var ZodFirstPartyTypeKind;
6062
6080
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6063
6081
  //#endregion
6064
- //#region ../types/dist/sleep-Cw1uUXvl.mjs
6082
+ //#region ../types/dist/sleep-Bn346wCJ.mjs
6065
6083
  /**
6066
6084
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6067
6085
  * window to float samples (D455).
@@ -11750,6 +11768,50 @@ var ACTUATOR_CAP_VOCABULARY = {
11750
11768
  value: false
11751
11769
  },
11752
11770
  args: { oscillating: false }
11771
+ },
11772
+ {
11773
+ id: "fan.horizontalOscillateOn",
11774
+ method: "setOscillationAxis",
11775
+ label: t("Horizontal oscillation on", "Oscillazione orizzontale attiva"),
11776
+ phrase: t("Start the horizontal oscillation of {device}", "Attiva l’oscillazione orizzontale di {device}"),
11777
+ icon: "move-horizontal",
11778
+ args: {
11779
+ axis: "horizontal",
11780
+ oscillating: true
11781
+ }
11782
+ },
11783
+ {
11784
+ id: "fan.horizontalOscillateOff",
11785
+ method: "setOscillationAxis",
11786
+ label: t("Horizontal oscillation off", "Oscillazione orizzontale spenta"),
11787
+ phrase: t("Stop the horizontal oscillation of {device}", "Ferma l’oscillazione orizzontale di {device}"),
11788
+ icon: "move-horizontal",
11789
+ args: {
11790
+ axis: "horizontal",
11791
+ oscillating: false
11792
+ }
11793
+ },
11794
+ {
11795
+ id: "fan.verticalOscillateOn",
11796
+ method: "setOscillationAxis",
11797
+ label: t("Vertical oscillation on", "Oscillazione verticale attiva"),
11798
+ phrase: t("Start the vertical oscillation of {device}", "Attiva l’oscillazione verticale di {device}"),
11799
+ icon: "move-vertical",
11800
+ args: {
11801
+ axis: "vertical",
11802
+ oscillating: true
11803
+ }
11804
+ },
11805
+ {
11806
+ id: "fan.verticalOscillateOff",
11807
+ method: "setOscillationAxis",
11808
+ label: t("Vertical oscillation off", "Oscillazione verticale spenta"),
11809
+ phrase: t("Stop the vertical oscillation of {device}", "Ferma l’oscillazione verticale di {device}"),
11810
+ icon: "move-vertical",
11811
+ args: {
11812
+ axis: "vertical",
11813
+ oscillating: false
11814
+ }
11753
11815
  }
11754
11816
  ],
11755
11817
  state: [{
@@ -13839,10 +13901,6 @@ var CAMERA_CAP_VOCABULARY = {
13839
13901
  scope: "device",
13840
13902
  noun: t("Admin link", "Link di amministrazione")
13841
13903
  },
13842
- "device-discovery": {
13843
- scope: "device",
13844
- noun: t("Discovery", "Rilevamento dispositivi")
13845
- },
13846
13904
  "device-extension": {
13847
13905
  scope: "device",
13848
13906
  noun: t("Device extension", "Estensione del dispositivo")
@@ -15322,7 +15380,6 @@ var CAP_NAMES = Object.freeze([
15322
15380
  "device-admin-link",
15323
15381
  "device-adoption",
15324
15382
  "device-credentials",
15325
- "device-discovery",
15326
15383
  "device-export",
15327
15384
  "device-extension",
15328
15385
  "device-history",
@@ -15944,13 +16001,6 @@ Object.freeze({
15944
16001
  "valueType": "string"
15945
16002
  }
15946
16003
  ],
15947
- "device-discovery": [{
15948
- "path": "lastDiscoveryAt",
15949
- "valueType": "number"
15950
- }, {
15951
- "path": "lastError",
15952
- "valueType": "string"
15953
- }],
15954
16004
  "device-export": [
15955
16005
  {
15956
16006
  "path": "linkState",
@@ -17402,7 +17452,7 @@ Object.freeze({
17402
17452
  }
17403
17453
  });
17404
17454
  //#endregion
17405
- //#region ../types/dist/implemented-methods-OitwyO1Y.mjs
17455
+ //#region ../types/dist/implemented-methods-5YMDeE3f.mjs
17406
17456
  /**
17407
17457
  * The ffmpeg build every CamStack node downloads, per platform and arch.
17408
17458
  *
@@ -44135,6 +44185,13 @@ var AutomationConditionOperatorSchema = _enum([
44135
44185
  "in"
44136
44186
  ]);
44137
44187
  /**
44188
+ * The stable name of an event leaf. A path (`when.0.1`) moves when a row is
44189
+ * reordered; the id does not, so a `triggered-by` leaf keeps pointing at the
44190
+ * same row. Optional: a leaf nothing refers to needs none.
44191
+ */
44192
+ var EVENT_LEAF_ID_RE = /^[A-Za-z0-9_-]{1,40}$/;
44193
+ var eventLeafId = { id: string().regex(EVENT_LEAF_ID_RE).optional() };
44194
+ /**
44138
44195
  * D8 compliance, and it is the reason a "becomes" leaf is not merely an event
44139
44196
  * subscription: it evaluates against the **state mirror**, which is reconciled,
44140
44197
  * and an event only WAKES the evaluation. A dropped event therefore DELAYS a
@@ -44142,6 +44199,7 @@ var AutomationConditionOperatorSchema = _enum([
44142
44199
  */
44143
44200
  var DeviceBecomesLeafSchema = object({
44144
44201
  kind: literal("device-becomes"),
44202
+ ...eventLeafId,
44145
44203
  deviceId: number$1().int().nonnegative(),
44146
44204
  cap: string().min(1),
44147
44205
  fieldPath: string().min(1),
@@ -44194,6 +44252,7 @@ var DeviceBecomesLeafSchema = object({
44194
44252
  });
44195
44253
  var DeviceEventLeafSchema = object({
44196
44254
  kind: literal("device-event"),
44255
+ ...eventLeafId,
44197
44256
  /** An `EventCategory` value. */
44198
44257
  category: string().min(1),
44199
44258
  deviceId: number$1().int().nonnegative().optional()
@@ -44206,18 +44265,24 @@ var DeviceEventLeafSchema = object({
44206
44265
  */
44207
44266
  var ScheduleLeafSchema = object({
44208
44267
  kind: literal("schedule"),
44268
+ ...eventLeafId,
44209
44269
  at: TimeSpecSchema.optional(),
44210
44270
  days: array(WeekdayKeySchema).min(1).max(7).optional(),
44211
44271
  /** @deprecated legacy cron — new schedules use `at`. */
44212
44272
  cron: string().min(1).max(120).optional()
44213
44273
  }).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" });
44214
- var ManualLeafSchema = object({ kind: literal("manual") });
44274
+ var ManualLeafSchema = object({
44275
+ kind: literal("manual"),
44276
+ ...eventLeafId
44277
+ });
44215
44278
  var IntervalLeafSchema = object({
44216
44279
  kind: literal("interval"),
44280
+ ...eventLeafId,
44217
44281
  minutes: number$1().int().min(1).max(1440)
44218
44282
  });
44219
44283
  var DetectionLeafSchema = object({
44220
44284
  kind: literal("detection"),
44285
+ ...eventLeafId,
44221
44286
  /** One macro class each, optionally narrowed by a label; a track of any listed subject fires. */
44222
44287
  subjects: array(DetectionSubjectSchema).min(1),
44223
44288
  deviceIds: array(number$1().int().nonnegative()).min(1),
@@ -44228,6 +44293,7 @@ var DetectionLeafSchema = object({
44228
44293
  });
44229
44294
  var StationaryLeafSchema = object({
44230
44295
  kind: literal("stationary"),
44296
+ ...eventLeafId,
44231
44297
  deviceIds: array(number$1().int().nonnegative()).min(1),
44232
44298
  subjects: array(StationarySubjectSchema).min(1).optional(),
44233
44299
  zones: array(string().min(1)).min(1).optional(),
@@ -44273,6 +44339,41 @@ var StationaryPresentLeafSchema = object({
44273
44339
  minCount: number$1().int().positive().optional()
44274
44340
  });
44275
44341
  /**
44342
+ * True while the site-local clock is inside a daily window and/or on one of
44343
+ * the named days. `days` names the local day a window STARTS on, so
44344
+ * 22:00-06:00 on weekdays is still inside at 01:00 Saturday. A one-date spec
44345
+ * (`kind: 'date'`) is refused: only a clock time or a sun event makes a window
44346
+ * that repeats every day.
44347
+ */
44348
+ var TimeIsLeafSchema = object({
44349
+ kind: literal("time-is"),
44350
+ between: object({
44351
+ from: TimeSpecSchema,
44352
+ to: TimeSpecSchema
44353
+ }).optional(),
44354
+ days: array(WeekdayKeySchema).min(1).max(7).optional()
44355
+ }).superRefine((leaf, ctx) => {
44356
+ if (leaf.between === void 0 && leaf.days === void 0) ctx.addIssue({
44357
+ code: "custom",
44358
+ message: "a time-is leaf needs a between window, days, or both"
44359
+ });
44360
+ for (const end of ["from", "to"]) if (leaf.between?.[end].kind === "date") ctx.addIssue({
44361
+ code: "custom",
44362
+ message: "a one-date time cannot bound a daily window: use a clock time or a sun event",
44363
+ path: ["between", end]
44364
+ });
44365
+ });
44366
+ /**
44367
+ * True for the run that one of the named event leaves started. It reads the
44368
+ * run, not a device: in the tree it is judged against the leaf that fired, in
44369
+ * a step guard against the trigger the run carries. A run no event leaf
44370
+ * started (a state-only tree becoming true) is false.
44371
+ */
44372
+ var TriggeredByLeafSchema = object({
44373
+ kind: literal("triggered-by"),
44374
+ leafIds: array(string().regex(EVENT_LEAF_ID_RE)).min(1).max(20)
44375
+ });
44376
+ /**
44276
44377
  * The escape hatch: the bounded expression engine over named device bindings.
44277
44378
  * Declared as a plain object so a discriminated union can read `kind`; the
44278
44379
  * author-time validation is the SAME function `ExpressionSourceSchema` runs.
@@ -44318,7 +44419,9 @@ var AutomationWhenSchema = lazy(() => discriminatedUnion("kind", [
44318
44419
  StationaryLeafSchema,
44319
44420
  DeviceIsLeafSchema,
44320
44421
  StationaryPresentLeafSchema,
44321
- ExpressionLeafSchema
44422
+ ExpressionLeafSchema,
44423
+ TimeIsLeafSchema,
44424
+ TriggeredByLeafSchema
44322
44425
  ]));
44323
44426
  var EVENT_KINDS = new Set([
44324
44427
  "device-becomes",
@@ -44372,6 +44475,28 @@ function hasEventLeaves(node) {
44372
44475
  });
44373
44476
  return found;
44374
44477
  }
44478
+ /** The event leaves of the tree that carry an id, in tree order. */
44479
+ function identifiedEventLeaves(when) {
44480
+ const found = [];
44481
+ forEachLeaf(when, (leaf, path) => {
44482
+ if (isEventLeaf(leaf) && leaf.id !== void 0) found.push({
44483
+ id: leaf.id,
44484
+ path,
44485
+ leaf
44486
+ });
44487
+ });
44488
+ return found;
44489
+ }
44490
+ /** Does the tree hold a `triggered-by` leaf? */
44491
+ function hasTriggeredByLeaves(when) {
44492
+ let found = false;
44493
+ forEachLeaf(when, (leaf) => {
44494
+ if (leaf.kind === "triggered-by") found = true;
44495
+ });
44496
+ return found;
44497
+ }
44498
+ /** Why a `triggered-by` leaf is refused outside an automation: there is no trigger row to name. */
44499
+ 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";
44375
44500
  function hasEmptyContainer(node) {
44376
44501
  if (isLeaf(node)) return false;
44377
44502
  if (node.kind === "not") return hasEmptyContainer(node.child);
@@ -44430,6 +44555,11 @@ function validateWhenTree(when) {
44430
44555
  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`;
44431
44556
  const leaves = countWhenLeaves(when);
44432
44557
  if (leaves > 32) return `the rules use ${leaves} rows — the limit is 32`;
44558
+ const seen = /* @__PURE__ */ new Set();
44559
+ for (const entry of identifiedEventLeaves(when)) {
44560
+ if (seen.has(entry.id)) return `two trigger rows share the id "${entry.id}" — an id names one row`;
44561
+ seen.add(entry.id);
44562
+ }
44433
44563
  const need = eventNeed(when, "when", false);
44434
44564
  if ("error" in need) return need.error;
44435
44565
  const [first, second] = need.paths;
@@ -44720,7 +44850,18 @@ var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).re
44720
44850
  message: "a domain target needs the vocabulary action it applies to (actionId)",
44721
44851
  path: ["actionId"]
44722
44852
  }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44723
- var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
44853
+ /**
44854
+ * A step of a STANDALONE list (an action, a scheduler point, a preset): the
44855
+ * same two step kinds an automation runs, minus a guard that reads the
44856
+ * automation's trigger, which such a list does not have.
44857
+ */
44858
+ var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]).superRefine((step, ctx) => {
44859
+ if (step.if !== void 0 && hasTriggeredByLeaves(step.if)) ctx.addIssue({
44860
+ code: "custom",
44861
+ message: TRIGGERED_BY_NEEDS_AUTOMATION,
44862
+ path: ["if"]
44863
+ });
44864
+ });
44724
44865
  var AutomationActionSchema = discriminatedUnion("kind", [
44725
44866
  GuardedWaitStepSchema,
44726
44867
  GuardedCapStepSchema,
@@ -44817,6 +44958,11 @@ var STATIONARY_DESCRIPTIONS = {
44817
44958
  phase: "appeared or departed",
44818
44959
  entryId: "the stopped object"
44819
44960
  };
44961
+ var BECOMES_DESCRIPTIONS = {
44962
+ deviceId: "the device that changed",
44963
+ from: "the value before the change, empty when it is not known",
44964
+ to: "the value it changed to"
44965
+ };
44820
44966
  function describe$1(descriptions) {
44821
44967
  return Object.entries(descriptions).map(([name, description]) => ({
44822
44968
  name,
@@ -44825,6 +44971,10 @@ function describe$1(descriptions) {
44825
44971
  }
44826
44972
  describe$1(DETECTION_DESCRIPTIONS);
44827
44973
  describe$1(STATIONARY_DESCRIPTIONS);
44974
+ describe$1(BECOMES_DESCRIPTIONS).map((v) => v.name === "deviceId" ? {
44975
+ ...v,
44976
+ hintKey: "becomesDeviceId"
44977
+ } : v);
44828
44978
  new Set(Object.values(COCO_TO_MACRO.mapping));
44829
44979
  /**
44830
44980
  * Schedulers (D983) — an entity that performs actions over the day.
@@ -44849,6 +44999,13 @@ var SchedulerStateTreeSchema = AutomationWhenSchema.superRefine((when, ctx) => {
44849
44999
  });
44850
45000
  return;
44851
45001
  }
45002
+ if (hasTriggeredByLeaves(when)) {
45003
+ ctx.addIssue({
45004
+ code: "custom",
45005
+ message: TRIGGERED_BY_NEEDS_AUTOMATION
45006
+ });
45007
+ return;
45008
+ }
44852
45009
  const problem = validateWhenTree(when);
44853
45010
  if (problem !== null) ctx.addIssue({
44854
45011
  code: "custom",
@@ -45069,6 +45226,8 @@ var AutomationConditionTraceNodeSchema = object({
45069
45226
  "device-is",
45070
45227
  "expression",
45071
45228
  "stationary-present",
45229
+ "time-is",
45230
+ "triggered-by",
45072
45231
  "device-becomes",
45073
45232
  "device-event",
45074
45233
  "schedule",
@@ -45485,7 +45644,7 @@ object({
45485
45644
  * is irrelevant; the array is treated as a set by consumers. */
45486
45645
  hiddenChildIds: array(number$1()).readonly()
45487
45646
  });
45488
- 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({
45647
+ DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Climate, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
45489
45648
  deviceId: number$1().int().nonnegative(),
45490
45649
  childDeviceId: number$1().int().nonnegative(),
45491
45650
  hidden: boolean()
@@ -47596,7 +47755,7 @@ var BatteryStatusSchema = object({
47596
47755
  */
47597
47756
  binary: boolean().optional().meta({ label: "Binary indicator" })
47598
47757
  });
47599
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
47758
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter;
47600
47759
  method(object({
47601
47760
  deviceId: number$1(),
47602
47761
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -49019,7 +49178,7 @@ var ClimateControlStatusSchema = object({
49019
49178
  /** Ms epoch when the slice was last updated (push or command). */
49020
49179
  lastFetchedAt: number$1()
49021
49180
  });
49022
- DeviceType.Thermostat, DeviceType.Climate, method(object({
49181
+ DeviceType.Climate, method(object({
49023
49182
  deviceId: number$1().int().nonnegative(),
49024
49183
  mode: HvacModeSchema
49025
49184
  }), _void(), {
@@ -49310,6 +49469,7 @@ var CompositionProblemSchema = object({
49310
49469
  "nested-field",
49311
49470
  "missing-field",
49312
49471
  "kind-mismatch",
49472
+ "source-kind-mismatch",
49313
49473
  "may-be-null",
49314
49474
  "source-missing",
49315
49475
  "source-unreadable",
@@ -49331,7 +49491,8 @@ var CompositionProblemSchema = object({
49331
49491
  "command-method-unknown",
49332
49492
  "command-source-unknown",
49333
49493
  "command-input-unknown",
49334
- "command-input-missing"
49494
+ "command-input-missing",
49495
+ "power-source-is-actuator"
49335
49496
  ]),
49336
49497
  path: string(),
49337
49498
  message: string()
@@ -50154,7 +50315,7 @@ DeviceType.MediaPlayer, optionalMethod(deviceOnly, _void(), {
50154
50315
  kind: "mutation",
50155
50316
  auth: "protected"
50156
50317
  });
50157
- 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;
50318
+ 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;
50158
50319
  var NUMBER = {
50159
50320
  kind: "fixed",
50160
50321
  result: ["number"]
@@ -50237,7 +50398,7 @@ function numeric(input) {
50237
50398
  }, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
50238
50399
  };
50239
50400
  }
50240
- var CLIMATE_DEVICES = [DeviceType.Thermostat, DeviceType.Climate];
50401
+ var CLIMATE_DEVICES = [DeviceType.Climate];
50241
50402
  function binary(input) {
50242
50403
  return {
50243
50404
  ...input,
@@ -50559,8 +50720,8 @@ var GROUP_TEMPLATES = [
50559
50720
  actuator({
50560
50721
  id: "climate",
50561
50722
  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.",
50562
- deviceType: DeviceType.Thermostat,
50563
- memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
50723
+ deviceType: DeviceType.Climate,
50724
+ memberDeviceTypes: [DeviceType.Climate],
50564
50725
  outputCap: "group-active",
50565
50726
  outputField: "active",
50566
50727
  member: {
@@ -50603,6 +50764,50 @@ function actuator(input) {
50603
50764
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
50604
50765
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
50605
50766
  DeviceType.Camera;
50767
+ var PowerSourceRefusalReasonSchema = _enum([
50768
+ "no-power-source",
50769
+ "switch-missing",
50770
+ "switch-offline",
50771
+ "switch-unknown",
50772
+ "restart-in-progress",
50773
+ "switch-call-failed",
50774
+ "switch-is-actuator"
50775
+ ]);
50776
+ var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
50777
+ accepted: literal(false),
50778
+ reason: PowerSourceRefusalReasonSchema,
50779
+ /** One line for the operator, naming the switch. */
50780
+ message: string()
50781
+ })]);
50782
+ var PowerSourceInfoSchema = object({
50783
+ /** False when the device has no power source linked; the rest is then empty. */
50784
+ linked: boolean(),
50785
+ switchDeviceId: number$1().nullable(),
50786
+ switchName: string().nullable(),
50787
+ /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
50788
+ switchOn: boolean().nullable(),
50789
+ switchOnline: boolean().nullable(),
50790
+ restartInProgress: boolean(),
50791
+ offSeconds: number$1().int()
50792
+ });
50793
+ object({
50794
+ /** Null while the switch has not reported: unknown is never `false` (D393). */
50795
+ switchOn: boolean().nullable(),
50796
+ offSeconds: number$1().int(),
50797
+ lastFetchedAt: number$1()
50798
+ });
50799
+ 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;
50800
+ var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
50801
+ systemMethod(deviceInput$2, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
50802
+ kind: "mutation",
50803
+ auth: "protected"
50804
+ }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
50805
+ kind: "mutation",
50806
+ auth: "protected"
50807
+ }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
50808
+ kind: "mutation",
50809
+ auth: "protected"
50810
+ });
50606
50811
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
50607
50812
  /**
50608
50813
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -51547,27 +51752,35 @@ var DeviceAdminLinkSchema = object({
51547
51752
  });
51548
51753
  method(object({ deviceId: number$1().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
51549
51754
  /**
51550
- * device-discovery — device-scoped capability for parents that host /
51551
- * enumerate child devices (Reolink Hub / NVR, ONVIF gateway, future
51552
- * integrations). The parent advertises a list of discoverable children,
51553
- * and the operator promotes a subset to real devices via `adoptDevice`.
51554
- * Child lifecycle (kernel device create/remove, parent reference) is
51555
- * owned by the framework so a single shared `<DiscoveryPanel />` can
51556
- * drive any integration.
51557
- *
51558
- * Boundaries:
51559
- * - The cap exposes ENUMERATION + ADOPT/RELEASE only. The protocol
51560
- * used to discover children (CGI poll, mDNS, push from hub, ...)
51561
- * is the integration's business; results land in `runtimeState`
51562
- * so the panel can render without a fresh round-trip.
51563
- * - `childNativeId` is integration-defined and must be stable across
51564
- * reboots so re-discovery doesn't duplicate adopted children.
51565
- * - `adoptDevice` returns the new `deviceId` so the UI can navigate
51566
- * directly to the freshly-created child's settings page.
51567
- */
51568
- /**
51569
- * Status enum for a discovered device. Mirrors the Reolink simpleEvent
51570
- * lifecycle (`online` / `sleeping` / `offline`) — generic enough for
51755
+ * `device-adoption` — generic discovery + adoption surface,
51756
+ * system-scoped collection (one provider per integration addon), routed
51757
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
51758
+ * pin model as `connection-test`. The admin UI keeps using
51759
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
51760
+ * successor to `ha-discovery`:
51761
+ * keyed by `integrationId` (the addon resolves integrationId → broker
51762
+ * internally) rather than a connection-specific `brokerId`, and it
51763
+ * OWNS the shared `DiscoveredChildDevice` candidate type
51764
+ * (declared below) so a single shared adoption modal renders any integration's
51765
+ * candidate tree.
51766
+ *
51767
+ * UI flow (Integrations page → integration detail):
51768
+ * 1. `listCandidates({integrationId, page, pageSize, filter})` →
51769
+ * paginated candidate list, each row collapsed.
51770
+ * 2. User expands a row → `getCandidate({integrationId,
51771
+ * childNativeId})` returns the single candidate (with its nested
51772
+ * `children`) for the accordion render.
51773
+ * 3. User clicks "Adopt" on one or more candidates →
51774
+ * `adopt({integrationId, childNativeIds, perCandidate?})`
51775
+ * materialises one parent CamStack device per candidate plus its
51776
+ * accessory children. `perCandidate[childNativeId]` carries an
51777
+ * optional display-name override + a `hiddenChildIds` pre-hide set
51778
+ * (the parent's `accessories.hiddenChildIds` gates UI visibility).
51779
+ * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
51780
+ * removes the parent + every child from the kernel registry.
51781
+ */
51782
+ /**
51783
+ * Status enum for a discovered device. Generic enough for
51571
51784
  * battery cams, awake cams, and unreachable cams alike.
51572
51785
  */
51573
51786
  var DiscoveredChildStatusSchema = _enum([
@@ -51584,12 +51797,12 @@ var DiscoveredChildDeviceSchema = lazy(() => object({
51584
51797
  /** DeviceType the child should be created with on adopt. */
51585
51798
  type: _enum(DeviceType),
51586
51799
  status: DiscoveredChildStatusSchema,
51587
- /** Free-form integration-specific metadata surfaced in the panel. */
51800
+ /** Free-form integration-specific metadata surfaced in the adoption modal. */
51588
51801
  metadata: object({
51589
51802
  model: string().optional(),
51590
51803
  serialNumber: string().optional(),
51591
51804
  uid: string().optional(),
51592
- /** Reolink: 0-based channel index inside the parent NVR/Hub. */
51805
+ /** Reolink: 0-based channel index inside the parent NVR. */
51593
51806
  rtspChannel: number$1().int().nonnegative().optional(),
51594
51807
  isBattery: boolean().optional(),
51595
51808
  isDoorbell: boolean().optional(),
@@ -51605,86 +51818,24 @@ var DiscoveredChildDeviceSchema = lazy(() => object({
51605
51818
  }).default({}),
51606
51819
  /**
51607
51820
  * `true` when the framework already created a child device for this
51608
- * `childNativeId` under the current parent. The panel uses it to
51821
+ * `childNativeId` under the current parent. The adoption modal uses it to
51609
51822
  * gate the Add/Remove button and surface the existing `deviceId`.
51610
51823
  */
51611
51824
  alreadyAdopted: boolean(),
51612
51825
  /** When `alreadyAdopted=true`, the framework-assigned child device id. */
51613
51826
  adoptedDeviceId: number$1().int().nonnegative().nullable(),
51614
- /** Capability names the candidate advertises — integrations populate, Hubs omit. */
51827
+ /** Capability names the candidate advertises — integrations populate, flat enumerations omit. */
51615
51828
  capabilities: array(string()).readonly().optional(),
51616
- /** Feature flags the candidate advertises — integrations populate, Hubs omit. */
51829
+ /** Feature flags the candidate advertises — integrations populate, flat enumerations omit. */
51617
51830
  features: array(string()).readonly().optional(),
51618
51831
  /** Upstream-system identity + rendering hints for the candidate. */
51619
51832
  sourceInfo: SourceInfoSchema.optional(),
51620
- /** Nested entity-children for accordion preview — integrations populate, Hubs omit. */
51833
+ /** Nested entity-children for accordion preview — integrations populate, flat enumerations omit. */
51621
51834
  children: array(DiscoveredChildDeviceSchema).readonly().optional(),
51622
51835
  /** `childNativeId` of the gateway candidate in the same list this device sits behind. */
51623
51836
  parentStableId: string().optional()
51624
51837
  }));
51625
51838
  /**
51626
- * Status block — populated by the integration after each
51627
- * `refreshDiscovery` (or push-driven update). The runtime-state slice
51628
- * is what the panel reads via the per-device proxy; `getStatus`
51629
- * returns the same payload via the codegen'd auto-injection.
51630
- */
51631
- var DeviceDiscoveryStatusSchema = object({
51632
- discovered: array(DiscoveredChildDeviceSchema),
51633
- /** Wall-clock ms of the last successful enumeration. */
51634
- lastDiscoveryAt: number$1().int().nonnegative().nullable(),
51635
- /** Last error surfaced from the source (rendered as a banner). */
51636
- lastError: string().nullable()
51637
- });
51638
- 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(), {
51639
- kind: "mutation",
51640
- auth: "admin"
51641
- }), method(object({
51642
- deviceId: number$1().int().nonnegative(),
51643
- childNativeId: string(),
51644
- /** Optional override for the child's display name. */
51645
- name: string().optional()
51646
- }), object({
51647
- deviceId: number$1().int().nonnegative(),
51648
- stableId: string()
51649
- }), {
51650
- kind: "mutation",
51651
- auth: "admin"
51652
- }), method(object({
51653
- deviceId: number$1().int().nonnegative(),
51654
- childDeviceId: number$1().int().nonnegative()
51655
- }), _void(), {
51656
- kind: "mutation",
51657
- auth: "admin"
51658
- });
51659
- /**
51660
- * `device-adoption` — generic discovery + adoption surface,
51661
- * system-scoped collection (one provider per integration addon), routed
51662
- * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
51663
- * pin model as `connection-test`. The admin UI keeps using
51664
- * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
51665
- * successor to `ha-discovery`:
51666
- * keyed by `integrationId` (the addon resolves integrationId → broker
51667
- * internally) rather than a connection-specific `brokerId`, and it
51668
- * REUSES the shared `DiscoveredChildDevice` candidate type from
51669
- * `device-discovery.cap.ts` so a single shared adoption panel renders
51670
- * any integration's candidate tree.
51671
- *
51672
- * UI flow (Integrations page → integration detail):
51673
- * 1. `listCandidates({integrationId, page, pageSize, filter})` →
51674
- * paginated candidate list, each row collapsed.
51675
- * 2. User expands a row → `getCandidate({integrationId,
51676
- * childNativeId})` returns the single candidate (with its nested
51677
- * `children`) for the accordion render.
51678
- * 3. User clicks "Adopt" on one or more candidates →
51679
- * `adopt({integrationId, childNativeIds, perCandidate?})`
51680
- * materialises one parent CamStack device per candidate plus its
51681
- * accessory children. `perCandidate[childNativeId]` carries an
51682
- * optional display-name override + a `hiddenChildIds` pre-hide set
51683
- * (the parent's `accessories.hiddenChildIds` gates UI visibility).
51684
- * 4. User clicks "Release" → `release({integrationId, camDeviceId})`
51685
- * removes the parent + every child from the kernel registry.
51686
- */
51687
- /**
51688
51839
  * Provider-declared discovery *granularity* filter (the keystone of the
51689
51840
  * single-entity-import design). A provider advertises which discovery
51690
51841
  * granularities it supports via `listCandidateFilters`; the operator picks
@@ -53051,8 +53202,14 @@ method(object({
53051
53202
  "string",
53052
53203
  "number",
53053
53204
  "boolean",
53054
- "enum"
53205
+ "enum",
53206
+ "union"
53055
53207
  ]),
53208
+ unionMembers: array(_enum([
53209
+ "string",
53210
+ "number",
53211
+ "boolean"
53212
+ ])).optional(),
53056
53213
  enumValues: array(string()).optional(),
53057
53214
  item: boolean().optional(),
53058
53215
  quantity: ReadingQuantitySchema.optional()
@@ -55430,8 +55587,85 @@ method(_void(), array(FailureContributionSchema).readonly());
55430
55587
  * - `FanPreset` — preset selector
55431
55588
  * - `FanDirection` — direction toggle (ceiling fans)
55432
55589
  * - `FanOscillating` — oscillation toggle
55590
+ *
55591
+ * Per-axis oscillation (`oscillationAxes`, `setOscillationAxis`, D1034): an air
55592
+ * circulator sweeps horizontally and vertically, each axis with its own
55593
+ * switch, fixed angle, sweep bounds and limits. A provider may report them
55594
+ * natively; otherwise the OPERATOR links sibling devices to each field in
55595
+ * Customize (a `replace` over the fields listed in `overridable` — nothing is
55596
+ * linked or inferred by itself), and a write to a linked field is forwarded to
55597
+ * its source. `oscillating` stays the single summary flag: when axes exist it
55598
+ * means "any axis oscillates" (`anyAxisOscillating`).
55433
55599
  */
55434
55600
  var FanDirectionSchema = _enum(["forward", "reverse"]);
55601
+ var FAN_OSCILLATION_AXES = ["horizontal", "vertical"];
55602
+ var FanOscillationAxisNameSchema = _enum(FAN_OSCILLATION_AXES);
55603
+ var FanOscillationAxisFieldSchema = _enum([
55604
+ "oscillating",
55605
+ "angle",
55606
+ "sweepFrom",
55607
+ "sweepTo"
55608
+ ]);
55609
+ /** The limits of one axis, read from the source that serves its angle. */
55610
+ var FAN_OSCILLATION_AXIS_LIMITS = [
55611
+ "min",
55612
+ "max",
55613
+ "step"
55614
+ ];
55615
+ /**
55616
+ * One oscillation axis. Every reading the device has not reported is `null`,
55617
+ * never `0` (D393): `0°` is a real position. Each leaf defaults to `null`, so
55618
+ * a slice that names only the leaves it knows (a Customize link of one field)
55619
+ * is still a whole axis.
55620
+ */
55621
+ var FanOscillationAxisSchema = object({
55622
+ /** Whether the axis sweeps. */
55623
+ oscillating: boolean().nullable().default(null),
55624
+ /** The fixed position (degrees) the axis holds when it does not sweep. */
55625
+ angle: number$1().nullable().default(null),
55626
+ /** The sweep bounds (degrees): left → right, bottom → top. */
55627
+ sweepFrom: number$1().nullable().default(null),
55628
+ sweepTo: number$1().nullable().default(null),
55629
+ /** The angles the axis accepts. Null when the device states none. */
55630
+ min: number$1().nullable().default(null),
55631
+ max: number$1().nullable().default(null),
55632
+ step: number$1().nullable().default(null)
55633
+ });
55634
+ /** Both axes; an axis the device does not have is `null`. */
55635
+ var FanOscillationAxesSchema = object({
55636
+ horizontal: FanOscillationAxisSchema.nullable().default(null),
55637
+ vertical: FanOscillationAxisSchema.nullable().default(null)
55638
+ });
55639
+ var FanOscillationAxisRefusalSchema = _enum([
55640
+ "nothing-to-set",
55641
+ "axis-not-linked",
55642
+ "out-of-range",
55643
+ "source-gone",
55644
+ "source-unknown",
55645
+ "source-call-failed"
55646
+ ]);
55647
+ var FanOscillationAxisResultSchema = discriminatedUnion("status", [object({ status: literal("applied") }), object({
55648
+ status: literal("refused"),
55649
+ reason: FanOscillationAxisRefusalSchema,
55650
+ /** The field at fault, when one is. */
55651
+ field: FanOscillationAxisFieldSchema.optional(),
55652
+ /** One line for the operator, naming the axis, the field and the source. */
55653
+ detail: string(),
55654
+ /** Fields that DID land before the refusal (writes run in order, stop at the first failure). */
55655
+ applied: array(FanOscillationAxisFieldSchema)
55656
+ })]);
55657
+ var SetOscillationAxisInputSchema = object({
55658
+ deviceId: number$1().int().nonnegative(),
55659
+ axis: FanOscillationAxisNameSchema,
55660
+ oscillating: boolean().optional(),
55661
+ angle: number$1().optional(),
55662
+ sweepFrom: number$1().optional(),
55663
+ sweepTo: number$1().optional()
55664
+ });
55665
+ /** The state path of one axis field: `oscillationAxes.<axis>.<field>`. */
55666
+ function fanAxisPath(axis, field) {
55667
+ return `oscillationAxes.${axis}.${field}`;
55668
+ }
55435
55669
  var FanControlStatusSchema = object({
55436
55670
  /** Active speed as 0..100 inclusive. Null when the device has no
55437
55671
  * speed surface (single-speed fan). */
@@ -55450,9 +55684,91 @@ var FanControlStatusSchema = object({
55450
55684
  /** Oscillation toggle. Null when the device has no oscillation
55451
55685
  * surface. */
55452
55686
  oscillating: boolean().nullable(),
55687
+ /**
55688
+ * Per-axis oscillation (air circulators). Absent when the device has no
55689
+ * per-axis surface and nothing is linked in Customize.
55690
+ */
55691
+ oscillationAxes: FanOscillationAxesSchema.optional(),
55453
55692
  /** Ms epoch when the slice was last updated. */
55454
55693
  lastChangedAt: number$1()
55455
55694
  });
55695
+ var FAN_CUSTOMIZE_DEVICE_TYPES = [DeviceType.Fan];
55696
+ /** The Customize section the axis targets are listed under. */
55697
+ var AXES_SECTION = "oscillation-axes";
55698
+ function axisOscillatingTarget(axis) {
55699
+ return {
55700
+ id: `${axis}-oscillating`,
55701
+ cardinality: "scalar",
55702
+ vocabulary: {
55703
+ cap: "fan-control",
55704
+ stateField: "oscillating"
55705
+ },
55706
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
55707
+ apply: "replace",
55708
+ section: AXES_SECTION,
55709
+ path: fanAxisPath(axis, "oscillating"),
55710
+ sources: [{
55711
+ kind: "switch",
55712
+ transforms: [{ kind: "identity" }]
55713
+ }],
55714
+ sourceReport: { status: "assignment-status" }
55715
+ };
55716
+ }
55717
+ /**
55718
+ * A numeric axis field. The `angle` link also carries the axis limits, read
55719
+ * from the SAME linked control's own range (`min`/`max`/`step`), so the limits
55720
+ * are the source's, never guessed.
55721
+ */
55722
+ function axisNumericTarget(axis, field) {
55723
+ const base = {
55724
+ id: `${axis}-${field}`,
55725
+ cardinality: "scalar",
55726
+ vocabulary: { cap: "fan-control" },
55727
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
55728
+ apply: "replace",
55729
+ section: AXES_SECTION,
55730
+ path: fanAxisPath(axis, field),
55731
+ sources: [{
55732
+ kind: "numeric",
55733
+ transforms: [{ kind: "identity" }]
55734
+ }],
55735
+ sourceReport: { status: "assignment-status" }
55736
+ };
55737
+ if (field !== "angle") return base;
55738
+ return {
55739
+ ...base,
55740
+ companions: FAN_OSCILLATION_AXIS_LIMITS.map((limit) => ({
55741
+ kind: "source-field",
55742
+ path: fanAxisPath(axis, limit),
55743
+ field: limit
55744
+ }))
55745
+ };
55746
+ }
55747
+ var AXIS_TARGETS = FAN_OSCILLATION_AXES.flatMap((axis) => [
55748
+ axisOscillatingTarget(axis),
55749
+ axisNumericTarget(axis, "angle"),
55750
+ axisNumericTarget(axis, "sweepFrom"),
55751
+ axisNumericTarget(axis, "sweepTo")
55752
+ ]);
55753
+ /** A select (an enum control) the operator links to the fan's `preset`. */
55754
+ var PRESET_TARGET = {
55755
+ id: "preset",
55756
+ cardinality: "scalar",
55757
+ vocabulary: { cap: "fan-control" },
55758
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
55759
+ apply: "replace",
55760
+ path: "preset",
55761
+ sources: [{
55762
+ kind: "field",
55763
+ valueKinds: ["string"],
55764
+ transforms: [{ kind: "identity" }]
55765
+ }],
55766
+ sourceReport: { status: "assignment-status" }
55767
+ };
55768
+ [...AXIS_TARGETS, PRESET_TARGET].map((target) => ({
55769
+ path: target.path,
55770
+ by: target.id
55771
+ }));
55456
55772
  DeviceType.Fan, optionalMethod(object({
55457
55773
  deviceId: number$1().int().nonnegative(),
55458
55774
  speed: number$1().min(0).max(100)
@@ -55477,17 +55793,37 @@ DeviceType.Fan, optionalMethod(object({
55477
55793
  }), _void(), {
55478
55794
  kind: "mutation",
55479
55795
  auth: "protected"
55796
+ }), optionalMethod(SetOscillationAxisInputSchema, FanOscillationAxisResultSchema, {
55797
+ kind: "mutation",
55798
+ auth: "protected"
55799
+ });
55800
+ /** One axis as a preset wants it; an absent field is left as it is. */
55801
+ var FanPresetAxisSchema = object({
55802
+ oscillating: boolean().optional(),
55803
+ angle: number$1().optional(),
55804
+ sweepFrom: number$1().optional(),
55805
+ sweepTo: number$1().optional()
55806
+ });
55807
+ /** The fan-control state a preset sets; an absent field is left as it is. */
55808
+ var FanPresetStateSchema = object({
55809
+ speed: number$1().min(0).max(100).optional(),
55810
+ /** The fan's own preset mode (or the linked select's option). */
55811
+ preset: string().min(1).optional(),
55812
+ direction: FanDirectionSchema.optional(),
55813
+ oscillationAxes: object({
55814
+ horizontal: FanPresetAxisSchema.optional(),
55815
+ vertical: FanPresetAxisSchema.optional()
55816
+ }).optional()
55480
55817
  });
55481
55818
  var FanPresetSchema = object({
55482
55819
  /** Stable key; never reused after a delete within one device's list. */
55483
55820
  id: string().min(1).max(64),
55484
55821
  /** What the operator and a voice assistant call it. */
55485
55822
  name: string().trim().min(1).max(40),
55486
- steps: array(ActionStepSchema).min(1).max(20)
55823
+ state: FanPresetStateSchema
55487
55824
  });
55488
55825
  var FanPresetsRefusalSchema = _enum([
55489
- "not-sibling",
55490
- "bad-target",
55826
+ "empty-state",
55491
55827
  "duplicate-name",
55492
55828
  "duplicate-id",
55493
55829
  "too-many",
@@ -55499,72 +55835,55 @@ var FanPresetsSetResultSchema = discriminatedUnion("status", [object({
55499
55835
  }), object({
55500
55836
  status: literal("refused"),
55501
55837
  reason: FanPresetsRefusalSchema,
55502
- /** Names the preset and step at fault. */
55838
+ /** Names the preset at fault. */
55503
55839
  detail: string()
55504
55840
  })]);
55505
- var FanPresetStepResultSchema = object({
55506
- index: number$1().int().nonnegative(),
55841
+ var FanPresetFieldResultSchema = object({
55842
+ /** The state path: `speed`, `preset`, `direction`, `oscillationAxes.horizontal.angle`. */
55843
+ field: string(),
55507
55844
  outcome: _enum([
55508
55845
  "applied",
55509
55846
  "failed",
55510
55847
  "not-run",
55511
55848
  "refused"
55512
55849
  ]),
55513
- deviceId: number$1().int().nonnegative().optional(),
55514
- cap: string().optional(),
55515
- method: string().optional(),
55516
55850
  /** The cause, for every outcome but `applied`. */
55517
55851
  message: string().optional()
55518
55852
  });
55519
55853
  var FanPresetApplyResultSchema = object({
55520
- /** `applied`: every step ran. `partial`: some ran, one failed. `refused`: nothing ran. */
55854
+ /** `applied`: every field landed. `partial`: some did, one did not. `refused`: nothing ran. */
55521
55855
  status: _enum([
55522
55856
  "applied",
55523
55857
  "partial",
55524
55858
  "refused"
55525
55859
  ]),
55526
- steps: array(FanPresetStepResultSchema)
55860
+ fields: array(FanPresetFieldResultSchema)
55527
55861
  });
55528
55862
  var FanCaptureFieldSchema = _enum([
55529
55863
  "speed",
55530
- "oscillating",
55531
55864
  "direction",
55532
- "preset"
55865
+ "preset",
55866
+ "oscillationAxes"
55533
55867
  ]);
55534
- var FanCaptureOmissionSchema = object({
55535
- /** A fan field (`speed`) or `step <n>` for a sibling step. */
55536
- what: string(),
55537
- /** Why no value was taken: unknown reading (never stored as 0, D393), or a step that cannot be read. */
55538
- reason: string()
55539
- });
55540
- var FanCaptureItemSchema = object({
55541
- group: _enum([
55542
- "fan",
55543
- "oscillation",
55544
- "angles"
55545
- ]),
55546
- /** What the step sets, in the operator's words (a device name, a fan field). */
55547
- label: string()
55548
- });
55549
55868
  var FanPresetCaptureResultSchema = object({
55550
- /** The steps filled from the device's current values; NOT saved. */
55551
- steps: array(ActionStepSchema),
55552
- /** One entry per step, same order: its review group and label. */
55553
- items: array(FanCaptureItemSchema),
55554
- omitted: array(FanCaptureOmissionSchema)
55869
+ /** The fan's CURRENT fan-control state, as a preset; NOT saved. */
55870
+ state: FanPresetStateSchema,
55871
+ omitted: array(object({
55872
+ /** A state path (`speed`, `oscillationAxes.vertical.angle`). */
55873
+ what: string(),
55874
+ /** Why no value was taken: an unknown reading is never stored as 0 (D393). */
55875
+ reason: string()
55876
+ }))
55555
55877
  });
55556
- var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
55878
+ var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
55557
55879
  DeviceType.Fan;
55558
- method(deviceInput$2, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$2.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
55880
+ method(deviceInput$1, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$1.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
55559
55881
  kind: "mutation",
55560
55882
  auth: "admin"
55561
- }), method(deviceInput$2.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
55883
+ }), method(deviceInput$1.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
55562
55884
  kind: "mutation",
55563
55885
  auth: "protected"
55564
- }), method(deviceInput$2.extend({
55565
- fields: array(FanCaptureFieldSchema).optional(),
55566
- steps: array(ActionStepSchema).max(20).default([])
55567
- }), FanPresetCaptureResultSchema, { auth: "protected" });
55886
+ }), method(deviceInput$1.extend({ fields: array(FanCaptureFieldSchema).optional() }), FanPresetCaptureResultSchema, { auth: "protected" });
55568
55887
  /**
55569
55888
  * Per-device feature/identity probe slice. Holds the runtime-resolved
55570
55889
  * truth about what a device CAN do — which the kernel uses to:
@@ -55688,7 +56007,7 @@ var GroupActiveSchema = object({
55688
56007
  /** Ms epoch when the slice was last updated. */
55689
56008
  lastChangedAt: number$1()
55690
56009
  });
55691
- DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
56010
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
55692
56011
  var GroupCommandsSchema = object({
55693
56012
  /** One row per member that has been commanded. A later command replaces that member's row. */
55694
56013
  results: array(object({
@@ -55700,7 +56019,7 @@ results: array(object({
55700
56019
  /** Ms epoch of the attempt. */
55701
56020
  at: number$1()
55702
56021
  })) });
55703
- DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
56022
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
55704
56023
  /**
55705
56024
  * How many members of a helper group answered (D944). Counts are integers,
55706
56025
  * not measurements: zero included is a real count, never a stand-in reading.
@@ -55724,7 +56043,7 @@ var GroupStatusSchema = object({
55724
56043
  label: "Members"
55725
56044
  }))
55726
56045
  });
55727
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
56046
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
55728
56047
  /**
55729
56048
  * Heat pump settable surface (D1026): one typed method per parameter, never a
55730
56049
  * generic `set(key, value)`. The values a mode takes and the limits of a number
@@ -55932,7 +56251,7 @@ var HeatingValveStatusSchema = object({
55932
56251
  /** Ms epoch when the slice was last updated (push or poll). */
55933
56252
  lastFetchedAt: number$1()
55934
56253
  });
55935
- DeviceType.Thermostat;
56254
+ DeviceType.Climate;
55936
56255
  /**
55937
56256
  * timed-run - run a device for a chosen time, then stop it (D993).
55938
56257
  *
@@ -55948,13 +56267,13 @@ DeviceType.Thermostat;
55948
56267
  * retried in a loop - D49); a future one is re-armed.
55949
56268
  *
55950
56269
  * What a device may be run for, and for how long at most, is per device type
55951
- * ({@link TIMED_RUN_LIMITS}): the maximum is a safety bound, not a preference,
56270
+ * and role ({@link timedRunLimitOf}): the maximum is a safety bound, not a preference,
55952
56271
  * so a request above it is REFUSED with a typed reason, never clamped.
55953
56272
  */
55954
56273
  var TimedRunUnitSchema = _enum(["s", "min"]);
55955
56274
  _enum(["switch", "pet-fountain"]);
55956
- DeviceType.Heater, DeviceType.PetFountain;
55957
- DeviceType.Heater, DeviceType.PetFountain;
56275
+ DeviceType.Switch, DeviceType.PetFountain;
56276
+ DeviceType.Switch, DeviceRole.SwitchHeater;
55958
56277
  /** One duration, as the one-tap run asks for it. */
55959
56278
  var TimedRunQuickRunSchema = object({
55960
56279
  duration: number$1().positive().finite(),
@@ -56126,8 +56445,8 @@ var HeroSceneSchema = object({
56126
56445
  /** 0..1: volume, cover position, cycle progress. */
56127
56446
  level: number$1().min(0).max(1).nullable()
56128
56447
  });
56129
- 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;
56130
- 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;
56448
+ 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;
56449
+ 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;
56131
56450
  /** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
56132
56451
  var HeroTextSchema = object({
56133
56452
  en: string(),
@@ -56512,8 +56831,8 @@ var HeroRowModelSchema = object({
56512
56831
  extras: array(HeroControlSchema).max(2).optional(),
56513
56832
  trailing: HeroFactSchema.nullable()
56514
56833
  });
56515
- DeviceType.Climate, DeviceType.Thermostat;
56516
- DeviceType.Climate, DeviceType.Thermostat, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer;
56834
+ DeviceType.Climate;
56835
+ DeviceType.Climate, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer;
56517
56836
  /**
56518
56837
  * hero-layout — what a device's hero says (D1023). Read-only: the FIXED
56519
56838
  * layouts live in `@camstack/types` and nothing here stores or edits one.
@@ -56545,7 +56864,10 @@ method(heroInput, HeroModelSchema.nullable(), {
56545
56864
  }), method(rowModelsInput, array(HeroRowModelSchema.nullable()), {
56546
56865
  auth: "protected",
56547
56866
  role: "viewer"
56548
- }), method(object({ deviceType: string() }), HeroLayoutRowsSchema, {
56867
+ }), method(object({
56868
+ deviceType: string(),
56869
+ role: string().nullable().optional()
56870
+ }), HeroLayoutRowsSchema, {
56549
56871
  auth: "protected",
56550
56872
  role: "viewer"
56551
56873
  });
@@ -56622,7 +56944,7 @@ var HumiditySensorStatusSchema = object({
56622
56944
  /** Ms epoch when the slice was last updated. */
56623
56945
  lastFetchedAt: number$1()
56624
56946
  });
56625
- DeviceType.Sensor, DeviceType.Thermostat;
56947
+ DeviceType.Sensor, DeviceType.Climate;
56626
56948
  /**
56627
56949
  * Image display cap. Models a single still image exposed by an integration —
56628
56950
  * a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
@@ -70916,7 +71238,6 @@ object({
70916
71238
  DeviceType.Light,
70917
71239
  DeviceType.Fan,
70918
71240
  DeviceType.Climate,
70919
- DeviceType.Thermostat,
70920
71241
  DeviceType.Humidifier,
70921
71242
  DeviceType.WaterHeater,
70922
71243
  DeviceType.MediaPlayer,
@@ -70925,52 +71246,8 @@ object({
70925
71246
  DeviceType.Dishwasher,
70926
71247
  DeviceType.Vacuum,
70927
71248
  DeviceType.LawnMower,
70928
- DeviceType.PetFeeder,
70929
- DeviceType.Heater
71249
+ DeviceType.PetFeeder
70930
71250
  ].filter((type) => type !== DeviceType.Sensor);
70931
- var PowerSourceRefusalReasonSchema = _enum([
70932
- "no-power-source",
70933
- "switch-missing",
70934
- "switch-offline",
70935
- "switch-unknown",
70936
- "restart-in-progress",
70937
- "switch-call-failed"
70938
- ]);
70939
- var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
70940
- accepted: literal(false),
70941
- reason: PowerSourceRefusalReasonSchema,
70942
- /** One line for the operator, naming the switch. */
70943
- message: string()
70944
- })]);
70945
- var PowerSourceInfoSchema = object({
70946
- /** False when the device has no power source linked; the rest is then empty. */
70947
- linked: boolean(),
70948
- switchDeviceId: number$1().nullable(),
70949
- switchName: string().nullable(),
70950
- /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
70951
- switchOn: boolean().nullable(),
70952
- switchOnline: boolean().nullable(),
70953
- restartInProgress: boolean(),
70954
- offSeconds: number$1().int()
70955
- });
70956
- object({
70957
- /** Null while the switch has not reported: unknown is never `false` (D393). */
70958
- switchOn: boolean().nullable(),
70959
- offSeconds: number$1().int(),
70960
- lastFetchedAt: number$1()
70961
- });
70962
- 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;
70963
- var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
70964
- systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70965
- kind: "mutation",
70966
- auth: "protected"
70967
- }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70968
- kind: "mutation",
70969
- auth: "protected"
70970
- }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70971
- kind: "mutation",
70972
- auth: "protected"
70973
- });
70974
71251
  /**
70975
71252
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
70976
71253
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -74098,7 +74375,7 @@ object({
74098
74375
  phase: string().nullable()
74099
74376
  });
74100
74377
  Object.values(DeviceType);
74101
- 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;
74378
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder;
74102
74379
  /**
74103
74380
  * scene-monitor — device-scoped reference-region state cap. An operator marks
74104
74381
  * a rect ROI on a camera frame and names one or more states; the engine
@@ -75799,7 +76076,7 @@ var SwitchStatusSchema = object({
75799
76076
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
75800
76077
  lastChangedAt: number$1()
75801
76078
  });
75802
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Heater, method(object({
76079
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
75803
76080
  deviceId: number$1(),
75804
76081
  on: boolean()
75805
76082
  }), _void(), {
@@ -76424,7 +76701,7 @@ var TemperatureSensorStatusSchema = object({
76424
76701
  /** Ms epoch when the slice was last updated (push or poll). */
76425
76702
  lastFetchedAt: number$1()
76426
76703
  });
76427
- DeviceType.Sensor, DeviceType.Thermostat;
76704
+ DeviceType.Sensor, DeviceType.Climate;
76428
76705
  var TemplateKindSchema = _enum(["remote"]);
76429
76706
  /**
76430
76707
  * template — the generic store of reusable, named operator data (D963). A
@@ -78981,7 +79258,9 @@ var AccessoryKind = {
78981
79258
  };
78982
79259
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
78983
79260
  DeviceType.HeatPump;
78984
- 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;
79261
+ DeviceType.Climate;
79262
+ DeviceRole.ClimateThermostat, DeviceRole.ClimateAc, DeviceRole.ClimateRadiator, DeviceRole.ClimateFloor, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit;
79263
+ 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;
78985
79264
  new Set(Object.values(DeviceType));
78986
79265
  /** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
78987
79266
  function contribution(cap, schema, build) {
@@ -80987,7 +81266,7 @@ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pu
80987
81266
  ...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
80988
81267
  ...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
80989
81268
  ];
80990
- 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;
81269
+ 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;
80991
81270
  /**
80992
81271
  * Who looks like what (D1023). One look per {@link DeviceType}, refined by a
80993
81272
  * {@link DeviceRole} where the role changes how the device reads (a leak
@@ -81631,9 +81910,9 @@ lookOf({
81631
81910
  idle: INFO,
81632
81911
  standby: MUTED
81633
81912
  });
81634
- DeviceType.Climate, DeviceType.Thermostat;
81635
- 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;
81636
- 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;
81913
+ DeviceType.Climate;
81914
+ 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;
81915
+ 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;
81637
81916
  Object.freeze({
81638
81917
  "accessories.getStatus": {
81639
81918
  capName: "accessories",
@@ -83483,41 +83762,6 @@ Object.freeze({
83483
83762
  access: "create",
83484
83763
  role: "admin"
83485
83764
  },
83486
- "deviceDiscovery.adoptDevice": {
83487
- capName: "device-discovery",
83488
- capScope: "device",
83489
- addonId: null,
83490
- access: "create",
83491
- role: "admin"
83492
- },
83493
- "deviceDiscovery.getStatus": {
83494
- capName: "device-discovery",
83495
- capScope: "device",
83496
- addonId: null,
83497
- access: "view",
83498
- role: "viewer"
83499
- },
83500
- "deviceDiscovery.listDiscovered": {
83501
- capName: "device-discovery",
83502
- capScope: "device",
83503
- addonId: null,
83504
- access: "view",
83505
- role: "viewer"
83506
- },
83507
- "deviceDiscovery.refreshDiscovery": {
83508
- capName: "device-discovery",
83509
- capScope: "device",
83510
- addonId: null,
83511
- access: "create",
83512
- role: "admin"
83513
- },
83514
- "deviceDiscovery.releaseDevice": {
83515
- capName: "device-discovery",
83516
- capScope: "device",
83517
- addonId: null,
83518
- access: "create",
83519
- role: "admin"
83520
- },
83521
83765
  "deviceExport.applyDeviceSettingsPatch": {
83522
83766
  capName: "device-export",
83523
83767
  capScope: "system",
@@ -85065,6 +85309,13 @@ Object.freeze({
85065
85309
  access: "create",
85066
85310
  role: "viewer"
85067
85311
  },
85312
+ "fanControl.setOscillationAxis": {
85313
+ capName: "fan-control",
85314
+ capScope: "device",
85315
+ addonId: null,
85316
+ access: "create",
85317
+ role: "viewer"
85318
+ },
85068
85319
  "fanControl.setPercentage": {
85069
85320
  capName: "fan-control",
85070
85321
  capScope: "device",
@@ -92086,7 +92337,7 @@ function projectAction(cap, action) {
92086
92337
  };
92087
92338
  }
92088
92339
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
92089
- 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;
92340
+ 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;
92090
92341
  DeviceFeature.BatteryOperated;
92091
92342
  function bound(cap, methods = [], authority = "reported") {
92092
92343
  return {
@@ -92600,35 +92851,6 @@ Object.freeze({
92600
92851
  form: "single",
92601
92852
  optional: false
92602
92853
  }],
92603
- "deviceDiscovery.adoptDevice": [{
92604
- name: "deviceId",
92605
- form: "single",
92606
- optional: false
92607
- }],
92608
- "deviceDiscovery.getStatus": [{
92609
- name: "deviceId",
92610
- form: "single",
92611
- optional: false
92612
- }],
92613
- "deviceDiscovery.listDiscovered": [{
92614
- name: "deviceId",
92615
- form: "single",
92616
- optional: false
92617
- }],
92618
- "deviceDiscovery.refreshDiscovery": [{
92619
- name: "deviceId",
92620
- form: "single",
92621
- optional: false
92622
- }],
92623
- "deviceDiscovery.releaseDevice": [{
92624
- name: "childDeviceId",
92625
- form: "single",
92626
- optional: false
92627
- }, {
92628
- name: "deviceId",
92629
- form: "single",
92630
- optional: false
92631
- }],
92632
92854
  "deviceExport.applyDeviceSettingsPatch": [{
92633
92855
  name: "deviceId",
92634
92856
  form: "single",
@@ -93192,6 +93414,11 @@ Object.freeze({
93192
93414
  form: "single",
93193
93415
  optional: false
93194
93416
  }],
93417
+ "fanControl.setOscillationAxis": [{
93418
+ name: "deviceId",
93419
+ form: "single",
93420
+ optional: false
93421
+ }],
93195
93422
  "fanControl.setPercentage": [{
93196
93423
  name: "deviceId",
93197
93424
  form: "single",
@@ -98105,9 +98332,14 @@ function thermostatCapability(slice, modes, features) {
98105
98332
  }
98106
98333
  };
98107
98334
  }
98108
- /** A thermostat is a THERMOSTAT, any other climate device an air conditioner. */
98109
- function climateCategoryFor(deviceType) {
98110
- return deviceType === "thermostat" ? "THERMOSTAT" : "AIR_CONDITIONER";
98335
+ /**
98336
+ * D1033 — one `climate` type, and the role says which thing it is: an air
98337
+ * conditioner is an AIR_CONDITIONER; a thermostat, a radiator, a floor loop, a
98338
+ * heat-pump circuit, a climate heater and a climate with no role yet are all a
98339
+ * THERMOSTAT.
98340
+ */
98341
+ function climateCategoryFor(role) {
98342
+ return role === DeviceRole.ClimateAc ? "AIR_CONDITIONER" : "THERMOSTAT";
98111
98343
  }
98112
98344
  function describeClimate(device) {
98113
98345
  const slice = readClimateSlice(device.slices["climate-control"]);
@@ -98141,7 +98373,7 @@ function describeClimate(device) {
98141
98373
  }] : [],
98142
98374
  ...extras
98143
98375
  ],
98144
- category: climateCategoryFor(device.type)
98376
+ category: climateCategoryFor(device.role)
98145
98377
  };
98146
98378
  }
98147
98379
  /** Amazon's `thermostatMode` for the state, or null while in a mode it lacks. */
@@ -99783,13 +100015,13 @@ async function applyCustom(c, deps, name) {
99783
100015
  tags: { deviceId: c.deviceId },
99784
100016
  meta: {
99785
100017
  preset: preset.name,
99786
- steps: result.steps.length
100018
+ fields: result.fields.length
99787
100019
  }
99788
100020
  });
99789
100021
  return successResponse$1(c, []);
99790
100022
  }
99791
- const bad = result.steps.find((s) => s.outcome === "failed" || s.outcome === "refused");
99792
- const detail = bad === void 0 ? result.status : `step ${bad.index}: ${bad.message ?? bad.outcome}`;
100023
+ const bad = result.fields.find((f) => f.outcome === "failed" || f.outcome === "refused");
100024
+ const detail = bad === void 0 ? result.status : `${bad.field}: ${bad.message ?? bad.outcome}`;
99793
100025
  deps.logger.warn("alexa fan-controller: custom preset did not fully apply", {
99794
100026
  tags: { deviceId: c.deviceId },
99795
100027
  meta: {
@@ -102756,18 +102988,17 @@ async function handleSetObjectDetectionClasses(header, endpoint, payloadRaw, ctx
102756
102988
  }] }
102757
102989
  };
102758
102990
  }
102759
- /** Device types this export may publish as a generic endpoint. `thermostat`
102760
- * (Home Assistant) and `climate` (an air conditioner, e.g. Gree) both carry
102761
- * the `climate-control` cap (D874). */
102991
+ /** Device types this export may publish as a generic endpoint. A `climate`
102992
+ * device carries the `climate-control` cap (D874); its role picks THERMOSTAT
102993
+ * or AIR_CONDITIONER (D1033). A plug-in heater is a `switch` (role
102994
+ * `switch-heater`). */
102762
102995
  var GENERIC_DEVICE_TYPES = [
102763
102996
  "light",
102764
102997
  "switch",
102765
- "heater",
102766
102998
  "siren",
102767
102999
  "sensor",
102768
103000
  "lock",
102769
103001
  "presence",
102770
- "thermostat",
102771
103002
  "climate",
102772
103003
  "cover",
102773
103004
  "fan",
@@ -110770,7 +111001,6 @@ var SUPPORTED_KINDS = [
110770
111001
  DeviceType.Sensor,
110771
111002
  DeviceType.Lock,
110772
111003
  DeviceType.Presence,
110773
- DeviceType.Thermostat,
110774
111004
  DeviceType.Climate,
110775
111005
  DeviceType.Cover,
110776
111006
  DeviceType.Generic