@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.mjs CHANGED
@@ -805,7 +805,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
805
805
  return EventCategory;
806
806
  }({});
807
807
  //#endregion
808
- //#region ../types/dist/device-type-CbDhVwFP.mjs
808
+ //#region ../types/dist/composed-stable-id-DLcPInGv.mjs
809
809
  /**
810
810
  import { errMsg } from '@camstack/types'
811
811
  * Extract a human-readable message from an unknown error value.
@@ -931,6 +931,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
931
931
  * (`reboot`, `device-admin-link`). Products are NOT its children — they are
932
932
  * adopted beside it — and its connection settings stay on the integration. */
933
933
  DeviceType["Gateway"] = "gateway";
934
+ /** A heat pump (any vendor): the compressor unit with its circuits (heating, hot
935
+ * water, cooling, solar), its system modes and its power. One main read-only
936
+ * `heat-pump-status` cap carries all of it; `heat-pump-control` sets it (D1026). */
937
+ DeviceType["HeatPump"] = "heat-pump";
934
938
  return DeviceType;
935
939
  }({});
936
940
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -1203,6 +1207,12 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1203
1207
  DeviceRole["IrTransmitter"] = "ir-transmitter";
1204
1208
  return DeviceRole;
1205
1209
  }({});
1210
+ /**
1211
+ * A composed device's stableId is this prefix plus the block id. Its own module,
1212
+ * free of zod, so the addon runner can read it through `@camstack/types/addon`
1213
+ * without loading the schema barrel (D28).
1214
+ */
1215
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1206
1216
  //#endregion
1207
1217
  //#region ../../node_modules/zod/v4/core/core.js
1208
1218
  var _a$1;
@@ -6015,7 +6025,7 @@ var ZodIssueCode = {
6015
6025
  var ZodFirstPartyTypeKind;
6016
6026
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6017
6027
  //#endregion
6018
- //#region ../types/dist/sleep-CkinsFFb.mjs
6028
+ //#region ../types/dist/sleep-VrfKAAGN.mjs
6019
6029
  /**
6020
6030
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6021
6031
  * window to float samples (D455).
@@ -9554,15 +9564,52 @@ var PeerBytesTicketSchema = object({
9554
9564
  */
9555
9565
  declaredBytes: number$1().int().nonnegative().nullable()
9556
9566
  });
9557
- discriminatedUnion("kind", [object({
9558
- kind: literal("action"),
9559
- actionId: string(),
9560
- runId: string(),
9561
- automationId: string().optional()
9562
- }), object({
9563
- kind: literal("scheduler"),
9564
- schedulerId: string()
9565
- })]);
9567
+ /**
9568
+ * The match a notification rule fired on (D705). Carried as a command origin so an
9569
+ * Action the rule starts can press `alarm-panel.trigger` as that match, not as an
9570
+ * anonymous press (D735). The same fields a rule fire ref freezes.
9571
+ */
9572
+ var RuleFireOriginSchema = object({
9573
+ ruleId: string(),
9574
+ ruleName: string(),
9575
+ deviceId: number$1().int(),
9576
+ sourceDeviceId: number$1().int().optional(),
9577
+ recordId: string(),
9578
+ timestamp: number$1(),
9579
+ trackId: string().optional(),
9580
+ eventId: string().optional(),
9581
+ className: string().optional(),
9582
+ label: string().optional(),
9583
+ zones: array(string()).optional(),
9584
+ confidence: number$1().optional(),
9585
+ sensorChange: object({
9586
+ name: string(),
9587
+ kind: string(),
9588
+ state: string()
9589
+ }).optional(),
9590
+ extraStills: array(object({
9591
+ ownerId: string(),
9592
+ cameraId: number$1().int()
9593
+ })).optional()
9594
+ });
9595
+ discriminatedUnion("kind", [
9596
+ object({
9597
+ kind: literal("action"),
9598
+ actionId: string(),
9599
+ runId: string(),
9600
+ automationId: string().optional(),
9601
+ /** The rule fire that started this run, when one did (D705). */
9602
+ ruleFire: RuleFireOriginSchema.optional()
9603
+ }),
9604
+ object({
9605
+ kind: literal("scheduler"),
9606
+ schedulerId: string()
9607
+ }),
9608
+ object({
9609
+ kind: literal("rule"),
9610
+ fire: RuleFireOriginSchema
9611
+ })
9612
+ ]);
9566
9613
  /**
9567
9614
  * One recorded device transition (D1022): a status field of a device went from
9568
9615
  * one value to another, with who or what asked for it.
@@ -10517,7 +10564,7 @@ function t(en, it) {
10517
10564
  * Things an operator switches, opens, sets or arms: lights, plugs, sirens,
10518
10565
  * covers, valves, locks, climate, fans, alarm panels.
10519
10566
  */
10520
- var ON = t("On", "Acceso");
10567
+ var ON$1 = t("On", "Acceso");
10521
10568
  var PERCENT = t("Percentage", "Percentuale");
