@camstack/addon-pipeline-orchestrator 1.2.675 → 1.2.676

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/assets/viewer/.viewer-current-files.json +7 -7
  3. package/assets/viewer/.viewer-version +1 -1
  4. package/assets/viewer/_expo/static/js/web/{__common-4f914318fd141d15531ac7ddf4031092.js → __common-98b27160c543cc31e34f70fa8ed0aba3.js} +7 -7
  5. package/assets/viewer/_expo/static/js/web/{index-ff114e0583aff9ba56dcdd8fbe52e4fc.js → index-6fc41b340364123d0ac05b0439f22ce3.js} +1 -1
  6. package/assets/viewer/embed/assets/{MaskShapeCanvas-DI4BY7W2-UvJLLJkx.js → MaskShapeCanvas-DI4BY7W2-45Tvv4x3.js} +1 -1
  7. package/assets/viewer/embed/assets/{MotionZonesSettings-CiYjd-yl-CewG16ye.js → MotionZonesSettings-CiYjd-yl-BzmguZ-t.js} +1 -1
  8. package/assets/viewer/embed/assets/{PrivacyMaskSettings-BmRdUrPp-CU-fziSk.js → PrivacyMaskSettings-BmRdUrPp-nVpBN44i.js} +1 -1
  9. package/assets/viewer/embed/assets/{SceneMonitorEditor-J4Ix_0tu-Bd1FWoZW.js → SceneMonitorEditor-J4Ix_0tu-DlpiU36r.js} +1 -1
  10. package/assets/viewer/embed/assets/index-B8SEO5Cv.js +117 -0
  11. package/assets/viewer/embed/index.html +1 -1
  12. package/assets/viewer/index.html +1 -1
  13. package/dist/_stub.js +2 -2
  14. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CjTvYWLp.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-Bc9E-zRz.mjs} +2 -2
  15. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C_nbf3R8.mjs +26 -0
  16. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BU7gD6fr.mjs +26 -0
  17. package/dist/{hostInit-C5m4xM6s.mjs → hostInit-nUxGHhQJ.mjs} +2 -2
  18. package/dist/index.js +1268 -233
  19. package/dist/index.mjs +1268 -233
  20. package/dist/remoteEntry.js +1 -1
  21. package/package.json +2 -2
  22. package/assets/viewer/embed/assets/index-C_4i1VmO.js +0 -117
  23. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bc_8pLH6.mjs +0 -26
  24. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Bul4xTZU.mjs +0 -26
package/dist/index.js CHANGED
@@ -833,7 +833,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
833
833
  return EventCategory;
834
834
  }({});
835
835
  //#endregion
836
- //#region ../types/dist/device-type-CbDhVwFP.mjs
836
+ //#region ../types/dist/composed-stable-id-DLcPInGv.mjs
837
837
  /**
838
838
  import { errMsg } from '@camstack/types'
839
839
  * Extract a human-readable message from an unknown error value.
@@ -959,6 +959,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
959
959
  * (`reboot`, `device-admin-link`). Products are NOT its children — they are
960
960
  * adopted beside it — and its connection settings stay on the integration. */
961
961
  DeviceType["Gateway"] = "gateway";
962
+ /** A heat pump (any vendor): the compressor unit with its circuits (heating, hot
963
+ * water, cooling, solar), its system modes and its power. One main read-only
964
+ * `heat-pump-status` cap carries all of it; `heat-pump-control` sets it (D1026). */
965
+ DeviceType["HeatPump"] = "heat-pump";
962
966
  return DeviceType;
963
967
  }({});
964
968
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -1231,6 +1235,12 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1231
1235
  DeviceRole["IrTransmitter"] = "ir-transmitter";
1232
1236
  return DeviceRole;
1233
1237
  }({});
1238
+ /**
1239
+ * A composed device's stableId is this prefix plus the block id. Its own module,
1240
+ * free of zod, so the addon runner can read it through `@camstack/types/addon`
1241
+ * without loading the schema barrel (D28).
1242
+ */
1243
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1234
1244
  //#endregion
1235
1245
  //#region ../../node_modules/zod/v4/core/core.js
1236
1246
  var _a$1;
@@ -6043,7 +6053,7 @@ var ZodIssueCode = {
6043
6053
  var ZodFirstPartyTypeKind;
6044
6054
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6045
6055
  //#endregion
6046
- //#region ../types/dist/sleep-CkinsFFb.mjs
6056
+ //#region ../types/dist/sleep-VrfKAAGN.mjs
6047
6057
  /**
6048
6058
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6049
6059
  * window to float samples (D455).
@@ -9582,15 +9592,52 @@ var PeerBytesTicketSchema = object({
9582
9592
  */
9583
9593
  declaredBytes: number$1().int().nonnegative().nullable()
9584
9594
  });
9585
- discriminatedUnion("kind", [object({
9586
- kind: literal("action"),
9587
- actionId: string(),
9588
- runId: string(),
9589
- automationId: string().optional()
9590
- }), object({
9591
- kind: literal("scheduler"),
9592
- schedulerId: string()
9593
- })]);
9595
+ /**
9596
+ * The match a notification rule fired on (D705). Carried as a command origin so an
9597
+ * Action the rule starts can press `alarm-panel.trigger` as that match, not as an
9598
+ * anonymous press (D735). The same fields a rule fire ref freezes.
9599
+ */
9600
+ var RuleFireOriginSchema = object({
9601
+ ruleId: string(),
9602
+ ruleName: string(),
9603
+ deviceId: number$1().int(),
9604
+ sourceDeviceId: number$1().int().optional(),
9605
+ recordId: string(),
9606
+ timestamp: number$1(),
9607
+ trackId: string().optional(),
9608
+ eventId: string().optional(),
9609
+ className: string().optional(),
9610
+ label: string().optional(),
9611
+ zones: array(string()).optional(),
9612
+ confidence: number$1().optional(),
9613
+ sensorChange: object({
9614
+ name: string(),
9615
+ kind: string(),
9616
+ state: string()
9617
+ }).optional(),
9618
+ extraStills: array(object({
9619
+ ownerId: string(),
9620
+ cameraId: number$1().int()
9621
+ })).optional()
9622
+ });
9623
+ discriminatedUnion("kind", [
9624
+ object({
9625
+ kind: literal("action"),
9626
+ actionId: string(),
9627
+ runId: string(),
9628
+ automationId: string().optional(),
9629
+ /** The rule fire that started this run, when one did (D705). */
9630
+ ruleFire: RuleFireOriginSchema.optional()
9631
+ }),
9632
+ object({
9633
+ kind: literal("scheduler"),
9634
+ schedulerId: string()
9635
+ }),
9636
+ object({
9637
+ kind: literal("rule"),
9638
+ fire: RuleFireOriginSchema
9639
+ })
9640
+ ]);
9594
9641
  /**
9595
9642
  * One recorded device transition (D1022): a status field of a device went from
9596
9643
  * one value to another, with who or what asked for it.
@@ -10545,7 +10592,7 @@ function t(en, it) {
10545
10592
  * Things an operator switches, opens, sets or arms: lights, plugs, sirens,
10546
10593
  * covers, valves, locks, climate, fans, alarm panels.
10547
10594
  */
10548
- var ON = t("On", "Acceso");
10595
+ var ON$1 = t("On", "Acceso");
10549
10596
  var PERCENT = t("Percentage", "Percentuale");