10522
10569
  var OPEN_CLOSE_STATES = [
10523
10570
  {
@@ -10577,7 +10624,7 @@ var ACTUATOR_CAP_VOCABULARY = {
10577
10624
  state: [{
10578
10625
  kind: "boolean",
10579
10626
  field: "on",
10580
- label: ON,
10627
+ label: ON$1,
10581
10628
  whenTrue: t("When {device} turns on", "Quando {device} si accende"),
10582
10629
  whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
10583
10630
  icon: "power"
@@ -11743,7 +11790,7 @@ var ACTUATOR_CAP_VOCABULARY = {
11743
11790
  state: [{
11744
11791
  kind: "boolean",
11745
11792
  field: "on",
11746
- label: ON,
11793
+ label: ON$1,
11747
11794
  whenTrue: t("When {device} turns on", "Quando {device} si accende"),
11748
11795
  whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
11749
11796
  icon: "power"
@@ -14155,6 +14202,133 @@ var CAMERA_CAP_VOCABULARY = {
14155
14202
  }
14156
14203
  };
14157
14204
  /**
14205
+ * The heat pump (D1026): its system modes are phrased for automations, each with the
14206
+ * values the gateway really accepts; the per-circuit parameters need a circuit and are
14207
+ * set from the device page.
14208
+ */
14209
+ var OFF = {
14210
+ value: "off",
14211
+ label: t("Off", "Off")
14212
+ };
14213
+ var AUTO = {
14214
+ value: "auto",
14215
+ label: t("Auto", "Auto")
14216
+ };
14217
+ var ON = {
14218
+ value: "on",
14219
+ label: t("On", "On")
14220
+ };
14221
+ var MANUAL = {
14222
+ value: "manual",
14223
+ label: t("Manual", "Manuale")
14224
+ };
14225
+ var HOLIDAY_PROGRAMMES = [OFF, ...[
14226
+ 1,
14227
+ 2,
14228
+ 3,
14229
+ 4,
14230
+ 5,
14231
+ 6,
14232
+ 7,
14233
+ 8
14234
+ ].map((n) => ({
14235
+ value: `hm${n}`,
14236
+ label: t(`Programme ${n}`, `Programma ${n}`)
14237
+ }))];
14238
+ var PER_CIRCUIT = "Needs a circuit: set from the device page, not offered to automations";
14239
+ var HEAT_PUMP_CAP_VOCABULARY = {
14240
+ "heat-pump-status": {
14241
+ scope: "device",
14242
+ noun: t("Heat pump", "Pompa di calore")
14243
+ },
14244
+ "heat-pump-control": {
14245
+ scope: "device",
14246
+ noun: t("Heat pump settings", "Impostazioni pompa di calore"),
14247
+ actions: [
14248
+ {
14249
+ id: "heatPump.silent",
14250
+ method: "setSilentMode",
14251
+ label: t("Set silent mode", "Imposta la modalità silenziosa"),
14252
+ phrase: t("Set silent mode of {device} to {mode}", "Imposta la modalità silenziosa di {device} su {mode}"),
14253
+ icon: "volume-x",
14254
+ openArgs: [{
14255
+ key: "mode",
14256
+ label: t("Silent mode", "Modalità silenziosa"),
14257
+ offer: {
14258
+ kind: "enum",
14259
+ values: [
14260
+ OFF,
14261
+ AUTO,
14262
+ ON
14263
+ ]
14264
+ }
14265
+ }]
14266
+ },
14267
+ {
14268
+ id: "heatPump.away",
14269
+ method: "setAwayMode",
14270
+ label: t("Set away mode", "Imposta la modalità assente"),
14271
+ phrase: t("Set away mode of {device} to {mode}", "Imposta la modalità assente di {device} su {mode}"),
14272
+ icon: "plane",
14273
+ openArgs: [{
14274
+ key: "mode",
14275
+ label: t("Away mode", "Modalità assente"),
14276
+ offer: {
14277
+ kind: "enum",
14278
+ values: [OFF, ON]
14279
+ }
14280
+ }]
14281
+ },
14282
+ {
14283
+ id: "heatPump.additionalHeater",
14284
+ method: "setAdditionalHeaterMode",
14285
+ label: t("Set additional heater", "Imposta il riscaldatore aggiuntivo"),
14286
+ phrase: t("Set the additional heater of {device} to {mode}", "Imposta il riscaldatore aggiuntivo di {device} su {mode}"),
14287
+ icon: "flame",
14288
+ openArgs: [{
14289
+ key: "mode",
14290
+ label: t("Additional heater", "Riscaldatore aggiuntivo"),
14291
+ offer: {
14292
+ kind: "enum",
14293
+ values: [
14294
+ OFF,
14295
+ MANUAL,
14296
+ AUTO
14297
+ ]
14298
+ }
14299
+ }]
14300
+ },
14301
+ {
14302
+ id: "heatPump.holiday",
14303
+ method: "setHolidayMode",
14304
+ label: t("Set holiday mode", "Imposta la modalità vacanza"),
14305
+ phrase: t("Set holiday mode of {device} to {mode}", "Imposta la modalità vacanza di {device} su {mode}"),
14306
+ icon: "tree-palm",
14307
+ openArgs: [{
14308
+ key: "mode",
14309
+ label: t("Holiday programme", "Programma vacanza"),
14310
+ offer: {
14311
+ kind: "enum",
14312
+ values: HOLIDAY_PROGRAMMES
14313
+ }
14314
+ }]
14315
+ }
14316
+ ],
14317
+ notOperatorFacing: {
14318
+ setCircuitOperationMode: PER_CIRCUIT,
14319
+ setCircuitHeatCoolMode: PER_CIRCUIT,
14320
+ setCircuitSummerWinter: PER_CIRCUIT,
14321
+ setCircuitComfortSetpoint: PER_CIRCUIT,
14322
+ setCircuitEcoSetpoint: PER_CIRCUIT,
14323
+ setCircuitMaxFlowTemp: PER_CIRCUIT,
14324
+ setDhwOperationMode: PER_CIRCUIT,
14325
+ setDhwTemperatureLevel: PER_CIRCUIT,
14326
+ setDhwChargeDuration: PER_CIRCUIT,
14327
+ startExtraHotWater: PER_CIRCUIT
14328
+ }
14329
+ }
14330
+ };
14331
+ /**
14158
14332
  * Things an operator WATCHES: contacts, motion, leaks, smoke, measurements,
14159
14333
  * presence, reachability, batteries, doorbells and event sources.
14160
14334
  */
@@ -14876,6 +15050,7 @@ var CAP_VOCABULARY_BY_NAME = {
14876
15050
  ...ACTUATOR_CAP_VOCABULARY,
14877
15051
  ...APPLIANCE_CAP_VOCABULARY,
14878
15052
  ...CAMERA_CAP_VOCABULARY,
15053
+ ...HEAT_PUMP_CAP_VOCABULARY,
14879
15054
  ...SENSOR_CAP_VOCABULARY,
14880
15055
  ...SYSTEM_CAP_VOCABULARY
14881
15056
  };
@@ -15213,6 +15388,8 @@ var CAP_NAMES = Object.freeze([
15213
15388
  "group-active",
15214
15389
  "group-commands",
15215
15390
  "group-status",
15391
+ "heat-pump-control",
15392
+ "heat-pump-status",
15216
15393
  "heating-valve",
15217
15394
  "hero-layout",
15218
15395
  "humidifier",
@@ -16078,6 +16255,48 @@ Object.freeze({
16078
16255
  "valueType": "number"
16079
16256
  }
16080
16257
  ],
16258
+ "heat-pump-status": [
16259
+ {
16260
+ "path": "power.thermalW",
16261
+ "valueType": "number"
16262
+ },
16263
+ {
16264
+ "path": "power.electricalW",
16265
+ "valueType": "number"
16266
+ },
16267
+ {
16268
+ "path": "power.compressorPct",
16269
+ "valueType": "number"
16270
+ },
16271
+ {
16272
+ "path": "temperatures.supply",
16273
+ "valueType": "number"
16274
+ },
16275
+ {
16276
+ "path": "temperatures.return",
16277
+ "valueType": "number"
16278
+ },
16279
+ {
16280
+ "path": "temperatures.outdoor",
16281
+ "valueType": "number"
16282
+ },
16283
+ {
16284
+ "path": "energy.thermalKwh",
16285
+ "valueType": "number"
16286
+ },
16287
+ {
16288
+ "path": "energy.electricalKwh",
16289
+ "valueType": "number"
16290
+ },
16291
+ {
16292
+ "path": "waterPressureBar",
16293
+ "valueType": "number"
16294
+ },
16295
+ {
16296
+ "path": "starts",
16297
+ "valueType": "number"
16298
+ }
16299
+ ],
16081
16300
  "heating-valve": [{
16082
16301
  "path": "position",
16083
16302
  "valueType": "number"
@@ -17243,7 +17462,7 @@ function sleep(ms) {
17243
17462
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
17244
17463
  }
17245
17464
  //#endregion
17246
- //#region ../types/dist/composition-CXCX78IR.mjs
17465
+ //#region ../types/dist/composition-BFJq1Y88.mjs
17247
17466
  /**
17248
17467
  * The ffmpeg build every CamStack node downloads, per platform and arch.
17249
17468
  *
@@ -18348,8 +18567,6 @@ var HelperSpecSchema = discriminatedUnion("kind", [
18348
18567
  */
18349
18568
  /** The owner of every composed device: the `composer` builtin. */
18350
18569
  var COMPOSER_ADDON_ID = "composer";
18351
- /** A composed device's stableId is this prefix plus the block id. */
18352
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
18353
18570
  /** Longest snippet a `code` source may carry (slice 4). */
18354
18571
  var MAX_COMPOSITION_CODE_LENGTH = 2e4;
18355
18572
  /** One field of one capability of one source device. */
@@ -44537,30 +44754,21 @@ function convertLegacyWhen(half) {
44537
44754
  * (instants) and state leaves (durations). It replaces the flat trigger list
44538
44755
  * plus the separate condition tree; the firing rule is in that file and in
44539
44756
  * ADR "one tree".
44540
- * - **Actions** — `NcRuleActionSchema`'s two steps, plus the `{kind:'code'}`
44541
- * fragment of §3.2.2. See {@link AutomationActionSchema} for the ONE place
44542
- * this had to diverge from "verbatim", and why.
44757
+ * - **Actions** — the `wait` and `cap` steps, plus the `{kind:'code'}`
44758
+ * fragment of §3.2.2. See {@link AutomationActionSchema}.
44543
44759
  *
44544
44760
  * A recipe stored in the old shape (`triggers` + `conditions`) still LOADS:
44545
44761
  * {@link AutomationRecipeSchema} (the parse-anywhere schema) converts it on parse. Nothing writes it.
44546
44762
  */
44547
44763
  /**
44548
- * One action step.
44549
- *
44550
- * `wait` and `cap` are `NcRuleActionSchema`'s two members, kept structurally
44551
- * identical so `NcRuleActionRunner` runs them unchanged — its device-scope
44552
- * check, stop-at-first-failure and per-sequence throttle are the whole reason
44553
- * to reuse it, and none of them are re-implemented here.
44764
+ * One action step: `wait`, or a `cap` call.
44554
44765
  *
44555
- * **The one divergence, and it is forced.** `NcRuleActionSchema.cap.deviceId` is
44556
- * a literal `z.number().int()`, and the NC runner's own `RunSequencesInput`
44557
- * documents its subject device as *"for the log tag, never for routing"*. So an
44558
- * NC action can never target the device that triggered it — which is fine for
44559
- * the NC (its rules already scope to a device) and fatal for an automation
44560
- * ("sound the siren of the camera that saw the person"). `deviceId` therefore
44561
- * also accepts `{ $var }`, resolved from the run's `vars` bag BEFORE the runner
44562
- * is called. The runner still receives a number and is untouched; the
44563
- * resolution is the recipe's job, not the runner's.
44766
+ * A cap step's target is who it acts on (D983: `devices`, a `domain`, or a
44767
+ * `{ $var }` resolved from the run's variables); the legacy `deviceId` is still
44768
+ * READ, never written. The step runner (`runSteps`) owns the device-scope
44769
+ * check, the stop-at-first-failure and the variable substitution, once, for
44770
+ * every caller — automations, Actions, and the notification centre, which runs
44771
+ * only Actions (planning#473).
44564
44772
  */
44565
44773
  var AutomationWaitStepSchema = object({
44566
44774
  kind: literal("wait"),
@@ -44607,21 +44815,44 @@ var AutomationCapStepBaseSchema = object({
44607
44815
  */
44608
44816
  argUnits: record(string(), string().min(1)).optional()
44609
44817
  });
44610
- var AutomationCapStepSchema = AutomationCapStepBaseSchema.refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44818
+ /**
44819
+ * The steps an internal Action may contain: cap and wait, and nothing that can
44820
+ * call back into an Action — so an Action can never reach itself (no cycles).
44821
+ * This is the LEAF shape: no condition of its own.
44822
+ */
44823
+ var LeafActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepBaseSchema.refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44611
44824
  message: "a cap step needs a target",
44612
44825
  path: ["target"]
44613
44826
  }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44614
44827
  message: "a domain target needs the vocabulary action it applies to (actionId)",
44615
44828
  path: ["actionId"]
44616
- });
44829
+ })]);
44617
44830
  /**
44618
- * The steps an internal Action may contain: cap and wait, and nothing that can
44619
- * call back into an Action — so an Action can never reach itself (no cycles).
44831
+ * The optional guard of a step (#472): `if` is the ONE `when` tree (D980), read
44832
+ * on the state mirror when the step is reached; `else` runs when it is false.
44833
+ * An `else` holds leaf steps only — the nesting is bounded at ONE level, so a
44834
+ * branch can never grow a tree the trace has to draw.
44620
44835
  */
44621
- var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
44836
+ var stepGuardShape = {
44837
+ if: AutomationWhenSchema.optional(),
44838
+ else: array(LeafActionStepSchema).max(10).optional()
44839
+ };
44840
+ var elseNeedsIf = {
44841
+ message: "an else list needs the condition it is the other side of (if)",
44842
+ path: ["else"]
44843
+ };
44844
+ var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44845
+ var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44846
+ message: "a cap step needs a target",
44847
+ path: ["target"]
44848
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44849
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
44850
+ path: ["actionId"]
44851
+ }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44852
+ var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
44622
44853
  var AutomationActionSchema = discriminatedUnion("kind", [
44623
- AutomationWaitStepSchema,
44624
- AutomationCapStepSchema,
44854
+ GuardedWaitStepSchema,
44855
+ GuardedCapStepSchema,
44625
44856
  object({
44626
44857
  kind: literal("action"),
44627
44858
  /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
@@ -45001,7 +45232,7 @@ var StepDeviceTraceSchema = object({
45001
45232
  outcome: _enum(["ok", "error"]),
45002
45233
  message: string().optional()
45003
45234
  });
45004
- var AutomationStepTraceSchema = object({
45235
+ var StepTraceBaseSchema = object({
45005
45236
  /** `actions.<i>` */
45006
45237
  path: string().min(1),
45007
45238
  kind: string().min(1),
@@ -45020,15 +45251,35 @@ var AutomationStepTraceSchema = object({
45020
45251
  * is shown as {@link REDACTED_ARG}. Absent on traces written before it existed.
45021
45252
  */
45022
45253
  args: record(string(), TraceValueSchema).optional(),
45023
- /** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. */
45254
+ /**
45255
+ * The device values a templated arg printed as `—`, one `ref: reason` each
45256
+ * (D1021): why a sentence says "—" where a number was expected. Bounded.
45257
+ */
45258
+ templates: array(string()).max(20).optional(),
45259
+ /**
45260
+ * What the step's own `if` read when the step was reached (#472): `true` the
45261
+ * step ran, `false` its `else` ran (or nothing did), `unknown` a state leaf
45262
+ * could not be read, so NEITHER side ran. Absent on an unguarded step.
45263
+ */
45264
+ condition: _enum([
45265
+ "true",
45266
+ "false",
45267
+ "unknown"
45268
+ ]).optional(),
45269
+ /** Why the condition read what it read, in the evaluator's own words. */
45270
+ conditionReason: string().optional(),
45271
+ /** `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. */
45024
45272
  outcome: _enum([
45025
45273
  "ok",
45026
45274
  "error",
45027
45275
  "not-run",
45028
- "empty"
45276
+ "empty",
45277
+ "skipped"
45029
45278
  ]),
45030
45279
  message: string().optional()
45031
45280
  });
45281
+ /** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
45282
+ var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: array(StepTraceBaseSchema).optional() });
45032
45283
  var AutomationRunTraceSchema = object({
45033
45284
  runId: string().min(1),
45034
45285
  startedAt: number$1(),
@@ -45135,6 +45386,8 @@ var ActionStatusSchema = object({
45135
45386
  /** The latest run's failure; null on success or when it never ran. */
45136
45387
  lastError: string().nullable()
45137
45388
  });
45389
+ /** The throttle window of an action, in seconds; absent or 0 = no throttle. */
45390
+ var ActionMinDelaySecSchema = number$1().int().min(0).max(86400);
45138
45391
  var ActionEntrySchema = object({
45139
45392
  /** `internal:<uuid>` or `<addonId>:<localId>`. */
45140
45393
  id: string().min(3),
@@ -45147,6 +45400,14 @@ var ActionEntrySchema = object({
45147
45400
  /** Internal only: cap and wait steps. No action-in-action, so no cycles. */
45148
45401
  steps: array(ActionStepSchema).min(1).max(50).optional(),
45149
45402
  variables: array(ActionVariableSchema).max(20).optional(),
45403
+ /**
45404
+ * Internal only: the least time between two run STARTS. A run that begins
45405
+ * inside the window is skipped (`skipped-cooldown`), traced and logged. It
45406
+ * is an actuator's budget — "how often may this gate physically open" —
45407
+ * not a notification cooldown, and it is shared by every caller of the
45408
+ * action (two rules, a button, an automation).
45409
+ */
45410
+ minDelaySec: ActionMinDelaySecSchema.optional(),
45150
45411
  status: ActionStatusSchema
45151
45412
  }).superRefine((entry, ctx) => {
45152
45413
  if (entry.source === "internal") {
@@ -45177,7 +45438,8 @@ var ActionEntrySchema = object({
45177
45438
  var ActionInputSchema = object({
45178
45439
  name: string().min(1).max(120),
45179
45440
  steps: array(ActionStepSchema).min(1).max(50),
45180
- variables: array(ActionVariableSchema).max(20).optional()
45441
+ variables: array(ActionVariableSchema).max(20).optional(),
45442
+ minDelaySec: ActionMinDelaySecSchema.optional()
45181
45443
  });
45182
45444
  /** Who started a run. Absent = the operator pressed it. */
45183
45445
  var ActionRunOriginSchema = object({
@@ -45204,6 +45466,7 @@ _enum([
45204
45466
  "invalid-variables",
45205
45467
  "invalid-steps",
45206
45468
  "not-linked",
45469
+ "template-scope",
45207
45470
  "busy"
45208
45471
  ]);
45209
45472
  object({
@@ -49827,7 +50090,7 @@ DeviceType.MediaPlayer, method(deviceOnly, _void(), {
49827
50090
  kind: "mutation",
49828
50091
  auth: "protected"
49829
50092
  });
49830
- 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;
50093
+ 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;
49831
50094
  var NUMBER = {
49832
50095
  kind: "fixed",
49833
50096
  result: ["number"]
@@ -51699,6 +51962,43 @@ method(InstancePinSchema, DeviceExportStatusSchema), method(_void(), array(Expor
51699
51962
  auth: "admin"
51700
51963
  });
51701
51964
  var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
51965
+ var DeviceTemplateSchema = string().min(1).max(4096);
51966
+ var DeviceTemplateRefusalSchema = object({
51967
+ reason: _enum([
51968
+ "too-long",
51969
+ "syntax",
51970
+ "forbidden-syntax",
51971
+ "forbidden-member",
51972
+ "unknown-filter",
51973
+ "ambiguous-field",
51974
+ "busy",
51975
+ "budget-exceeded",
51976
+ "timeout",
51977
+ "output-too-large",
51978
+ "render-failed",
51979
+ "out-of-scope",
51980
+ "unavailable"
51981
+ ]),
51982
+ message: string()
51983
+ });
51984
+ var DeviceTemplateTraceEntrySchema = object({
51985
+ ref: string(),
51986
+ reason: _enum([
51987
+ "unknown-alias",
51988
+ "unknown-field",
51989
+ "no-field",
51990
+ "unavailable"
51991
+ ])
51992
+ });
51993
+ var DeviceTemplateRenderSchema = discriminatedUnion("ok", [object({
51994
+ ok: literal(true),
51995
+ text: string(),
51996
+ trace: array(DeviceTemplateTraceEntrySchema)
51997
+ }), object({
51998
+ ok: literal(false),
51999
+ refusal: DeviceTemplateRefusalSchema,
52000
+ trace: array(DeviceTemplateTraceEntrySchema)
52001
+ })]);
51702
52002
  /**
51703
52003
  * A SITE ZONE — a named part of the property that several locations belong to.
51704
52004
  *
@@ -52413,7 +52713,13 @@ method(object({
52413
52713
  auth: "admin"
52414
52714
  }), 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({
52415
52715
  deviceId: number$1(),
52416
- name: string()
52716
+ name: string(),
52717
+ /**
52718
+ * Absent or true: an operator rename, which stamps `userNamed`.
52719
+ * False: the system copying a block name onto the device. That write
52720
+ * must not look like the operator's, or the next reconcile freezes it.
52721
+ */
52722
+ stampUserNamed: boolean().optional()
52417
52723
  }), _void(), {
52418
52724
  kind: "mutation",
52419
52725
  auth: "admin"
@@ -52437,6 +52743,22 @@ method(object({
52437
52743
  kind: "mutation",
52438
52744
  auth: "admin"
52439
52745
  }), method(object({
52746
+ templates: array(DeviceTemplateSchema).max(64),
52747
+ allowedDeviceIds: array(number$1().int()).optional()
52748
+ }), object({ results: array(DeviceTemplateRenderSchema) }), { auth: "admin" }), method(object({
52749
+ templates: array(string()).max(64),
52750
+ allowedDeviceIds: array(number$1().int()).optional()
52751
+ }), object({ results: array(discriminatedUnion("ok", [object({
52752
+ ok: literal(true),
52753
+ aliases: array(object({
52754
+ alias: string(),
52755
+ deviceId: number$1().int().nullable(),
52756
+ allowed: boolean()
52757
+ }))
52758
+ }), object({
52759
+ ok: literal(false),
52760
+ refusal: DeviceTemplateRefusalSchema
52761
+ })])) }), { auth: "admin" }), method(object({
52440
52762
  deviceId: number$1(),
52441
52763
  location: string().nullable()
52442
52764
  }), _void(), {
@@ -55446,6 +55768,207 @@ var GroupStatusSchema = object({
55446
55768
  }))
55447
55769
  });
55448
55770
  DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
55771
+ /**
55772
+ * Heat pump settable surface (D1026): one typed method per parameter, never a
55773
+ * generic `set(key, value)`. The values a mode takes and the limits of a number
55774
+ * are the ones `heat-pump-status` carries (`allowed`, `min`, `max`, `step`),
55775
+ * read from the gateway; a provider refuses a value outside them. The state is
55776
+ * `heat-pump-status` — this cap has none.
55777
+ */
55778
+ var deviceId = number$1().int().nonnegative();
55779
+ var circuitId = string().min(1);
55780
+ var mode = string().min(1);
55781
+ var temp = number$1().finite();
55782
+ DeviceType.HeatPump, method(object({
55783
+ deviceId,
55784
+ mode
55785
+ }), _void(), {
55786
+ kind: "mutation",
55787
+ auth: "protected"
55788
+ }), method(object({
55789
+ deviceId,
55790
+ mode
55791
+ }), _void(), {
55792
+ kind: "mutation",
55793
+ auth: "protected"
55794
+ }), method(object({
55795
+ deviceId,
55796
+ mode
55797
+ }), _void(), {
55798
+ kind: "mutation",
55799
+ auth: "protected"
55800
+ }), method(object({
55801
+ deviceId,
55802
+ mode
55803
+ }), _void(), {
55804
+ kind: "mutation",
55805
+ auth: "protected"
55806
+ }), method(object({
55807
+ deviceId,
55808
+ circuitId,
55809
+ mode
55810
+ }), _void(), {
55811
+ kind: "mutation",
55812
+ auth: "protected"
55813
+ }), method(object({
55814
+ deviceId,
55815
+ circuitId,
55816
+ mode
55817
+ }), _void(), {
55818
+ kind: "mutation",
55819
+ auth: "protected"
55820
+ }), method(object({
55821
+ deviceId,
55822
+ circuitId,
55823
+ mode
55824
+ }), _void(), {
55825
+ kind: "mutation",
55826
+ auth: "protected"
55827
+ }), method(object({
55828
+ deviceId,
55829
+ circuitId,
55830
+ temp
55831
+ }), _void(), {
55832
+ kind: "mutation",
55833
+ auth: "protected"
55834
+ }), method(object({
55835
+ deviceId,
55836
+ circuitId,
55837
+ temp
55838
+ }), _void(), {
55839
+ kind: "mutation",
55840
+ auth: "protected"
55841
+ }), method(object({
55842
+ deviceId,
55843
+ circuitId,
55844
+ temp
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
+ level: mode
55859
+ }), _void(), {
55860
+ kind: "mutation",
55861
+ auth: "protected"
55862
+ }), method(object({
55863
+ deviceId,
55864
+ circuitId,
55865
+ minutes: number$1().int().positive()
55866
+ }), _void(), {
55867
+ kind: "mutation",
55868
+ auth: "protected"
55869
+ }), method(object({
55870
+ deviceId,
55871
+ circuitId
55872
+ }), _void(), {
55873
+ kind: "mutation",
55874
+ auth: "protected"
55875
+ });
55876
+ var HeatPumpCircuitKindSchema = _enum([
55877
+ "heating",
55878
+ "dhw",
55879
+ "cooling",
55880
+ "solar"
55881
+ ]);
55882
+ /** A setting that takes one of a list of values the gateway named. */
55883
+ var HeatPumpOptionSettingSchema = object({
55884
+ /** The active value. Null when the gateway did not answer. */
55885
+ value: string().nullable(),
55886
+ /** Values the gateway accepts, in its order. Empty = read-only here. */
55887
+ allowed: array(string())
55888
+ });
55889
+ /** A numeric setting with the limits the gateway named. */
55890
+ var HeatPumpRangeSettingSchema = object({
55891
+ value: number$1().nullable(),
55892
+ min: number$1().nullable(),
55893
+ max: number$1().nullable(),
55894
+ step: number$1().nullable()
55895
+ });
55896
+ var HeatPumpCircuitSchema = object({
55897
+ /** Gateway id of the circuit (`hc1`, `dhw1`): the key of the series. */
55898
+ id: string().min(1),
55899
+ kind: HeatPumpCircuitKindSchema,
55900
+ label: string(),
55901
+ icon: IconKeySchema,
55902
+ /** Measured temperature of the circuit (room, tank, collector). */
55903
+ currentTemp: number$1().nullable().meta(readingMeta("temperature")),
55904
+ /** The setpoint in force now. */
55905
+ targetTemp: number$1().nullable().meta(readingMeta("temperature")),
55906
+ /** The operation mode in force (mirror of `operationMode.value`, for the series). */
55907
+ mode: string().nullable(),
55908
+ /** Whether the circuit is calling for heat right now. Null = unknown. */
55909
+ active: boolean().nullable(),
55910
+ operationMode: HeatPumpOptionSettingSchema.nullable(),
55911
+ /** Heating circuits: heat / cool / heatCool. */
55912
+ heatCoolMode: HeatPumpOptionSettingSchema.nullable(),
55913
+ /** Heating circuits: summer / winter changeover. */
55914
+ summerWinter: HeatPumpOptionSettingSchema.nullable(),
55915
+ comfortSetpoint: HeatPumpRangeSettingSchema.nullable(),
55916
+ ecoSetpoint: HeatPumpRangeSettingSchema.nullable(),
55917
+ maxFlowTemp: HeatPumpRangeSettingSchema.nullable(),
55918
+ /** Hot water: the temperature level (off / low / high / eco). */
55919
+ temperatureLevel: HeatPumpOptionSettingSchema.nullable(),
55920
+ /** Hot water: how long a charge lasts, minutes. */
55921
+ chargeDuration: HeatPumpRangeSettingSchema.nullable(),
55922
+ /** Hot water: whether an extra-hot-water charge is running. Null = no such surface. */
55923
+ extraHotWater: boolean().nullable()
55924
+ });
55925
+ /** The independent system modes, each with its real values. A null mode = the gateway has none. */
55926
+ var HeatPumpSystemSchema = object({
55927
+ silent: HeatPumpOptionSettingSchema.nullable(),
55928
+ away: HeatPumpOptionSettingSchema.nullable(),
55929
+ additionalHeater: HeatPumpOptionSettingSchema.nullable(),
55930
+ holiday: HeatPumpOptionSettingSchema.nullable()
55931
+ });
55932
+ var HeatPumpPowerSchema = object({
55933
+ thermalW: number$1().nullable().meta(readingMeta("power")),
55934
+ electricalW: number$1().nullable().meta(readingMeta("power")),
55935
+ /** Compressor modulation, percent. */
55936
+ compressorPct: number$1().nullable().meta(readingMeta("percentage"))
55937
+ });
55938
+ var HeatPumpTemperaturesSchema = object({
55939
+ supply: number$1().nullable().meta(readingMeta("temperature")),
55940
+ return: number$1().nullable().meta(readingMeta("temperature")),
55941
+ outdoor: number$1().nullable().meta(readingMeta("temperature"))
55942
+ });
55943
+ /** Lifetime meters, kWh: the energy of a period is computed at read time from their difference (D944). */
55944
+ var HeatPumpEnergySchema = object({
55945
+ thermalKwh: number$1().nullable().meta(readingMeta("energy")),
55946
+ electricalKwh: number$1().nullable().meta(readingMeta("energy"))
55947
+ });
55948
+ var HeatPumpStatusSchema = object({
55949
+ circuits: array(HeatPumpCircuitSchema),
55950
+ system: HeatPumpSystemSchema,
55951
+ power: HeatPumpPowerSchema,
55952
+ temperatures: HeatPumpTemperaturesSchema,
55953
+ energy: HeatPumpEnergySchema,
55954
+ /** Water pressure of the heating loop, bar. */
55955
+ waterPressureBar: number$1().nullable(),
55956
+ /** Compressor starts since commissioning. */
55957
+ starts: number$1().nullable(),
55958
+ /** Ms epoch when the slice was last read from the gateway. */
55959
+ lastFetchedAt: number$1()
55960
+ });
55961
+ /**
55962
+ * The instantaneous COP: thermal over electrical power. Null unless BOTH powers
55963
+ * are known and the unit draws power — a missing reading is never a 0 or a
55964
+ * division by it (D393). Computed on every read; there is no stored value.
55965
+ */
55966
+ function heatPumpInstantCop(power) {
55967
+ const { thermalW, electricalW } = power;
55968
+ if (thermalW === null || electricalW === null || electricalW <= 0) return null;
55969
+ return thermalW / electricalW;
55970
+ }
55971
+ DeviceType.HeatPump;
55449
55972
  var HeatingValveStatusSchema = object({
55450
55973
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
55451
55974
  position: number$1().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -55603,6 +56126,7 @@ var HeroSceneSchema = object({
55603
56126
  "ac",
55604
56127
  "thermostat",
55605
56128
  "heater",
56129
+ "heat-pump",
55606
56130
  "fan",
55607
56131
  "washer",
55608
56132
  "dryer",
@@ -55645,7 +56169,7 @@ var HeroSceneSchema = object({
55645
56169
  /** 0..1: volume, cover position, cycle progress. */
55646
56170
  level: number$1().min(0).max(1).nullable()
55647
56171
  });
55648
- 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;
56172
+ 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;
55649
56173
  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;
55650
56174
  /** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
55651
56175
  var HeroTextSchema = object({
@@ -55653,6 +56177,7 @@ var HeroTextSchema = object({
55653
56177
  it: string()
55654
56178
  });
55655
56179
  var HeroRowIdSchema = _enum([
56180
+ "progress",
55656
56181
  "run-for",
55657
56182
  "cycle",
55658
56183
  "program",
@@ -55667,6 +56192,7 @@ var HeroRowIdSchema = _enum([
55667
56192
  "alarm",
55668
56193
  "fan",
55669
56194
  "vacuum",
56195
+ "vacuum-suction",
55670
56196
  "mower",
55671
56197
  "feeder",
55672
56198
  "fountain",
@@ -55685,7 +56211,10 @@ var HeroRowIdSchema = _enum([
55685
56211
  "climate-fan",
55686
56212
  "setpoint",
55687
56213
  "channel",
55688
- "control"
56214
+ "control",
56215
+ "circuit",
56216
+ "heat-pump-power",
56217
+ "system-mode"
55689
56218
  ]);
55690
56219
  var HeroArgValueSchema = lazy(() => union([
55691
56220
  string(),
@@ -55750,16 +56279,32 @@ var HeroControlSchema = discriminatedUnion("kind", [
55750
56279
  label: HeroTextSchema,
55751
56280
  current: string().nullable(),
55752
56281
  options: array(string()),
56282
+ /** A readable label per option value; an option without one is drawn as its raw value. */
56283
+ optionLabels: record(string(), HeroTextSchema).optional(),
55753
56284
  call: HeroCallSchema,
55754
56285
  valueArg: string()
55755
56286
  })
55756
56287
  ]);
56288
+ /** Declared by its interface: a `z.infer` of one more icon union pushes the cap's inferred type past what the compiler can print. */
56289
+ var HeroPillSchema = object({
56290
+ icon: IconKeySchema.nullable(),
56291
+ text: HeroTextSchema,
56292
+ tone: HeroToneSchema
56293
+ });
55757
56294
  var HeroRowSchema = object({
55758
56295
  id: HeroRowIdSchema,
56296
+ /** The row's own name when the kind's label would not tell rows of one kind apart (a circuit's label). */
56297
+ label: HeroTextSchema.optional(),
56298
+ /** A group header drawn above the row when it differs from the previous row's ("System"). */
56299
+ group: HeroTextSchema.optional(),
56300
+ /** Values drawn as pills across the row (a heat pump's powers). */
56301
+ pills: array(HeroPillSchema).optional(),
55759
56302
  icon: IconKeySchema,
55760
56303
  /** The row's status, in words. `null` = nothing to say. */
55761
56304
  status: HeroTextSchema.nullable(),
55762
- controls: array(HeroControlSchema)
56305
+ controls: array(HeroControlSchema),
56306
+ /** A bar under the row's label, 0..1; `null` / absent = no bar. */
56307
+ progress: number$1().min(0).max(1).nullable().optional()
55763
56308
  });
55764
56309
  var HeroDetailSchema = object({
55765
56310
  label: HeroTextSchema,
@@ -55767,7 +56312,11 @@ var HeroDetailSchema = object({
55767
56312
  unit: string().nullable()
55768
56313
  });
55769
56314
  var HeroBadgeSchema = object({
55770
- id: _enum(["battery", "network-link"]),
56315
+ id: _enum([
56316
+ "battery",
56317
+ "network-link",
56318
+ "integration"
56319
+ ]),
55771
56320
  icon: IconKeySchema,
55772
56321
  tone: HeroToneSchema,
55773
56322
  /** Percent for a battery, link quality for a link; `null` = not known. */
@@ -55815,7 +56364,13 @@ var HeroTimedRunSlotSchema = object({
55815
56364
  activeUntil: number$1().nullable(),
55816
56365
  quickRun: TimedRunQuickRunSchema,
55817
56366
  run: HeroActionSchema,
55818
- cancel: HeroActionSchema
56367
+ cancel: HeroActionSchema,
56368
+ /**
56369
+ * Whole units left (the limit's unit, ceil). `null` while nothing is armed.
56370
+ * A number, not words: the row formats it, and a text here would not fit the
56371
+ * hero-layout declaration.
56372
+ */
56373
+ remaining: number$1().nullable()
55819
56374
  });
55820
56375
  var HeroPowerSupplySlotSchema = object({
55821
56376
  /** The plug's state; `null` = unknown, never off. */
@@ -55867,7 +56422,12 @@ var HeroFactSchema = object({
55867
56422
  var HeroSideTileSchema = object({
55868
56423
  label: HeroTextSchema,
55869
56424
  value: HeroTextSchema,
55870
- tone: HeroToneSchema.optional()
56425
+ tone: HeroToneSchema.optional(),
56426
+ /**
56427
+ * Epoch ms when the tile reads a clock time (an appliance's end): a client prints it in
56428
+ * the viewer's own time zone; `value` is the fallback for one that cannot.
56429
+ */
56430
+ at: number$1().optional()
55871
56431
  });
55872
56432
  var HeroSideTilesSchema = object({
55873
56433
  left: array(HeroSideTileSchema).max(2),
@@ -55903,8 +56463,12 @@ var HeroModelSchema = object({
55903
56463
  sideTiles: HeroSideTilesSchema,
55904
56464
  /** The status line under the main icon. */
55905
56465
  title: HeroTextSchema,
56466
+ /** The scene's top line when it says more than `title`; absent = draw the title. */
56467
+ caption: HeroTextSchema.optional(),
55906
56468
  badges: array(HeroBadgeSchema),
55907
56469
  remote: HeroRemoteSlotSchema.nullable(),
56470
+ /** The foot button that opens the device's history: "History", "Cycles", "Meals", "Access". */
56471
+ historyLabel: HeroTextSchema,
55908
56472
  consumables: HeroConsumablesSlotSchema.nullable(),
55909
56473
  consumption: HeroConsumptionSlotSchema.nullable(),
55910
56474
  ownPower: HeroOwnPowerSlotSchema.nullable(),
@@ -55925,18 +56489,31 @@ var HeroModelSchema = object({
55925
56489
  * 4. a trailing fact (power, else battery, else consumables).
55926
56490
  *
55927
56491
  * Selection rules, all taken from the model:
55928
- * - ONE control is ever shown: the device's own power; else the FIRST control of
56492
+ * - the primary control is the device's own power; else the FIRST control of
55929
56493
  * the FIRST row that has any (a later row's control is never promoted). When
55930
56494
  * the model lists that part in `gated`, the row has no inline control: the
55931
56495
  * projection never falls through to another control the caller could use.
56496
+ * - a timed run, when the model carries the slot, sits beside that primary:
56497
+ * Run while idle, Stop while armed. Gating the slot hides the control.
55932
56498
  * - the status line is the head (what plays, else the state) plus at most
55933
- * {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded;
56499
+ * {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded, then the
56500
+ * time left on an armed timed run;
55934
56501
  * - the trailing fact is the first of power, battery, consumables.
55935
56502
  *
55936
56503
  * `projectDeviceRow` is pure and computes nothing: it selects from a
55937
56504
  * {@link HeroModel}. A row that needed a value the hero lacks would mean the
55938
56505
  * model is missing it, so the fix goes in the model.
55939
56506
  */
56507
+ /**
56508
+ * The row's timed-run control. `id` is `timed-run.run` while idle and
56509
+ * `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
56510
+ * a Run press starts.
56511
+ */
56512
+ var HeroRowTimedRunSchema = object({
56513
+ id: _enum(["timed-run.run", "timed-run.cancel"]),
56514
+ duration: number$1(),
56515
+ unit: _enum(["min", "s"])
56516
+ });
55940
56517
  var HeroRowModelSchema = object({
55941
56518
  deviceId: number$1().int(),
55942
56519
  name: string(),
@@ -55949,6 +56526,11 @@ var HeroRowModelSchema = object({
55949
56526
  statusLine: array(HeroTextSchema),
55950
56527
  /** `null` = the type has no inline control, or the caller may not act on it. */
55951
56528
  primary: HeroControlSchema.nullable(),
56529
+ /**
56530
+ * Beside `primary` when the device offers a timed run: Run while idle, Stop
56531
+ * while armed. `null` when there is no slot, or the caller may not act.
56532
+ */
56533
+ timedRun: HeroRowTimedRunSchema.nullable(),
55952
56534
  trailing: HeroFactSchema.nullable()
55953
56535
  });
55954
56536
  /**
@@ -66772,92 +67354,21 @@ var NcZoneConditionSchema = object({
66772
67354
  * membership lists are OR within the list (spec §2.3).
66773
67355
  */
66774
67356
  /**
66775
- * What a rule may actuate.
66776
- *
66777
- * **No hand-maintained allowlist** (operator decision, and the right one — a
66778
- * written list of methods is a third parallel map to keep aligned, and this
66779
- * repo has paid for those). The boundary instead comes from a property the
66780
- * capabilities already carry: an action may target only a **device-scoped**
66781
- * capability method.
66782
- *
66783
- * That is not decoration. A rule can be authored by a NON-ADMIN — personal
66784
- * rules are a supported flow — and the executor runs with the addon's
66785
- * privileges, so an unbounded action is an arbitrary RPC channel with a
66786
- * privilege escalation attached. Restricting to device scope excludes the
66787
- * system caps (`device-manager.removeDevice` and friends) by construction,
66788
- * costs nothing to maintain, and cannot rot: a cap that stops being
66789
- * device-scoped stops being actuatable in the same change.
67357
+ * What a rule or a button runs: an **Action** of the `actions` surface
67358
+ * (`internal:<uuid>` or an addon's), by id, and nothing else (planning#473).
66790
67359
  *
66791
- * The executor enforces it; {@link NcRuleActionSchema} carries the intent.
67360
+ * The notification centre has no step vocabulary of its own. The steps, the
67361
+ * device-scope boundary, the stop-at-first-failure, the throttle
67362
+ * (`minDelaySec`), the variables and the runs ledger all belong to the Action;
67363
+ * an operator edits them in ONE place (the Actions page) and a rule points at
67364
+ * the result. A rule can be authored by a non-admin (personal rules), which is
67365
+ * safe for the same reason: it can only name an Action an admin already wrote.
66792
67366
  */
67367
+ var NcActionIdSchema = string().min(1);
67368
+ /** Action ids one hook edge runs, in order. Capped so a slot never becomes a second editor. */
67369
+ var NcHookActionIdsSchema = array(NcActionIdSchema).max(4);
66793
67370
  /**
66794
- * One step of a sequence.
66795
- *
66796
- * `wait` is a first-class step rather than a property of the next action: it is
66797
- * what makes a sequence a SEQUENCE and not a list — "unlock, wait 5s, open"
66798
- * cannot be expressed otherwise.
66799
- */
66800
- var NcRuleActionSchema = discriminatedUnion("kind", [object({
66801
- kind: literal("wait"),
66802
- seconds: number$1().min(0).max(300)
66803
- }), object({
66804
- kind: literal("cap"),
66805
- /**
66806
- * WHO the step acts on (D983) — the only shape that is written. A sequence
66807
- * stored before D983 carries `deviceId`; the sequence store reads it as a
66808
- * `devices` target.
66809
- */
66810
- target: ActionTargetSchema.optional(),
66811
- /** The vocabulary action the step performs; required for a `domain` target. */
66812
- actionId: string().min(1).optional(),
66813
- /** @deprecated The pre-D983 single device. Read, never written. */
66814
- deviceId: number$1().int().optional(),
66815
- /** Capability name, e.g. `alarm-panel`. */
66816
- cap: string().min(1),
66817
- /** Method on it. The executor refuses a non-device-scoped cap. */
66818
- method: string().min(1),
66819
- /** Method arguments, minus `deviceId` (the executor injects it). */
66820
- args: record(string(), unknown()).optional()
66821
- }).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
66822
- message: "a cap step needs a target",
66823
- path: ["target"]
66824
- }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
66825
- message: "a domain target needs the vocabulary action it applies to (actionId)",
66826
- path: ["actionId"]
66827
- })]);
66828
- /**
66829
- * A named, ordered run of steps shared across rules, with its own throttle.
66830
- *
66831
- * Sequences live in the notification centre's sequence store — never inline on
66832
- * a rule. A rule binds to one by id ({@link NcActionBindingSchema}), and a
66833
- * button names one the same way. `minDelaySec` exists because a noisy rule
66834
- * otherwise hammers a physical actuator — the rule's own cooldown governs
66835
- * NOTIFICATIONS, which is a different budget from "how often may this gate
66836
- * actually open". The throttle key is the sequence id, so two rules sharing
66837
- * one sequence share its budget.
66838
- */
66839
- var NcSharedSequenceSchema = object({
66840
- id: string().min(1),
66841
- name: string().min(1).max(120),
66842
- minDelaySec: number$1().int().min(0).max(86400).optional(),
66843
- actions: array(NcRuleActionSchema).min(1)
66844
- });
66845
- /** Create / update body — the id is minted by the provider. */
66846
- var NcSharedSequenceInputSchema = object({
66847
- name: string().min(1).max(120),
66848
- minDelaySec: number$1().int().min(0).max(86400).optional(),
66849
- actions: array(NcRuleActionSchema).min(1)
66850
- });
66851
- /** Bindings on one hook edge. Cap keeps a slot from becoming a second sequence editor. */
66852
- var NcHookBindingsSchema = array(discriminatedUnion("kind", [object({
66853
- kind: literal("sequence"),
66854
- sequenceId: string().min(1)
66855
- }), object({
66856
- kind: literal("do"),
66857
- action: NcRuleActionSchema
66858
- })])).max(4);
66859
- /**
66860
- * One button carried by the notification, running a shared sequence on tap.
67371
+ * One button carried by the notification, running an Action on tap.
66861
67372
  *
66862
67373
  * **Read this before adding a button that does something physical.** The tap
66863
67374
  * arrives over a link that travelled through third-party infrastructure — ntfy,
@@ -66872,9 +67383,9 @@ var NcRuleNotificationButtonSchema = object({
66872
67383
  /** Stable id — travels in the callback and identifies the button in logs. */
66873
67384
  id: string().min(1).max(64),
66874
67385
  label: string().min(1).max(40),
66875
- /** Id of a shared sequence. The dispatcher drops a button whose sequence
66876
- * does not exist rather than minting a token for nothing. */
66877
- sequenceId: string().min(1),
67386
+ /** The Action the tap runs. The dispatcher drops a button whose Action does
67387
+ * not exist rather than minting a token for nothing. */
67388
+ actionId: NcActionIdSchema,
66878
67389
  icon: NotificationActionIconSchema.optional(),
66879
67390
  destructive: boolean().optional()
66880
67391
  });
@@ -66889,25 +67400,19 @@ var NcRuleNotificationButtonSchema = object({
66889
67400
  * leave). A delivery with no clear edge never produces this hook.
66890
67401
  */
66891
67402
  var NcRuleActionsSchema = object({
66892
- onActivation: NcHookBindingsSchema.optional(),
66893
- onDeactivation: NcHookBindingsSchema.optional(),
67403
+ onActivation: NcHookActionIdsSchema.optional(),
67404
+ onDeactivation: NcHookActionIdsSchema.optional(),
66894
67405
  /** Runs on a positive / raised match. */
66895
- onTrigger: NcHookBindingsSchema.optional(),
67406
+ onTrigger: NcHookActionIdsSchema.optional(),
66896
67407
  /** Runs on a clear / leave match, when the subject carries one. */
66897
- onTriggerOff: NcHookBindingsSchema.optional(),
67408
+ onTriggerOff: NcHookActionIdsSchema.optional(),
66898
67409
  /**
66899
- * Buttons the NOTIFICATION carries, each running one shared sequence when
66900
- * tapped. Deliberately a REFERENCE — a button that could define its own
66901
- * actions would be a parallel actuation vocabulary.
67410
+ * Buttons the NOTIFICATION carries, each running one Action when tapped.
67411
+ * Deliberately a REFERENCE — a button that could define its own steps would
67412
+ * be a parallel actuation vocabulary.
66902
67413
  */
66903
67414
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
66904
67415
  });
66905
- object({
66906
- name: string().min(1).max(120),
66907
- enabled: boolean(),
66908
- minDelaySec: number$1().int().min(0).max(86400).optional(),
66909
- actions: array(NcRuleActionSchema).min(1)
66910
- });
66911
67416
  /**
66912
67417
  * "This rule applies only while `deviceId` is in one of `states`."
66913
67418
  *
@@ -68588,18 +69093,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
68588
69093
  }), object({ success: literal(true) }), {
68589
69094
  kind: "mutation",
68590
69095
  auth: "admin"
68591
- }), 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 }), {
68592
- kind: "mutation",
68593
- auth: "admin"
68594
- }), method(object({
68595
- sequenceId: string().min(1),
68596
- sequence: NcSharedSequenceInputSchema
68597
- }), object({ sequence: NcSharedSequenceSchema }), {
68598
- kind: "mutation",
68599
- auth: "admin"
68600
- }), method(object({ sequenceId: string().min(1) }), object({ success: literal(true) }), {
68601
- kind: "mutation",
68602
- auth: "admin"
68603
69096
  }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
68604
69097
  deviceId: number$1().int(),
68605
69098
  muted: boolean()
@@ -80232,7 +80725,8 @@ var AccessoryKind = {
80232
80725
  PrivacyMask: DeviceRole.PrivacyMask
80233
80726
  };
80234
80727
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
80235
- 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;
80728
+ DeviceType.HeatPump;
80729
+ 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;
80236
80730
  new Set(Object.values(DeviceType));
80237
80731
  /** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
80238
80732
  function contribution(cap, schema, build) {
@@ -80368,6 +80862,13 @@ var lockContribution = contribution("lock-control", LockControlStatusSchema, (sl
80368
80862
  reading: reading("lock-control", words?.state ?? "unknown", false, words?.title),
80369
80863
  rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(DeviceFeature.LockOpen)))],
80370
80864
  ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, "muted")] },
80865
+ ...words === null ? {} : { tiles: { left: [{
80866
+ label: t("Door", "Porta"),
80867
+ value: title
80868
+ }, ...since === null ? [] : [{
80869
+ label: t("Since", "Da"),
80870
+ value: since
80871
+ }]] } },
80371
80872
  ...words?.door == null ? {} : { scene: { mode: words.door } }
80372
80873
  };
80373
80874
  });
@@ -80449,7 +80950,17 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
80449
80950
  return {
80450
80951
  reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
80451
80952
  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))],
80452
- ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] }
80953
+ ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
80954
+ ...words === null ? {} : { tiles: {
80955
+ left: [{
80956
+ label: t("Mode", "Modalità"),
80957
+ value: words.title
80958
+ }],
80959
+ ...since === null ? {} : { right: [{
80960
+ label: t("Since", "Da"),
80961
+ value: since
80962
+ }] }
80963
+ } }
80453
80964
  };
80454
80965
  }),
80455
80966
  "automation-control": contribution("automation-control", AutomationControlStatusSchema, (slice, ctx) => {
@@ -80513,7 +81024,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
80513
81024
  */
80514
81025
  var has$3 = (ctx, f) => ctx.features.includes(f);
80515
81026
  var unknownText = t("Unknown", "Sconosciuto");
80516
- var pct$1 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
81027
+ var pct$2 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
80517
81028
  var unit = (n) => Math.min(1, Math.max(0, n / 100));
80518
81029
  /** Battery as a fact, unless the device is also bound to the `battery` cap (it already says so). */
80519
81030
  function ownBattery(level, ctx) {
@@ -80575,7 +81086,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
80575
81086
  },
80576
81087
  valueArg: "direction"
80577
81088
  });
80578
- const speedText = speed === null ? null : pct$1(speed);
81089
+ const speedText = speed === null ? null : pct$2(speed);
80579
81090
  const preset = slice?.preset ?? "";
80580
81091
  const status = speed === null ? unknownText : joinText([speed === 0 ? t("Off", "Spento") : t(`Speed ${speed}%`, `Velocità ${speed}%`), preset === "" ? null : t(preset, preset)]);
80581
81092
  return {
@@ -80588,10 +81099,16 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
80588
81099
  }],
80589
81100
  ...speedText === null ? {} : {
80590
81101
  facts: [fact("speed", "fan", speedText, speed === 0 ? "muted" : "primary")],
80591
- tiles: { right: [{
80592
- label: t("Speed", "Velocità"),
80593
- value: speedText
80594
- }] },
81102
+ tiles: {
81103
+ ...slice?.oscillating == null ? {} : { left: [{
81104
+ label: t("Oscillation", "Oscilla"),
81105
+ value: slice.oscillating ? t("Yes", "Sì") : t("No", "No")
81106
+ }] },
81107
+ ...preset === "" ? {} : { right: [{
81108
+ label: t("Mode", "Modalità"),
81109
+ value: t(preset, preset)
81110
+ }] }
81111
+ },
80595
81112
  scene: { level: unit(speed ?? 0) }
80596
81113
  }
80597
81114
  };
@@ -80655,7 +81172,8 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
80655
81172
  const words = state === null ? null : VACUUM_WORDS[state];
80656
81173
  const title = state === "error" && slice?.errorLabel ? t(slice.errorLabel, slice.errorLabel) : words?.title;
80657
81174
  const controls = vacuumControls(state);
80658
- if (slice !== void 0 && slice.availableFanSpeeds.length > 0) controls.push({
81175
+ const suctionControls = [];
81176
+ if (slice !== void 0 && slice.availableFanSpeeds.length > 0) suctionControls.push({
80659
81177
  kind: "picker",
80660
81178
  id: "vacuum.suction",
80661
81179
  label: t("Suction", "Aspirazione"),
@@ -80670,22 +81188,31 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
80670
81188
  });
80671
81189
  if (state !== null) controls.push(vac("locate", "Locate", "Trova", "map-pin", "locate"));
80672
81190
  const progress = state === "cleaning" ? slice?.progress ?? null : null;
81191
+ const suction = slice?.fanSpeed == null || slice.fanSpeed === "" ? [] : [{
81192
+ label: t("Suction", "Aspirazione"),
81193
+ value: t(slice.fanSpeed, slice.fanSpeed)
81194
+ }];
81195
+ const suctionRows = suctionControls.length === 0 ? [] : [{
81196
+ id: "vacuum-suction",
81197
+ icon: "bot",
81198
+ status: null,
81199
+ controls: suctionControls
81200
+ }];
81201
+ const vacuumRows = [{
81202
+ id: "vacuum",
81203
+ icon: "bot",
81204
+ status: title ?? unknownText,
81205
+ controls
81206
+ }, ...suctionRows];
80673
81207
  return {
80674
81208
  reading: reading("vacuum-control", words?.state ?? "unknown", false, title),
80675
- rows: [{
80676
- id: "vacuum",
80677
- icon: "bot",
80678
- status: title ?? unknownText,
80679
- controls
80680
- }],
80681
- facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$1(progress), "primary")]],
80682
- ...progress === null ? {} : {
80683
- tiles: { right: [{
80684
- label: t("Progress", "Avanzamento"),
80685
- value: pct$1(progress)
80686
- }] },
80687
- scene: { level: unit(progress) }
80688
- }
81209
+ rows: vacuumRows,
81210
+ facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
81211
+ ...suction.length === 0 && progress === null ? {} : { tiles: { right: [...suction, ...progress === null ? [] : [{
81212
+ label: t("Progress", "Avanzamento"),
81213
+ value: pct$2(progress)
81214
+ }]] } },
81215
+ ...progress === null ? {} : { scene: { level: unit(progress) } }
80689
81216
  };
80690
81217
  });
80691
81218
  var MOWER_WORDS = {
@@ -80741,11 +81268,11 @@ var mowerContribution = contribution("lawn-mower-control", LawnMowerControlStatu
80741
81268
  status: title ?? unknownText,
80742
81269
  controls: mowerControls(activity)
80743
81270
  }],
80744
- facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$1(progress), "primary")]],
81271
+ facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
80745
81272
  ...progress === null ? {} : {
80746
81273
  tiles: { right: [{
80747
81274
  label: t("Progress", "Avanzamento"),
80748
- value: pct$1(progress)
81275
+ value: pct$2(progress)
80749
81276
  }] },
80750
81277
  scene: { level: unit(progress) }
80751
81278
  }
@@ -80816,10 +81343,13 @@ var feederContribution = contribution("pet-feeder", PetFeederStatusSchema, (slic
80816
81343
  ...last === null ? [] : [fact("last-run", "clock", t(`Last ${last} g`, `Ultimo ${last} g`))],
80817
81344
  ...ownBattery(slice?.powerSource === "battery" ? slice.batteryPower : null, ctx)
80818
81345
  ],
80819
- ...last === null ? {} : { tiles: { right: [{
81346
+ tiles: { left: [...slice?.foodLevel == null ? [] : [{
81347
+ label: t("Tank", "Serbatoio"),
81348
+ value: pct$2(slice.foodLevel)
81349
+ }], ...last === null ? [] : [{
80820
81350
  label: t("Last portion", "Ultima porzione"),
80821
81351
  value: t(`${last} g`, `${last} g`)
80822
- }] } }
81352
+ }]] }
80823
81353
  };
80824
81354
  });
80825
81355
  var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema, (slice) => {
@@ -80847,10 +81377,13 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
80847
81377
  }],
80848
81378
  ...level === null ? {} : {
80849
81379
  facts: [fact("level", "droplets", t(`Water ${Math.round(level)}%`, `Acqua ${Math.round(level)}%`), level <= 20 ? "warning" : "primary")],
80850
- tiles: { right: [{
81380
+ tiles: { left: [{
80851
81381
  label: t("Water", "Acqua"),
80852
- value: pct$1(level)
80853
- }] },
81382
+ value: pct$2(level)
81383
+ }, ...slice?.waterVolume == null ? [] : [{
81384
+ label: t("Volume", "Volume"),
81385
+ value: t(`${Math.round(slice.waterVolume)} ml`, `${Math.round(slice.waterVolume)} ml`)
81386
+ }]] },
80854
81387
  scene: { level: unit(level) }
80855
81388
  }
80856
81389
  };
@@ -80882,14 +81415,18 @@ var DEVICES_FAMILY_CONTRIBUTIONS = {
80882
81415
  * that does not parse reads `unknown`, never closed or off (D315/D393).
80883
81416
  */
80884
81417
  var has$2 = (ctx, f) => ctx.features.includes(f);
80885
- var pct = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
81418
+ var pct$1 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
80886
81419
  var brightnessContribution = contribution("brightness", BrightnessStatusSchema, (slice) => {
80887
81420
  const level = slice?.level ?? null;
80888
81421
  return {
80889
81422
  ...level === null ? {} : { reading: reading("brightness", level > 0 ? "on" : "off") },
80890
81423
  ...level === null ? {} : {
80891
- facts: [fact("level", "sun-dim", pct(level), level > 0 ? "primary" : "muted")],
80892
- scene: { level: level / 100 }
81424
+ facts: [fact("level", "sun-dim", pct$1(level), level > 0 ? "primary" : "muted")],
81425
+ scene: { level: level / 100 },
81426
+ tiles: { left: [{
81427
+ label: t("Brightness", "Luminosità"),
81428
+ value: pct$1(level)
81429
+ }] }
80893
81430
  },
80894
81431
  rows: [row$1("brightness", "sun-dim", level === null ? null : t(`Brightness ${Math.round(level)}%`, `Luminosità ${Math.round(level)}%`), [{
80895
81432
  kind: "slider",
@@ -81098,12 +81635,16 @@ function travelFragment(s, state, position, tilt, ctx) {
81098
81635
  });
81099
81636
  return {
81100
81637
  reading: reading(s.source, words.state, false, words.title),
81101
- ...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct(position))] },
81638
+ ...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct$1(position))] },
81639
+ ...position === null ? {} : { tiles: { left: [{
81640
+ label: t("Opening", "Apertura"),
81641
+ value: pct$1(position)
81642
+ }] } },
81102
81643
  scene: {
81103
81644
  ...words.mode === null ? {} : { mode: words.mode },
81104
81645
  ...position === null ? {} : { level: position / 100 }
81105
81646
  },
81106
- rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct(position) : null]), controls)]
81647
+ rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct$1(position) : null]), controls)]
81107
81648
  };
81108
81649
  }
81109
81650
  var ACTUATORS_FAMILY_CONTRIBUTIONS = {
@@ -81181,10 +81722,10 @@ var ACTUATORS_FAMILY_CONTRIBUTIONS = {
81181
81722
  const now = slice.currentHumidity;
81182
81723
  return {
81183
81724
  reading: reading("humidifier", state, false, title),
81184
- ...now === null ? {} : { facts: [fact("level", "droplets", pct(now), "info")] },
81725
+ ...now === null ? {} : { facts: [fact("level", "droplets", pct$1(now), "info")] },
81185
81726
  ...slice.targetHumidity === null ? {} : { tiles: { right: [{
81186
81727
  label: t("Target", "Obiettivo"),
81187
- value: pct(slice.targetHumidity)
81728
+ value: pct$1(slice.targetHumidity)
81188
81729
  }] } },
81189
81730
  ...now === null ? {} : { scene: { level: now / 100 } },
81190
81731
  rows: [row$1("humidifier", "droplets", joinText([title, slice.mode === null ? null : t(slice.mode, slice.mode)]), controls)]
@@ -81432,17 +81973,16 @@ var weatherContribution = contribution("weather", WeatherStatusSchema, (slice, c
81432
81973
  });
81433
81974
  var updateContribution = contribution("update", UpdateStatusSchema, (slice) => {
81434
81975
  if (slice === void 0) return { reading: reading("update", "unknown") };
81435
- const { currentVersion, availableVersion, inProgress, updatable } = slice;
81976
+ const { currentVersion, availableVersion, inProgress } = slice;
81436
81977
  const pending = availableVersion !== null && availableVersion !== "" && availableVersion !== currentVersion;
81437
81978
  if (!pending && currentVersion === null && !inProgress) return { reading: reading("update", "unknown") };
81438
81979
  const state = inProgress ? "running" : pending ? "standby" : "idle";
81439
81980
  const title = inProgress ? t("Updating", "Aggiornamento in corso") : pending ? t("Update available", "Aggiornamento disponibile") : t("Up to date", "Aggiornato");
81440
81981
  const versions = currentVersion === null ? pending ? t(`${availableVersion}`, `${availableVersion}`) : null : pending ? t(`${currentVersion} → ${availableVersion}`, `${currentVersion} → ${availableVersion}`) : t(`Version ${currentVersion}`, `Versione ${currentVersion}`);
81441
- const install = pending && updatable && !inProgress ? [asAction(action("update.install", t("Install", "Installa"), "download", "update", "installUpdate", {}, "primary", "install"))] : [];
81442
81982
  return {
81443
81983
  reading: reading("update", state, false, title),
81444
81984
  facts: versions === null ? [] : [fact("reading", "download", versions, pending ? "warning" : "muted")],
81445
- rows: [row$1("update", "download", versions, install)]
81985
+ rows: [row$1("update", "download", versions, [])]
81446
81986
  };
81447
81987
  });
81448
81988
  var imageContribution = contribution("image", ImageStatusSchema, (slice, ctx) => {
@@ -81550,6 +82090,33 @@ var ON_MODE_PREFERENCE = [
81550
82090
  "heat",
81551
82091
  "cool"
81552
82092
  ];
82093
+ var FAN_LABEL = {
82094
+ auto: t("Auto", "Auto"),
82095
+ quiet: t("Quiet", "Silenziosa"),
82096
+ low: t("Low", "Bassa"),
82097
+ medium: t("Medium", "Media"),
82098
+ high: t("High", "Alta"),
82099
+ turbo: t("Turbo", "Turbo"),
82100
+ off: t("Off", "Spenta")
82101
+ };
82102
+ /** A readable label for a fan speed name; an unknown one is shown as the device reported it. */
82103
+ function fanLabelOf(fan) {
82104
+ return FAN_LABEL[fan] ?? t(fan, fan);
82105
+ }
82106
+ /** Short labels for a segmented control: one word each, so the segments stay on a line. */
82107
+ var MODE_SEGMENT_LABEL = {
82108
+ off: t("Off", "Spento"),
82109
+ heat: t("Heat", "Caldo"),
82110
+ cool: t("Cool", "Freddo"),
82111
+ auto: t("Auto", "Auto"),
82112
+ heat_cool: t("Heat/Cool", "Caldo/Freddo"),
82113
+ fan_only: t("Fan", "Vent."),
82114
+ dry: t("Dry", "Deum.")
82115
+ };
82116
+ /** The segment label of every available HVAC mode, keyed by the mode value. */
82117
+ function modeLabelsOf(modes) {
82118
+ return Object.fromEntries(modes.map((m) => [m, MODE_SEGMENT_LABEL[m]]));
82119
+ }
81553
82120
  /** 22 -> "22", 22.3 -> "22.3": a trailing zero is noise on a thermostat. */
81554
82121
  function formatDegrees(value) {
81555
82122
  return `${Number(value.toFixed(1))}°`;
@@ -81614,11 +82181,11 @@ function rangeFrom(min, max, step) {
81614
82181
  * contribute, types never do (D14). A slice that is absent or does not parse is
81615
82182
  * "not answered": the state reads unknown, no row is drawn (D315, D393).
81616
82183
  */
81617
- var same = (text) => t(text, text);
81618
- function tile(en, it, value) {
82184
+ var same$1 = (text) => t(text, text);
82185
+ function tile$1(en, it, value) {
81619
82186
  return {
81620
82187
  label: t(en, it),
81621
- value: same(value)
82188
+ value: same$1(value)
81622
82189
  };
81623
82190
  }
81624
82191
  function setpointSlider(id, cap, method, valueArg, value, range) {
@@ -81653,18 +82220,19 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
81653
82220
  const status = climateStatusText(view);
81654
82221
  const facts = [];
81655
82222
  if (status !== null) facts.push(fact("climate", "thermometer", status));
81656
- if (view.humidity !== null) facts.push(fact("humidity", "droplets", same(`${Math.round(view.humidity)}%`)));
81657
- if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same(`→ ${Math.round(view.targetHumidity)}%`)));
82223
+ if (view.humidity !== null) facts.push(fact("humidity", "droplets", same$1(`${Math.round(view.humidity)}%`)));
82224
+ if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same$1(`→ ${Math.round(view.targetHumidity)}%`)));
81658
82225
  const left = [];
81659
82226
  const right = [];
81660
- if (view.measured !== null) left.push(tile("Indoor", "In casa", formatDegrees(view.measured)));
81661
- if (view.humidity !== null) left.push(tile("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
82227
+ if (view.measured !== null) left.push(tile$1("Indoor", "In casa", formatDegrees(view.measured)));
82228
+ if (view.humidity !== null) left.push(tile$1("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
81662
82229
  const modeControls = [{
81663
82230
  kind: "picker",
81664
82231
  id: "climate.mode",
81665
82232
  label: t("Mode", "Modalità"),
81666
82233
  current: view.mode,
81667
- options: [...view.availableModes],
82234
+ options: [...view.availableModes.filter((m) => m !== "off"), ...view.availableModes.filter((m) => m === "off")],
82235
+ optionLabels: modeLabelsOf(view.availableModes),
81668
82236
  call: {
81669
82237
  cap: "climate-control",
81670
82238
  method: "setMode",
@@ -81692,6 +82260,7 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
81692
82260
  label: t("Fan", "Ventola"),
81693
82261
  current: slice.fanMode === "" ? null : slice.fanMode,
81694
82262
  options: [...slice.availableFanModes],
82263
+ optionLabels: Object.fromEntries(slice.availableFanModes.map((m) => [m, fanLabelOf(m)])),
81695
82264
  call: {
81696
82265
  cap: "climate-control",
81697
82266
  method: "setFanMode",
@@ -81717,14 +82286,15 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
81717
82286
  if (fanControls.length > 0) rows.push({
81718
82287
  id: "climate-fan",
81719
82288
  icon: "fan",
81720
- status: slice.fanMode === "" ? null : same(slice.fanMode),
82289
+ status: slice.fanMode === "" ? null : same$1(slice.fanMode),
81721
82290
  controls: fanControls
81722
82291
  });
81723
- 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)));
82292
+ 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)));
81724
82293
  const sceneMode = view.sceneMode;
81725
82294
  return {
81726
82295
  reading: reading("climate-control", view.isOff ? "off" : "on"),
81727
82296
  title: view.modeLabel,
82297
+ ...view.isOff || slice.fanMode === "" ? {} : { caption: t(`${view.modeLabel.en} · fan ${fanLabelOf(slice.fanMode).en}`, `${view.modeLabel.it} · ventola ${fanLabelOf(slice.fanMode).it}`) },
81728
82298
  facts,
81729
82299
  ...left.length === 0 && right.length === 0 ? {} : { tiles: {
81730
82300
  left,
@@ -81751,7 +82321,7 @@ var WATER_ON_PREFERENCE = [
81751
82321
  "performance"
81752
82322
  ];
81753
82323
  function capitalised(word) {
81754
- return same(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
82324
+ return same$1(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
81755
82325
  }
81756
82326
  var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSchema, (slice) => {
81757
82327
  if (slice === void 0 || slice.operationMode === null) return { reading: reading("climate-control", "unknown") };
@@ -81788,13 +82358,13 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
81788
82358
  icon: "flame",
81789
82359
  status: label,
81790
82360
  controls: modeControls
81791
- }, ...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))];
82361
+ }, ...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))];
81792
82362
  const level = levelWithin(slice.targetTemp, range);
81793
82363
  return {
81794
82364
  reading: reading("climate-control", isOff ? "off" : "on"),
81795
82365
  title: label,
81796
82366
  facts: status === null ? [] : [fact("climate", "flame", status)],
81797
- ...slice.currentTemp === null ? {} : { tiles: { left: [tile("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
82367
+ ...slice.currentTemp === null ? {} : { tiles: { left: [tile$1("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
81798
82368
  scene: {
81799
82369
  ...isOff ? {} : { mode: "heat" },
81800
82370
  ...level === null ? {} : { level }
@@ -81812,11 +82382,12 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
81812
82382
  var heatingValveContribution = contribution("heating-valve", HeatingValveStatusSchema, (slice) => {
81813
82383
  const position = slice?.position ?? null;
81814
82384
  if (position === null) return { reading: reading("sensor", "unknown") };
81815
- const text = same(`${Math.round(position)}%`);
82385
+ const text = same$1(`${Math.round(position)}%`);
81816
82386
  return {
81817
82387
  reading: reading("sensor", position > 0 ? "running" : "idle"),
81818
82388
  facts: [fact("valve", "gauge", t(`Valve ${text.en}`, `Valvola ${text.it}`))],
81819
- tiles: { right: [tile("Valve", "Valvola", text.en)] },
82389
+ tiles: { right: [tile$1("Valve", "Valvola", text.en)] },
82390
+ ...position > 0 ? { caption: t(`Heating · valve ${text.en}`, `Riscalda · valvola ${text.it}`) } : {},
81820
82391
  scene: { level: position / 100 }
81821
82392
  };
81822
82393
  });
@@ -81825,9 +82396,9 @@ function sensorFragment(value, id, icon, en, it, text) {
81825
82396
  if (value === null) return { reading: reading("sensor", "unknown") };
81826
82397
  return {
81827
82398
  reading: reading("sensor", "on"),
81828
- title: same(text),
81829
- facts: [fact(id, icon, same(text))],
81830
- tiles: { right: [tile(en, it, text)] }
82399
+ title: same$1(text),
82400
+ facts: [fact(id, icon, same$1(text))],
82401
+ tiles: { right: [tile$1(en, it, text)] }
81831
82402
  };
81832
82403
  }
81833
82404
  var temperatureContribution = contribution("temperature-sensor", TemperatureSensorStatusSchema, (slice) => sensorFragment(slice?.temperature ?? null, "temperature", "thermometer", "Temperature", "Temperatura", formatDegrees(slice?.temperature ?? 0)));
@@ -81882,8 +82453,8 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
81882
82453
  return {
81883
82454
  reading: reading("sensor", "on"),
81884
82455
  ...slice.aqi === void 0 ? {} : { title: airQualityWord(slice.aqi) },
81885
- facts: parts.map((p) => fact("air-quality", "wind", same(`${p.label} ${p.value}`))),
81886
- tiles: { right: parts.slice(0, 2).map((p) => tile(p.label, p.label, p.value)) }
82456
+ facts: parts.map((p) => fact("air-quality", "wind", same$1(`${p.label} ${p.value}`))),
82457
+ tiles: { right: parts.slice(0, 2).map((p) => tile$1(p.label, p.label, p.value)) }
81887
82458
  };
81888
82459
  }),
81889
82460
  "carbon-monoxide": contribution("carbon-monoxide", CarbonMonoxideStatusSchema, (slice) => {
@@ -81898,15 +82469,270 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
81898
82469
  "numeric-sensor": numericContribution,
81899
82470
  "enum-sensor": enumContribution
81900
82471
  };
82472
+ /**
82473
+ * The heat pump's contribution to a hero (D1026): the compressor scene, every
82474
+ * circuit as a row with its own label and icon, the powers as pills (the
82475
+ * instantaneous COP is "—" when it cannot be computed) and a "System" group with
82476
+ * one selector per mode. Values and their limits come from the slice, which the
82477
+ * gateway filled: a selector with no allowed value is not drawn, a missing
82478
+ * reading is never a 0 (D393).
82479
+ */
82480
+ var CAP = "heat-pump-control";
82481
+ var same = (text) => t(text, text);
82482
+ /** The words of the values the gateway names; a value not listed is drawn as the gateway wrote it. */
82483
+ var VALUE_LABELS = {
82484
+ off: t("Off", "Off"),
82485
+ on: t("On", "On"),
82486
+ auto: t("Auto", "Auto"),
82487
+ manual: t("Manual", "Manuale"),
82488
+ low: t("Low", "Bassa"),
82489
+ high: t("High", "Alta"),
82490
+ eco: t("Eco", "Eco"),
82491
+ heat: t("Heat", "Caldo"),
82492
+ cool: t("Cool", "Freddo"),
82493
+ heatCool: t("Heat/cool", "Caldo/freddo"),
82494
+ ownprogram: t("Programme", "Programma")
82495
+ };
82496
+ function valueLabel(value) {
82497
+ const known = VALUE_LABELS[value];
82498
+ if (known !== void 0) return known;
82499
+ const holiday = /^hm(\d+)$/.exec(value);
82500
+ if (holiday?.[1] !== void 0) return t(`Programme ${holiday[1]}`, `Programma ${holiday[1]}`);
82501
+ return same(value);
82502
+ }
82503
+ function optionLabels(allowed) {
82504
+ return Object.fromEntries(allowed.map((value) => [value, valueLabel(value)]));
82505
+ }
82506
+ function picker(id, label, setting, method, args, valueArg = "mode") {
82507
+ return {
82508
+ kind: "picker",
82509
+ id,
82510
+ label,
82511
+ current: setting.value,
82512
+ options: [...setting.allowed],
82513
+ optionLabels: optionLabels(setting.allowed),
82514
+ call: {
82515
+ cap: CAP,
82516
+ method,
82517
+ args: { ...args }
82518
+ },
82519
+ valueArg
82520
+ };
82521
+ }
82522
+ /** A selector exists only where the gateway named values to choose from. */
82523
+ function choosable(setting) {
82524
+ return setting !== null && setting.allowed.length > 0;
82525
+ }
82526
+ function circuitControl(circuit) {
82527
+ const args = { circuitId: circuit.id };
82528
+ if (circuit.kind === "dhw" && choosable(circuit.temperatureLevel)) return picker(`heat-pump.${circuit.id}.level`, t("Level", "Livello"), circuit.temperatureLevel, "setDhwTemperatureLevel", args, "level");
82529
+ if (!choosable(circuit.operationMode)) return null;
82530
+ const method = circuit.kind === "dhw" ? "setDhwOperationMode" : "setCircuitOperationMode";
82531
+ return picker(`heat-pump.${circuit.id}.mode`, t("Mode", "Modalità"), circuit.operationMode, method, args);
82532
+ }
82533
+ /** A circuit with no reading is still a row: it shows that nothing is known, not nothing. */
82534
+ var UNKNOWN_STATUS = same("—");
82535
+ function circuitRow(circuit) {
82536
+ const control = circuitControl(circuit);
82537
+ const status = thermalStatusText(circuit.targetTemp, circuit.currentTemp) ?? UNKNOWN_STATUS;
82538
+ return {
82539
+ id: "circuit",
82540
+ label: same(circuit.label),
82541
+ icon: circuit.icon,
82542
+ status,
82543
+ controls: control === null ? [] : [control]
82544
+ };
82545
+ }
82546
+ var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
82547
+ /** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
82548
+ function copPill(cop) {
82549
+ if (cop === null) return {
82550
+ icon: "gauge",
82551
+ text: t("Instantaneous COP —", "COP istantaneo —"),
82552
+ tone: "muted"
82553
+ };
82554
+ const text = String(Number(cop.toFixed(1)));
82555
+ return {
82556
+ icon: "gauge",
82557
+ text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
82558
+ tone: "success"
82559
+ };
82560
+ }
82561
+ function powerPills(status) {
82562
+ const { thermalW, electricalW } = status.power;
82563
+ const pills = [];
82564
+ if (thermalW !== null) pills.push({
82565
+ icon: "flame",
82566
+ text: t(`Thermal ${kilowatts(thermalW)}`, `Termica ${kilowatts(thermalW)}`),
82567
+ tone: "muted"
82568
+ });
82569
+ if (electricalW !== null) pills.push({
82570
+ icon: "zap",
82571
+ text: t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
82572
+ tone: "muted"
82573
+ });
82574
+ pills.push(copPill(heatPumpInstantCop(status.power)));
82575
+ return pills;
82576
+ }
82577
+ /** The independent system modes, in the order the card draws them. */
82578
+ var SYSTEM_MODES = [
82579
+ {
82580
+ key: "silent",
82581
+ label: t("Silent", "Silenzioso"),
82582
+ icon: "volume-x",
82583
+ method: "setSilentMode"
82584
+ },
82585
+ {
82586
+ key: "away",
82587
+ label: t("Away", "Assente"),
82588
+ icon: "plane",
82589
+ method: "setAwayMode"
82590
+ },
82591
+ {
82592
+ key: "additionalHeater",
82593
+ label: t("Additional heater", "Riscaldatore aggiuntivo"),
82594
+ icon: "flame",
82595
+ method: "setAdditionalHeaterMode"
82596
+ },
82597
+ {
82598
+ key: "holiday",
82599
+ label: t("Holiday", "Vacanza"),
82600
+ icon: "tree-palm",
82601
+ method: "setHolidayMode"
82602
+ }
82603
+ ];
82604
+ var SYSTEM_GROUP = t("System", "Sistema");
82605
+ var PROGRAMME = /^hm\d+$/;
82606
+ /**
82607
+ * Holiday is two segments, off / programme. Choosing "programme" keeps the programme
82608
+ * that is set, else the first one the gateway allowed, so a write never leaves
82609
+ * `allowed`. The full hm1..hm8 pick is not in the hero (D1026). A holiday whose values
82610
+ * are not programmes keeps the plain selector.
82611
+ */
82612
+ function holidayRow(def, setting) {
82613
+ if (!setting.allowed.includes("off")) return null;
82614
+ const current = setting.value !== null && PROGRAMME.test(setting.value) ? setting.value : null;
82615
+ const programme = current ?? setting.allowed.find((v) => PROGRAMME.test(v));
82616
+ if (programme === void 0) return null;
82617
+ const control = picker("heat-pump.system.holiday", def.label, {
82618
+ value: setting.value,
82619
+ allowed: ["off", programme]
82620
+ }, def.method, {});
82621
+ const number = programme.slice(2);
82622
+ return {
82623
+ id: "system-mode",
82624
+ label: def.label,
82625
+ group: SYSTEM_GROUP,
82626
+ icon: def.icon,
82627
+ status: current === null ? null : t(`Programme ${number}`, `Programma ${number}`),
82628
+ controls: [control.kind === "picker" ? {
82629
+ ...control,
82630
+ optionLabels: {
82631
+ off: t("Off", "Off"),
82632
+ [programme]: t("Programme", "Programma")
82633
+ }
82634
+ } : control]
82635
+ };
82636
+ }
82637
+ function systemRows(status) {
82638
+ const rows = [];
82639
+ for (const def of SYSTEM_MODES) {
82640
+ const setting = status.system[def.key];
82641
+ if (!choosable(setting)) continue;
82642
+ if (def.key === "holiday") {
82643
+ const holiday = holidayRow(def, setting);
82644
+ if (holiday !== null) {
82645
+ rows.push(holiday);
82646
+ continue;
82647
+ }
82648
+ }
82649
+ rows.push({
82650
+ id: "system-mode",
82651
+ label: def.label,
82652
+ group: SYSTEM_GROUP,
82653
+ icon: def.icon,
82654
+ status: null,
82655
+ controls: [picker(`heat-pump.system.${def.key}`, def.label, setting, def.method, {})]
82656
+ });
82657
+ }
82658
+ return rows;
82659
+ }
82660
+ function tile(en, it, value) {
82661
+ return {
82662
+ label: t(en, it),
82663
+ value: same(value)
82664
+ };
82665
+ }
82666
+ function tilesOf$1(status) {
82667
+ const { supply, return: back, outdoor } = status.temperatures;
82668
+ const left = [];
82669
+ const right = [];
82670
+ if (supply !== null) left.push(tile("Supply", "Mandata", formatDegrees(supply)));
82671
+ if (back !== null) left.push(tile("Return", "Ritorno", formatDegrees(back)));
82672
+ if (outdoor !== null) right.push(tile("Outdoor", "Esterna", formatDegrees(outdoor)));
82673
+ if (status.waterPressureBar !== null) right.push(tile("Pressure", "Pressione", `${Number(status.waterPressureBar.toFixed(1))} bar`));
82674
+ return {
82675
+ left,
82676
+ right
82677
+ };
82678
+ }
82679
+ function isRunning(status) {
82680
+ const { compressorPct, electricalW } = status.power;
82681
+ if (compressorPct !== null) return compressorPct > 0;
82682
+ if (electricalW !== null) return electricalW > 0;
82683
+ return null;
82684
+ }
82685
+ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pump-status", HeatPumpStatusSchema, (slice) => {
82686
+ if (slice === void 0) return { reading: reading("climate-control", "unknown") };
82687
+ const running = isRunning(slice);
82688
+ const facts = [];
82689
+ if (slice.power.electricalW !== null) facts.push(fact("power", "zap", same(`${Math.round(slice.power.electricalW)} W`)));
82690
+ if (slice.power.compressorPct !== null) facts.push(fact("level", "gauge", t(`Compressor ${Math.round(slice.power.compressorPct)} %`, `Compressore ${Math.round(slice.power.compressorPct)} %`)));
82691
+ const charging = slice.circuits.find((c) => c.active === true);
82692
+ const tiles = tilesOf$1(slice);
82693
+ const pills = powerPills(slice);
82694
+ const rows = [
82695
+ ...slice.circuits.map(circuitRow),
82696
+ ...pills.length === 0 ? [] : [{
82697
+ id: "heat-pump-power",
82698
+ icon: "zap",
82699
+ status: null,
82700
+ controls: [],
82701
+ pills: [...pills]
82702
+ }],
82703
+ ...systemRows(slice)
82704
+ ];
82705
+ return {
82706
+ reading: reading("climate-control", running === true ? "running" : running === false ? "idle" : "on"),
82707
+ title: t("Heat pump", "Pompa di calore"),
82708
+ ...charging === void 0 ? {} : { caption: t(`${charging.label} · heating`.toUpperCase(), `${charging.label} · in riscaldamento`.toUpperCase()) },
82709
+ facts,
82710
+ ...tiles.left.length === 0 && tiles.right.length === 0 ? {} : { tiles },
82711
+ ...slice.power.electricalW === null ? {} : { consumption: {
82712
+ priority: 1,
82713
+ slot: {
82714
+ kind: "power",
82715
+ watts: slice.power.electricalW,
82716
+ detail: slice.power.thermalW === null ? [] : [{
82717
+ label: t("Thermal", "Termica"),
82718
+ value: Math.round(slice.power.thermalW),
82719
+ unit: "W"
82720
+ }]
82721
+ }
82722
+ } },
82723
+ rows
82724
+ };
82725
+ }) };
81901
82726
  [
81902
82727
  ...Object.values(ACCESS_FAMILY_CONTRIBUTIONS),
81903
82728
  ...Object.values(DEVICES_FAMILY_CONTRIBUTIONS),
81904
82729
  ...Object.values(GROUPS_FAMILY_CONTRIBUTIONS),
81905
82730
  ...Object.values(ACTUATORS_FAMILY_CONTRIBUTIONS),
81906
82731
  ...Object.values(SENSORS_FAMILY_CONTRIBUTIONS),
81907
- ...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS)
82732
+ ...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
82733
+ ...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
81908
82734
  ];
81909
- 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;
82735
+ 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;
81910
82736
  /**
81911
82737
  * Who looks like what (D1023). One look per {@link DeviceType}, refined by a
81912
82738
  * {@link DeviceRole} where the role changes how the device reads (a leak
@@ -82296,7 +83122,7 @@ lookOf({
82296
83122
  ({ ...lookOf({
82297
83123
  icon: "shield-check",
82298
83124
  on: [
82299
- "success",
83125
+ "danger",
82300
83126
  "glow",
82301
83127
  "halo"
82302
83128
  ],
@@ -82534,8 +83360,24 @@ lookOf({
82534
83360
  idle: INFO,
82535
83361
  standby: MUTED
82536
83362
  });
83363
+ lookOf({
83364
+ icon: "thermometer-sun",
83365
+ on: [
83366
+ "warning",
83367
+ "heat-rise",
83368
+ "rise"
83369
+ ],
83370
+ off: MUTED,
83371
+ running: [
83372
+ "warning",
83373
+ "heat-rise",
83374
+ "rise"
83375
+ ],
83376
+ idle: INFO,
83377
+ standby: MUTED
83378
+ });
82537
83379
  DeviceType.Climate, DeviceType.Thermostat;
82538
- 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;
83380
+ 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;
82539
83381
  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;
82540
83382
  Object.freeze({
82541
83383
  "accessories.getStatus": {
@@ -84701,6 +85543,13 @@ Object.freeze({
84701
85543
  access: "create",
84702
85544
  role: "admin"
84703
85545
  },
85546
+ "deviceManager.checkDeviceTemplates": {
85547
+ capName: "device-manager",
85548
+ capScope: "system",
85549
+ addonId: null,
85550
+ access: "view",
85551
+ role: "admin"
85552
+ },
84704
85553
  "deviceManager.cleanupDeletedDevicesData": {
84705
85554
  capName: "device-manager",
84706
85555
  capScope: "system",
@@ -85100,6 +85949,13 @@ Object.freeze({
85100
85949
  access: "create",
85101
85950
  role: "admin"
85102
85951
  },
85952
+ "deviceManager.renderDeviceTemplates": {
85953
+ capName: "device-manager",
85954
+ capScope: "system",
85955
+ addonId: null,
85956
+ access: "view",
85957
+ role: "admin"
85958
+ },
85103
85959
  "deviceManager.reportDiscoveryObservations": {
85104
85960
  capName: "device-manager",
85105
85961
  capScope: "system",
@@ -86031,6 +86887,111 @@ Object.freeze({
86031
86887
  access: "view",
86032
86888
  role: "viewer"
86033
86889
  },
86890
+ "heatPumpControl.setAdditionalHeaterMode": {
86891
+ capName: "heat-pump-control",
86892
+ capScope: "device",
86893
+ addonId: null,
86894
+ access: "create",
86895
+ role: "viewer"
86896
+ },
86897
+ "heatPumpControl.setAwayMode": {
86898
+ capName: "heat-pump-control",
86899
+ capScope: "device",
86900
+ addonId: null,
86901
+ access: "create",
86902
+ role: "viewer"
86903
+ },
86904
+ "heatPumpControl.setCircuitComfortSetpoint": {
86905
+ capName: "heat-pump-control",
86906
+ capScope: "device",
86907
+ addonId: null,
86908
+ access: "create",
86909
+ role: "viewer"
86910
+ },
86911
+ "heatPumpControl.setCircuitEcoSetpoint": {
86912
+ capName: "heat-pump-control",
86913
+ capScope: "device",
86914
+ addonId: null,
86915
+ access: "create",
86916
+ role: "viewer"
86917
+ },
86918
+ "heatPumpControl.setCircuitHeatCoolMode": {
86919
+ capName: "heat-pump-control",
86920
+ capScope: "device",
86921
+ addonId: null,
86922
+ access: "create",
86923
+ role: "viewer"
86924
+ },
86925
+ "heatPumpControl.setCircuitMaxFlowTemp": {
86926
+ capName: "heat-pump-control",
86927
+ capScope: "device",
86928
+ addonId: null,
86929
+ access: "create",
86930
+ role: "viewer"
86931
+ },
86932
+ "heatPumpControl.setCircuitOperationMode": {
86933
+ capName: "heat-pump-control",
86934
+ capScope: "device",
86935
+ addonId: null,
86936
+ access: "create",
86937
+ role: "viewer"
86938
+ },
86939
+ "heatPumpControl.setCircuitSummerWinter": {
86940
+ capName: "heat-pump-control",
86941
+ capScope: "device",
86942
+ addonId: null,
86943
+ access: "create",
86944
+ role: "viewer"
86945
+ },
86946
+ "heatPumpControl.setDhwChargeDuration": {
86947
+ capName: "heat-pump-control",
86948
+ capScope: "device",
86949
+ addonId: null,
86950
+ access: "create",
86951
+ role: "viewer"
86952
+ },
86953
+ "heatPumpControl.setDhwOperationMode": {
86954
+ capName: "heat-pump-control",
86955
+ capScope: "device",
86956
+ addonId: null,
86957
+ access: "create",
86958
+ role: "viewer"
86959
+ },
86960
+ "heatPumpControl.setDhwTemperatureLevel": {
86961
+ capName: "heat-pump-control",
86962
+ capScope: "device",
86963
+ addonId: null,
86964
+ access: "create",
86965
+ role: "viewer"
86966
+ },
86967
+ "heatPumpControl.setHolidayMode": {
86968
+ capName: "heat-pump-control",
86969
+ capScope: "device",
86970
+ addonId: null,
86971
+ access: "create",
86972
+ role: "viewer"
86973
+ },
86974
+ "heatPumpControl.setSilentMode": {
86975
+ capName: "heat-pump-control",
86976
+ capScope: "device",
86977
+ addonId: null,
86978
+ access: "create",
86979
+ role: "viewer"
86980
+ },
86981
+ "heatPumpControl.startExtraHotWater": {
86982
+ capName: "heat-pump-control",
86983
+ capScope: "device",
86984
+ addonId: null,
86985
+ access: "create",
86986
+ role: "viewer"
86987
+ },
86988
+ "heatPumpStatus.getStatus": {
86989
+ capName: "heat-pump-status",
86990
+ capScope: "device",
86991
+ addonId: null,
86992
+ access: "view",
86993
+ role: "viewer"
86994
+ },
86034
86995
  "heroLayout.getHeroModel": {
86035
86996
  capName: "hero-layout",
86036
86997
  capScope: "system",
@@ -92870,7 +93831,7 @@ function projectAction(cap, action) {
92870
93831
  };
92871
93832
  }
92872
93833
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
92873
- 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;
93834
+ 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;
92874
93835
  /**
92875
93836
  * Heuristic check — `device.features?.includes(profile.when.hasFeature)`.
92876
93837
  */
@@ -92939,7 +93900,6 @@ function offered(received) {
92939
93900
  };
92940
93901
  }
92941
93902
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
92942
- string().min(1).max(4096);
92943
93903
  Object.freeze({
92944
93904
  "accessories.getStatus": [{
92945
93905
  name: "deviceId",
@@ -94022,6 +94982,81 @@ Object.freeze({
94022
94982
  form: "single",
94023
94983
  optional: false
94024
94984
  }],
94985
+ "heatPumpControl.setAdditionalHeaterMode": [{
94986
+ name: "deviceId",
94987
+ form: "single",
94988
+ optional: false
94989
+ }],
94990
+ "heatPumpControl.setAwayMode": [{
94991
+ name: "deviceId",
94992
+ form: "single",
94993
+ optional: false
94994
+ }],
94995
+ "heatPumpControl.setCircuitComfortSetpoint": [{
94996
+ name: "deviceId",
94997
+ form: "single",
94998
+ optional: false
94999
+ }],
95000
+ "heatPumpControl.setCircuitEcoSetpoint": [{
95001
+ name: "deviceId",
95002
+ form: "single",
95003
+ optional: false
95004
+ }],
95005
+ "heatPumpControl.setCircuitHeatCoolMode": [{
95006
+ name: "deviceId",
95007
+ form: "single",
95008
+ optional: false
95009
+ }],
95010
+ "heatPumpControl.setCircuitMaxFlowTemp": [{
95011
+ name: "deviceId",
95012
+ form: "single",
95013
+ optional: false
95014
+ }],
95015
+ "heatPumpControl.setCircuitOperationMode": [{
95016
+ name: "deviceId",
95017
+ form: "single",
95018
+ optional: false
95019
+ }],
95020
+ "heatPumpControl.setCircuitSummerWinter": [{
95021
+ name: "deviceId",
95022
+ form: "single",
95023
+ optional: false
95024
+ }],
95025
+ "heatPumpControl.setDhwChargeDuration": [{
95026
+ name: "deviceId",
95027
+ form: "single",
95028
+ optional: false
95029
+ }],
95030
+ "heatPumpControl.setDhwOperationMode": [{
95031
+ name: "deviceId",
95032
+ form: "single",
95033
+ optional: false
95034
+ }],
95035
+ "heatPumpControl.setDhwTemperatureLevel": [{
95036
+ name: "deviceId",
95037
+ form: "single",
95038
+ optional: false
95039
+ }],
95040
+ "heatPumpControl.setHolidayMode": [{
95041
+ name: "deviceId",
95042
+ form: "single",
95043
+ optional: false
95044
+ }],
95045
+ "heatPumpControl.setSilentMode": [{
95046
+ name: "deviceId",
95047
+ form: "single",
95048
+ optional: false
95049
+ }],
95050
+ "heatPumpControl.startExtraHotWater": [{
95051
+ name: "deviceId",
95052
+ form: "single",
95053
+ optional: false
95054
+ }],
95055
+ "heatPumpStatus.getStatus": [{
95056
+ name: "deviceId",
95057
+ form: "single",
95058
+ optional: false
95059
+ }],
94025
95060
  "heroLayout.getHeroModel": [{
94026
95061
  name: "deviceId",
94027
95062
  form: "single",