10550
10597
  var OPEN_CLOSE_STATES = [
10551
10598
  {
@@ -10605,7 +10652,7 @@ var ACTUATOR_CAP_VOCABULARY = {
10605
10652
  state: [{
10606
10653
  kind: "boolean",
10607
10654
  field: "on",
10608
- label: ON,
10655
+ label: ON$1,
10609
10656
  whenTrue: t("When {device} turns on", "Quando {device} si accende"),
10610
10657
  whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
10611
10658
  icon: "power"
@@ -11771,7 +11818,7 @@ var ACTUATOR_CAP_VOCABULARY = {
11771
11818
  state: [{
11772
11819
  kind: "boolean",
11773
11820
  field: "on",
11774
- label: ON,
11821
+ label: ON$1,
11775
11822
  whenTrue: t("When {device} turns on", "Quando {device} si accende"),
11776
11823
  whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
11777
11824
  icon: "power"
@@ -14183,6 +14230,133 @@ var CAMERA_CAP_VOCABULARY = {
14183
14230
  }
14184
14231
  };
14185
14232
  /**
14233
+ * The heat pump (D1026): its system modes are phrased for automations, each with the
14234
+ * values the gateway really accepts; the per-circuit parameters need a circuit and are
14235
+ * set from the device page.
14236
+ */
14237
+ var OFF = {
14238
+ value: "off",
14239
+ label: t("Off", "Off")
14240
+ };
14241
+ var AUTO = {
14242
+ value: "auto",
14243
+ label: t("Auto", "Auto")
14244
+ };
14245
+ var ON = {
14246
+ value: "on",
14247
+ label: t("On", "On")
14248
+ };
14249
+ var MANUAL = {
14250
+ value: "manual",
14251
+ label: t("Manual", "Manuale")
14252
+ };
14253
+ var HOLIDAY_PROGRAMMES = [OFF, ...[
14254
+ 1,
14255
+ 2,
14256
+ 3,
14257
+ 4,
14258
+ 5,
14259
+ 6,
14260
+ 7,
14261
+ 8
14262
+ ].map((n) => ({
14263
+ value: `hm${n}`,
14264
+ label: t(`Programme ${n}`, `Programma ${n}`)
14265
+ }))];
14266
+ var PER_CIRCUIT = "Needs a circuit: set from the device page, not offered to automations";
14267
+ var HEAT_PUMP_CAP_VOCABULARY = {
14268
+ "heat-pump-status": {
14269
+ scope: "device",
14270
+ noun: t("Heat pump", "Pompa di calore")
14271
+ },
14272
+ "heat-pump-control": {
14273
+ scope: "device",
14274
+ noun: t("Heat pump settings", "Impostazioni pompa di calore"),
14275
+ actions: [
14276
+ {
14277
+ id: "heatPump.silent",
14278
+ method: "setSilentMode",
14279
+ label: t("Set silent mode", "Imposta la modalità silenziosa"),
14280
+ phrase: t("Set silent mode of {device} to {mode}", "Imposta la modalità silenziosa di {device} su {mode}"),
14281
+ icon: "volume-x",
14282
+ openArgs: [{
14283
+ key: "mode",
14284
+ label: t("Silent mode", "Modalità silenziosa"),
14285
+ offer: {
14286
+ kind: "enum",
14287
+ values: [
14288
+ OFF,
14289
+ AUTO,
14290
+ ON
14291
+ ]
14292
+ }
14293
+ }]
14294
+ },
14295
+ {
14296
+ id: "heatPump.away",
14297
+ method: "setAwayMode",
14298
+ label: t("Set away mode", "Imposta la modalità assente"),
14299
+ phrase: t("Set away mode of {device} to {mode}", "Imposta la modalità assente di {device} su {mode}"),
14300
+ icon: "plane",
14301
+ openArgs: [{
14302
+ key: "mode",
14303
+ label: t("Away mode", "Modalità assente"),
14304
+ offer: {
14305
+ kind: "enum",
14306
+ values: [OFF, ON]
14307
+ }
14308
+ }]
14309
+ },
14310
+ {
14311
+ id: "heatPump.additionalHeater",
14312
+ method: "setAdditionalHeaterMode",
14313
+ label: t("Set additional heater", "Imposta il riscaldatore aggiuntivo"),
14314
+ phrase: t("Set the additional heater of {device} to {mode}", "Imposta il riscaldatore aggiuntivo di {device} su {mode}"),
14315
+ icon: "flame",
14316
+ openArgs: [{
14317
+ key: "mode",
14318
+ label: t("Additional heater", "Riscaldatore aggiuntivo"),
14319
+ offer: {
14320
+ kind: "enum",
14321
+ values: [
14322
+ OFF,
14323
+ MANUAL,
14324
+ AUTO
14325
+ ]
14326
+ }
14327
+ }]
14328
+ },
14329
+ {
14330
+ id: "heatPump.holiday",
14331
+ method: "setHolidayMode",
14332
+ label: t("Set holiday mode", "Imposta la modalità vacanza"),
14333
+ phrase: t("Set holiday mode of {device} to {mode}", "Imposta la modalità vacanza di {device} su {mode}"),
14334
+ icon: "tree-palm",
14335
+ openArgs: [{
14336
+ key: "mode",
14337
+ label: t("Holiday programme", "Programma vacanza"),
14338
+ offer: {
14339
+ kind: "enum",
14340
+ values: HOLIDAY_PROGRAMMES
14341
+ }
14342
+ }]
14343
+ }
14344
+ ],
14345
+ notOperatorFacing: {
14346
+ setCircuitOperationMode: PER_CIRCUIT,
14347
+ setCircuitHeatCoolMode: PER_CIRCUIT,
14348
+ setCircuitSummerWinter: PER_CIRCUIT,
14349
+ setCircuitComfortSetpoint: PER_CIRCUIT,
14350
+ setCircuitEcoSetpoint: PER_CIRCUIT,
14351
+ setCircuitMaxFlowTemp: PER_CIRCUIT,
14352
+ setDhwOperationMode: PER_CIRCUIT,
14353
+ setDhwTemperatureLevel: PER_CIRCUIT,
14354
+ setDhwChargeDuration: PER_CIRCUIT,
14355
+ startExtraHotWater: PER_CIRCUIT
14356
+ }
14357
+ }
14358
+ };
14359
+ /**
14186
14360
  * Things an operator WATCHES: contacts, motion, leaks, smoke, measurements,
14187
14361
  * presence, reachability, batteries, doorbells and event sources.
14188
14362
  */
@@ -14904,6 +15078,7 @@ var CAP_VOCABULARY_BY_NAME = {
14904
15078
  ...ACTUATOR_CAP_VOCABULARY,
14905
15079
  ...APPLIANCE_CAP_VOCABULARY,
14906
15080
  ...CAMERA_CAP_VOCABULARY,
15081
+ ...HEAT_PUMP_CAP_VOCABULARY,
14907
15082
  ...SENSOR_CAP_VOCABULARY,
14908
15083
  ...SYSTEM_CAP_VOCABULARY
14909
15084
  };
@@ -15241,6 +15416,8 @@ var CAP_NAMES = Object.freeze([
15241
15416
  "group-active",
15242
15417
  "group-commands",
15243
15418
  "group-status",
15419
+ "heat-pump-control",
15420
+ "heat-pump-status",
15244
15421
  "heating-valve",
15245
15422
  "hero-layout",
15246
15423
  "humidifier",
@@ -16106,6 +16283,48 @@ Object.freeze({
16106
16283
  "valueType": "number"
16107
16284
  }
16108
16285
  ],
16286
+ "heat-pump-status": [
16287
+ {
16288
+ "path": "power.thermalW",
16289
+ "valueType": "number"
16290
+ },
16291
+ {
16292
+ "path": "power.electricalW",
16293
+ "valueType": "number"
16294
+ },
16295
+ {
16296
+ "path": "power.compressorPct",
16297
+ "valueType": "number"
16298
+ },
16299
+ {
16300
+ "path": "temperatures.supply",
16301
+ "valueType": "number"
16302
+ },
16303
+ {
16304
+ "path": "temperatures.return",
16305
+ "valueType": "number"
16306
+ },
16307
+ {
16308
+ "path": "temperatures.outdoor",
16309
+ "valueType": "number"
16310
+ },
16311
+ {
16312
+ "path": "energy.thermalKwh",
16313
+ "valueType": "number"
16314
+ },
16315
+ {
16316
+ "path": "energy.electricalKwh",
16317
+ "valueType": "number"
16318
+ },
16319
+ {
16320
+ "path": "waterPressureBar",
16321
+ "valueType": "number"
16322
+ },
16323
+ {
16324
+ "path": "starts",
16325
+ "valueType": "number"
16326
+ }
16327
+ ],
16109
16328
  "heating-valve": [{
16110
16329
  "path": "position",
16111
16330
  "valueType": "number"
@@ -17271,7 +17490,7 @@ function sleep(ms) {
17271
17490
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
17272
17491
  }
17273
17492
  //#endregion
17274
- //#region ../types/dist/composition-CXCX78IR.mjs
17493
+ //#region ../types/dist/composition-BFJq1Y88.mjs
17275
17494
  /**
17276
17495
  * The ffmpeg build every CamStack node downloads, per platform and arch.
17277
17496
  *
@@ -18376,8 +18595,6 @@ var HelperSpecSchema = discriminatedUnion("kind", [
18376
18595
  */
18377
18596
  /** The owner of every composed device: the `composer` builtin. */
18378
18597
  var COMPOSER_ADDON_ID = "composer";
18379
- /** A composed device's stableId is this prefix plus the block id. */
18380
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
18381
18598
  /** Longest snippet a `code` source may carry (slice 4). */
18382
18599
  var MAX_COMPOSITION_CODE_LENGTH = 2e4;
18383
18600
  /** One field of one capability of one source device. */
@@ -44565,30 +44782,21 @@ function convertLegacyWhen(half) {
44565
44782
  * (instants) and state leaves (durations). It replaces the flat trigger list
44566
44783
  * plus the separate condition tree; the firing rule is in that file and in
44567
44784
  * ADR "one tree".
44568
- * - **Actions** — `NcRuleActionSchema`'s two steps, plus the `{kind:'code'}`
44569
- * fragment of §3.2.2. See {@link AutomationActionSchema} for the ONE place
44570
- * this had to diverge from "verbatim", and why.
44785
+ * - **Actions** — the `wait` and `cap` steps, plus the `{kind:'code'}`
44786
+ * fragment of §3.2.2. See {@link AutomationActionSchema}.
44571
44787
  *
44572
44788
  * A recipe stored in the old shape (`triggers` + `conditions`) still LOADS:
44573
44789
  * {@link AutomationRecipeSchema} (the parse-anywhere schema) converts it on parse. Nothing writes it.
44574
44790
  */
44575
44791
  /**
44576
- * One action step.
44577
- *
44578
- * `wait` and `cap` are `NcRuleActionSchema`'s two members, kept structurally
44579
- * identical so `NcRuleActionRunner` runs them unchanged — its device-scope
44580
- * check, stop-at-first-failure and per-sequence throttle are the whole reason
44581
- * to reuse it, and none of them are re-implemented here.
44792
+ * One action step: `wait`, or a `cap` call.
44582
44793
  *
44583
- * **The one divergence, and it is forced.** `NcRuleActionSchema.cap.deviceId` is
44584
- * a literal `z.number().int()`, and the NC runner's own `RunSequencesInput`
44585
- * documents its subject device as *"for the log tag, never for routing"*. So an
44586
- * NC action can never target the device that triggered it — which is fine for
44587
- * the NC (its rules already scope to a device) and fatal for an automation
44588
- * ("sound the siren of the camera that saw the person"). `deviceId` therefore
44589
- * also accepts `{ $var }`, resolved from the run's `vars` bag BEFORE the runner
44590
- * is called. The runner still receives a number and is untouched; the
44591
- * resolution is the recipe's job, not the runner's.
44794
+ * A cap step's target is who it acts on (D983: `devices`, a `domain`, or a
44795
+ * `{ $var }` resolved from the run's variables); the legacy `deviceId` is still
44796
+ * READ, never written. The step runner (`runSteps`) owns the device-scope
44797
+ * check, the stop-at-first-failure and the variable substitution, once, for
44798
+ * every caller — automations, Actions, and the notification centre, which runs
44799
+ * only Actions (planning#473).
44592
44800
  */
44593
44801
  var AutomationWaitStepSchema = object({
44594
44802
  kind: literal("wait"),
@@ -44635,21 +44843,44 @@ var AutomationCapStepBaseSchema = object({
44635
44843
  */
44636
44844
  argUnits: record(string(), string().min(1)).optional()
44637
44845
  });
44638
- var AutomationCapStepSchema = AutomationCapStepBaseSchema.refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44846
+ /**
44847
+ * The steps an internal Action may contain: cap and wait, and nothing that can
44848
+ * call back into an Action — so an Action can never reach itself (no cycles).
44849
+ * This is the LEAF shape: no condition of its own.
44850
+ */
44851
+ var LeafActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepBaseSchema.refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44639
44852
  message: "a cap step needs a target",
44640
44853
  path: ["target"]
44641
44854
  }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44642
44855
  message: "a domain target needs the vocabulary action it applies to (actionId)",
44643
44856
  path: ["actionId"]
44644
- });
44857
+ })]);
44645
44858
  /**
44646
- * The steps an internal Action may contain: cap and wait, and nothing that can
44647
- * call back into an Action — so an Action can never reach itself (no cycles).
44859
+ * The optional guard of a step (#472): `if` is the ONE `when` tree (D980), read
44860
+ * on the state mirror when the step is reached; `else` runs when it is false.
44861
+ * An `else` holds leaf steps only — the nesting is bounded at ONE level, so a
44862
+ * branch can never grow a tree the trace has to draw.
44648
44863
  */
44649
- var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
44864
+ var stepGuardShape = {
44865
+ if: AutomationWhenSchema.optional(),
44866
+ else: array(LeafActionStepSchema).max(10).optional()
44867
+ };
44868
+ var elseNeedsIf = {
44869
+ message: "an else list needs the condition it is the other side of (if)",
44870
+ path: ["else"]
44871
+ };
44872
+ var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44873
+ var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44874
+ message: "a cap step needs a target",
44875
+ path: ["target"]
44876
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44877
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
44878
+ path: ["actionId"]
44879
+ }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44880
+ var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
44650
44881
  var AutomationActionSchema = discriminatedUnion("kind", [
44651
- AutomationWaitStepSchema,
44652
- AutomationCapStepSchema,
44882
+ GuardedWaitStepSchema,
44883
+ GuardedCapStepSchema,
44653
44884
  object({
44654
44885
  kind: literal("action"),
44655
44886
  /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
@@ -45029,7 +45260,7 @@ var StepDeviceTraceSchema = object({
45029
45260
  outcome: _enum(["ok", "error"]),
45030
45261
  message: string().optional()
45031
45262
  });
45032
- var AutomationStepTraceSchema = object({
45263
+ var StepTraceBaseSchema = object({
45033
45264
  /** `actions.<i>` */
45034
45265
  path: string().min(1),
45035
45266
  kind: string().min(1),
@@ -45048,15 +45279,35 @@ var AutomationStepTraceSchema = object({
45048
45279
  * is shown as {@link REDACTED_ARG}. Absent on traces written before it existed.
45049
45280
  */
45050
45281
  args: record(string(), TraceValueSchema).optional(),
45051
- /** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. */
45282
+ /**
45283
+ * The device values a templated arg printed as `—`, one `ref: reason` each
45284
+ * (D1021): why a sentence says "—" where a number was expected. Bounded.
45285
+ */
45286
+ templates: array(string()).max(20).optional(),
45287
+ /**
45288
+ * What the step's own `if` read when the step was reached (#472): `true` the
45289
+ * step ran, `false` its `else` ran (or nothing did), `unknown` a state leaf
45290
+ * could not be read, so NEITHER side ran. Absent on an unguarded step.
45291
+ */
45292
+ condition: _enum([
45293
+ "true",
45294
+ "false",
45295
+ "unknown"
45296
+ ]).optional(),
45297
+ /** Why the condition read what it read, in the evaluator's own words. */
45298
+ conditionReason: string().optional(),
45299
+ /** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. */
45052
45300
  outcome: _enum([
45053
45301
  "ok",
45054
45302
  "error",
45055
45303
  "not-run",
45056
- "empty"
45304
+ "empty",
45305
+ "skipped"
45057
45306
  ]),
45058
45307
  message: string().optional()
45059
45308
  });
45309
+ /** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
45310
+ var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: array(StepTraceBaseSchema).optional() });
45060
45311
  var AutomationRunTraceSchema = object({
45061
45312
  runId: string().min(1),
45062
45313
  startedAt: number$1(),
@@ -45163,6 +45414,8 @@ var ActionStatusSchema = object({
45163
45414
  /** The latest run's failure; null on success or when it never ran. */
45164
45415
  lastError: string().nullable()
45165
45416
  });
45417
+ /** The throttle window of an action, in seconds; absent or 0 = no throttle. */
45418
+ var ActionMinDelaySecSchema = number$1().int().min(0).max(86400);
45166
45419
  var ActionEntrySchema = object({
45167
45420
  /** `internal:<uuid>` or `<addonId>:<localId>`. */
45168
45421
  id: string().min(3),
@@ -45175,6 +45428,14 @@ var ActionEntrySchema = object({
45175
45428
  /** Internal only: cap and wait steps. No action-in-action, so no cycles. */
45176
45429
  steps: array(ActionStepSchema).min(1).max(50).optional(),
45177
45430
  variables: array(ActionVariableSchema).max(20).optional(),
45431
+ /**
45432
+ * Internal only: the least time between two run STARTS. A run that begins
45433
+ * inside the window is skipped (`skipped-cooldown`), traced and logged. It
45434
+ * is an actuator's budget — "how often may this gate physically open" —
45435
+ * not a notification cooldown, and it is shared by every caller of the
45436
+ * action (two rules, a button, an automation).
45437
+ */
45438
+ minDelaySec: ActionMinDelaySecSchema.optional(),
45178
45439
  status: ActionStatusSchema
45179
45440
  }).superRefine((entry, ctx) => {
45180
45441
  if (entry.source === "internal") {
@@ -45205,7 +45466,8 @@ var ActionEntrySchema = object({
45205
45466
  var ActionInputSchema = object({
45206
45467
  name: string().min(1).max(120),
45207
45468
  steps: array(ActionStepSchema).min(1).max(50),
45208
- variables: array(ActionVariableSchema).max(20).optional()
45469
+ variables: array(ActionVariableSchema).max(20).optional(),
45470
+ minDelaySec: ActionMinDelaySecSchema.optional()
45209
45471
  });
45210
45472
  /** Who started a run. Absent = the operator pressed it. */
45211
45473
  var ActionRunOriginSchema = object({
@@ -45232,6 +45494,7 @@ _enum([
45232
45494
  "invalid-variables",
45233
45495
  "invalid-steps",
45234
45496
  "not-linked",
45497
+ "template-scope",
45235
45498
  "busy"
45236
45499
  ]);
45237
45500
  object({
@@ -49855,7 +50118,7 @@ DeviceType.MediaPlayer, method(deviceOnly, _void(), {
49855
50118
  kind: "mutation",
49856
50119
  auth: "protected"
49857
50120
  });
49858
- 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.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;
50121
+ 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;
49859
50122
  var NUMBER = {
49860
50123
  kind: "fixed",
49861
50124
  result: ["number"]
@@ -51727,6 +51990,43 @@ method(InstancePinSchema, DeviceExportStatusSchema), method(_void(), array(Expor
51727
51990
  auth: "admin"
51728
51991
  });
51729
51992
  var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
51993
+ var DeviceTemplateSchema = string().min(1).max(4096);
51994
+ var DeviceTemplateRefusalSchema = object({
51995
+ reason: _enum([
51996
+ "too-long",
51997
+ "syntax",
51998
+ "forbidden-syntax",
51999
+ "forbidden-member",
52000
+ "unknown-filter",
52001
+ "ambiguous-field",
52002
+ "busy",
52003
+ "budget-exceeded",
52004
+ "timeout",
52005
+ "output-too-large",
52006
+ "render-failed",
52007
+ "out-of-scope",
52008
+ "unavailable"
52009
+ ]),
52010
+ message: string()
52011
+ });
52012
+ var DeviceTemplateTraceEntrySchema = object({
52013
+ ref: string(),
52014
+ reason: _enum([
52015
+ "unknown-alias",
52016
+ "unknown-field",
52017
+ "no-field",
52018
+ "unavailable"
52019
+ ])
52020
+ });
52021
+ var DeviceTemplateRenderSchema = discriminatedUnion("ok", [object({
52022
+ ok: literal(true),
52023
+ text: string(),
52024
+ trace: array(DeviceTemplateTraceEntrySchema)
52025
+ }), object({
52026
+ ok: literal(false),
52027
+ refusal: DeviceTemplateRefusalSchema,
52028
+ trace: array(DeviceTemplateTraceEntrySchema)
52029
+ })]);
51730
52030
  /**
51731
52031
  * A SITE ZONE — a named part of the property that several locations belong to.
51732
52032
  *
@@ -52441,7 +52741,13 @@ method(object({
52441
52741
  auth: "admin"
52442
52742
  }), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), DeviceMetaSchema.nullable()), method(object({
52443
52743
  deviceId: number$1(),
52444
- name: string()
52744
+ name: string(),
52745
+ /**
52746
+ * Absent or true: an operator rename, which stamps `userNamed`.
52747
+ * False: the system copying a block name onto the device. That write
52748
+ * must not look like the operator's, or the next reconcile freezes it.
52749
+ */
52750
+ stampUserNamed: boolean().optional()
52445
52751
  }), _void(), {
52446
52752
  kind: "mutation",
52447
52753
  auth: "admin"
@@ -52465,6 +52771,22 @@ method(object({
52465
52771
  kind: "mutation",
52466
52772
  auth: "admin"
52467
52773
  }), method(object({
52774
+ templates: array(DeviceTemplateSchema).max(64),
52775
+ allowedDeviceIds: array(number$1().int()).optional()
52776
+ }), object({ results: array(DeviceTemplateRenderSchema) }), { auth: "admin" }), method(object({
52777
+ templates: array(string()).max(64),
52778
+ allowedDeviceIds: array(number$1().int()).optional()
52779
+ }), object({ results: array(discriminatedUnion("ok", [object({
52780
+ ok: literal(true),
52781
+ aliases: array(object({
52782
+ alias: string(),
52783
+ deviceId: number$1().int().nullable(),
52784
+ allowed: boolean()
52785
+ }))
52786
+ }), object({
52787
+ ok: literal(false),
52788
+ refusal: DeviceTemplateRefusalSchema
52789
+ })])) }), { auth: "admin" }), method(object({
52468
52790
  deviceId: number$1(),
52469
52791
  location: string().nullable()
52470
52792
  }), _void(), {
@@ -55474,6 +55796,207 @@ var GroupStatusSchema = object({
55474
55796
  }))
55475
55797
  });
55476
55798
  DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
55799
+ /**
55800
+ * Heat pump settable surface (D1026): one typed method per parameter, never a
55801
+ * generic `set(key, value)`. The values a mode takes and the limits of a number
55802
+ * are the ones `heat-pump-status` carries (`allowed`, `min`, `max`, `step`),
55803
+ * read from the gateway; a provider refuses a value outside them. The state is
55804
+ * `heat-pump-status` — this cap has none.
55805
+ */
55806
+ var deviceId = number$1().int().nonnegative();
55807
+ var circuitId = string().min(1);
55808
+ var mode = string().min(1);
55809
+ var temp = number$1().finite();
55810
+ DeviceType.HeatPump, method(object({
55811
+ deviceId,
55812
+ mode
55813
+ }), _void(), {
55814
+ kind: "mutation",
55815
+ auth: "protected"
55816
+ }), method(object({
55817
+ deviceId,
55818
+ mode
55819
+ }), _void(), {
55820
+ kind: "mutation",
55821
+ auth: "protected"
55822
+ }), method(object({
55823
+ deviceId,
55824
+ mode
55825
+ }), _void(), {
55826
+ kind: "mutation",
55827
+ auth: "protected"
55828
+ }), method(object({
55829
+ deviceId,
55830
+ mode
55831
+ }), _void(), {
55832
+ kind: "mutation",
55833
+ auth: "protected"
55834
+ }), method(object({
55835
+ deviceId,
55836
+ circuitId,
55837
+ mode
55838
+ }), _void(), {
55839
+ kind: "mutation",
55840
+ auth: "protected"
55841
+ }), method(object({
55842
+ deviceId,
55843
+ circuitId,
55844
+ mode
55845
+ }), _void(), {
55846
+ kind: "mutation",
55847
+ auth: "protected"
55848
+ }), method(object({
55849
+ deviceId,
55850
+ circuitId,
55851
+ mode
55852
+ }), _void(), {
55853
+ kind: "mutation",
55854
+ auth: "protected"
55855
+ }), method(object({
55856
+ deviceId,
55857
+ circuitId,
55858
+ temp
55859
+ }), _void(), {
55860
+ kind: "mutation",
55861
+ auth: "protected"
55862
+ }), method(object({
55863
+ deviceId,
55864
+ circuitId,
55865
+ temp
55866
+ }), _void(), {
55867
+ kind: "mutation",
55868
+ auth: "protected"
55869
+ }), method(object({
55870
+ deviceId,
55871
+ circuitId,
55872
+ temp
55873
+ }), _void(), {
55874
+ kind: "mutation",
55875
+ auth: "protected"
55876
+ }), method(object({
55877
+ deviceId,
55878
+ circuitId,
55879
+ mode
55880
+ }), _void(), {
55881
+ kind: "mutation",
55882
+ auth: "protected"
55883
+ }), method(object({
55884
+ deviceId,
55885
+ circuitId,
55886
+ level: mode
55887
+ }), _void(), {
55888
+ kind: "mutation",
55889
+ auth: "protected"
55890
+ }), method(object({
55891
+ deviceId,
55892
+ circuitId,
55893
+ minutes: number$1().int().positive()
55894
+ }), _void(), {
55895
+ kind: "mutation",
55896
+ auth: "protected"
55897
+ }), method(object({
55898
+ deviceId,
55899
+ circuitId
55900
+ }), _void(), {
55901
+ kind: "mutation",
55902
+ auth: "protected"
55903
+ });
55904
+ var HeatPumpCircuitKindSchema = _enum([
55905
+ "heating",
55906
+ "dhw",
55907
+ "cooling",
55908
+ "solar"
55909
+ ]);
55910
+ /** A setting that takes one of a list of values the gateway named. */
55911
+ var HeatPumpOptionSettingSchema = object({
55912
+ /** The active value. Null when the gateway did not answer. */
55913
+ value: string().nullable(),
55914
+ /** Values the gateway accepts, in its order. Empty = read-only here. */
55915
+ allowed: array(string())
55916
+ });
55917
+ /** A numeric setting with the limits the gateway named. */
55918
+ var HeatPumpRangeSettingSchema = object({
55919
+ value: number$1().nullable(),
55920
+ min: number$1().nullable(),
55921
+ max: number$1().nullable(),
55922
+ step: number$1().nullable()
55923
+ });
55924
+ var HeatPumpCircuitSchema = object({
55925
+ /** Gateway id of the circuit (`hc1`, `dhw1`): the key of the series. */
55926
+ id: string().min(1),
55927
+ kind: HeatPumpCircuitKindSchema,
55928
+ label: string(),
55929
+ icon: IconKeySchema,
55930
+ /** Measured temperature of the circuit (room, tank, collector). */
55931
+ currentTemp: number$1().nullable().meta(readingMeta("temperature")),
55932
+ /** The setpoint in force now. */
55933
+ targetTemp: number$1().nullable().meta(readingMeta("temperature")),
55934
+ /** The operation mode in force (mirror of `operationMode.value`, for the series). */
55935
+ mode: string().nullable(),
55936
+ /** Whether the circuit is calling for heat right now. Null = unknown. */
55937
+ active: boolean().nullable(),
55938
+ operationMode: HeatPumpOptionSettingSchema.nullable(),
55939
+ /** Heating circuits: heat / cool / heatCool. */
55940
+ heatCoolMode: HeatPumpOptionSettingSchema.nullable(),
55941
+ /** Heating circuits: summer / winter changeover. */
55942
+ summerWinter: HeatPumpOptionSettingSchema.nullable(),
55943
+ comfortSetpoint: HeatPumpRangeSettingSchema.nullable(),
55944
+ ecoSetpoint: HeatPumpRangeSettingSchema.nullable(),
55945
+ maxFlowTemp: HeatPumpRangeSettingSchema.nullable(),
55946
+ /** Hot water: the temperature level (off / low / high / eco). */
55947
+ temperatureLevel: HeatPumpOptionSettingSchema.nullable(),
55948
+ /** Hot water: how long a charge lasts, minutes. */
55949
+ chargeDuration: HeatPumpRangeSettingSchema.nullable(),
55950
+ /** Hot water: whether an extra-hot-water charge is running. Null = no such surface. */
55951
+ extraHotWater: boolean().nullable()
55952
+ });
55953
+ /** The independent system modes, each with its real values. A null mode = the gateway has none. */
55954
+ var HeatPumpSystemSchema = object({
55955
+ silent: HeatPumpOptionSettingSchema.nullable(),
55956
+ away: HeatPumpOptionSettingSchema.nullable(),
55957
+ additionalHeater: HeatPumpOptionSettingSchema.nullable(),
55958
+ holiday: HeatPumpOptionSettingSchema.nullable()
55959
+ });
55960
+ var HeatPumpPowerSchema = object({
55961
+ thermalW: number$1().nullable().meta(readingMeta("power")),
55962
+ electricalW: number$1().nullable().meta(readingMeta("power")),
55963
+ /** Compressor modulation, percent. */
55964
+ compressorPct: number$1().nullable().meta(readingMeta("percentage"))
55965
+ });
55966
+ var HeatPumpTemperaturesSchema = object({
55967
+ supply: number$1().nullable().meta(readingMeta("temperature")),
55968
+ return: number$1().nullable().meta(readingMeta("temperature")),
55969
+ outdoor: number$1().nullable().meta(readingMeta("temperature"))
55970
+ });
55971
+ /** Lifetime meters, kWh: the energy of a period is computed at read time from their difference (D944). */
55972
+ var HeatPumpEnergySchema = object({
55973
+ thermalKwh: number$1().nullable().meta(readingMeta("energy")),
55974
+ electricalKwh: number$1().nullable().meta(readingMeta("energy"))
55975
+ });
55976
+ var HeatPumpStatusSchema = object({
55977
+ circuits: array(HeatPumpCircuitSchema),
55978
+ system: HeatPumpSystemSchema,
55979
+ power: HeatPumpPowerSchema,
55980
+ temperatures: HeatPumpTemperaturesSchema,
55981
+ energy: HeatPumpEnergySchema,
55982
+ /** Water pressure of the heating loop, bar. */
55983
+ waterPressureBar: number$1().nullable(),
55984
+ /** Compressor starts since commissioning. */
55985
+ starts: number$1().nullable(),
55986
+ /** Ms epoch when the slice was last read from the gateway. */
55987
+ lastFetchedAt: number$1()
55988
+ });
55989
+ /**
55990
+ * The instantaneous COP: thermal over electrical power. Null unless BOTH powers
55991
+ * are known and the unit draws power — a missing reading is never a 0 or a
55992
+ * division by it (D393). Computed on every read; there is no stored value.
55993
+ */
55994
+ function heatPumpInstantCop(power) {
55995
+ const { thermalW, electricalW } = power;
55996
+ if (thermalW === null || electricalW === null || electricalW <= 0) return null;
55997
+ return thermalW / electricalW;
55998
+ }
55999
+ DeviceType.HeatPump;
55477
56000
  var HeatingValveStatusSchema = object({
55478
56001
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
55479
56002
  position: number$1().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -55631,6 +56154,7 @@ var HeroSceneSchema = object({
55631
56154
  "ac",
55632
56155
  "thermostat",
55633
56156
  "heater",
56157
+ "heat-pump",
55634
56158
  "fan",
55635
56159
  "washer",
55636
56160
  "dryer",
@@ -55673,7 +56197,7 @@ var HeroSceneSchema = object({
55673
56197
  /** 0..1: volume, cover position, cycle progress. */
55674
56198
  level: number$1().min(0).max(1).nullable()
55675
56199
  });
55676
- 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;
56200
+ 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;
55677
56201
  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;
55678
56202
  /** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
55679
56203
  var HeroTextSchema = object({
@@ -55681,6 +56205,7 @@ var HeroTextSchema = object({
55681
56205
  it: string()
55682
56206
  });
55683
56207
  var HeroRowIdSchema = _enum([
56208
+ "progress",
55684
56209
  "run-for",
55685
56210
  "cycle",
55686
56211
  "program",
@@ -55695,6 +56220,7 @@ var HeroRowIdSchema = _enum([
55695
56220
  "alarm",
55696
56221
  "fan",
55697
56222
  "vacuum",
56223
+ "vacuum-suction",
55698
56224
  "mower",
55699
56225
  "feeder",
55700
56226
  "fountain",
@@ -55713,7 +56239,10 @@ var HeroRowIdSchema = _enum([
55713
56239
  "climate-fan",
55714
56240
  "setpoint",
55715
56241
  "channel",
55716
- "control"
56242
+ "control",
56243
+ "circuit",
56244
+ "heat-pump-power",
56245
+ "system-mode"
55717
56246
  ]);
55718
56247
  var HeroArgValueSchema = lazy(() => union([
55719
56248
  string(),
@@ -55778,16 +56307,32 @@ var HeroControlSchema = discriminatedUnion("kind", [
55778
56307
  label: HeroTextSchema,
55779
56308
  current: string().nullable(),
55780
56309
  options: array(string()),
56310
+ /** A readable label per option value; an option without one is drawn as its raw value. */
56311
+ optionLabels: record(string(), HeroTextSchema).optional(),
55781
56312
  call: HeroCallSchema,
55782
56313
  valueArg: string()
55783
56314
  })
55784
56315
  ]);
56316
+ /** Declared by its interface: a `z.infer` of one more icon union pushes the cap's inferred type past what the compiler can print. */
56317
+ var HeroPillSchema = object({
56318
+ icon: IconKeySchema.nullable(),
56319
+ text: HeroTextSchema,
56320
+ tone: HeroToneSchema
56321
+ });
55785
56322
  var HeroRowSchema = object({
55786
56323
  id: HeroRowIdSchema,
56324
+ /** The row's own name when the kind's label would not tell rows of one kind apart (a circuit's label). */
56325
+ label: HeroTextSchema.optional(),
56326
+ /** A group header drawn above the row when it differs from the previous row's ("System"). */
56327
+ group: HeroTextSchema.optional(),
56328
+ /** Values drawn as pills across the row (a heat pump's powers). */
56329
+ pills: array(HeroPillSchema).optional(),
55787
56330
  icon: IconKeySchema,
55788
56331
  /** The row's status, in words. `null` = nothing to say. */
55789
56332
  status: HeroTextSchema.nullable(),
55790
- controls: array(HeroControlSchema)
56333
+ controls: array(HeroControlSchema),
56334
+ /** A bar under the row's label, 0..1; `null` / absent = no bar. */
56335
+ progress: number$1().min(0).max(1).nullable().optional()
55791
56336
  });
55792
56337
  var HeroDetailSchema = object({
55793
56338
  label: HeroTextSchema,
@@ -55795,7 +56340,11 @@ var HeroDetailSchema = object({
55795
56340
  unit: string().nullable()
55796
56341
  });
55797
56342
  var HeroBadgeSchema = object({
55798
- id: _enum(["battery", "network-link"]),
56343
+ id: _enum([
56344
+ "battery",
56345
+ "network-link",
56346
+ "integration"
56347
+ ]),
55799
56348
  icon: IconKeySchema,
55800
56349
  tone: HeroToneSchema,
55801
56350
  /** Percent for a battery, link quality for a link; `null` = not known. */
@@ -55843,7 +56392,13 @@ var HeroTimedRunSlotSchema = object({
55843
56392
  activeUntil: number$1().nullable(),
55844
56393
  quickRun: TimedRunQuickRunSchema,
55845
56394
  run: HeroActionSchema,
55846
- cancel: HeroActionSchema
56395
+ cancel: HeroActionSchema,
56396
+ /**
56397
+ * Whole units left (the limit's unit, ceil). `null` while nothing is armed.
56398
+ * A number, not words: the row formats it, and a text here would not fit the
56399
+ * hero-layout declaration.
56400
+ */
56401
+ remaining: number$1().nullable()
55847
56402
  });
55848
56403
  var HeroPowerSupplySlotSchema = object({
55849
56404
  /** The plug's state; `null` = unknown, never off. */
@@ -55895,7 +56450,12 @@ var HeroFactSchema = object({
55895
56450
  var HeroSideTileSchema = object({
55896
56451
  label: HeroTextSchema,
55897
56452
  value: HeroTextSchema,
55898
- tone: HeroToneSchema.optional()
56453
+ tone: HeroToneSchema.optional(),
56454
+ /**
56455
+ * Epoch ms when the tile reads a clock time (an appliance's end): a client prints it in
56456
+ * the viewer's own time zone; `value` is the fallback for one that cannot.
56457
+ */
56458
+ at: number$1().optional()
55899
56459
  });
55900
56460
  var HeroSideTilesSchema = object({
55901
56461
  left: array(HeroSideTileSchema).max(2),
@@ -55931,8 +56491,12 @@ var HeroModelSchema = object({
55931
56491
  sideTiles: HeroSideTilesSchema,
55932
56492
  /** The status line under the main icon. */
55933
56493
  title: HeroTextSchema,
56494
+ /** The scene's top line when it says more than `title`; absent = draw the title. */
56495
+ caption: HeroTextSchema.optional(),
55934
56496
  badges: array(HeroBadgeSchema),
55935
56497
  remote: HeroRemoteSlotSchema.nullable(),
56498
+ /** The foot button that opens the device's history: "History", "Cycles", "Meals", "Access". */
56499
+ historyLabel: HeroTextSchema,
55936
56500
  consumables: HeroConsumablesSlotSchema.nullable(),
55937
56501
  consumption: HeroConsumptionSlotSchema.nullable(),
55938
56502
  ownPower: HeroOwnPowerSlotSchema.nullable(),
@@ -55953,18 +56517,31 @@ var HeroModelSchema = object({
55953
56517
  * 4. a trailing fact (power, else battery, else consumables).
55954
56518
  *
55955
56519
  * Selection rules, all taken from the model:
55956
- * - ONE control is ever shown: the device's own power; else the FIRST control of
56520
+ * - the primary control is the device's own power; else the FIRST control of
55957
56521
  * the FIRST row that has any (a later row's control is never promoted). When
55958
56522
  * the model lists that part in `gated`, the row has no inline control: the
55959
56523
  * projection never falls through to another control the caller could use.
56524
+ * - a timed run, when the model carries the slot, sits beside that primary:
56525
+ * Run while idle, Stop while armed. Gating the slot hides the control.
55960
56526
  * - the status line is the head (what plays, else the state) plus at most
55961
- * {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded;
56527
+ * {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded, then the
56528
+ * time left on an armed timed run;
55962
56529
  * - the trailing fact is the first of power, battery, consumables.
55963
56530
  *
55964
56531
  * `projectDeviceRow` is pure and computes nothing: it selects from a
55965
56532
  * {@link HeroModel}. A row that needed a value the hero lacks would mean the
55966
56533
  * model is missing it, so the fix goes in the model.
55967
56534
  */
56535
+ /**
56536
+ * The row's timed-run control. `id` is `timed-run.run` while idle and
56537
+ * `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
56538
+ * a Run press starts.
56539
+ */
56540
+ var HeroRowTimedRunSchema = object({
56541
+ id: _enum(["timed-run.run", "timed-run.cancel"]),
56542
+ duration: number$1(),
56543
+ unit: _enum(["min", "s"])
56544
+ });
55968
56545
  var HeroRowModelSchema = object({
55969
56546
  deviceId: number$1().int(),
55970
56547
  name: string(),
@@ -55977,6 +56554,11 @@ var HeroRowModelSchema = object({
55977
56554
  statusLine: array(HeroTextSchema),
55978
56555
  /** `null` = the type has no inline control, or the caller may not act on it. */
55979
56556
  primary: HeroControlSchema.nullable(),
56557
+ /**
56558
+ * Beside `primary` when the device offers a timed run: Run while idle, Stop
56559
+ * while armed. `null` when there is no slot, or the caller may not act.
56560
+ */
56561
+ timedRun: HeroRowTimedRunSchema.nullable(),
55980
56562
  trailing: HeroFactSchema.nullable()
55981
56563
  });
55982
56564
  /**
@@ -66800,92 +67382,21 @@ var NcZoneConditionSchema = object({
66800
67382
  * membership lists are OR within the list (spec §2.3).
66801
67383
  */
66802
67384
  /**
66803
- * What a rule may actuate.
66804
- *
66805
- * **No hand-maintained allowlist** (operator decision, and the right one — a
66806
- * written list of methods is a third parallel map to keep aligned, and this
66807
- * repo has paid for those). The boundary instead comes from a property the
66808
- * capabilities already carry: an action may target only a **device-scoped**
66809
- * capability method.
66810
- *
66811
- * That is not decoration. A rule can be authored by a NON-ADMIN — personal
66812
- * rules are a supported flow — and the executor runs with the addon's
66813
- * privileges, so an unbounded action is an arbitrary RPC channel with a
66814
- * privilege escalation attached. Restricting to device scope excludes the
66815
- * system caps (`device-manager.removeDevice` and friends) by construction,
66816
- * costs nothing to maintain, and cannot rot: a cap that stops being
66817
- * device-scoped stops being actuatable in the same change.
67385
+ * What a rule or a button runs: an **Action** of the `actions` surface
67386
+ * (`internal:<uuid>` or an addon's), by id, and nothing else (planning#473).
66818
67387
  *
66819
- * The executor enforces it; {@link NcRuleActionSchema} carries the intent.
67388
+ * The notification centre has no step vocabulary of its own. The steps, the
67389
+ * device-scope boundary, the stop-at-first-failure, the throttle
67390
+ * (`minDelaySec`), the variables and the runs ledger all belong to the Action;
67391
+ * an operator edits them in ONE place (the Actions page) and a rule points at
67392
+ * the result. A rule can be authored by a non-admin (personal rules), which is
67393
+ * safe for the same reason: it can only name an Action an admin already wrote.
66820
67394
  */
67395
+ var NcActionIdSchema = string().min(1);
67396
+ /** Action ids one hook edge runs, in order. Capped so a slot never becomes a second editor. */
67397
+ var NcHookActionIdsSchema = array(NcActionIdSchema).max(4);
66821
67398
  /**
66822
- * One step of a sequence.
66823
- *
66824
- * `wait` is a first-class step rather than a property of the next action: it is
66825
- * what makes a sequence a SEQUENCE and not a list — "unlock, wait 5s, open"
66826
- * cannot be expressed otherwise.
66827
- */
66828
- var NcRuleActionSchema = discriminatedUnion("kind", [object({
66829
- kind: literal("wait"),
66830
- seconds: number$1().min(0).max(300)
66831
- }), object({
66832
- kind: literal("cap"),
66833
- /**
66834
- * WHO the step acts on (D983) — the only shape that is written. A sequence
66835
- * stored before D983 carries `deviceId`; the sequence store reads it as a
66836
- * `devices` target.
66837
- */
66838
- target: ActionTargetSchema.optional(),
66839
- /** The vocabulary action the step performs; required for a `domain` target. */
66840
- actionId: string().min(1).optional(),
66841
- /** @deprecated The pre-D983 single device. Read, never written. */
66842
- deviceId: number$1().int().optional(),
66843
- /** Capability name, e.g. `alarm-panel`. */
66844
- cap: string().min(1),
66845
- /** Method on it. The executor refuses a non-device-scoped cap. */
66846
- method: string().min(1),
66847
- /** Method arguments, minus `deviceId` (the executor injects it). */
66848
- args: record(string(), unknown()).optional()
66849
- }).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
66850
- message: "a cap step needs a target",
66851
- path: ["target"]
66852
- }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
66853
- message: "a domain target needs the vocabulary action it applies to (actionId)",
66854
- path: ["actionId"]
66855
- })]);
66856
- /**
66857
- * A named, ordered run of steps shared across rules, with its own throttle.
66858
- *
66859
- * Sequences live in the notification centre's sequence store — never inline on
66860
- * a rule. A rule binds to one by id ({@link NcActionBindingSchema}), and a
66861
- * button names one the same way. `minDelaySec` exists because a noisy rule
66862
- * otherwise hammers a physical actuator — the rule's own cooldown governs
66863
- * NOTIFICATIONS, which is a different budget from "how often may this gate
66864
- * actually open". The throttle key is the sequence id, so two rules sharing
66865
- * one sequence share its budget.
66866
- */
66867
- var NcSharedSequenceSchema = object({
66868
- id: string().min(1),
66869
- name: string().min(1).max(120),
66870
- minDelaySec: number$1().int().min(0).max(86400).optional(),
66871
- actions: array(NcRuleActionSchema).min(1)
66872
- });
66873
- /** Create / update body — the id is minted by the provider. */
66874
- var NcSharedSequenceInputSchema = object({
66875
- name: string().min(1).max(120),
66876
- minDelaySec: number$1().int().min(0).max(86400).optional(),
66877
- actions: array(NcRuleActionSchema).min(1)
66878
- });
66879
- /** Bindings on one hook edge. Cap keeps a slot from becoming a second sequence editor. */
66880
- var NcHookBindingsSchema = array(discriminatedUnion("kind", [object({
66881
- kind: literal("sequence"),
66882
- sequenceId: string().min(1)
66883
- }), object({
66884
- kind: literal("do"),
66885
- action: NcRuleActionSchema
66886
- })])).max(4);
66887
- /**
66888
- * One button carried by the notification, running a shared sequence on tap.
67399
+ * One button carried by the notification, running an Action on tap.
66889
67400
  *
66890
67401
  * **Read this before adding a button that does something physical.** The tap
66891
67402
  * arrives over a link that travelled through third-party infrastructure — ntfy,
@@ -66900,9 +67411,9 @@ var NcRuleNotificationButtonSchema = object({
66900
67411
  /** Stable id — travels in the callback and identifies the button in logs. */
66901
67412
  id: string().min(1).max(64),
66902
67413
  label: string().min(1).max(40),
66903
- /** Id of a shared sequence. The dispatcher drops a button whose sequence
66904
- * does not exist rather than minting a token for nothing. */
66905
- sequenceId: string().min(1),
67414
+ /** The Action the tap runs. The dispatcher drops a button whose Action does
67415
+ * not exist rather than minting a token for nothing. */
67416
+ actionId: NcActionIdSchema,
66906
67417
  icon: NotificationActionIconSchema.optional(),
66907
67418
  destructive: boolean().optional()
66908
67419
  });
@@ -66917,25 +67428,19 @@ var NcRuleNotificationButtonSchema = object({
66917
67428
  * leave). A delivery with no clear edge never produces this hook.
66918
67429
  */
66919
67430
  var NcRuleActionsSchema = object({
66920
- onActivation: NcHookBindingsSchema.optional(),
66921
- onDeactivation: NcHookBindingsSchema.optional(),
67431
+ onActivation: NcHookActionIdsSchema.optional(),
67432
+ onDeactivation: NcHookActionIdsSchema.optional(),
66922
67433
  /** Runs on a positive / raised match. */
66923
- onTrigger: NcHookBindingsSchema.optional(),
67434
+ onTrigger: NcHookActionIdsSchema.optional(),
66924
67435
  /** Runs on a clear / leave match, when the subject carries one. */
66925
- onTriggerOff: NcHookBindingsSchema.optional(),
67436
+ onTriggerOff: NcHookActionIdsSchema.optional(),
66926
67437
  /**
66927
- * Buttons the NOTIFICATION carries, each running one shared sequence when
66928
- * tapped. Deliberately a REFERENCE — a button that could define its own
66929
- * actions would be a parallel actuation vocabulary.
67438
+ * Buttons the NOTIFICATION carries, each running one Action when tapped.
67439
+ * Deliberately a REFERENCE — a button that could define its own steps would
67440
+ * be a parallel actuation vocabulary.
66930
67441
  */
66931
67442
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
66932
67443
  });
66933
- object({
66934
- name: string().min(1).max(120),
66935
- enabled: boolean(),
66936
- minDelaySec: number$1().int().min(0).max(86400).optional(),
66937
- actions: array(NcRuleActionSchema).min(1)
66938
- });
66939
67444
  /**
66940
67445
  * "This rule applies only while `deviceId` is in one of `states`."
66941
67446
  *
@@ -68616,18 +69121,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
68616
69121
  }), object({ success: literal(true) }), {
68617
69122
  kind: "mutation",
68618
69123
  auth: "admin"
68619
- }), method(object({}), object({ sequences: array(NcSharedSequenceSchema) }), { auth: "admin" }), method(object({ sequenceId: string().min(1) }), object({ sequence: NcSharedSequenceSchema.nullable() }), { auth: "admin" }), method(object({ sequence: NcSharedSequenceInputSchema }), object({ sequence: NcSharedSequenceSchema }), {
68620
- kind: "mutation",
68621
- auth: "admin"
68622
- }), method(object({
68623
- sequenceId: string().min(1),
68624
- sequence: NcSharedSequenceInputSchema
68625
- }), object({ sequence: NcSharedSequenceSchema }), {
68626
- kind: "mutation",
68627
- auth: "admin"
68628
- }), method(object({ sequenceId: string().min(1) }), object({ success: literal(true) }), {
68629
- kind: "mutation",
68630
- auth: "admin"
68631
69124
  }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
68632
69125
  deviceId: number$1().int(),
68633
69126
  muted: boolean()
@@ -80260,7 +80753,8 @@ var AccessoryKind = {
80260
80753
  PrivacyMask: DeviceRole.PrivacyMask
80261
80754
  };
80262
80755
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
80263
- DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, 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;
80756
+ DeviceType.HeatPump;
80757
+ 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;
80264
80758
  new Set(Object.values(DeviceType));
80265
80759
  /** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
80266
80760
  function contribution(cap, schema, build) {
@@ -80396,6 +80890,13 @@ var lockContribution = contribution("lock-control", LockControlStatusSchema, (sl
80396
80890
  reading: reading("lock-control", words?.state ?? "unknown", false, words?.title),
80397
80891
  rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(DeviceFeature.LockOpen)))],
80398
80892
  ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, "muted")] },
80893
+ ...words === null ? {} : { tiles: { left: [{
80894
+ label: t("Door", "Porta"),
80895
+ value: title
80896
+ }, ...since === null ? [] : [{
80897
+ label: t("Since", "Da"),
80898
+ value: since
80899
+ }]] } },
80399
80900
  ...words?.door == null ? {} : { scene: { mode: words.door } }
80400
80901
  };
80401
80902
  });
@@ -80477,7 +80978,17 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
80477
80978
  return {
80478
80979
  reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
80479
80980
  rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? t("Unknown", "Sconosciuto"), since]), alarmControls(state, modes, slice?.requiresCode ?? false))],
80480
- ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] }
80981
+ ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
80982
+ ...words === null ? {} : { tiles: {
80983
+ left: [{
80984
+ label: t("Mode", "Modalità"),
80985
+ value: words.title
80986
+ }],
80987
+ ...since === null ? {} : { right: [{
80988
+ label: t("Since", "Da"),
80989
+ value: since
80990
+ }] }
80991
+ } }
80481
80992
  };
80482
80993
  }),
80483
80994
  "automation-control": contribution("automation-control", AutomationControlStatusSchema, (slice, ctx) => {
@@ -80541,7 +81052,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
80541
81052
  */
80542
81053
  var has$3 = (ctx, f) => ctx.features.includes(f);
80543
81054
  var unknownText = t("Unknown", "Sconosciuto");
80544
- var pct$1 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
81055
+ var pct$2 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
80545
81056
  var unit = (n) => Math.min(1, Math.max(0, n / 100));
80546
81057
  /** Battery as a fact, unless the device is also bound to the `battery` cap (it already says so). */
80547
81058
  function ownBattery(level, ctx) {
@@ -80603,7 +81114,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
80603
81114
  },
80604
81115
  valueArg: "direction"
80605
81116
  });
80606
- const speedText = speed === null ? null : pct$1(speed);
81117
+ const speedText = speed === null ? null : pct$2(speed);
80607
81118
  const preset = slice?.preset ?? "";
80608
81119
  const status = speed === null ? unknownText : joinText([speed === 0 ? t("Off", "Spento") : t(`Speed ${speed}%`, `Velocità ${speed}%`), preset === "" ? null : t(preset, preset)]);
80609
81120
  return {
@@ -80616,10 +81127,16 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
80616
81127
  }],
80617
81128
  ...speedText === null ? {} : {
80618
81129
  facts: [fact("speed", "fan", speedText, speed === 0 ? "muted" : "primary")],
80619
- tiles: { right: [{
80620
- label: t("Speed", "Velocità"),
80621
- value: speedText
80622
- }] },
81130
+ tiles: {
81131
+ ...slice?.oscillating == null ? {} : { left: [{
81132
+ label: t("Oscillation", "Oscilla"),
81133
+ value: slice.oscillating ? t("Yes", "Sì") : t("No", "No")
81134
+ }] },
81135
+ ...preset === "" ? {} : { right: [{
81136
+ label: t("Mode", "Modalità"),
81137
+ value: t(preset, preset)
81138
+ }] }
81139
+ },
80623
81140
  scene: { level: unit(speed ?? 0) }
80624
81141
  }
80625
81142
  };
@@ -80683,7 +81200,8 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
80683
81200
  const words = state === null ? null : VACUUM_WORDS[state];
80684
81201
  const title = state === "error" && slice?.errorLabel ? t(slice.errorLabel, slice.errorLabel) : words?.title;
80685
81202
  const controls = vacuumControls(state);
80686
- if (slice !== void 0 && slice.availableFanSpeeds.length > 0) controls.push({
81203
+ const suctionControls = [];
81204
+ if (slice !== void 0 && slice.availableFanSpeeds.length > 0) suctionControls.push({
80687
81205
  kind: "picker",
80688
81206
  id: "vacuum.suction",
80689
81207
  label: t("Suction", "Aspirazione"),
@@ -80698,22 +81216,31 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
80698
81216
  });
80699
81217
  if (state !== null) controls.push(vac("locate", "Locate", "Trova", "map-pin", "locate"));
80700
81218
  const progress = state === "cleaning" ? slice?.progress ?? null : null;
81219
+ const suction = slice?.fanSpeed == null || slice.fanSpeed === "" ? [] : [{
81220
+ label: t("Suction", "Aspirazione"),
81221
+ value: t(slice.fanSpeed, slice.fanSpeed)
81222
+ }];
81223
+ const suctionRows = suctionControls.length === 0 ? [] : [{
81224
+ id: "vacuum-suction",
81225
+ icon: "bot",
81226
+ status: null,
81227
+ controls: suctionControls
81228
+ }];
81229
+ const vacuumRows = [{
81230
+ id: "vacuum",
81231
+ icon: "bot",
81232
+ status: title ?? unknownText,
81233
+ controls
81234
+ }, ...suctionRows];
80701
81235
  return {
80702
81236
  reading: reading("vacuum-control", words?.state ?? "unknown", false, title),
80703
- rows: [{
80704
- id: "vacuum",
80705
- icon: "bot",
80706
- status: title ?? unknownText,
80707
- controls
80708
- }],
80709
- facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$1(progress), "primary")]],
80710
- ...progress === null ? {} : {
80711
- tiles: { right: [{
80712
- label: t("Progress", "Avanzamento"),
80713
- value: pct$1(progress)
80714
- }] },
80715
- scene: { level: unit(progress) }
80716
- }
81237
+ rows: vacuumRows,
81238
+ facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
81239
+ ...suction.length === 0 && progress === null ? {} : { tiles: { right: [...suction, ...progress === null ? [] : [{
81240
+ label: t("Progress", "Avanzamento"),
81241
+ value: pct$2(progress)
81242
+ }]] } },
81243
+ ...progress === null ? {} : { scene: { level: unit(progress) } }
80717
81244
  };
80718
81245
  });
80719
81246
  var MOWER_WORDS = {
@@ -80769,11 +81296,11 @@ var mowerContribution = contribution("lawn-mower-control", LawnMowerControlStatu
80769
81296
  status: title ?? unknownText,
80770
81297
  controls: mowerControls(activity)
80771
81298
  }],
80772
- facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$1(progress), "primary")]],
81299
+ facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
80773
81300
  ...progress === null ? {} : {
80774
81301
  tiles: { right: [{
80775
81302
  label: t("Progress", "Avanzamento"),
80776
- value: pct$1(progress)
81303
+ value: pct$2(progress)
80777
81304
  }] },
80778
81305
  scene: { level: unit(progress) }
80779
81306
  }
@@ -80844,10 +81371,13 @@ var feederContribution = contribution("pet-feeder", PetFeederStatusSchema, (slic
80844
81371
  ...last === null ? [] : [fact("last-run", "clock", t(`Last ${last} g`, `Ultimo ${last} g`))],
80845
81372
  ...ownBattery(slice?.powerSource === "battery" ? slice.batteryPower : null, ctx)
80846
81373
  ],
80847
- ...last === null ? {} : { tiles: { right: [{
81374
+ tiles: { left: [...slice?.foodLevel == null ? [] : [{
81375
+ label: t("Tank", "Serbatoio"),
81376
+ value: pct$2(slice.foodLevel)
81377
+ }], ...last === null ? [] : [{
80848
81378
  label: t("Last portion", "Ultima porzione"),
80849
81379
  value: t(`${last} g`, `${last} g`)
80850
- }] } }
81380
+ }]] }
80851
81381
  };
80852
81382
  });
80853
81383
  var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema, (slice) => {
@@ -80875,10 +81405,13 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
80875
81405
  }],
80876
81406
  ...level === null ? {} : {
80877
81407
  facts: [fact("level", "droplets", t(`Water ${Math.round(level)}%`, `Acqua ${Math.round(level)}%`), level <= 20 ? "warning" : "primary")],
80878
- tiles: { right: [{
81408
+ tiles: { left: [{
80879
81409
  label: t("Water", "Acqua"),
80880
- value: pct$1(level)
80881
- }] },
81410
+ value: pct$2(level)
81411
+ }, ...slice?.waterVolume == null ? [] : [{
81412
+ label: t("Volume", "Volume"),
81413
+ value: t(`${Math.round(slice.waterVolume)} ml`, `${Math.round(slice.waterVolume)} ml`)
81414
+ }]] },
80882
81415
  scene: { level: unit(level) }
80883
81416
  }
80884
81417
  };
@@ -80910,14 +81443,18 @@ var DEVICES_FAMILY_CONTRIBUTIONS = {
80910
81443
  * that does not parse reads `unknown`, never closed or off (D315/D393).
80911
81444
  */
80912
81445
  var has$2 = (ctx, f) => ctx.features.includes(f);
80913
- var pct = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
81446
+ var pct$1 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
80914
81447
  var brightnessContribution = contribution("brightness", BrightnessStatusSchema, (slice) => {
80915
81448
  const level = slice?.level ?? null;
80916
81449
  return {
80917
81450
  ...level === null ? {} : { reading: reading("brightness", level > 0 ? "on" : "off") },
80918
81451
  ...level === null ? {} : {
80919
- facts: [fact("level", "sun-dim", pct(level), level > 0 ? "primary" : "muted")],
80920
- scene: { level: level / 100 }
81452
+ facts: [fact("level", "sun-dim", pct$1(level), level > 0 ? "primary" : "muted")],
81453
+ scene: { level: level / 100 },
81454
+ tiles: { left: [{
81455
+ label: t("Brightness", "Luminosità"),
81456
+ value: pct$1(level)
81457
+ }] }
80921
81458
  },
80922
81459
  rows: [row$1("brightness", "sun-dim", level === null ? null : t(`Brightness ${Math.round(level)}%`, `Luminosità ${Math.round(level)}%`), [{
80923
81460
  kind: "slider",
@@ -81126,12 +81663,16 @@ function travelFragment(s, state, position, tilt, ctx) {
81126
81663
  });
81127
81664
  return {
81128
81665
  reading: reading(s.source, words.state, false, words.title),
81129
- ...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct(position))] },
81666
+ ...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct$1(position))] },
81667
+ ...position === null ? {} : { tiles: { left: [{
81668
+ label: t("Opening", "Apertura"),
81669
+ value: pct$1(position)
81670
+ }] } },
81130
81671
  scene: {
81131
81672
  ...words.mode === null ? {} : { mode: words.mode },
81132
81673
  ...position === null ? {} : { level: position / 100 }
81133
81674
  },
81134
- rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct(position) : null]), controls)]
81675
+ rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct$1(position) : null]), controls)]
81135
81676
  };
81136
81677
  }
81137
81678
  var ACTUATORS_FAMILY_CONTRIBUTIONS = {
@@ -81209,10 +81750,10 @@ var ACTUATORS_FAMILY_CONTRIBUTIONS = {
81209
81750
  const now = slice.currentHumidity;
81210
81751
  return {
81211
81752
  reading: reading("humidifier", state, false, title),
81212
- ...now === null ? {} : { facts: [fact("level", "droplets", pct(now), "info")] },
81753
+ ...now === null ? {} : { facts: [fact("level", "droplets", pct$1(now), "info")] },
81213
81754
  ...slice.targetHumidity === null ? {} : { tiles: { right: [{
81214
81755
  label: t("Target", "Obiettivo"),
81215
- value: pct(slice.targetHumidity)
81756
+ value: pct$1(slice.targetHumidity)
81216
81757
  }] } },
81217
81758
  ...now === null ? {} : { scene: { level: now / 100 } },
81218
81759
  rows: [row$1("humidifier", "droplets", joinText([title, slice.mode === null ? null : t(slice.mode, slice.mode)]), controls)]
@@ -81460,17 +82001,16 @@ var weatherContribution = contribution("weather", WeatherStatusSchema, (slice, c
81460
82001
  });
81461
82002
  var updateContribution = contribution("update", UpdateStatusSchema, (slice) => {
81462
82003
  if (slice === void 0) return { reading: reading("update", "unknown") };
81463
- const { currentVersion, availableVersion, inProgress, updatable } = slice;
82004
+ const { currentVersion, availableVersion, inProgress } = slice;
81464
82005
  const pending = availableVersion !== null && availableVersion !== "" && availableVersion !== currentVersion;
81465
82006
  if (!pending && currentVersion === null && !inProgress) return { reading: reading("update", "unknown") };
81466
82007
  const state = inProgress ? "running" : pending ? "standby" : "idle";
81467
82008
  const title = inProgress ? t("Updating", "Aggiornamento in corso") : pending ? t("Update available", "Aggiornamento disponibile") : t("Up to date", "Aggiornato");
81468
82009
  const versions = currentVersion === null ? pending ? t(`${availableVersion}`, `${availableVersion}`) : null : pending ? t(`${currentVersion} → ${availableVersion}`, `${currentVersion} → ${availableVersion}`) : t(`Version ${currentVersion}`, `Versione ${currentVersion}`);
81469
- const install = pending && updatable && !inProgress ? [asAction(action("update.install", t("Install", "Installa"), "download", "update", "installUpdate", {}, "primary", "install"))] : [];
81470
82010
  return {
81471
82011
  reading: reading("update", state, false, title),
81472
82012
  facts: versions === null ? [] : [fact("reading", "download", versions, pending ? "warning" : "muted")],
81473
- rows: [row$1("update", "download", versions, install)]
82013
+ rows: [row$1("update", "download", versions, [])]
81474
82014
  };
81475
82015
  });
81476
82016
  var imageContribution = contribution("image", ImageStatusSchema, (slice, ctx) => {
@@ -81578,6 +82118,33 @@ var ON_MODE_PREFERENCE = [
81578
82118
  "heat",
81579
82119
  "cool"
81580
82120
  ];
82121
+ var FAN_LABEL = {
82122
+ auto: t("Auto", "Auto"),
82123
+ quiet: t("Quiet", "Silenziosa"),
82124
+ low: t("Low", "Bassa"),
82125
+ medium: t("Medium", "Media"),
82126
+ high: t("High", "Alta"),
82127
+ turbo: t("Turbo", "Turbo"),
82128
+ off: t("Off", "Spenta")
82129
+ };
82130
+ /** A readable label for a fan speed name; an unknown one is shown as the device reported it. */
82131
+ function fanLabelOf(fan) {
82132
+ return FAN_LABEL[fan] ?? t(fan, fan);
82133
+ }
82134
+ /** Short labels for a segmented control: one word each, so the segments stay on a line. */
82135
+ var MODE_SEGMENT_LABEL = {
82136
+ off: t("Off", "Spento"),
82137
+ heat: t("Heat", "Caldo"),
82138
+ cool: t("Cool", "Freddo"),
82139
+ auto: t("Auto", "Auto"),
82140
+ heat_cool: t("Heat/Cool", "Caldo/Freddo"),
82141
+ fan_only: t("Fan", "Vent."),
82142
+ dry: t("Dry", "Deum.")
82143
+ };
82144
+ /** The segment label of every available HVAC mode, keyed by the mode value. */
82145
+ function modeLabelsOf(modes) {
82146
+ return Object.fromEntries(modes.map((m) => [m, MODE_SEGMENT_LABEL[m]]));
82147
+ }
81581
82148
  /** 22 -> "22", 22.3 -> "22.3": a trailing zero is noise on a thermostat. */
81582
82149
  function formatDegrees(value) {
81583
82150
  return `${Number(value.toFixed(1))}°`;
@@ -81642,11 +82209,11 @@ function rangeFrom(min, max, step) {
81642
82209
  * contribute, types never do (D14). A slice that is absent or does not parse is
81643
82210
  * "not answered": the state reads unknown, no row is drawn (D315, D393).
81644
82211
  */
81645
- var same = (text) => t(text, text);
81646
- function tile(en, it, value) {
82212
+ var same$1 = (text) => t(text, text);
82213
+ function tile$1(en, it, value) {
81647
82214
  return {
81648
82215
  label: t(en, it),
81649
- value: same(value)
82216
+ value: same$1(value)
81650
82217
  };
81651
82218
  }
81652
82219
  function setpointSlider(id, cap, method, valueArg, value, range) {
@@ -81681,18 +82248,19 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
81681
82248
  const status = climateStatusText(view);
81682
82249
  const facts = [];
81683
82250
  if (status !== null) facts.push(fact("climate", "thermometer", status));
81684
- if (view.humidity !== null) facts.push(fact("humidity", "droplets", same(`${Math.round(view.humidity)}%`)));
81685
- if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same(`→ ${Math.round(view.targetHumidity)}%`)));
82251
+ if (view.humidity !== null) facts.push(fact("humidity", "droplets", same$1(`${Math.round(view.humidity)}%`)));
82252
+ if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same$1(`→ ${Math.round(view.targetHumidity)}%`)));
81686
82253
  const left = [];
81687
82254
  const right = [];
81688
- if (view.measured !== null) left.push(tile("Indoor", "In casa", formatDegrees(view.measured)));
81689
- if (view.humidity !== null) left.push(tile("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
82255
+ if (view.measured !== null) left.push(tile$1("Indoor", "In casa", formatDegrees(view.measured)));
82256
+ if (view.humidity !== null) left.push(tile$1("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
81690
82257
  const modeControls = [{
81691
82258
  kind: "picker",
81692
82259
  id: "climate.mode",
81693
82260
  label: t("Mode", "Modalità"),
81694
82261
  current: view.mode,
81695
- options: [...view.availableModes],
82262
+ options: [...view.availableModes.filter((m) => m !== "off"), ...view.availableModes.filter((m) => m === "off")],
82263
+ optionLabels: modeLabelsOf(view.availableModes),
81696
82264
  call: {
81697
82265
  cap: "climate-control",
81698
82266
  method: "setMode",
@@ -81720,6 +82288,7 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
81720
82288
  label: t("Fan", "Ventola"),
81721
82289
  current: slice.fanMode === "" ? null : slice.fanMode,
81722
82290
  options: [...slice.availableFanModes],
82291
+ optionLabels: Object.fromEntries(slice.availableFanModes.map((m) => [m, fanLabelOf(m)])),
81723
82292
  call: {
81724
82293
  cap: "climate-control",
81725
82294
  method: "setFanMode",
@@ -81745,14 +82314,15 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
81745
82314
  if (fanControls.length > 0) rows.push({
81746
82315
  id: "climate-fan",
81747
82316
  icon: "fan",
81748
- status: slice.fanMode === "" ? null : same(slice.fanMode),
82317
+ status: slice.fanMode === "" ? null : same$1(slice.fanMode),
81749
82318
  controls: fanControls
81750
82319
  });
81751
- rows.push(...setpointRow(view.target === null ? null : same(formatDegrees(view.target)), view.range === null || view.target === null ? null : setpointSlider("climate.target", "climate-control", "setTarget", "target", view.target, view.range)));
82320
+ rows.push(...setpointRow(view.target === null ? null : same$1(formatDegrees(view.target)), view.range === null || view.target === null ? null : setpointSlider("climate.target", "climate-control", "setTarget", "target", view.target, view.range)));
81752
82321
  const sceneMode = view.sceneMode;
81753
82322
  return {
81754
82323
  reading: reading("climate-control", view.isOff ? "off" : "on"),
81755
82324
  title: view.modeLabel,
82325
+ ...view.isOff || slice.fanMode === "" ? {} : { caption: t(`${view.modeLabel.en} · fan ${fanLabelOf(slice.fanMode).en}`, `${view.modeLabel.it} · ventola ${fanLabelOf(slice.fanMode).it}`) },
81756
82326
  facts,
81757
82327
  ...left.length === 0 && right.length === 0 ? {} : { tiles: {
81758
82328
  left,
@@ -81779,7 +82349,7 @@ var WATER_ON_PREFERENCE = [
81779
82349
  "performance"
81780
82350
  ];
81781
82351
  function capitalised(word) {
81782
- return same(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
82352
+ return same$1(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
81783
82353
  }
81784
82354
  var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSchema, (slice) => {
81785
82355
  if (slice === void 0 || slice.operationMode === null) return { reading: reading("climate-control", "unknown") };
@@ -81816,13 +82386,13 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
81816
82386
  icon: "flame",
81817
82387
  status: label,
81818
82388
  controls: modeControls
81819
- }, ...setpointRow(slice.targetTemp === null ? null : same(formatDegrees(slice.targetTemp)), range === null || slice.targetTemp === null ? null : setpointSlider("water-heater.target", "water-heater", "setTargetTemp", "temp", slice.targetTemp, range))];
82389
+ }, ...setpointRow(slice.targetTemp === null ? null : same$1(formatDegrees(slice.targetTemp)), range === null || slice.targetTemp === null ? null : setpointSlider("water-heater.target", "water-heater", "setTargetTemp", "temp", slice.targetTemp, range))];
81820
82390
  const level = levelWithin(slice.targetTemp, range);
81821
82391
  return {
81822
82392
  reading: reading("climate-control", isOff ? "off" : "on"),
81823
82393
  title: label,
81824
82394
  facts: status === null ? [] : [fact("climate", "flame", status)],
81825
- ...slice.currentTemp === null ? {} : { tiles: { left: [tile("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
82395
+ ...slice.currentTemp === null ? {} : { tiles: { left: [tile$1("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
81826
82396
  scene: {
81827
82397
  ...isOff ? {} : { mode: "heat" },
81828
82398
  ...level === null ? {} : { level }
@@ -81840,11 +82410,12 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
81840
82410
  var heatingValveContribution = contribution("heating-valve", HeatingValveStatusSchema, (slice) => {
81841
82411
  const position = slice?.position ?? null;
81842
82412
  if (position === null) return { reading: reading("sensor", "unknown") };
81843
- const text = same(`${Math.round(position)}%`);
82413
+ const text = same$1(`${Math.round(position)}%`);
81844
82414
  return {
81845
82415
  reading: reading("sensor", position > 0 ? "running" : "idle"),
81846
82416
  facts: [fact("valve", "gauge", t(`Valve ${text.en}`, `Valvola ${text.it}`))],
81847
- tiles: { right: [tile("Valve", "Valvola", text.en)] },
82417
+ tiles: { right: [tile$1("Valve", "Valvola", text.en)] },
82418
+ ...position > 0 ? { caption: t(`Heating · valve ${text.en}`, `Riscalda · valvola ${text.it}`) } : {},
81848
82419
  scene: { level: position / 100 }
81849
82420
  };
81850
82421
  });
@@ -81853,9 +82424,9 @@ function sensorFragment(value, id, icon, en, it, text) {
81853
82424
  if (value === null) return { reading: reading("sensor", "unknown") };
81854
82425
  return {
81855
82426
  reading: reading("sensor", "on"),
81856
- title: same(text),
81857
- facts: [fact(id, icon, same(text))],
81858
- tiles: { right: [tile(en, it, text)] }
82427
+ title: same$1(text),
82428
+ facts: [fact(id, icon, same$1(text))],
82429
+ tiles: { right: [tile$1(en, it, text)] }
81859
82430
  };
81860
82431
  }
81861
82432
  var temperatureContribution = contribution("temperature-sensor", TemperatureSensorStatusSchema, (slice) => sensorFragment(slice?.temperature ?? null, "temperature", "thermometer", "Temperature", "Temperatura", formatDegrees(slice?.temperature ?? 0)));
@@ -81910,8 +82481,8 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
81910
82481
  return {
81911
82482
  reading: reading("sensor", "on"),
81912
82483
  ...slice.aqi === void 0 ? {} : { title: airQualityWord(slice.aqi) },
81913
- facts: parts.map((p) => fact("air-quality", "wind", same(`${p.label} ${p.value}`))),
81914
- tiles: { right: parts.slice(0, 2).map((p) => tile(p.label, p.label, p.value)) }
82484
+ facts: parts.map((p) => fact("air-quality", "wind", same$1(`${p.label} ${p.value}`))),
82485
+ tiles: { right: parts.slice(0, 2).map((p) => tile$1(p.label, p.label, p.value)) }
81915
82486
  };
81916
82487
  }),
81917
82488
  "carbon-monoxide": contribution("carbon-monoxide", CarbonMonoxideStatusSchema, (slice) => {
@@ -81926,15 +82497,270 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
81926
82497
  "numeric-sensor": numericContribution,
81927
82498
  "enum-sensor": enumContribution
81928
82499
  };
82500
+ /**
82501
+ * The heat pump's contribution to a hero (D1026): the compressor scene, every
82502
+ * circuit as a row with its own label and icon, the powers as pills (the
82503
+ * instantaneous COP is "—" when it cannot be computed) and a "System" group with
82504
+ * one selector per mode. Values and their limits come from the slice, which the
82505
+ * gateway filled: a selector with no allowed value is not drawn, a missing
82506
+ * reading is never a 0 (D393).
82507
+ */
82508
+ var CAP = "heat-pump-control";
82509
+ var same = (text) => t(text, text);
82510
+ /** The words of the values the gateway names; a value not listed is drawn as the gateway wrote it. */
82511
+ var VALUE_LABELS = {
82512
+ off: t("Off", "Off"),
82513
+ on: t("On", "On"),
82514
+ auto: t("Auto", "Auto"),
82515
+ manual: t("Manual", "Manuale"),
82516
+ low: t("Low", "Bassa"),
82517
+ high: t("High", "Alta"),
82518
+ eco: t("Eco", "Eco"),
82519
+ heat: t("Heat", "Caldo"),
82520
+ cool: t("Cool", "Freddo"),
82521
+ heatCool: t("Heat/cool", "Caldo/freddo"),
82522
+ ownprogram: t("Programme", "Programma")
82523
+ };
82524
+ function valueLabel(value) {
82525
+ const known = VALUE_LABELS[value];
82526
+ if (known !== void 0) return known;
82527
+ const holiday = /^hm(\d+)$/.exec(value);
82528
+ if (holiday?.[1] !== void 0) return t(`Programme ${holiday[1]}`, `Programma ${holiday[1]}`);
82529
+ return same(value);
82530
+ }
82531
+ function optionLabels(allowed) {
82532
+ return Object.fromEntries(allowed.map((value) => [value, valueLabel(value)]));
82533
+ }
82534
+ function picker(id, label, setting, method, args, valueArg = "mode") {
82535
+ return {
82536
+ kind: "picker",
82537
+ id,
82538
+ label,
82539
+ current: setting.value,
82540
+ options: [...setting.allowed],
82541
+ optionLabels: optionLabels(setting.allowed),
82542
+ call: {
82543
+ cap: CAP,
82544
+ method,
82545
+ args: { ...args }
82546
+ },
82547
+ valueArg
82548
+ };
82549
+ }
82550
+ /** A selector exists only where the gateway named values to choose from. */
82551
+ function choosable(setting) {
82552
+ return setting !== null && setting.allowed.length > 0;
82553
+ }
82554
+ function circuitControl(circuit) {
82555
+ const args = { circuitId: circuit.id };
82556
+ if (circuit.kind === "dhw" && choosable(circuit.temperatureLevel)) return picker(`heat-pump.${circuit.id}.level`, t("Level", "Livello"), circuit.temperatureLevel, "setDhwTemperatureLevel", args, "level");
82557
+ if (!choosable(circuit.operationMode)) return null;
82558
+ const method = circuit.kind === "dhw" ? "setDhwOperationMode" : "setCircuitOperationMode";
82559
+ return picker(`heat-pump.${circuit.id}.mode`, t("Mode", "Modalità"), circuit.operationMode, method, args);
82560
+ }
82561
+ /** A circuit with no reading is still a row: it shows that nothing is known, not nothing. */
82562
+ var UNKNOWN_STATUS = same("—");
82563
+ function circuitRow(circuit) {
82564
+ const control = circuitControl(circuit);
82565
+ const status = thermalStatusText(circuit.targetTemp, circuit.currentTemp) ?? UNKNOWN_STATUS;
82566
+ return {
82567
+ id: "circuit",
82568
+ label: same(circuit.label),
82569
+ icon: circuit.icon,
82570
+ status,
82571
+ controls: control === null ? [] : [control]
82572
+ };
82573
+ }
82574
+ var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
82575
+ /** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
82576
+ function copPill(cop) {
82577
+ if (cop === null) return {
82578
+ icon: "gauge",
82579
+ text: t("Instantaneous COP —", "COP istantaneo —"),
82580
+ tone: "muted"
82581
+ };
82582
+ const text = String(Number(cop.toFixed(1)));
82583
+ return {
82584
+ icon: "gauge",
82585
+ text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
82586
+ tone: "success"
82587
+ };
82588
+ }
82589
+ function powerPills(status) {
82590
+ const { thermalW, electricalW } = status.power;
82591
+ const pills = [];
82592
+ if (thermalW !== null) pills.push({
82593
+ icon: "flame",
82594
+ text: t(`Thermal ${kilowatts(thermalW)}`, `Termica ${kilowatts(thermalW)}`),
82595
+ tone: "muted"
82596
+ });
82597
+ if (electricalW !== null) pills.push({
82598
+ icon: "zap",
82599
+ text: t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
82600
+ tone: "muted"
82601
+ });
82602
+ pills.push(copPill(heatPumpInstantCop(status.power)));
82603
+ return pills;
82604
+ }
82605
+ /** The independent system modes, in the order the card draws them. */
82606
+ var SYSTEM_MODES = [
82607
+ {
82608
+ key: "silent",
82609
+ label: t("Silent", "Silenzioso"),
82610
+ icon: "volume-x",
82611
+ method: "setSilentMode"
82612
+ },
82613
+ {
82614
+ key: "away",
82615
+ label: t("Away", "Assente"),
82616
+ icon: "plane",
82617
+ method: "setAwayMode"
82618
+ },
82619
+ {
82620
+ key: "additionalHeater",
82621
+ label: t("Additional heater", "Riscaldatore aggiuntivo"),
82622
+ icon: "flame",
82623
+ method: "setAdditionalHeaterMode"
82624
+ },
82625
+ {
82626
+ key: "holiday",
82627
+ label: t("Holiday", "Vacanza"),
82628
+ icon: "tree-palm",
82629
+ method: "setHolidayMode"
82630
+ }
82631
+ ];
82632
+ var SYSTEM_GROUP = t("System", "Sistema");
82633
+ var PROGRAMME = /^hm\d+$/;
82634
+ /**
82635
+ * Holiday is two segments, off / programme. Choosing "programme" keeps the programme
82636
+ * that is set, else the first one the gateway allowed, so a write never leaves
82637
+ * `allowed`. The full hm1..hm8 pick is not in the hero (D1026). A holiday whose values
82638
+ * are not programmes keeps the plain selector.
82639
+ */
82640
+ function holidayRow(def, setting) {
82641
+ if (!setting.allowed.includes("off")) return null;
82642
+ const current = setting.value !== null && PROGRAMME.test(setting.value) ? setting.value : null;
82643
+ const programme = current ?? setting.allowed.find((v) => PROGRAMME.test(v));
82644
+ if (programme === void 0) return null;
82645
+ const control = picker("heat-pump.system.holiday", def.label, {
82646
+ value: setting.value,
82647
+ allowed: ["off", programme]
82648
+ }, def.method, {});
82649
+ const number = programme.slice(2);
82650
+ return {
82651
+ id: "system-mode",
82652
+ label: def.label,
82653
+ group: SYSTEM_GROUP,
82654
+ icon: def.icon,
82655
+ status: current === null ? null : t(`Programme ${number}`, `Programma ${number}`),
82656
+ controls: [control.kind === "picker" ? {
82657
+ ...control,
82658
+ optionLabels: {
82659
+ off: t("Off", "Off"),
82660
+ [programme]: t("Programme", "Programma")
82661
+ }
82662
+ } : control]
82663
+ };
82664
+ }
82665
+ function systemRows(status) {
82666
+ const rows = [];
82667
+ for (const def of SYSTEM_MODES) {
82668
+ const setting = status.system[def.key];
82669
+ if (!choosable(setting)) continue;
82670
+ if (def.key === "holiday") {
82671
+ const holiday = holidayRow(def, setting);
82672
+ if (holiday !== null) {
82673
+ rows.push(holiday);
82674
+ continue;
82675
+ }
82676
+ }
82677
+ rows.push({
82678
+ id: "system-mode",
82679
+ label: def.label,
82680
+ group: SYSTEM_GROUP,
82681
+ icon: def.icon,
82682
+ status: null,
82683
+ controls: [picker(`heat-pump.system.${def.key}`, def.label, setting, def.method, {})]
82684
+ });
82685
+ }
82686
+ return rows;
82687
+ }
82688
+ function tile(en, it, value) {
82689
+ return {
82690
+ label: t(en, it),
82691
+ value: same(value)
82692
+ };
82693
+ }
82694
+ function tilesOf$1(status) {
82695
+ const { supply, return: back, outdoor } = status.temperatures;
82696
+ const left = [];
82697
+ const right = [];
82698
+ if (supply !== null) left.push(tile("Supply", "Mandata", formatDegrees(supply)));
82699
+ if (back !== null) left.push(tile("Return", "Ritorno", formatDegrees(back)));
82700
+ if (outdoor !== null) right.push(tile("Outdoor", "Esterna", formatDegrees(outdoor)));
82701
+ if (status.waterPressureBar !== null) right.push(tile("Pressure", "Pressione", `${Number(status.waterPressureBar.toFixed(1))} bar`));
82702
+ return {
82703
+ left,
82704
+ right
82705
+ };
82706
+ }
82707
+ function isRunning(status) {
82708
+ const { compressorPct, electricalW } = status.power;
82709
+ if (compressorPct !== null) return compressorPct > 0;
82710
+ if (electricalW !== null) return electricalW > 0;
82711
+ return null;
82712
+ }
82713
+ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pump-status", HeatPumpStatusSchema, (slice) => {
82714
+ if (slice === void 0) return { reading: reading("climate-control", "unknown") };
82715
+ const running = isRunning(slice);
82716
+ const facts = [];
82717
+ if (slice.power.electricalW !== null) facts.push(fact("power", "zap", same(`${Math.round(slice.power.electricalW)} W`)));
82718
+ if (slice.power.compressorPct !== null) facts.push(fact("level", "gauge", t(`Compressor ${Math.round(slice.power.compressorPct)} %`, `Compressore ${Math.round(slice.power.compressorPct)} %`)));
82719
+ const charging = slice.circuits.find((c) => c.active === true);
82720
+ const tiles = tilesOf$1(slice);
82721
+ const pills = powerPills(slice);
82722
+ const rows = [
82723
+ ...slice.circuits.map(circuitRow),
82724
+ ...pills.length === 0 ? [] : [{
82725
+ id: "heat-pump-power",
82726
+ icon: "zap",
82727
+ status: null,
82728
+ controls: [],
82729
+ pills: [...pills]
82730
+ }],
82731
+ ...systemRows(slice)
82732
+ ];
82733
+ return {
82734
+ reading: reading("climate-control", running === true ? "running" : running === false ? "idle" : "on"),
82735
+ title: t("Heat pump", "Pompa di calore"),
82736
+ ...charging === void 0 ? {} : { caption: t(`${charging.label} · heating`.toUpperCase(), `${charging.label} · in riscaldamento`.toUpperCase()) },
82737
+ facts,
82738
+ ...tiles.left.length === 0 && tiles.right.length === 0 ? {} : { tiles },
82739
+ ...slice.power.electricalW === null ? {} : { consumption: {
82740
+ priority: 1,
82741
+ slot: {
82742
+ kind: "power",
82743
+ watts: slice.power.electricalW,
82744
+ detail: slice.power.thermalW === null ? [] : [{
82745
+ label: t("Thermal", "Termica"),
82746
+ value: Math.round(slice.power.thermalW),
82747
+ unit: "W"
82748
+ }]
82749
+ }
82750
+ } },
82751
+ rows
82752
+ };
82753
+ }) };
81929
82754
  [
81930
82755
  ...Object.values(ACCESS_FAMILY_CONTRIBUTIONS),
81931
82756
  ...Object.values(DEVICES_FAMILY_CONTRIBUTIONS),
81932
82757
  ...Object.values(GROUPS_FAMILY_CONTRIBUTIONS),
81933
82758
  ...Object.values(ACTUATORS_FAMILY_CONTRIBUTIONS),
81934
82759
  ...Object.values(SENSORS_FAMILY_CONTRIBUTIONS),
81935
- ...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS)
82760
+ ...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
82761
+ ...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
81936
82762
  ];
81937
- 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;
82763
+ 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;
81938
82764
  /**
81939
82765
  * Who looks like what (D1023). One look per {@link DeviceType}, refined by a
81940
82766
  * {@link DeviceRole} where the role changes how the device reads (a leak
@@ -82324,7 +83150,7 @@ lookOf({
82324
83150
  ({ ...lookOf({
82325
83151
  icon: "shield-check",
82326
83152
  on: [
82327
- "success",
83153
+ "danger",
82328
83154
  "glow",
82329
83155
  "halo"
82330
83156
  ],
@@ -82562,8 +83388,24 @@ lookOf({
82562
83388
  idle: INFO,
82563
83389
  standby: MUTED
82564
83390
  });
83391
+ lookOf({
83392
+ icon: "thermometer-sun",
83393
+ on: [
83394
+ "warning",
83395
+ "heat-rise",
83396
+ "rise"
83397
+ ],
83398
+ off: MUTED,
83399
+ running: [
83400
+ "warning",
83401
+ "heat-rise",
83402
+ "rise"
83403
+ ],
83404
+ idle: INFO,
83405
+ standby: MUTED
83406
+ });
82565
83407
  DeviceType.Climate, DeviceType.Thermostat;
82566
- 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;
83408
+ 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;
82567
83409
  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;
82568
83410
  Object.freeze({
82569
83411
  "accessories.getStatus": {
@@ -84729,6 +85571,13 @@ Object.freeze({
84729
85571
  access: "create",
84730
85572
  role: "admin"
84731
85573
  },
85574
+ "deviceManager.checkDeviceTemplates": {
85575
+ capName: "device-manager",
85576
+ capScope: "system",
85577
+ addonId: null,
85578
+ access: "view",
85579
+ role: "admin"
85580
+ },
84732
85581
  "deviceManager.cleanupDeletedDevicesData": {
84733
85582
  capName: "device-manager",
84734
85583
  capScope: "system",
@@ -85128,6 +85977,13 @@ Object.freeze({
85128
85977
  access: "create",
85129
85978
  role: "admin"
85130
85979
  },
85980
+ "deviceManager.renderDeviceTemplates": {
85981
+ capName: "device-manager",
85982
+ capScope: "system",
85983
+ addonId: null,
85984
+ access: "view",
85985
+ role: "admin"
85986
+ },
85131
85987
  "deviceManager.reportDiscoveryObservations": {
85132
85988
  capName: "device-manager",
85133
85989
  capScope: "system",
@@ -86059,6 +86915,111 @@ Object.freeze({
86059
86915
  access: "view",
86060
86916
  role: "viewer"
86061
86917
  },
86918
+ "heatPumpControl.setAdditionalHeaterMode": {
86919
+ capName: "heat-pump-control",
86920
+ capScope: "device",
86921
+ addonId: null,
86922
+ access: "create",
86923
+ role: "viewer"
86924
+ },
86925
+ "heatPumpControl.setAwayMode": {
86926
+ capName: "heat-pump-control",
86927
+ capScope: "device",
86928
+ addonId: null,
86929
+ access: "create",
86930
+ role: "viewer"
86931
+ },
86932
+ "heatPumpControl.setCircuitComfortSetpoint": {
86933
+ capName: "heat-pump-control",
86934
+ capScope: "device",
86935
+ addonId: null,
86936
+ access: "create",
86937
+ role: "viewer"
86938
+ },
86939
+ "heatPumpControl.setCircuitEcoSetpoint": {
86940
+ capName: "heat-pump-control",
86941
+ capScope: "device",
86942
+ addonId: null,
86943
+ access: "create",
86944
+ role: "viewer"
86945
+ },
86946
+ "heatPumpControl.setCircuitHeatCoolMode": {
86947
+ capName: "heat-pump-control",
86948
+ capScope: "device",
86949
+ addonId: null,
86950
+ access: "create",
86951
+ role: "viewer"
86952
+ },
86953
+ "heatPumpControl.setCircuitMaxFlowTemp": {
86954
+ capName: "heat-pump-control",
86955
+ capScope: "device",
86956
+ addonId: null,
86957
+ access: "create",
86958
+ role: "viewer"
86959
+ },
86960
+ "heatPumpControl.setCircuitOperationMode": {
86961
+ capName: "heat-pump-control",
86962
+ capScope: "device",
86963
+ addonId: null,
86964
+ access: "create",
86965
+ role: "viewer"
86966
+ },
86967
+ "heatPumpControl.setCircuitSummerWinter": {
86968
+ capName: "heat-pump-control",
86969
+ capScope: "device",
86970
+ addonId: null,
86971
+ access: "create",
86972
+ role: "viewer"
86973
+ },
86974
+ "heatPumpControl.setDhwChargeDuration": {
86975
+ capName: "heat-pump-control",
86976
+ capScope: "device",
86977
+ addonId: null,
86978
+ access: "create",
86979
+ role: "viewer"
86980
+ },
86981
+ "heatPumpControl.setDhwOperationMode": {
86982
+ capName: "heat-pump-control",
86983
+ capScope: "device",
86984
+ addonId: null,
86985
+ access: "create",
86986
+ role: "viewer"
86987
+ },
86988
+ "heatPumpControl.setDhwTemperatureLevel": {
86989
+ capName: "heat-pump-control",
86990
+ capScope: "device",
86991
+ addonId: null,
86992
+ access: "create",
86993
+ role: "viewer"
86994
+ },
86995
+ "heatPumpControl.setHolidayMode": {
86996
+ capName: "heat-pump-control",
86997
+ capScope: "device",
86998
+ addonId: null,
86999
+ access: "create",
87000
+ role: "viewer"
87001
+ },
87002
+ "heatPumpControl.setSilentMode": {
87003
+ capName: "heat-pump-control",
87004
+ capScope: "device",
87005
+ addonId: null,
87006
+ access: "create",
87007
+ role: "viewer"
87008
+ },
87009
+ "heatPumpControl.startExtraHotWater": {
87010
+ capName: "heat-pump-control",
87011
+ capScope: "device",
87012
+ addonId: null,
87013
+ access: "create",
87014
+ role: "viewer"
87015
+ },
87016
+ "heatPumpStatus.getStatus": {
87017
+ capName: "heat-pump-status",
87018
+ capScope: "device",
87019
+ addonId: null,
87020
+ access: "view",
87021
+ role: "viewer"
87022
+ },
86062
87023
  "heroLayout.getHeroModel": {
86063
87024
  capName: "hero-layout",
86064
87025
  capScope: "system",
@@ -92898,7 +93859,7 @@ function projectAction(cap, action) {
92898
93859
  };
92899
93860
  }
92900
93861
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
92901
- 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.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
93862
+ 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;
92902
93863
  /**
92903
93864
  * Heuristic check — `device.features?.includes(profile.when.hasFeature)`.
92904
93865
  */
@@ -92967,7 +93928,6 @@ function offered(received) {
92967
93928
  };
92968
93929
  }
92969
93930
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
92970
- string().min(1).max(4096);
92971
93931
  Object.freeze({
92972
93932
  "accessories.getStatus": [{
92973
93933
  name: "deviceId",
@@ -94050,6 +95010,81 @@ Object.freeze({
94050
95010
  form: "single",
94051
95011
  optional: false
94052
95012
  }],
95013
+ "heatPumpControl.setAdditionalHeaterMode": [{
95014
+ name: "deviceId",
95015
+ form: "single",
95016
+ optional: false
95017
+ }],
95018
+ "heatPumpControl.setAwayMode": [{
95019
+ name: "deviceId",
95020
+ form: "single",
95021
+ optional: false
95022
+ }],
95023
+ "heatPumpControl.setCircuitComfortSetpoint": [{
95024
+ name: "deviceId",
95025
+ form: "single",
95026
+ optional: false
95027
+ }],
95028
+ "heatPumpControl.setCircuitEcoSetpoint": [{
95029
+ name: "deviceId",
95030
+ form: "single",
95031
+ optional: false
95032
+ }],
95033
+ "heatPumpControl.setCircuitHeatCoolMode": [{
95034
+ name: "deviceId",
95035
+ form: "single",
95036
+ optional: false
95037
+ }],
95038
+ "heatPumpControl.setCircuitMaxFlowTemp": [{
95039
+ name: "deviceId",
95040
+ form: "single",
95041
+ optional: false
95042
+ }],
95043
+ "heatPumpControl.setCircuitOperationMode": [{
95044
+ name: "deviceId",
95045
+ form: "single",
95046
+ optional: false
95047
+ }],
95048
+ "heatPumpControl.setCircuitSummerWinter": [{
95049
+ name: "deviceId",
95050
+ form: "single",
95051
+ optional: false
95052
+ }],
95053
+ "heatPumpControl.setDhwChargeDuration": [{
95054
+ name: "deviceId",
95055
+ form: "single",
95056
+ optional: false
95057
+ }],
95058
+ "heatPumpControl.setDhwOperationMode": [{
95059
+ name: "deviceId",
95060
+ form: "single",
95061
+ optional: false
95062
+ }],
95063
+ "heatPumpControl.setDhwTemperatureLevel": [{
95064
+ name: "deviceId",
95065
+ form: "single",
95066
+ optional: false
95067
+ }],
95068
+ "heatPumpControl.setHolidayMode": [{
95069
+ name: "deviceId",
95070
+ form: "single",
95071
+ optional: false
95072
+ }],
95073
+ "heatPumpControl.setSilentMode": [{
95074
+ name: "deviceId",
95075
+ form: "single",
95076
+ optional: false
95077
+ }],
95078
+ "heatPumpControl.startExtraHotWater": [{
95079
+ name: "deviceId",
95080
+ form: "single",
95081
+ optional: false
95082
+ }],
95083
+ "heatPumpStatus.getStatus": [{
95084
+ name: "deviceId",
95085
+ form: "single",
95086
+ optional: false
95087
+ }],
94053
95088
  "heroLayout.getHeroModel": [{
94054
95089
  name: "deviceId",
94055
95090
  form: "single",