@camstack/addon-pipeline-orchestrator 1.2.674 → 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.
- package/CHANGELOG.md +14 -0
- package/assets/viewer/.viewer-current-files.json +7 -7
- package/assets/viewer/.viewer-version +1 -1
- package/assets/viewer/_expo/static/js/web/{__common-4f914318fd141d15531ac7ddf4031092.js → __common-98b27160c543cc31e34f70fa8ed0aba3.js} +7 -7
- package/assets/viewer/_expo/static/js/web/{index-ff114e0583aff9ba56dcdd8fbe52e4fc.js → index-6fc41b340364123d0ac05b0439f22ce3.js} +1 -1
- package/assets/viewer/embed/assets/{MaskShapeCanvas-DI4BY7W2-UvJLLJkx.js → MaskShapeCanvas-DI4BY7W2-45Tvv4x3.js} +1 -1
- package/assets/viewer/embed/assets/{MotionZonesSettings-CiYjd-yl-CewG16ye.js → MotionZonesSettings-CiYjd-yl-BzmguZ-t.js} +1 -1
- package/assets/viewer/embed/assets/{PrivacyMaskSettings-BmRdUrPp-CU-fziSk.js → PrivacyMaskSettings-BmRdUrPp-nVpBN44i.js} +1 -1
- package/assets/viewer/embed/assets/{SceneMonitorEditor-J4Ix_0tu-Bd1FWoZW.js → SceneMonitorEditor-J4Ix_0tu-DlpiU36r.js} +1 -1
- package/assets/viewer/embed/assets/index-B8SEO5Cv.js +117 -0
- package/assets/viewer/embed/index.html +1 -1
- package/assets/viewer/index.html +1 -1
- package/dist/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-Cch2oyCT.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-Bc9E-zRz.mjs} +2 -2
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C_nbf3R8.mjs +26 -0
- 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
- package/dist/{hostInit-CwsAknxy.mjs → hostInit-nUxGHhQJ.mjs} +2 -2
- package/dist/index.js +1325 -328
- package/dist/index.mjs +1325 -328
- package/dist/remoteEntry.js +1 -1
- package/package.json +2 -2
- package/assets/viewer/embed/assets/index-C_4i1VmO.js +0 -117
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CzRjpdR9.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CCdrYdxx.mjs +0 -26
package/dist/index.js
CHANGED
|
@@ -833,7 +833,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
833
833
|
return EventCategory;
|
|
834
834
|
}({});
|
|
835
835
|
//#endregion
|
|
836
|
-
//#region ../types/dist/
|
|
836
|
+
//#region ../types/dist/composed-stable-id-DLcPInGv.mjs
|
|
837
837
|
/**
|
|
838
838
|
import { errMsg } from '@camstack/types'
|
|
839
839
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -959,6 +959,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
959
959
|
* (`reboot`, `device-admin-link`). Products are NOT its children — they are
|
|
960
960
|
* adopted beside it — and its connection settings stay on the integration. */
|
|
961
961
|
DeviceType["Gateway"] = "gateway";
|
|
962
|
+
/** A heat pump (any vendor): the compressor unit with its circuits (heating, hot
|
|
963
|
+
* water, cooling, solar), its system modes and its power. One main read-only
|
|
964
|
+
* `heat-pump-status` cap carries all of it; `heat-pump-control` sets it (D1026). */
|
|
965
|
+
DeviceType["HeatPump"] = "heat-pump";
|
|
962
966
|
return DeviceType;
|
|
963
967
|
}({});
|
|
964
968
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -1231,6 +1235,12 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1231
1235
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
1232
1236
|
return DeviceRole;
|
|
1233
1237
|
}({});
|
|
1238
|
+
/**
|
|
1239
|
+
* A composed device's stableId is this prefix plus the block id. Its own module,
|
|
1240
|
+
* free of zod, so the addon runner can read it through `@camstack/types/addon`
|
|
1241
|
+
* without loading the schema barrel (D28).
|
|
1242
|
+
*/
|
|
1243
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
1234
1244
|
//#endregion
|
|
1235
1245
|
//#region ../../node_modules/zod/v4/core/core.js
|
|
1236
1246
|
var _a$1;
|
|
@@ -6043,7 +6053,7 @@ var ZodIssueCode = {
|
|
|
6043
6053
|
var ZodFirstPartyTypeKind;
|
|
6044
6054
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6045
6055
|
//#endregion
|
|
6046
|
-
//#region ../types/dist/sleep-
|
|
6056
|
+
//#region ../types/dist/sleep-VrfKAAGN.mjs
|
|
6047
6057
|
/**
|
|
6048
6058
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6049
6059
|
* window to float samples (D455).
|
|
@@ -8284,16 +8294,6 @@ var BaseAddon = class {
|
|
|
8284
8294
|
return null;
|
|
8285
8295
|
}
|
|
8286
8296
|
/**
|
|
8287
|
-
* The form schema of ONE integration instance, or `null` to use the scoped form.
|
|
8288
|
-
*
|
|
8289
|
-
* Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
|
|
8290
|
-
* needs its connection fields, the default integration the addon's own sections. It is the
|
|
8291
|
-
* SHAPE of the form only — the values live on the instance record.
|
|
8292
|
-
*/
|
|
8293
|
-
async integrationFormSchema(_instance) {
|
|
8294
|
-
return null;
|
|
8295
|
-
}
|
|
8296
|
-
/**
|
|
8297
8297
|
* D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
|
|
8298
8298
|
* provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
|
|
8299
8299
|
* declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
|
|
@@ -8321,8 +8321,7 @@ var BaseAddon = class {
|
|
|
8321
8321
|
}
|
|
8322
8322
|
/**
|
|
8323
8323
|
* The host's read of the scoped declarations: the schema one capability declares for `scope`,
|
|
8324
|
-
* or `null`.
|
|
8325
|
-
* host asks this method.
|
|
8324
|
+
* or `null`. The hook is protected, the host asks this method.
|
|
8326
8325
|
*/
|
|
8327
8326
|
async getScopedSettingsSchema(scope, cap) {
|
|
8328
8327
|
switch (scope) {
|
|
@@ -8490,22 +8489,6 @@ var BaseAddon = class {
|
|
|
8490
8489
|
return Object.fromEntries([...collectHydratedFieldValues(form)].filter(([, value]) => value !== void 0));
|
|
8491
8490
|
}
|
|
8492
8491
|
/**
|
|
8493
|
-
* What the create wizard and the integration edit page render for one instance: the addon's
|
|
8494
|
-
* per-instance schema when it declares one, else its global schema (what they always showed).
|
|
8495
|
-
*/
|
|
8496
|
-
async getIntegrationFormSchema(instance, nodeId) {
|
|
8497
|
-
const scoped = await this.integrationFormSchema(instance);
|
|
8498
|
-
if (scoped === null) return this.scopedForm(nodeId);
|
|
8499
|
-
return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
|
|
8500
|
-
}
|
|
8501
|
-
/** The form of the scoped schemas this addon declared, hydrated from its store. */
|
|
8502
|
-
async scopedForm(nodeId) {
|
|
8503
|
-
await this.loadScopedSchemas();
|
|
8504
|
-
const schema = this.scopedFormSchema();
|
|
8505
|
-
if (!schema) return { sections: [] };
|
|
8506
|
-
return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
|
|
8507
|
-
}
|
|
8508
|
-
/**
|
|
8509
8492
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
8510
8493
|
* every `perNode: true` field carries THAT node's scoped value on its bare
|
|
8511
8494
|
* key (absent scoped key ⇒ key absent, so the schema `default` wins — no
|
|
@@ -8692,12 +8675,6 @@ var BaseAddon = class {
|
|
|
8692
8675
|
this._nodeKeysByCap = /* @__PURE__ */ new Map();
|
|
8693
8676
|
this._addonSecretTree = null;
|
|
8694
8677
|
}
|
|
8695
|
-
/** The form of an addon's scoped schemas: their sections, each shown once. */
|
|
8696
|
-
scopedFormSchema(cap) {
|
|
8697
|
-
const byId = /* @__PURE__ */ new Map();
|
|
8698
|
-
for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
|
|
8699
|
-
return byId.size === 0 ? null : { sections: [...byId.values()] };
|
|
8700
|
-
}
|
|
8701
8678
|
/** Every loaded scoped schema of `cap`, or of every loaded capability. */
|
|
8702
8679
|
loadedScopedSchemas(cap) {
|
|
8703
8680
|
if (cap !== void 0) return this._scopedByCap.get(cap) ?? [];
|
|
@@ -9287,6 +9264,10 @@ function normalizeAddonInitResult(result) {
|
|
|
9287
9264
|
if (Array.isArray(result)) return { providers: result };
|
|
9288
9265
|
return result;
|
|
9289
9266
|
}
|
|
9267
|
+
object({
|
|
9268
|
+
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
9269
|
+
params: record(string(), union([string(), number$1()])).optional()
|
|
9270
|
+
});
|
|
9290
9271
|
object({
|
|
9291
9272
|
field: string().min(1),
|
|
9292
9273
|
on: literal("advance")
|
|
@@ -9363,12 +9344,6 @@ function systemMethod(input, output, options) {
|
|
|
9363
9344
|
systemOnly: true
|
|
9364
9345
|
};
|
|
9365
9346
|
}
|
|
9366
|
-
/**
|
|
9367
|
-
* A method a SOURCE of a collection cap may legitimately not serve — OPTIONAL
|
|
9368
|
-
* on `InferProvider`. The `providerOptional: true` literal is what
|
|
9369
|
-
* `InferProvider` keys on; see {@link CapabilityMethodSchema.providerOptional}
|
|
9370
|
-
* for when this is the honest answer and when it is a soft stub.
|
|
9371
|
-
*/
|
|
9372
9347
|
function optionalMethod(input, output, options) {
|
|
9373
9348
|
return {
|
|
9374
9349
|
...method(input, output, options),
|
|
@@ -9617,15 +9592,52 @@ var PeerBytesTicketSchema = object({
|
|
|
9617
9592
|
*/
|
|
9618
9593
|
declaredBytes: number$1().int().nonnegative().nullable()
|
|
9619
9594
|
});
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9595
|
+
/**
|
|
9596
|
+
* The match a notification rule fired on (D705). Carried as a command origin so an
|
|
9597
|
+
* Action the rule starts can press `alarm-panel.trigger` as that match, not as an
|
|
9598
|
+
* anonymous press (D735). The same fields a rule fire ref freezes.
|
|
9599
|
+
*/
|
|
9600
|
+
var RuleFireOriginSchema = object({
|
|
9601
|
+
ruleId: string(),
|
|
9602
|
+
ruleName: string(),
|
|
9603
|
+
deviceId: number$1().int(),
|
|
9604
|
+
sourceDeviceId: number$1().int().optional(),
|
|
9605
|
+
recordId: string(),
|
|
9606
|
+
timestamp: number$1(),
|
|
9607
|
+
trackId: string().optional(),
|
|
9608
|
+
eventId: string().optional(),
|
|
9609
|
+
className: string().optional(),
|
|
9610
|
+
label: string().optional(),
|
|
9611
|
+
zones: array(string()).optional(),
|
|
9612
|
+
confidence: number$1().optional(),
|
|
9613
|
+
sensorChange: object({
|
|
9614
|
+
name: string(),
|
|
9615
|
+
kind: string(),
|
|
9616
|
+
state: string()
|
|
9617
|
+
}).optional(),
|
|
9618
|
+
extraStills: array(object({
|
|
9619
|
+
ownerId: string(),
|
|
9620
|
+
cameraId: number$1().int()
|
|
9621
|
+
})).optional()
|
|
9622
|
+
});
|
|
9623
|
+
discriminatedUnion("kind", [
|
|
9624
|
+
object({
|
|
9625
|
+
kind: literal("action"),
|
|
9626
|
+
actionId: string(),
|
|
9627
|
+
runId: string(),
|
|
9628
|
+
automationId: string().optional(),
|
|
9629
|
+
/** The rule fire that started this run, when one did (D705). */
|
|
9630
|
+
ruleFire: RuleFireOriginSchema.optional()
|
|
9631
|
+
}),
|
|
9632
|
+
object({
|
|
9633
|
+
kind: literal("scheduler"),
|
|
9634
|
+
schedulerId: string()
|
|
9635
|
+
}),
|
|
9636
|
+
object({
|
|
9637
|
+
kind: literal("rule"),
|
|
9638
|
+
fire: RuleFireOriginSchema
|
|
9639
|
+
})
|
|
9640
|
+
]);
|
|
9629
9641
|
/**
|
|
9630
9642
|
* One recorded device transition (D1022): a status field of a device went from
|
|
9631
9643
|
* one value to another, with who or what asked for it.
|
|
@@ -10580,7 +10592,7 @@ function t(en, it) {
|
|
|
10580
10592
|
* Things an operator switches, opens, sets or arms: lights, plugs, sirens,
|
|
10581
10593
|
* covers, valves, locks, climate, fans, alarm panels.
|
|
10582
10594
|
*/
|
|
10583
|
-
var ON = t("On", "Acceso");
|
|
10595
|
+
var ON$1 = t("On", "Acceso");
|
|
10584
10596
|
var PERCENT = t("Percentage", "Percentuale");
|
|
10585
10597
|
var OPEN_CLOSE_STATES = [
|
|
10586
10598
|
{
|
|
@@ -10640,7 +10652,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
10640
10652
|
state: [{
|
|
10641
10653
|
kind: "boolean",
|
|
10642
10654
|
field: "on",
|
|
10643
|
-
label: ON,
|
|
10655
|
+
label: ON$1,
|
|
10644
10656
|
whenTrue: t("When {device} turns on", "Quando {device} si accende"),
|
|
10645
10657
|
whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
|
|
10646
10658
|
icon: "power"
|
|
@@ -11806,7 +11818,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
11806
11818
|
state: [{
|
|
11807
11819
|
kind: "boolean",
|
|
11808
11820
|
field: "on",
|
|
11809
|
-
label: ON,
|
|
11821
|
+
label: ON$1,
|
|
11810
11822
|
whenTrue: t("When {device} turns on", "Quando {device} si accende"),
|
|
11811
11823
|
whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
|
|
11812
11824
|
icon: "power"
|
|
@@ -14218,6 +14230,133 @@ var CAMERA_CAP_VOCABULARY = {
|
|
|
14218
14230
|
}
|
|
14219
14231
|
};
|
|
14220
14232
|
/**
|
|
14233
|
+
* The heat pump (D1026): its system modes are phrased for automations, each with the
|
|
14234
|
+
* values the gateway really accepts; the per-circuit parameters need a circuit and are
|
|
14235
|
+
* set from the device page.
|
|
14236
|
+
*/
|
|
14237
|
+
var OFF = {
|
|
14238
|
+
value: "off",
|
|
14239
|
+
label: t("Off", "Off")
|
|
14240
|
+
};
|
|
14241
|
+
var AUTO = {
|
|
14242
|
+
value: "auto",
|
|
14243
|
+
label: t("Auto", "Auto")
|
|
14244
|
+
};
|
|
14245
|
+
var ON = {
|
|
14246
|
+
value: "on",
|
|
14247
|
+
label: t("On", "On")
|
|
14248
|
+
};
|
|
14249
|
+
var MANUAL = {
|
|
14250
|
+
value: "manual",
|
|
14251
|
+
label: t("Manual", "Manuale")
|
|
14252
|
+
};
|
|
14253
|
+
var HOLIDAY_PROGRAMMES = [OFF, ...[
|
|
14254
|
+
1,
|
|
14255
|
+
2,
|
|
14256
|
+
3,
|
|
14257
|
+
4,
|
|
14258
|
+
5,
|
|
14259
|
+
6,
|
|
14260
|
+
7,
|
|
14261
|
+
8
|
|
14262
|
+
].map((n) => ({
|
|
14263
|
+
value: `hm${n}`,
|
|
14264
|
+
label: t(`Programme ${n}`, `Programma ${n}`)
|
|
14265
|
+
}))];
|
|
14266
|
+
var PER_CIRCUIT = "Needs a circuit: set from the device page, not offered to automations";
|
|
14267
|
+
var HEAT_PUMP_CAP_VOCABULARY = {
|
|
14268
|
+
"heat-pump-status": {
|
|
14269
|
+
scope: "device",
|
|
14270
|
+
noun: t("Heat pump", "Pompa di calore")
|
|
14271
|
+
},
|
|
14272
|
+
"heat-pump-control": {
|
|
14273
|
+
scope: "device",
|
|
14274
|
+
noun: t("Heat pump settings", "Impostazioni pompa di calore"),
|
|
14275
|
+
actions: [
|
|
14276
|
+
{
|
|
14277
|
+
id: "heatPump.silent",
|
|
14278
|
+
method: "setSilentMode",
|
|
14279
|
+
label: t("Set silent mode", "Imposta la modalità silenziosa"),
|
|
14280
|
+
phrase: t("Set silent mode of {device} to {mode}", "Imposta la modalità silenziosa di {device} su {mode}"),
|
|
14281
|
+
icon: "volume-x",
|
|
14282
|
+
openArgs: [{
|
|
14283
|
+
key: "mode",
|
|
14284
|
+
label: t("Silent mode", "Modalità silenziosa"),
|
|
14285
|
+
offer: {
|
|
14286
|
+
kind: "enum",
|
|
14287
|
+
values: [
|
|
14288
|
+
OFF,
|
|
14289
|
+
AUTO,
|
|
14290
|
+
ON
|
|
14291
|
+
]
|
|
14292
|
+
}
|
|
14293
|
+
}]
|
|
14294
|
+
},
|
|
14295
|
+
{
|
|
14296
|
+
id: "heatPump.away",
|
|
14297
|
+
method: "setAwayMode",
|
|
14298
|
+
label: t("Set away mode", "Imposta la modalità assente"),
|
|
14299
|
+
phrase: t("Set away mode of {device} to {mode}", "Imposta la modalità assente di {device} su {mode}"),
|
|
14300
|
+
icon: "plane",
|
|
14301
|
+
openArgs: [{
|
|
14302
|
+
key: "mode",
|
|
14303
|
+
label: t("Away mode", "Modalità assente"),
|
|
14304
|
+
offer: {
|
|
14305
|
+
kind: "enum",
|
|
14306
|
+
values: [OFF, ON]
|
|
14307
|
+
}
|
|
14308
|
+
}]
|
|
14309
|
+
},
|
|
14310
|
+
{
|
|
14311
|
+
id: "heatPump.additionalHeater",
|
|
14312
|
+
method: "setAdditionalHeaterMode",
|
|
14313
|
+
label: t("Set additional heater", "Imposta il riscaldatore aggiuntivo"),
|
|
14314
|
+
phrase: t("Set the additional heater of {device} to {mode}", "Imposta il riscaldatore aggiuntivo di {device} su {mode}"),
|
|
14315
|
+
icon: "flame",
|
|
14316
|
+
openArgs: [{
|
|
14317
|
+
key: "mode",
|
|
14318
|
+
label: t("Additional heater", "Riscaldatore aggiuntivo"),
|
|
14319
|
+
offer: {
|
|
14320
|
+
kind: "enum",
|
|
14321
|
+
values: [
|
|
14322
|
+
OFF,
|
|
14323
|
+
MANUAL,
|
|
14324
|
+
AUTO
|
|
14325
|
+
]
|
|
14326
|
+
}
|
|
14327
|
+
}]
|
|
14328
|
+
},
|
|
14329
|
+
{
|
|
14330
|
+
id: "heatPump.holiday",
|
|
14331
|
+
method: "setHolidayMode",
|
|
14332
|
+
label: t("Set holiday mode", "Imposta la modalità vacanza"),
|
|
14333
|
+
phrase: t("Set holiday mode of {device} to {mode}", "Imposta la modalità vacanza di {device} su {mode}"),
|
|
14334
|
+
icon: "tree-palm",
|
|
14335
|
+
openArgs: [{
|
|
14336
|
+
key: "mode",
|
|
14337
|
+
label: t("Holiday programme", "Programma vacanza"),
|
|
14338
|
+
offer: {
|
|
14339
|
+
kind: "enum",
|
|
14340
|
+
values: HOLIDAY_PROGRAMMES
|
|
14341
|
+
}
|
|
14342
|
+
}]
|
|
14343
|
+
}
|
|
14344
|
+
],
|
|
14345
|
+
notOperatorFacing: {
|
|
14346
|
+
setCircuitOperationMode: PER_CIRCUIT,
|
|
14347
|
+
setCircuitHeatCoolMode: PER_CIRCUIT,
|
|
14348
|
+
setCircuitSummerWinter: PER_CIRCUIT,
|
|
14349
|
+
setCircuitComfortSetpoint: PER_CIRCUIT,
|
|
14350
|
+
setCircuitEcoSetpoint: PER_CIRCUIT,
|
|
14351
|
+
setCircuitMaxFlowTemp: PER_CIRCUIT,
|
|
14352
|
+
setDhwOperationMode: PER_CIRCUIT,
|
|
14353
|
+
setDhwTemperatureLevel: PER_CIRCUIT,
|
|
14354
|
+
setDhwChargeDuration: PER_CIRCUIT,
|
|
14355
|
+
startExtraHotWater: PER_CIRCUIT
|
|
14356
|
+
}
|
|
14357
|
+
}
|
|
14358
|
+
};
|
|
14359
|
+
/**
|
|
14221
14360
|
* Things an operator WATCHES: contacts, motion, leaks, smoke, measurements,
|
|
14222
14361
|
* presence, reachability, batteries, doorbells and event sources.
|
|
14223
14362
|
*/
|
|
@@ -14939,6 +15078,7 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
14939
15078
|
...ACTUATOR_CAP_VOCABULARY,
|
|
14940
15079
|
...APPLIANCE_CAP_VOCABULARY,
|
|
14941
15080
|
...CAMERA_CAP_VOCABULARY,
|
|
15081
|
+
...HEAT_PUMP_CAP_VOCABULARY,
|
|
14942
15082
|
...SENSOR_CAP_VOCABULARY,
|
|
14943
15083
|
...SYSTEM_CAP_VOCABULARY
|
|
14944
15084
|
};
|
|
@@ -15276,6 +15416,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
15276
15416
|
"group-active",
|
|
15277
15417
|
"group-commands",
|
|
15278
15418
|
"group-status",
|
|
15419
|
+
"heat-pump-control",
|
|
15420
|
+
"heat-pump-status",
|
|
15279
15421
|
"heating-valve",
|
|
15280
15422
|
"hero-layout",
|
|
15281
15423
|
"humidifier",
|
|
@@ -16141,6 +16283,48 @@ Object.freeze({
|
|
|
16141
16283
|
"valueType": "number"
|
|
16142
16284
|
}
|
|
16143
16285
|
],
|
|
16286
|
+
"heat-pump-status": [
|
|
16287
|
+
{
|
|
16288
|
+
"path": "power.thermalW",
|
|
16289
|
+
"valueType": "number"
|
|
16290
|
+
},
|
|
16291
|
+
{
|
|
16292
|
+
"path": "power.electricalW",
|
|
16293
|
+
"valueType": "number"
|
|
16294
|
+
},
|
|
16295
|
+
{
|
|
16296
|
+
"path": "power.compressorPct",
|
|
16297
|
+
"valueType": "number"
|
|
16298
|
+
},
|
|
16299
|
+
{
|
|
16300
|
+
"path": "temperatures.supply",
|
|
16301
|
+
"valueType": "number"
|
|
16302
|
+
},
|
|
16303
|
+
{
|
|
16304
|
+
"path": "temperatures.return",
|
|
16305
|
+
"valueType": "number"
|
|
16306
|
+
},
|
|
16307
|
+
{
|
|
16308
|
+
"path": "temperatures.outdoor",
|
|
16309
|
+
"valueType": "number"
|
|
16310
|
+
},
|
|
16311
|
+
{
|
|
16312
|
+
"path": "energy.thermalKwh",
|
|
16313
|
+
"valueType": "number"
|
|
16314
|
+
},
|
|
16315
|
+
{
|
|
16316
|
+
"path": "energy.electricalKwh",
|
|
16317
|
+
"valueType": "number"
|
|
16318
|
+
},
|
|
16319
|
+
{
|
|
16320
|
+
"path": "waterPressureBar",
|
|
16321
|
+
"valueType": "number"
|
|
16322
|
+
},
|
|
16323
|
+
{
|
|
16324
|
+
"path": "starts",
|
|
16325
|
+
"valueType": "number"
|
|
16326
|
+
}
|
|
16327
|
+
],
|
|
16144
16328
|
"heating-valve": [{
|
|
16145
16329
|
"path": "position",
|
|
16146
16330
|
"valueType": "number"
|
|
@@ -17281,10 +17465,6 @@ Object.freeze({
|
|
|
17281
17465
|
"uploadDataset": 72e5
|
|
17282
17466
|
}
|
|
17283
17467
|
});
|
|
17284
|
-
object({
|
|
17285
|
-
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
17286
|
-
params: record(string(), union([string(), number$1()])).optional()
|
|
17287
|
-
});
|
|
17288
17468
|
/**
|
|
17289
17469
|
* Promise-based timer helpers — used everywhere the codebase needs to
|
|
17290
17470
|
* wait, back off, or schedule a retry. Before these helpers landed, each
|
|
@@ -17310,7 +17490,7 @@ function sleep(ms) {
|
|
|
17310
17490
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
17311
17491
|
}
|
|
17312
17492
|
//#endregion
|
|
17313
|
-
//#region ../types/dist/composition-
|
|
17493
|
+
//#region ../types/dist/composition-BFJq1Y88.mjs
|
|
17314
17494
|
/**
|
|
17315
17495
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
17316
17496
|
*
|
|
@@ -18415,8 +18595,6 @@ var HelperSpecSchema = discriminatedUnion("kind", [
|
|
|
18415
18595
|
*/
|
|
18416
18596
|
/** The owner of every composed device: the `composer` builtin. */
|
|
18417
18597
|
var COMPOSER_ADDON_ID = "composer";
|
|
18418
|
-
/** A composed device's stableId is this prefix plus the block id. */
|
|
18419
|
-
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
18420
18598
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
18421
18599
|
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
18422
18600
|
/** One field of one capability of one source device. */
|
|
@@ -19188,25 +19366,6 @@ var RequiredAddonUpdateSchema = object({
|
|
|
19188
19366
|
installed: string().nullable()
|
|
19189
19367
|
});
|
|
19190
19368
|
/**
|
|
19191
|
-
* Which integration instance a settings form is for. An addon that serves several instances
|
|
19192
|
-
* (`instanceMode: multiple`) can show a different form per instance — an NVR integration
|
|
19193
|
-
* needs its connection, the default integration needs the addon's own sections.
|
|
19194
|
-
*
|
|
19195
|
-
* - `integrationId` is `null` in the create wizard: nothing exists yet, the operator is
|
|
19196
|
-
* setting up a NEW instance.
|
|
19197
|
-
* - `mode` is the wizard mode of the integration type (`getAvailableTypes`).
|
|
19198
|
-
* - `candidateStableId` is the discovery candidate a wizard was seeded from, if any.
|
|
19199
|
-
*/
|
|
19200
|
-
var IntegrationInstanceRefSchema = object({
|
|
19201
|
-
integrationId: string().nullable(),
|
|
19202
|
-
mode: _enum([
|
|
19203
|
-
"standalone",
|
|
19204
|
-
"account",
|
|
19205
|
-
"broker"
|
|
19206
|
-
]),
|
|
19207
|
-
candidateStableId: string().optional()
|
|
19208
|
-
});
|
|
19209
|
-
/**
|
|
19210
19369
|
* notification-output — canonical, capability-gated notification delivery.
|
|
19211
19370
|
*
|
|
19212
19371
|
* Apprise-derived model (see
|
|
@@ -44623,30 +44782,21 @@ function convertLegacyWhen(half) {
|
|
|
44623
44782
|
* (instants) and state leaves (durations). It replaces the flat trigger list
|
|
44624
44783
|
* plus the separate condition tree; the firing rule is in that file and in
|
|
44625
44784
|
* ADR "one tree".
|
|
44626
|
-
* - **Actions** — `
|
|
44627
|
-
* fragment of §3.2.2. See {@link AutomationActionSchema}
|
|
44628
|
-
* this had to diverge from "verbatim", and why.
|
|
44785
|
+
* - **Actions** — the `wait` and `cap` steps, plus the `{kind:'code'}`
|
|
44786
|
+
* fragment of §3.2.2. See {@link AutomationActionSchema}.
|
|
44629
44787
|
*
|
|
44630
44788
|
* A recipe stored in the old shape (`triggers` + `conditions`) still LOADS:
|
|
44631
44789
|
* {@link AutomationRecipeSchema} (the parse-anywhere schema) converts it on parse. Nothing writes it.
|
|
44632
44790
|
*/
|
|
44633
44791
|
/**
|
|
44634
|
-
* One action step.
|
|
44792
|
+
* One action step: `wait`, or a `cap` call.
|
|
44635
44793
|
*
|
|
44636
|
-
*
|
|
44637
|
-
*
|
|
44638
|
-
*
|
|
44639
|
-
*
|
|
44640
|
-
*
|
|
44641
|
-
*
|
|
44642
|
-
* a literal `z.number().int()`, and the NC runner's own `RunSequencesInput`
|
|
44643
|
-
* documents its subject device as *"for the log tag, never for routing"*. So an
|
|
44644
|
-
* NC action can never target the device that triggered it — which is fine for
|
|
44645
|
-
* the NC (its rules already scope to a device) and fatal for an automation
|
|
44646
|
-
* ("sound the siren of the camera that saw the person"). `deviceId` therefore
|
|
44647
|
-
* also accepts `{ $var }`, resolved from the run's `vars` bag BEFORE the runner
|
|
44648
|
-
* is called. The runner still receives a number and is untouched; the
|
|
44649
|
-
* resolution is the recipe's job, not the runner's.
|
|
44794
|
+
* A cap step's target is who it acts on (D983: `devices`, a `domain`, or a
|
|
44795
|
+
* `{ $var }` resolved from the run's variables); the legacy `deviceId` is still
|
|
44796
|
+
* READ, never written. The step runner (`runSteps`) owns the device-scope
|
|
44797
|
+
* check, the stop-at-first-failure and the variable substitution, once, for
|
|
44798
|
+
* every caller — automations, Actions, and the notification centre, which runs
|
|
44799
|
+
* only Actions (planning#473).
|
|
44650
44800
|
*/
|
|
44651
44801
|
var AutomationWaitStepSchema = object({
|
|
44652
44802
|
kind: literal("wait"),
|
|
@@ -44693,21 +44843,44 @@ var AutomationCapStepBaseSchema = object({
|
|
|
44693
44843
|
*/
|
|
44694
44844
|
argUnits: record(string(), string().min(1)).optional()
|
|
44695
44845
|
});
|
|
44696
|
-
|
|
44846
|
+
/**
|
|
44847
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
44848
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
44849
|
+
* This is the LEAF shape: no condition of its own.
|
|
44850
|
+
*/
|
|
44851
|
+
var LeafActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepBaseSchema.refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
44697
44852
|
message: "a cap step needs a target",
|
|
44698
44853
|
path: ["target"]
|
|
44699
44854
|
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
44700
44855
|
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
44701
44856
|
path: ["actionId"]
|
|
44702
|
-
});
|
|
44857
|
+
})]);
|
|
44703
44858
|
/**
|
|
44704
|
-
* The
|
|
44705
|
-
*
|
|
44859
|
+
* The optional guard of a step (#472): `if` is the ONE `when` tree (D980), read
|
|
44860
|
+
* on the state mirror when the step is reached; `else` runs when it is false.
|
|
44861
|
+
* An `else` holds leaf steps only — the nesting is bounded at ONE level, so a
|
|
44862
|
+
* branch can never grow a tree the trace has to draw.
|
|
44706
44863
|
*/
|
|
44707
|
-
var
|
|
44864
|
+
var stepGuardShape = {
|
|
44865
|
+
if: AutomationWhenSchema.optional(),
|
|
44866
|
+
else: array(LeafActionStepSchema).max(10).optional()
|
|
44867
|
+
};
|
|
44868
|
+
var elseNeedsIf = {
|
|
44869
|
+
message: "an else list needs the condition it is the other side of (if)",
|
|
44870
|
+
path: ["else"]
|
|
44871
|
+
};
|
|
44872
|
+
var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
44873
|
+
var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
44874
|
+
message: "a cap step needs a target",
|
|
44875
|
+
path: ["target"]
|
|
44876
|
+
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
44877
|
+
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
44878
|
+
path: ["actionId"]
|
|
44879
|
+
}).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
44880
|
+
var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
|
|
44708
44881
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
44709
|
-
|
|
44710
|
-
|
|
44882
|
+
GuardedWaitStepSchema,
|
|
44883
|
+
GuardedCapStepSchema,
|
|
44711
44884
|
object({
|
|
44712
44885
|
kind: literal("action"),
|
|
44713
44886
|
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
@@ -45087,7 +45260,7 @@ var StepDeviceTraceSchema = object({
|
|
|
45087
45260
|
outcome: _enum(["ok", "error"]),
|
|
45088
45261
|
message: string().optional()
|
|
45089
45262
|
});
|
|
45090
|
-
var
|
|
45263
|
+
var StepTraceBaseSchema = object({
|
|
45091
45264
|
/** `actions.<i>` */
|
|
45092
45265
|
path: string().min(1),
|
|
45093
45266
|
kind: string().min(1),
|
|
@@ -45106,15 +45279,35 @@ var AutomationStepTraceSchema = object({
|
|
|
45106
45279
|
* is shown as {@link REDACTED_ARG}. Absent on traces written before it existed.
|
|
45107
45280
|
*/
|
|
45108
45281
|
args: record(string(), TraceValueSchema).optional(),
|
|
45109
|
-
/**
|
|
45282
|
+
/**
|
|
45283
|
+
* The device values a templated arg printed as `—`, one `ref: reason` each
|
|
45284
|
+
* (D1021): why a sentence says "—" where a number was expected. Bounded.
|
|
45285
|
+
*/
|
|
45286
|
+
templates: array(string()).max(20).optional(),
|
|
45287
|
+
/**
|
|
45288
|
+
* What the step's own `if` read when the step was reached (#472): `true` the
|
|
45289
|
+
* step ran, `false` its `else` ran (or nothing did), `unknown` a state leaf
|
|
45290
|
+
* could not be read, so NEITHER side ran. Absent on an unguarded step.
|
|
45291
|
+
*/
|
|
45292
|
+
condition: _enum([
|
|
45293
|
+
"true",
|
|
45294
|
+
"false",
|
|
45295
|
+
"unknown"
|
|
45296
|
+
]).optional(),
|
|
45297
|
+
/** Why the condition read what it read, in the evaluator's own words. */
|
|
45298
|
+
conditionReason: string().optional(),
|
|
45299
|
+
/** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. */
|
|
45110
45300
|
outcome: _enum([
|
|
45111
45301
|
"ok",
|
|
45112
45302
|
"error",
|
|
45113
45303
|
"not-run",
|
|
45114
|
-
"empty"
|
|
45304
|
+
"empty",
|
|
45305
|
+
"skipped"
|
|
45115
45306
|
]),
|
|
45116
45307
|
message: string().optional()
|
|
45117
45308
|
});
|
|
45309
|
+
/** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
|
|
45310
|
+
var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: array(StepTraceBaseSchema).optional() });
|
|
45118
45311
|
var AutomationRunTraceSchema = object({
|
|
45119
45312
|
runId: string().min(1),
|
|
45120
45313
|
startedAt: number$1(),
|
|
@@ -45221,6 +45414,8 @@ var ActionStatusSchema = object({
|
|
|
45221
45414
|
/** The latest run's failure; null on success or when it never ran. */
|
|
45222
45415
|
lastError: string().nullable()
|
|
45223
45416
|
});
|
|
45417
|
+
/** The throttle window of an action, in seconds; absent or 0 = no throttle. */
|
|
45418
|
+
var ActionMinDelaySecSchema = number$1().int().min(0).max(86400);
|
|
45224
45419
|
var ActionEntrySchema = object({
|
|
45225
45420
|
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
45226
45421
|
id: string().min(3),
|
|
@@ -45233,6 +45428,14 @@ var ActionEntrySchema = object({
|
|
|
45233
45428
|
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
45234
45429
|
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
45235
45430
|
variables: array(ActionVariableSchema).max(20).optional(),
|
|
45431
|
+
/**
|
|
45432
|
+
* Internal only: the least time between two run STARTS. A run that begins
|
|
45433
|
+
* inside the window is skipped (`skipped-cooldown`), traced and logged. It
|
|
45434
|
+
* is an actuator's budget — "how often may this gate physically open" —
|
|
45435
|
+
* not a notification cooldown, and it is shared by every caller of the
|
|
45436
|
+
* action (two rules, a button, an automation).
|
|
45437
|
+
*/
|
|
45438
|
+
minDelaySec: ActionMinDelaySecSchema.optional(),
|
|
45236
45439
|
status: ActionStatusSchema
|
|
45237
45440
|
}).superRefine((entry, ctx) => {
|
|
45238
45441
|
if (entry.source === "internal") {
|
|
@@ -45263,7 +45466,8 @@ var ActionEntrySchema = object({
|
|
|
45263
45466
|
var ActionInputSchema = object({
|
|
45264
45467
|
name: string().min(1).max(120),
|
|
45265
45468
|
steps: array(ActionStepSchema).min(1).max(50),
|
|
45266
|
-
variables: array(ActionVariableSchema).max(20).optional()
|
|
45469
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
45470
|
+
minDelaySec: ActionMinDelaySecSchema.optional()
|
|
45267
45471
|
});
|
|
45268
45472
|
/** Who started a run. Absent = the operator pressed it. */
|
|
45269
45473
|
var ActionRunOriginSchema = object({
|
|
@@ -45290,6 +45494,7 @@ _enum([
|
|
|
45290
45494
|
"invalid-variables",
|
|
45291
45495
|
"invalid-steps",
|
|
45292
45496
|
"not-linked",
|
|
45497
|
+
"template-scope",
|
|
45293
45498
|
"busy"
|
|
45294
45499
|
]);
|
|
45295
45500
|
object({
|
|
@@ -45614,10 +45819,6 @@ method(object({
|
|
|
45614
45819
|
scope: ScopedSettingsScopeSchema,
|
|
45615
45820
|
nodeId: string().optional()
|
|
45616
45821
|
}), record(string(), unknown()).nullable()), method(object({
|
|
45617
|
-
addonId: string(),
|
|
45618
|
-
nodeId: string().optional(),
|
|
45619
|
-
instance: IntegrationInstanceRefSchema
|
|
45620
|
-
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
45621
45822
|
addonId: string(),
|
|
45622
45823
|
nodeId: string().optional()
|
|
45623
45824
|
}), object({ keys: array(string()) }).nullable(), { auth: "admin" }), method(object({
|
|
@@ -49917,7 +50118,7 @@ DeviceType.MediaPlayer, method(deviceOnly, _void(), {
|
|
|
49917
50118
|
kind: "mutation",
|
|
49918
50119
|
auth: "protected"
|
|
49919
50120
|
});
|
|
49920
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
|
|
50121
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
|
|
49921
50122
|
var NUMBER = {
|
|
49922
50123
|
kind: "fixed",
|
|
49923
50124
|
result: ["number"]
|
|
@@ -51789,6 +51990,43 @@ method(InstancePinSchema, DeviceExportStatusSchema), method(_void(), array(Expor
|
|
|
51789
51990
|
auth: "admin"
|
|
51790
51991
|
});
|
|
51791
51992
|
var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
|
|
51993
|
+
var DeviceTemplateSchema = string().min(1).max(4096);
|
|
51994
|
+
var DeviceTemplateRefusalSchema = object({
|
|
51995
|
+
reason: _enum([
|
|
51996
|
+
"too-long",
|
|
51997
|
+
"syntax",
|
|
51998
|
+
"forbidden-syntax",
|
|
51999
|
+
"forbidden-member",
|
|
52000
|
+
"unknown-filter",
|
|
52001
|
+
"ambiguous-field",
|
|
52002
|
+
"busy",
|
|
52003
|
+
"budget-exceeded",
|
|
52004
|
+
"timeout",
|
|
52005
|
+
"output-too-large",
|
|
52006
|
+
"render-failed",
|
|
52007
|
+
"out-of-scope",
|
|
52008
|
+
"unavailable"
|
|
52009
|
+
]),
|
|
52010
|
+
message: string()
|
|
52011
|
+
});
|
|
52012
|
+
var DeviceTemplateTraceEntrySchema = object({
|
|
52013
|
+
ref: string(),
|
|
52014
|
+
reason: _enum([
|
|
52015
|
+
"unknown-alias",
|
|
52016
|
+
"unknown-field",
|
|
52017
|
+
"no-field",
|
|
52018
|
+
"unavailable"
|
|
52019
|
+
])
|
|
52020
|
+
});
|
|
52021
|
+
var DeviceTemplateRenderSchema = discriminatedUnion("ok", [object({
|
|
52022
|
+
ok: literal(true),
|
|
52023
|
+
text: string(),
|
|
52024
|
+
trace: array(DeviceTemplateTraceEntrySchema)
|
|
52025
|
+
}), object({
|
|
52026
|
+
ok: literal(false),
|
|
52027
|
+
refusal: DeviceTemplateRefusalSchema,
|
|
52028
|
+
trace: array(DeviceTemplateTraceEntrySchema)
|
|
52029
|
+
})]);
|
|
51792
52030
|
/**
|
|
51793
52031
|
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
51794
52032
|
*
|
|
@@ -52503,7 +52741,13 @@ method(object({
|
|
|
52503
52741
|
auth: "admin"
|
|
52504
52742
|
}), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), DeviceMetaSchema.nullable()), method(object({
|
|
52505
52743
|
deviceId: number$1(),
|
|
52506
|
-
name: string()
|
|
52744
|
+
name: string(),
|
|
52745
|
+
/**
|
|
52746
|
+
* Absent or true: an operator rename, which stamps `userNamed`.
|
|
52747
|
+
* False: the system copying a block name onto the device. That write
|
|
52748
|
+
* must not look like the operator's, or the next reconcile freezes it.
|
|
52749
|
+
*/
|
|
52750
|
+
stampUserNamed: boolean().optional()
|
|
52507
52751
|
}), _void(), {
|
|
52508
52752
|
kind: "mutation",
|
|
52509
52753
|
auth: "admin"
|
|
@@ -52527,6 +52771,22 @@ method(object({
|
|
|
52527
52771
|
kind: "mutation",
|
|
52528
52772
|
auth: "admin"
|
|
52529
52773
|
}), method(object({
|
|
52774
|
+
templates: array(DeviceTemplateSchema).max(64),
|
|
52775
|
+
allowedDeviceIds: array(number$1().int()).optional()
|
|
52776
|
+
}), object({ results: array(DeviceTemplateRenderSchema) }), { auth: "admin" }), method(object({
|
|
52777
|
+
templates: array(string()).max(64),
|
|
52778
|
+
allowedDeviceIds: array(number$1().int()).optional()
|
|
52779
|
+
}), object({ results: array(discriminatedUnion("ok", [object({
|
|
52780
|
+
ok: literal(true),
|
|
52781
|
+
aliases: array(object({
|
|
52782
|
+
alias: string(),
|
|
52783
|
+
deviceId: number$1().int().nullable(),
|
|
52784
|
+
allowed: boolean()
|
|
52785
|
+
}))
|
|
52786
|
+
}), object({
|
|
52787
|
+
ok: literal(false),
|
|
52788
|
+
refusal: DeviceTemplateRefusalSchema
|
|
52789
|
+
})])) }), { auth: "admin" }), method(object({
|
|
52530
52790
|
deviceId: number$1(),
|
|
52531
52791
|
location: string().nullable()
|
|
52532
52792
|
}), _void(), {
|
|
@@ -55536,6 +55796,207 @@ var GroupStatusSchema = object({
|
|
|
55536
55796
|
}))
|
|
55537
55797
|
});
|
|
55538
55798
|
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
55799
|
+
/**
|
|
55800
|
+
* Heat pump settable surface (D1026): one typed method per parameter, never a
|
|
55801
|
+
* generic `set(key, value)`. The values a mode takes and the limits of a number
|
|
55802
|
+
* are the ones `heat-pump-status` carries (`allowed`, `min`, `max`, `step`),
|
|
55803
|
+
* read from the gateway; a provider refuses a value outside them. The state is
|
|
55804
|
+
* `heat-pump-status` — this cap has none.
|
|
55805
|
+
*/
|
|
55806
|
+
var deviceId = number$1().int().nonnegative();
|
|
55807
|
+
var circuitId = string().min(1);
|
|
55808
|
+
var mode = string().min(1);
|
|
55809
|
+
var temp = number$1().finite();
|
|
55810
|
+
DeviceType.HeatPump, method(object({
|
|
55811
|
+
deviceId,
|
|
55812
|
+
mode
|
|
55813
|
+
}), _void(), {
|
|
55814
|
+
kind: "mutation",
|
|
55815
|
+
auth: "protected"
|
|
55816
|
+
}), method(object({
|
|
55817
|
+
deviceId,
|
|
55818
|
+
mode
|
|
55819
|
+
}), _void(), {
|
|
55820
|
+
kind: "mutation",
|
|
55821
|
+
auth: "protected"
|
|
55822
|
+
}), method(object({
|
|
55823
|
+
deviceId,
|
|
55824
|
+
mode
|
|
55825
|
+
}), _void(), {
|
|
55826
|
+
kind: "mutation",
|
|
55827
|
+
auth: "protected"
|
|
55828
|
+
}), method(object({
|
|
55829
|
+
deviceId,
|
|
55830
|
+
mode
|
|
55831
|
+
}), _void(), {
|
|
55832
|
+
kind: "mutation",
|
|
55833
|
+
auth: "protected"
|
|
55834
|
+
}), method(object({
|
|
55835
|
+
deviceId,
|
|
55836
|
+
circuitId,
|
|
55837
|
+
mode
|
|
55838
|
+
}), _void(), {
|
|
55839
|
+
kind: "mutation",
|
|
55840
|
+
auth: "protected"
|
|
55841
|
+
}), method(object({
|
|
55842
|
+
deviceId,
|
|
55843
|
+
circuitId,
|
|
55844
|
+
mode
|
|
55845
|
+
}), _void(), {
|
|
55846
|
+
kind: "mutation",
|
|
55847
|
+
auth: "protected"
|
|
55848
|
+
}), method(object({
|
|
55849
|
+
deviceId,
|
|
55850
|
+
circuitId,
|
|
55851
|
+
mode
|
|
55852
|
+
}), _void(), {
|
|
55853
|
+
kind: "mutation",
|
|
55854
|
+
auth: "protected"
|
|
55855
|
+
}), method(object({
|
|
55856
|
+
deviceId,
|
|
55857
|
+
circuitId,
|
|
55858
|
+
temp
|
|
55859
|
+
}), _void(), {
|
|
55860
|
+
kind: "mutation",
|
|
55861
|
+
auth: "protected"
|
|
55862
|
+
}), method(object({
|
|
55863
|
+
deviceId,
|
|
55864
|
+
circuitId,
|
|
55865
|
+
temp
|
|
55866
|
+
}), _void(), {
|
|
55867
|
+
kind: "mutation",
|
|
55868
|
+
auth: "protected"
|
|
55869
|
+
}), method(object({
|
|
55870
|
+
deviceId,
|
|
55871
|
+
circuitId,
|
|
55872
|
+
temp
|
|
55873
|
+
}), _void(), {
|
|
55874
|
+
kind: "mutation",
|
|
55875
|
+
auth: "protected"
|
|
55876
|
+
}), method(object({
|
|
55877
|
+
deviceId,
|
|
55878
|
+
circuitId,
|
|
55879
|
+
mode
|
|
55880
|
+
}), _void(), {
|
|
55881
|
+
kind: "mutation",
|
|
55882
|
+
auth: "protected"
|
|
55883
|
+
}), method(object({
|
|
55884
|
+
deviceId,
|
|
55885
|
+
circuitId,
|
|
55886
|
+
level: mode
|
|
55887
|
+
}), _void(), {
|
|
55888
|
+
kind: "mutation",
|
|
55889
|
+
auth: "protected"
|
|
55890
|
+
}), method(object({
|
|
55891
|
+
deviceId,
|
|
55892
|
+
circuitId,
|
|
55893
|
+
minutes: number$1().int().positive()
|
|
55894
|
+
}), _void(), {
|
|
55895
|
+
kind: "mutation",
|
|
55896
|
+
auth: "protected"
|
|
55897
|
+
}), method(object({
|
|
55898
|
+
deviceId,
|
|
55899
|
+
circuitId
|
|
55900
|
+
}), _void(), {
|
|
55901
|
+
kind: "mutation",
|
|
55902
|
+
auth: "protected"
|
|
55903
|
+
});
|
|
55904
|
+
var HeatPumpCircuitKindSchema = _enum([
|
|
55905
|
+
"heating",
|
|
55906
|
+
"dhw",
|
|
55907
|
+
"cooling",
|
|
55908
|
+
"solar"
|
|
55909
|
+
]);
|
|
55910
|
+
/** A setting that takes one of a list of values the gateway named. */
|
|
55911
|
+
var HeatPumpOptionSettingSchema = object({
|
|
55912
|
+
/** The active value. Null when the gateway did not answer. */
|
|
55913
|
+
value: string().nullable(),
|
|
55914
|
+
/** Values the gateway accepts, in its order. Empty = read-only here. */
|
|
55915
|
+
allowed: array(string())
|
|
55916
|
+
});
|
|
55917
|
+
/** A numeric setting with the limits the gateway named. */
|
|
55918
|
+
var HeatPumpRangeSettingSchema = object({
|
|
55919
|
+
value: number$1().nullable(),
|
|
55920
|
+
min: number$1().nullable(),
|
|
55921
|
+
max: number$1().nullable(),
|
|
55922
|
+
step: number$1().nullable()
|
|
55923
|
+
});
|
|
55924
|
+
var HeatPumpCircuitSchema = object({
|
|
55925
|
+
/** Gateway id of the circuit (`hc1`, `dhw1`): the key of the series. */
|
|
55926
|
+
id: string().min(1),
|
|
55927
|
+
kind: HeatPumpCircuitKindSchema,
|
|
55928
|
+
label: string(),
|
|
55929
|
+
icon: IconKeySchema,
|
|
55930
|
+
/** Measured temperature of the circuit (room, tank, collector). */
|
|
55931
|
+
currentTemp: number$1().nullable().meta(readingMeta("temperature")),
|
|
55932
|
+
/** The setpoint in force now. */
|
|
55933
|
+
targetTemp: number$1().nullable().meta(readingMeta("temperature")),
|
|
55934
|
+
/** The operation mode in force (mirror of `operationMode.value`, for the series). */
|
|
55935
|
+
mode: string().nullable(),
|
|
55936
|
+
/** Whether the circuit is calling for heat right now. Null = unknown. */
|
|
55937
|
+
active: boolean().nullable(),
|
|
55938
|
+
operationMode: HeatPumpOptionSettingSchema.nullable(),
|
|
55939
|
+
/** Heating circuits: heat / cool / heatCool. */
|
|
55940
|
+
heatCoolMode: HeatPumpOptionSettingSchema.nullable(),
|
|
55941
|
+
/** Heating circuits: summer / winter changeover. */
|
|
55942
|
+
summerWinter: HeatPumpOptionSettingSchema.nullable(),
|
|
55943
|
+
comfortSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
55944
|
+
ecoSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
55945
|
+
maxFlowTemp: HeatPumpRangeSettingSchema.nullable(),
|
|
55946
|
+
/** Hot water: the temperature level (off / low / high / eco). */
|
|
55947
|
+
temperatureLevel: HeatPumpOptionSettingSchema.nullable(),
|
|
55948
|
+
/** Hot water: how long a charge lasts, minutes. */
|
|
55949
|
+
chargeDuration: HeatPumpRangeSettingSchema.nullable(),
|
|
55950
|
+
/** Hot water: whether an extra-hot-water charge is running. Null = no such surface. */
|
|
55951
|
+
extraHotWater: boolean().nullable()
|
|
55952
|
+
});
|
|
55953
|
+
/** The independent system modes, each with its real values. A null mode = the gateway has none. */
|
|
55954
|
+
var HeatPumpSystemSchema = object({
|
|
55955
|
+
silent: HeatPumpOptionSettingSchema.nullable(),
|
|
55956
|
+
away: HeatPumpOptionSettingSchema.nullable(),
|
|
55957
|
+
additionalHeater: HeatPumpOptionSettingSchema.nullable(),
|
|
55958
|
+
holiday: HeatPumpOptionSettingSchema.nullable()
|
|
55959
|
+
});
|
|
55960
|
+
var HeatPumpPowerSchema = object({
|
|
55961
|
+
thermalW: number$1().nullable().meta(readingMeta("power")),
|
|
55962
|
+
electricalW: number$1().nullable().meta(readingMeta("power")),
|
|
55963
|
+
/** Compressor modulation, percent. */
|
|
55964
|
+
compressorPct: number$1().nullable().meta(readingMeta("percentage"))
|
|
55965
|
+
});
|
|
55966
|
+
var HeatPumpTemperaturesSchema = object({
|
|
55967
|
+
supply: number$1().nullable().meta(readingMeta("temperature")),
|
|
55968
|
+
return: number$1().nullable().meta(readingMeta("temperature")),
|
|
55969
|
+
outdoor: number$1().nullable().meta(readingMeta("temperature"))
|
|
55970
|
+
});
|
|
55971
|
+
/** Lifetime meters, kWh: the energy of a period is computed at read time from their difference (D944). */
|
|
55972
|
+
var HeatPumpEnergySchema = object({
|
|
55973
|
+
thermalKwh: number$1().nullable().meta(readingMeta("energy")),
|
|
55974
|
+
electricalKwh: number$1().nullable().meta(readingMeta("energy"))
|
|
55975
|
+
});
|
|
55976
|
+
var HeatPumpStatusSchema = object({
|
|
55977
|
+
circuits: array(HeatPumpCircuitSchema),
|
|
55978
|
+
system: HeatPumpSystemSchema,
|
|
55979
|
+
power: HeatPumpPowerSchema,
|
|
55980
|
+
temperatures: HeatPumpTemperaturesSchema,
|
|
55981
|
+
energy: HeatPumpEnergySchema,
|
|
55982
|
+
/** Water pressure of the heating loop, bar. */
|
|
55983
|
+
waterPressureBar: number$1().nullable(),
|
|
55984
|
+
/** Compressor starts since commissioning. */
|
|
55985
|
+
starts: number$1().nullable(),
|
|
55986
|
+
/** Ms epoch when the slice was last read from the gateway. */
|
|
55987
|
+
lastFetchedAt: number$1()
|
|
55988
|
+
});
|
|
55989
|
+
/**
|
|
55990
|
+
* The instantaneous COP: thermal over electrical power. Null unless BOTH powers
|
|
55991
|
+
* are known and the unit draws power — a missing reading is never a 0 or a
|
|
55992
|
+
* division by it (D393). Computed on every read; there is no stored value.
|
|
55993
|
+
*/
|
|
55994
|
+
function heatPumpInstantCop(power) {
|
|
55995
|
+
const { thermalW, electricalW } = power;
|
|
55996
|
+
if (thermalW === null || electricalW === null || electricalW <= 0) return null;
|
|
55997
|
+
return thermalW / electricalW;
|
|
55998
|
+
}
|
|
55999
|
+
DeviceType.HeatPump;
|
|
55539
56000
|
var HeatingValveStatusSchema = object({
|
|
55540
56001
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
55541
56002
|
position: number$1().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -55693,6 +56154,7 @@ var HeroSceneSchema = object({
|
|
|
55693
56154
|
"ac",
|
|
55694
56155
|
"thermostat",
|
|
55695
56156
|
"heater",
|
|
56157
|
+
"heat-pump",
|
|
55696
56158
|
"fan",
|
|
55697
56159
|
"washer",
|
|
55698
56160
|
"dryer",
|
|
@@ -55735,7 +56197,7 @@ var HeroSceneSchema = object({
|
|
|
55735
56197
|
/** 0..1: volume, cover position, cycle progress. */
|
|
55736
56198
|
level: number$1().min(0).max(1).nullable()
|
|
55737
56199
|
});
|
|
55738
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
56200
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
55739
56201
|
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
55740
56202
|
/** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
|
|
55741
56203
|
var HeroTextSchema = object({
|
|
@@ -55743,6 +56205,7 @@ var HeroTextSchema = object({
|
|
|
55743
56205
|
it: string()
|
|
55744
56206
|
});
|
|
55745
56207
|
var HeroRowIdSchema = _enum([
|
|
56208
|
+
"progress",
|
|
55746
56209
|
"run-for",
|
|
55747
56210
|
"cycle",
|
|
55748
56211
|
"program",
|
|
@@ -55757,6 +56220,7 @@ var HeroRowIdSchema = _enum([
|
|
|
55757
56220
|
"alarm",
|
|
55758
56221
|
"fan",
|
|
55759
56222
|
"vacuum",
|
|
56223
|
+
"vacuum-suction",
|
|
55760
56224
|
"mower",
|
|
55761
56225
|
"feeder",
|
|
55762
56226
|
"fountain",
|
|
@@ -55775,7 +56239,10 @@ var HeroRowIdSchema = _enum([
|
|
|
55775
56239
|
"climate-fan",
|
|
55776
56240
|
"setpoint",
|
|
55777
56241
|
"channel",
|
|
55778
|
-
"control"
|
|
56242
|
+
"control",
|
|
56243
|
+
"circuit",
|
|
56244
|
+
"heat-pump-power",
|
|
56245
|
+
"system-mode"
|
|
55779
56246
|
]);
|
|
55780
56247
|
var HeroArgValueSchema = lazy(() => union([
|
|
55781
56248
|
string(),
|
|
@@ -55840,16 +56307,32 @@ var HeroControlSchema = discriminatedUnion("kind", [
|
|
|
55840
56307
|
label: HeroTextSchema,
|
|
55841
56308
|
current: string().nullable(),
|
|
55842
56309
|
options: array(string()),
|
|
56310
|
+
/** A readable label per option value; an option without one is drawn as its raw value. */
|
|
56311
|
+
optionLabels: record(string(), HeroTextSchema).optional(),
|
|
55843
56312
|
call: HeroCallSchema,
|
|
55844
56313
|
valueArg: string()
|
|
55845
56314
|
})
|
|
55846
56315
|
]);
|
|
56316
|
+
/** Declared by its interface: a `z.infer` of one more icon union pushes the cap's inferred type past what the compiler can print. */
|
|
56317
|
+
var HeroPillSchema = object({
|
|
56318
|
+
icon: IconKeySchema.nullable(),
|
|
56319
|
+
text: HeroTextSchema,
|
|
56320
|
+
tone: HeroToneSchema
|
|
56321
|
+
});
|
|
55847
56322
|
var HeroRowSchema = object({
|
|
55848
56323
|
id: HeroRowIdSchema,
|
|
56324
|
+
/** The row's own name when the kind's label would not tell rows of one kind apart (a circuit's label). */
|
|
56325
|
+
label: HeroTextSchema.optional(),
|
|
56326
|
+
/** A group header drawn above the row when it differs from the previous row's ("System"). */
|
|
56327
|
+
group: HeroTextSchema.optional(),
|
|
56328
|
+
/** Values drawn as pills across the row (a heat pump's powers). */
|
|
56329
|
+
pills: array(HeroPillSchema).optional(),
|
|
55849
56330
|
icon: IconKeySchema,
|
|
55850
56331
|
/** The row's status, in words. `null` = nothing to say. */
|
|
55851
56332
|
status: HeroTextSchema.nullable(),
|
|
55852
|
-
controls: array(HeroControlSchema)
|
|
56333
|
+
controls: array(HeroControlSchema),
|
|
56334
|
+
/** A bar under the row's label, 0..1; `null` / absent = no bar. */
|
|
56335
|
+
progress: number$1().min(0).max(1).nullable().optional()
|
|
55853
56336
|
});
|
|
55854
56337
|
var HeroDetailSchema = object({
|
|
55855
56338
|
label: HeroTextSchema,
|
|
@@ -55857,7 +56340,11 @@ var HeroDetailSchema = object({
|
|
|
55857
56340
|
unit: string().nullable()
|
|
55858
56341
|
});
|
|
55859
56342
|
var HeroBadgeSchema = object({
|
|
55860
|
-
id: _enum([
|
|
56343
|
+
id: _enum([
|
|
56344
|
+
"battery",
|
|
56345
|
+
"network-link",
|
|
56346
|
+
"integration"
|
|
56347
|
+
]),
|
|
55861
56348
|
icon: IconKeySchema,
|
|
55862
56349
|
tone: HeroToneSchema,
|
|
55863
56350
|
/** Percent for a battery, link quality for a link; `null` = not known. */
|
|
@@ -55905,7 +56392,13 @@ var HeroTimedRunSlotSchema = object({
|
|
|
55905
56392
|
activeUntil: number$1().nullable(),
|
|
55906
56393
|
quickRun: TimedRunQuickRunSchema,
|
|
55907
56394
|
run: HeroActionSchema,
|
|
55908
|
-
cancel: HeroActionSchema
|
|
56395
|
+
cancel: HeroActionSchema,
|
|
56396
|
+
/**
|
|
56397
|
+
* Whole units left (the limit's unit, ceil). `null` while nothing is armed.
|
|
56398
|
+
* A number, not words: the row formats it, and a text here would not fit the
|
|
56399
|
+
* hero-layout declaration.
|
|
56400
|
+
*/
|
|
56401
|
+
remaining: number$1().nullable()
|
|
55909
56402
|
});
|
|
55910
56403
|
var HeroPowerSupplySlotSchema = object({
|
|
55911
56404
|
/** The plug's state; `null` = unknown, never off. */
|
|
@@ -55957,7 +56450,12 @@ var HeroFactSchema = object({
|
|
|
55957
56450
|
var HeroSideTileSchema = object({
|
|
55958
56451
|
label: HeroTextSchema,
|
|
55959
56452
|
value: HeroTextSchema,
|
|
55960
|
-
tone: HeroToneSchema.optional()
|
|
56453
|
+
tone: HeroToneSchema.optional(),
|
|
56454
|
+
/**
|
|
56455
|
+
* Epoch ms when the tile reads a clock time (an appliance's end): a client prints it in
|
|
56456
|
+
* the viewer's own time zone; `value` is the fallback for one that cannot.
|
|
56457
|
+
*/
|
|
56458
|
+
at: number$1().optional()
|
|
55961
56459
|
});
|
|
55962
56460
|
var HeroSideTilesSchema = object({
|
|
55963
56461
|
left: array(HeroSideTileSchema).max(2),
|
|
@@ -55993,8 +56491,12 @@ var HeroModelSchema = object({
|
|
|
55993
56491
|
sideTiles: HeroSideTilesSchema,
|
|
55994
56492
|
/** The status line under the main icon. */
|
|
55995
56493
|
title: HeroTextSchema,
|
|
56494
|
+
/** The scene's top line when it says more than `title`; absent = draw the title. */
|
|
56495
|
+
caption: HeroTextSchema.optional(),
|
|
55996
56496
|
badges: array(HeroBadgeSchema),
|
|
55997
56497
|
remote: HeroRemoteSlotSchema.nullable(),
|
|
56498
|
+
/** The foot button that opens the device's history: "History", "Cycles", "Meals", "Access". */
|
|
56499
|
+
historyLabel: HeroTextSchema,
|
|
55998
56500
|
consumables: HeroConsumablesSlotSchema.nullable(),
|
|
55999
56501
|
consumption: HeroConsumptionSlotSchema.nullable(),
|
|
56000
56502
|
ownPower: HeroOwnPowerSlotSchema.nullable(),
|
|
@@ -56015,18 +56517,31 @@ var HeroModelSchema = object({
|
|
|
56015
56517
|
* 4. a trailing fact (power, else battery, else consumables).
|
|
56016
56518
|
*
|
|
56017
56519
|
* Selection rules, all taken from the model:
|
|
56018
|
-
* -
|
|
56520
|
+
* - the primary control is the device's own power; else the FIRST control of
|
|
56019
56521
|
* the FIRST row that has any (a later row's control is never promoted). When
|
|
56020
56522
|
* the model lists that part in `gated`, the row has no inline control: the
|
|
56021
56523
|
* projection never falls through to another control the caller could use.
|
|
56524
|
+
* - a timed run, when the model carries the slot, sits beside that primary:
|
|
56525
|
+
* Run while idle, Stop while armed. Gating the slot hides the control.
|
|
56022
56526
|
* - the status line is the head (what plays, else the state) plus at most
|
|
56023
|
-
* {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded
|
|
56527
|
+
* {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded, then the
|
|
56528
|
+
* time left on an armed timed run;
|
|
56024
56529
|
* - the trailing fact is the first of power, battery, consumables.
|
|
56025
56530
|
*
|
|
56026
56531
|
* `projectDeviceRow` is pure and computes nothing: it selects from a
|
|
56027
56532
|
* {@link HeroModel}. A row that needed a value the hero lacks would mean the
|
|
56028
56533
|
* model is missing it, so the fix goes in the model.
|
|
56029
56534
|
*/
|
|
56535
|
+
/**
|
|
56536
|
+
* The row's timed-run control. `id` is `timed-run.run` while idle and
|
|
56537
|
+
* `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
|
|
56538
|
+
* a Run press starts.
|
|
56539
|
+
*/
|
|
56540
|
+
var HeroRowTimedRunSchema = object({
|
|
56541
|
+
id: _enum(["timed-run.run", "timed-run.cancel"]),
|
|
56542
|
+
duration: number$1(),
|
|
56543
|
+
unit: _enum(["min", "s"])
|
|
56544
|
+
});
|
|
56030
56545
|
var HeroRowModelSchema = object({
|
|
56031
56546
|
deviceId: number$1().int(),
|
|
56032
56547
|
name: string(),
|
|
@@ -56039,6 +56554,11 @@ var HeroRowModelSchema = object({
|
|
|
56039
56554
|
statusLine: array(HeroTextSchema),
|
|
56040
56555
|
/** `null` = the type has no inline control, or the caller may not act on it. */
|
|
56041
56556
|
primary: HeroControlSchema.nullable(),
|
|
56557
|
+
/**
|
|
56558
|
+
* Beside `primary` when the device offers a timed run: Run while idle, Stop
|
|
56559
|
+
* while armed. `null` when there is no slot, or the caller may not act.
|
|
56560
|
+
*/
|
|
56561
|
+
timedRun: HeroRowTimedRunSchema.nullable(),
|
|
56042
56562
|
trailing: HeroFactSchema.nullable()
|
|
56043
56563
|
});
|
|
56044
56564
|
/**
|
|
@@ -56318,6 +56838,12 @@ var IntegrationWithStateSchema = object({
|
|
|
56318
56838
|
name: string(),
|
|
56319
56839
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
56320
56840
|
enabled: boolean(),
|
|
56841
|
+
/**
|
|
56842
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
56843
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
56844
|
+
* must not draw it as on or off (D315).
|
|
56845
|
+
*/
|
|
56846
|
+
switchUnknown: literal(true).optional(),
|
|
56321
56847
|
info: record(string(), unknown()).readonly(),
|
|
56322
56848
|
/** The discovery candidate this integration was set up from (D984). */
|
|
56323
56849
|
originStableId: string().optional(),
|
|
@@ -56331,6 +56857,12 @@ var IntegrationLiteSchema = object({
|
|
|
56331
56857
|
name: string(),
|
|
56332
56858
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
56333
56859
|
enabled: boolean(),
|
|
56860
|
+
/**
|
|
56861
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
56862
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
56863
|
+
* must not draw it as on or off (D315).
|
|
56864
|
+
*/
|
|
56865
|
+
switchUnknown: literal(true).optional(),
|
|
56334
56866
|
info: record(string(), unknown()).readonly(),
|
|
56335
56867
|
/** The discovery candidate this integration was set up from (D984). */
|
|
56336
56868
|
originStableId: string().optional(),
|
|
@@ -56429,9 +56961,9 @@ var UpdateIntegrationInputSchema = object({
|
|
|
56429
56961
|
id: string(),
|
|
56430
56962
|
name: string().optional(),
|
|
56431
56963
|
/**
|
|
56432
|
-
*
|
|
56433
|
-
*
|
|
56434
|
-
*
|
|
56964
|
+
* Honoured ONLY for a fixed builtin (`info.fixed`), whose switch is the hub's own registry flag
|
|
56965
|
+
* and works while its addon is down. Any other row is refused (a typed `BAD_REQUEST`): its
|
|
56966
|
+
* switch is `integration-instances.setInstanceEnabled`.
|
|
56435
56967
|
*/
|
|
56436
56968
|
enabled: boolean().optional(),
|
|
56437
56969
|
info: record(string(), unknown()).optional()
|
|
@@ -56465,6 +56997,12 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
56465
56997
|
* the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
|
|
56466
56998
|
* or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
|
|
56467
56999
|
* clears it.
|
|
57000
|
+
*
|
|
57001
|
+
* Who may call (epic #440): every method but `describe` and `instanceFormSchema` is open to any
|
|
57002
|
+
* session (`caller: 'scoped'`) and default-denies. An admin passes everywhere. A non-admin passes
|
|
57003
|
+
* only on a call pinned to one addon whose `describe().userScoped` is true, and that provider
|
|
57004
|
+
* filters every row on the `caller` the router injected (a notification target is somebody's
|
|
57005
|
+
* phone: a user sees and changes only their own). An addon that says nothing keeps the admin door.
|
|
56468
57006
|
*/
|
|
56469
57007
|
var ConfigSchemaPassthrough$2 = custom();
|
|
56470
57008
|
var IntegrationInstanceIdSchema = string().min(1);
|
|
@@ -56578,7 +57116,15 @@ var IntegrationInstanceDescriptionSchema = object({
|
|
|
56578
57116
|
*/
|
|
56579
57117
|
mintsId: boolean().optional(),
|
|
56580
57118
|
/** The links to other instances the provider's kinds declare; absent means none. */
|
|
56581
|
-
links: array(IntegrationInstanceLinkSchema).optional()
|
|
57119
|
+
links: array(IntegrationInstanceLinkSchema).optional(),
|
|
57120
|
+
/**
|
|
57121
|
+
* The rows belong to individual users (a notification target is somebody's phone). The router
|
|
57122
|
+
* then opens `listInstances`, `getInstance`, `createInstance`, `updateInstance`,
|
|
57123
|
+
* `setInstanceEnabled`, `deleteInstance` and `testInstance` to a NON-admin session on a call
|
|
57124
|
+
* pinned to this addon, and hands the provider the `caller` so it keeps a user to their own rows.
|
|
57125
|
+
* Absent means admin only, as it always was.
|
|
57126
|
+
*/
|
|
57127
|
+
userScoped: boolean().optional()
|
|
56582
57128
|
});
|
|
56583
57129
|
var IntegrationInstanceStatusSchema = object({
|
|
56584
57130
|
state: _enum([
|
|
@@ -56628,7 +57174,13 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
|
|
|
56628
57174
|
]).optional(),
|
|
56629
57175
|
/** The discovery candidate the wizard was seeded from (`stableId`), if any. */
|
|
56630
57176
|
candidateStableId: string().min(1).optional()
|
|
56631
|
-
}), ConfigSchemaPassthrough$2, { auth: "admin" }), method(
|
|
57177
|
+
}), ConfigSchemaPassthrough$2, { auth: "admin" }), method(looseObject({}), array(IntegrationInstanceSchema).readonly(), {
|
|
57178
|
+
auth: "protected",
|
|
57179
|
+
caller: "scoped"
|
|
57180
|
+
}), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), {
|
|
57181
|
+
auth: "protected",
|
|
57182
|
+
caller: "scoped"
|
|
57183
|
+
}), method(object({
|
|
56632
57184
|
id: IntegrationInstanceIdSchema.optional(),
|
|
56633
57185
|
name: string().min(1),
|
|
56634
57186
|
kind: string().min(1).optional(),
|
|
@@ -56650,19 +57202,23 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
|
|
|
56650
57202
|
seed: object({ info: record(string(), unknown()) }).optional()
|
|
56651
57203
|
}), object({ id: string() }), {
|
|
56652
57204
|
kind: "mutation",
|
|
56653
|
-
auth: "
|
|
57205
|
+
auth: "protected",
|
|
57206
|
+
caller: "scoped"
|
|
56654
57207
|
}), method(IntegrationInstancePatchSchema, object({ ok: literal(true) }), {
|
|
56655
57208
|
kind: "mutation",
|
|
56656
|
-
auth: "
|
|
57209
|
+
auth: "protected",
|
|
57210
|
+
caller: "scoped"
|
|
56657
57211
|
}), method(object({
|
|
56658
57212
|
id: IntegrationInstanceIdSchema,
|
|
56659
57213
|
enabled: boolean()
|
|
56660
57214
|
}), object({ ok: literal(true) }), {
|
|
56661
57215
|
kind: "mutation",
|
|
56662
|
-
auth: "
|
|
57216
|
+
auth: "protected",
|
|
57217
|
+
caller: "scoped"
|
|
56663
57218
|
}), method(object({ id: IntegrationInstanceIdSchema }), object({ ok: literal(true) }), {
|
|
56664
57219
|
kind: "mutation",
|
|
56665
|
-
auth: "
|
|
57220
|
+
auth: "protected",
|
|
57221
|
+
caller: "scoped"
|
|
56666
57222
|
}), optionalMethod(object({
|
|
56667
57223
|
id: IntegrationInstanceIdSchema.nullable(),
|
|
56668
57224
|
values: record(string(), unknown()),
|
|
@@ -56670,7 +57226,8 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
|
|
|
56670
57226
|
kind: string().min(1).optional()
|
|
56671
57227
|
}), TestConnectionResultSchema, {
|
|
56672
57228
|
kind: "mutation",
|
|
56673
|
-
auth: "
|
|
57229
|
+
auth: "protected",
|
|
57230
|
+
caller: "scoped"
|
|
56674
57231
|
});
|
|
56675
57232
|
/**
|
|
56676
57233
|
* Two-way audio / talk-back cap. Clients open a WebRTC audio-only
|
|
@@ -66825,92 +67382,21 @@ var NcZoneConditionSchema = object({
|
|
|
66825
67382
|
* membership lists are OR within the list (spec §2.3).
|
|
66826
67383
|
*/
|
|
66827
67384
|
/**
|
|
66828
|
-
* What a rule
|
|
66829
|
-
*
|
|
66830
|
-
* **No hand-maintained allowlist** (operator decision, and the right one — a
|
|
66831
|
-
* written list of methods is a third parallel map to keep aligned, and this
|
|
66832
|
-
* repo has paid for those). The boundary instead comes from a property the
|
|
66833
|
-
* capabilities already carry: an action may target only a **device-scoped**
|
|
66834
|
-
* capability method.
|
|
66835
|
-
*
|
|
66836
|
-
* That is not decoration. A rule can be authored by a NON-ADMIN — personal
|
|
66837
|
-
* rules are a supported flow — and the executor runs with the addon's
|
|
66838
|
-
* privileges, so an unbounded action is an arbitrary RPC channel with a
|
|
66839
|
-
* privilege escalation attached. Restricting to device scope excludes the
|
|
66840
|
-
* system caps (`device-manager.removeDevice` and friends) by construction,
|
|
66841
|
-
* costs nothing to maintain, and cannot rot: a cap that stops being
|
|
66842
|
-
* device-scoped stops being actuatable in the same change.
|
|
66843
|
-
*
|
|
66844
|
-
* The executor enforces it; {@link NcRuleActionSchema} carries the intent.
|
|
66845
|
-
*/
|
|
66846
|
-
/**
|
|
66847
|
-
* One step of a sequence.
|
|
66848
|
-
*
|
|
66849
|
-
* `wait` is a first-class step rather than a property of the next action: it is
|
|
66850
|
-
* what makes a sequence a SEQUENCE and not a list — "unlock, wait 5s, open"
|
|
66851
|
-
* cannot be expressed otherwise.
|
|
66852
|
-
*/
|
|
66853
|
-
var NcRuleActionSchema = discriminatedUnion("kind", [object({
|
|
66854
|
-
kind: literal("wait"),
|
|
66855
|
-
seconds: number$1().min(0).max(300)
|
|
66856
|
-
}), object({
|
|
66857
|
-
kind: literal("cap"),
|
|
66858
|
-
/**
|
|
66859
|
-
* WHO the step acts on (D983) — the only shape that is written. A sequence
|
|
66860
|
-
* stored before D983 carries `deviceId`; the sequence store reads it as a
|
|
66861
|
-
* `devices` target.
|
|
66862
|
-
*/
|
|
66863
|
-
target: ActionTargetSchema.optional(),
|
|
66864
|
-
/** The vocabulary action the step performs; required for a `domain` target. */
|
|
66865
|
-
actionId: string().min(1).optional(),
|
|
66866
|
-
/** @deprecated The pre-D983 single device. Read, never written. */
|
|
66867
|
-
deviceId: number$1().int().optional(),
|
|
66868
|
-
/** Capability name, e.g. `alarm-panel`. */
|
|
66869
|
-
cap: string().min(1),
|
|
66870
|
-
/** Method on it. The executor refuses a non-device-scoped cap. */
|
|
66871
|
-
method: string().min(1),
|
|
66872
|
-
/** Method arguments, minus `deviceId` (the executor injects it). */
|
|
66873
|
-
args: record(string(), unknown()).optional()
|
|
66874
|
-
}).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
66875
|
-
message: "a cap step needs a target",
|
|
66876
|
-
path: ["target"]
|
|
66877
|
-
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
66878
|
-
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
66879
|
-
path: ["actionId"]
|
|
66880
|
-
})]);
|
|
66881
|
-
/**
|
|
66882
|
-
* A named, ordered run of steps shared across rules, with its own throttle.
|
|
67385
|
+
* What a rule or a button runs: an **Action** of the `actions` surface
|
|
67386
|
+
* (`internal:<uuid>` or an addon's), by id, and nothing else (planning#473).
|
|
66883
67387
|
*
|
|
66884
|
-
*
|
|
66885
|
-
*
|
|
66886
|
-
*
|
|
66887
|
-
*
|
|
66888
|
-
*
|
|
66889
|
-
*
|
|
66890
|
-
* one sequence share its budget.
|
|
67388
|
+
* The notification centre has no step vocabulary of its own. The steps, the
|
|
67389
|
+
* device-scope boundary, the stop-at-first-failure, the throttle
|
|
67390
|
+
* (`minDelaySec`), the variables and the runs ledger all belong to the Action;
|
|
67391
|
+
* an operator edits them in ONE place (the Actions page) and a rule points at
|
|
67392
|
+
* the result. A rule can be authored by a non-admin (personal rules), which is
|
|
67393
|
+
* safe for the same reason: it can only name an Action an admin already wrote.
|
|
66891
67394
|
*/
|
|
66892
|
-
var
|
|
66893
|
-
|
|
66894
|
-
|
|
66895
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
66896
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
66897
|
-
});
|
|
66898
|
-
/** Create / update body — the id is minted by the provider. */
|
|
66899
|
-
var NcSharedSequenceInputSchema = object({
|
|
66900
|
-
name: string().min(1).max(120),
|
|
66901
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
66902
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
66903
|
-
});
|
|
66904
|
-
/** Bindings on one hook edge. Cap keeps a slot from becoming a second sequence editor. */
|
|
66905
|
-
var NcHookBindingsSchema = array(discriminatedUnion("kind", [object({
|
|
66906
|
-
kind: literal("sequence"),
|
|
66907
|
-
sequenceId: string().min(1)
|
|
66908
|
-
}), object({
|
|
66909
|
-
kind: literal("do"),
|
|
66910
|
-
action: NcRuleActionSchema
|
|
66911
|
-
})])).max(4);
|
|
67395
|
+
var NcActionIdSchema = string().min(1);
|
|
67396
|
+
/** Action ids one hook edge runs, in order. Capped so a slot never becomes a second editor. */
|
|
67397
|
+
var NcHookActionIdsSchema = array(NcActionIdSchema).max(4);
|
|
66912
67398
|
/**
|
|
66913
|
-
* One button carried by the notification, running
|
|
67399
|
+
* One button carried by the notification, running an Action on tap.
|
|
66914
67400
|
*
|
|
66915
67401
|
* **Read this before adding a button that does something physical.** The tap
|
|
66916
67402
|
* arrives over a link that travelled through third-party infrastructure — ntfy,
|
|
@@ -66925,9 +67411,9 @@ var NcRuleNotificationButtonSchema = object({
|
|
|
66925
67411
|
/** Stable id — travels in the callback and identifies the button in logs. */
|
|
66926
67412
|
id: string().min(1).max(64),
|
|
66927
67413
|
label: string().min(1).max(40),
|
|
66928
|
-
/**
|
|
66929
|
-
*
|
|
66930
|
-
|
|
67414
|
+
/** The Action the tap runs. The dispatcher drops a button whose Action does
|
|
67415
|
+
* not exist rather than minting a token for nothing. */
|
|
67416
|
+
actionId: NcActionIdSchema,
|
|
66931
67417
|
icon: NotificationActionIconSchema.optional(),
|
|
66932
67418
|
destructive: boolean().optional()
|
|
66933
67419
|
});
|
|
@@ -66942,25 +67428,19 @@ var NcRuleNotificationButtonSchema = object({
|
|
|
66942
67428
|
* leave). A delivery with no clear edge never produces this hook.
|
|
66943
67429
|
*/
|
|
66944
67430
|
var NcRuleActionsSchema = object({
|
|
66945
|
-
onActivation:
|
|
66946
|
-
onDeactivation:
|
|
67431
|
+
onActivation: NcHookActionIdsSchema.optional(),
|
|
67432
|
+
onDeactivation: NcHookActionIdsSchema.optional(),
|
|
66947
67433
|
/** Runs on a positive / raised match. */
|
|
66948
|
-
onTrigger:
|
|
67434
|
+
onTrigger: NcHookActionIdsSchema.optional(),
|
|
66949
67435
|
/** Runs on a clear / leave match, when the subject carries one. */
|
|
66950
|
-
onTriggerOff:
|
|
67436
|
+
onTriggerOff: NcHookActionIdsSchema.optional(),
|
|
66951
67437
|
/**
|
|
66952
|
-
* Buttons the NOTIFICATION carries, each running one
|
|
66953
|
-
*
|
|
66954
|
-
*
|
|
67438
|
+
* Buttons the NOTIFICATION carries, each running one Action when tapped.
|
|
67439
|
+
* Deliberately a REFERENCE — a button that could define its own steps would
|
|
67440
|
+
* be a parallel actuation vocabulary.
|
|
66955
67441
|
*/
|
|
66956
67442
|
buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
|
|
66957
67443
|
});
|
|
66958
|
-
object({
|
|
66959
|
-
name: string().min(1).max(120),
|
|
66960
|
-
enabled: boolean(),
|
|
66961
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
66962
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
66963
|
-
});
|
|
66964
67444
|
/**
|
|
66965
67445
|
* "This rule applies only while `deviceId` is in one of `states`."
|
|
66966
67446
|
*
|
|
@@ -68641,18 +69121,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
68641
69121
|
}), object({ success: literal(true) }), {
|
|
68642
69122
|
kind: "mutation",
|
|
68643
69123
|
auth: "admin"
|
|
68644
|
-
}), 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 }), {
|
|
68645
|
-
kind: "mutation",
|
|
68646
|
-
auth: "admin"
|
|
68647
|
-
}), method(object({
|
|
68648
|
-
sequenceId: string().min(1),
|
|
68649
|
-
sequence: NcSharedSequenceInputSchema
|
|
68650
|
-
}), object({ sequence: NcSharedSequenceSchema }), {
|
|
68651
|
-
kind: "mutation",
|
|
68652
|
-
auth: "admin"
|
|
68653
|
-
}), method(object({ sequenceId: string().min(1) }), object({ success: literal(true) }), {
|
|
68654
|
-
kind: "mutation",
|
|
68655
|
-
auth: "admin"
|
|
68656
69124
|
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
68657
69125
|
deviceId: number$1().int(),
|
|
68658
69126
|
muted: boolean()
|
|
@@ -76225,6 +76693,11 @@ var SendEmailResultSchema = object({
|
|
|
76225
76693
|
var SmtpStatusSchema = object({
|
|
76226
76694
|
/** True iff the addon has successfully verified the relay. */
|
|
76227
76695
|
ready: boolean(),
|
|
76696
|
+
/**
|
|
76697
|
+
* The tri-state behind `ready` (D315): true when the last send worked, false when it failed,
|
|
76698
|
+
* ABSENT when the relay has not sent yet (unknown, never "not verified").
|
|
76699
|
+
*/
|
|
76700
|
+
verified: boolean().optional(),
|
|
76228
76701
|
/** Operator-visible host string (no credentials). */
|
|
76229
76702
|
host: string(),
|
|
76230
76703
|
/** Last error message reported by the relay, when not ready. */
|
|
@@ -76236,10 +76709,6 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
|
|
|
76236
76709
|
kind: "mutation",
|
|
76237
76710
|
auth: "admin",
|
|
76238
76711
|
access: "create"
|
|
76239
|
-
}), method(RelayPinSchema, SmtpStatusSchema, {
|
|
76240
|
-
kind: "mutation",
|
|
76241
|
-
auth: "admin",
|
|
76242
|
-
access: "view"
|
|
76243
76712
|
}), method(RelayPinSchema, SmtpStatusSchema, { auth: "admin" });
|
|
76244
76713
|
/**
|
|
76245
76714
|
* A single device snapshot returned as base64 JPEG/PNG.
|
|
@@ -80284,7 +80753,8 @@ var AccessoryKind = {
|
|
|
80284
80753
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
80285
80754
|
};
|
|
80286
80755
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
80287
|
-
DeviceType.
|
|
80756
|
+
DeviceType.HeatPump;
|
|
80757
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
80288
80758
|
new Set(Object.values(DeviceType));
|
|
80289
80759
|
/** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
|
|
80290
80760
|
function contribution(cap, schema, build) {
|
|
@@ -80420,6 +80890,13 @@ var lockContribution = contribution("lock-control", LockControlStatusSchema, (sl
|
|
|
80420
80890
|
reading: reading("lock-control", words?.state ?? "unknown", false, words?.title),
|
|
80421
80891
|
rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(DeviceFeature.LockOpen)))],
|
|
80422
80892
|
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, "muted")] },
|
|
80893
|
+
...words === null ? {} : { tiles: { left: [{
|
|
80894
|
+
label: t("Door", "Porta"),
|
|
80895
|
+
value: title
|
|
80896
|
+
}, ...since === null ? [] : [{
|
|
80897
|
+
label: t("Since", "Da"),
|
|
80898
|
+
value: since
|
|
80899
|
+
}]] } },
|
|
80423
80900
|
...words?.door == null ? {} : { scene: { mode: words.door } }
|
|
80424
80901
|
};
|
|
80425
80902
|
});
|
|
@@ -80501,7 +80978,17 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
80501
80978
|
return {
|
|
80502
80979
|
reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
|
|
80503
80980
|
rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? t("Unknown", "Sconosciuto"), since]), alarmControls(state, modes, slice?.requiresCode ?? false))],
|
|
80504
|
-
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] }
|
|
80981
|
+
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
|
|
80982
|
+
...words === null ? {} : { tiles: {
|
|
80983
|
+
left: [{
|
|
80984
|
+
label: t("Mode", "Modalità"),
|
|
80985
|
+
value: words.title
|
|
80986
|
+
}],
|
|
80987
|
+
...since === null ? {} : { right: [{
|
|
80988
|
+
label: t("Since", "Da"),
|
|
80989
|
+
value: since
|
|
80990
|
+
}] }
|
|
80991
|
+
} }
|
|
80505
80992
|
};
|
|
80506
80993
|
}),
|
|
80507
80994
|
"automation-control": contribution("automation-control", AutomationControlStatusSchema, (slice, ctx) => {
|
|
@@ -80565,7 +81052,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
80565
81052
|
*/
|
|
80566
81053
|
var has$3 = (ctx, f) => ctx.features.includes(f);
|
|
80567
81054
|
var unknownText = t("Unknown", "Sconosciuto");
|
|
80568
|
-
var pct$
|
|
81055
|
+
var pct$2 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
80569
81056
|
var unit = (n) => Math.min(1, Math.max(0, n / 100));
|
|
80570
81057
|
/** Battery as a fact, unless the device is also bound to the `battery` cap (it already says so). */
|
|
80571
81058
|
function ownBattery(level, ctx) {
|
|
@@ -80627,7 +81114,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
80627
81114
|
},
|
|
80628
81115
|
valueArg: "direction"
|
|
80629
81116
|
});
|
|
80630
|
-
const speedText = speed === null ? null : pct$
|
|
81117
|
+
const speedText = speed === null ? null : pct$2(speed);
|
|
80631
81118
|
const preset = slice?.preset ?? "";
|
|
80632
81119
|
const status = speed === null ? unknownText : joinText([speed === 0 ? t("Off", "Spento") : t(`Speed ${speed}%`, `Velocità ${speed}%`), preset === "" ? null : t(preset, preset)]);
|
|
80633
81120
|
return {
|
|
@@ -80640,10 +81127,16 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
80640
81127
|
}],
|
|
80641
81128
|
...speedText === null ? {} : {
|
|
80642
81129
|
facts: [fact("speed", "fan", speedText, speed === 0 ? "muted" : "primary")],
|
|
80643
|
-
tiles: {
|
|
80644
|
-
|
|
80645
|
-
|
|
80646
|
-
|
|
81130
|
+
tiles: {
|
|
81131
|
+
...slice?.oscillating == null ? {} : { left: [{
|
|
81132
|
+
label: t("Oscillation", "Oscilla"),
|
|
81133
|
+
value: slice.oscillating ? t("Yes", "Sì") : t("No", "No")
|
|
81134
|
+
}] },
|
|
81135
|
+
...preset === "" ? {} : { right: [{
|
|
81136
|
+
label: t("Mode", "Modalità"),
|
|
81137
|
+
value: t(preset, preset)
|
|
81138
|
+
}] }
|
|
81139
|
+
},
|
|
80647
81140
|
scene: { level: unit(speed ?? 0) }
|
|
80648
81141
|
}
|
|
80649
81142
|
};
|
|
@@ -80707,7 +81200,8 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
80707
81200
|
const words = state === null ? null : VACUUM_WORDS[state];
|
|
80708
81201
|
const title = state === "error" && slice?.errorLabel ? t(slice.errorLabel, slice.errorLabel) : words?.title;
|
|
80709
81202
|
const controls = vacuumControls(state);
|
|
80710
|
-
|
|
81203
|
+
const suctionControls = [];
|
|
81204
|
+
if (slice !== void 0 && slice.availableFanSpeeds.length > 0) suctionControls.push({
|
|
80711
81205
|
kind: "picker",
|
|
80712
81206
|
id: "vacuum.suction",
|
|
80713
81207
|
label: t("Suction", "Aspirazione"),
|
|
@@ -80722,22 +81216,31 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
80722
81216
|
});
|
|
80723
81217
|
if (state !== null) controls.push(vac("locate", "Locate", "Trova", "map-pin", "locate"));
|
|
80724
81218
|
const progress = state === "cleaning" ? slice?.progress ?? null : null;
|
|
81219
|
+
const suction = slice?.fanSpeed == null || slice.fanSpeed === "" ? [] : [{
|
|
81220
|
+
label: t("Suction", "Aspirazione"),
|
|
81221
|
+
value: t(slice.fanSpeed, slice.fanSpeed)
|
|
81222
|
+
}];
|
|
81223
|
+
const suctionRows = suctionControls.length === 0 ? [] : [{
|
|
81224
|
+
id: "vacuum-suction",
|
|
81225
|
+
icon: "bot",
|
|
81226
|
+
status: null,
|
|
81227
|
+
controls: suctionControls
|
|
81228
|
+
}];
|
|
81229
|
+
const vacuumRows = [{
|
|
81230
|
+
id: "vacuum",
|
|
81231
|
+
icon: "bot",
|
|
81232
|
+
status: title ?? unknownText,
|
|
81233
|
+
controls
|
|
81234
|
+
}, ...suctionRows];
|
|
80725
81235
|
return {
|
|
80726
81236
|
reading: reading("vacuum-control", words?.state ?? "unknown", false, title),
|
|
80727
|
-
rows:
|
|
80728
|
-
|
|
80729
|
-
|
|
80730
|
-
|
|
80731
|
-
|
|
80732
|
-
}],
|
|
80733
|
-
|
|
80734
|
-
...progress === null ? {} : {
|
|
80735
|
-
tiles: { right: [{
|
|
80736
|
-
label: t("Progress", "Avanzamento"),
|
|
80737
|
-
value: pct$1(progress)
|
|
80738
|
-
}] },
|
|
80739
|
-
scene: { level: unit(progress) }
|
|
80740
|
-
}
|
|
81237
|
+
rows: vacuumRows,
|
|
81238
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
81239
|
+
...suction.length === 0 && progress === null ? {} : { tiles: { right: [...suction, ...progress === null ? [] : [{
|
|
81240
|
+
label: t("Progress", "Avanzamento"),
|
|
81241
|
+
value: pct$2(progress)
|
|
81242
|
+
}]] } },
|
|
81243
|
+
...progress === null ? {} : { scene: { level: unit(progress) } }
|
|
80741
81244
|
};
|
|
80742
81245
|
});
|
|
80743
81246
|
var MOWER_WORDS = {
|
|
@@ -80793,11 +81296,11 @@ var mowerContribution = contribution("lawn-mower-control", LawnMowerControlStatu
|
|
|
80793
81296
|
status: title ?? unknownText,
|
|
80794
81297
|
controls: mowerControls(activity)
|
|
80795
81298
|
}],
|
|
80796
|
-
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$
|
|
81299
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
80797
81300
|
...progress === null ? {} : {
|
|
80798
81301
|
tiles: { right: [{
|
|
80799
81302
|
label: t("Progress", "Avanzamento"),
|
|
80800
|
-
value: pct$
|
|
81303
|
+
value: pct$2(progress)
|
|
80801
81304
|
}] },
|
|
80802
81305
|
scene: { level: unit(progress) }
|
|
80803
81306
|
}
|
|
@@ -80868,10 +81371,13 @@ var feederContribution = contribution("pet-feeder", PetFeederStatusSchema, (slic
|
|
|
80868
81371
|
...last === null ? [] : [fact("last-run", "clock", t(`Last ${last} g`, `Ultimo ${last} g`))],
|
|
80869
81372
|
...ownBattery(slice?.powerSource === "battery" ? slice.batteryPower : null, ctx)
|
|
80870
81373
|
],
|
|
80871
|
-
...
|
|
81374
|
+
tiles: { left: [...slice?.foodLevel == null ? [] : [{
|
|
81375
|
+
label: t("Tank", "Serbatoio"),
|
|
81376
|
+
value: pct$2(slice.foodLevel)
|
|
81377
|
+
}], ...last === null ? [] : [{
|
|
80872
81378
|
label: t("Last portion", "Ultima porzione"),
|
|
80873
81379
|
value: t(`${last} g`, `${last} g`)
|
|
80874
|
-
}] }
|
|
81380
|
+
}]] }
|
|
80875
81381
|
};
|
|
80876
81382
|
});
|
|
80877
81383
|
var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema, (slice) => {
|
|
@@ -80899,10 +81405,13 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
|
|
|
80899
81405
|
}],
|
|
80900
81406
|
...level === null ? {} : {
|
|
80901
81407
|
facts: [fact("level", "droplets", t(`Water ${Math.round(level)}%`, `Acqua ${Math.round(level)}%`), level <= 20 ? "warning" : "primary")],
|
|
80902
|
-
tiles: {
|
|
81408
|
+
tiles: { left: [{
|
|
80903
81409
|
label: t("Water", "Acqua"),
|
|
80904
|
-
value: pct$
|
|
80905
|
-
}]
|
|
81410
|
+
value: pct$2(level)
|
|
81411
|
+
}, ...slice?.waterVolume == null ? [] : [{
|
|
81412
|
+
label: t("Volume", "Volume"),
|
|
81413
|
+
value: t(`${Math.round(slice.waterVolume)} ml`, `${Math.round(slice.waterVolume)} ml`)
|
|
81414
|
+
}]] },
|
|
80906
81415
|
scene: { level: unit(level) }
|
|
80907
81416
|
}
|
|
80908
81417
|
};
|
|
@@ -80934,14 +81443,18 @@ var DEVICES_FAMILY_CONTRIBUTIONS = {
|
|
|
80934
81443
|
* that does not parse reads `unknown`, never closed or off (D315/D393).
|
|
80935
81444
|
*/
|
|
80936
81445
|
var has$2 = (ctx, f) => ctx.features.includes(f);
|
|
80937
|
-
var pct = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
81446
|
+
var pct$1 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
80938
81447
|
var brightnessContribution = contribution("brightness", BrightnessStatusSchema, (slice) => {
|
|
80939
81448
|
const level = slice?.level ?? null;
|
|
80940
81449
|
return {
|
|
80941
81450
|
...level === null ? {} : { reading: reading("brightness", level > 0 ? "on" : "off") },
|
|
80942
81451
|
...level === null ? {} : {
|
|
80943
|
-
facts: [fact("level", "sun-dim", pct(level), level > 0 ? "primary" : "muted")],
|
|
80944
|
-
scene: { level: level / 100 }
|
|
81452
|
+
facts: [fact("level", "sun-dim", pct$1(level), level > 0 ? "primary" : "muted")],
|
|
81453
|
+
scene: { level: level / 100 },
|
|
81454
|
+
tiles: { left: [{
|
|
81455
|
+
label: t("Brightness", "Luminosità"),
|
|
81456
|
+
value: pct$1(level)
|
|
81457
|
+
}] }
|
|
80945
81458
|
},
|
|
80946
81459
|
rows: [row$1("brightness", "sun-dim", level === null ? null : t(`Brightness ${Math.round(level)}%`, `Luminosità ${Math.round(level)}%`), [{
|
|
80947
81460
|
kind: "slider",
|
|
@@ -81150,12 +81663,16 @@ function travelFragment(s, state, position, tilt, ctx) {
|
|
|
81150
81663
|
});
|
|
81151
81664
|
return {
|
|
81152
81665
|
reading: reading(s.source, words.state, false, words.title),
|
|
81153
|
-
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct(position))] },
|
|
81666
|
+
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct$1(position))] },
|
|
81667
|
+
...position === null ? {} : { tiles: { left: [{
|
|
81668
|
+
label: t("Opening", "Apertura"),
|
|
81669
|
+
value: pct$1(position)
|
|
81670
|
+
}] } },
|
|
81154
81671
|
scene: {
|
|
81155
81672
|
...words.mode === null ? {} : { mode: words.mode },
|
|
81156
81673
|
...position === null ? {} : { level: position / 100 }
|
|
81157
81674
|
},
|
|
81158
|
-
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct(position) : null]), controls)]
|
|
81675
|
+
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct$1(position) : null]), controls)]
|
|
81159
81676
|
};
|
|
81160
81677
|
}
|
|
81161
81678
|
var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
@@ -81233,10 +81750,10 @@ var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
|
81233
81750
|
const now = slice.currentHumidity;
|
|
81234
81751
|
return {
|
|
81235
81752
|
reading: reading("humidifier", state, false, title),
|
|
81236
|
-
...now === null ? {} : { facts: [fact("level", "droplets", pct(now), "info")] },
|
|
81753
|
+
...now === null ? {} : { facts: [fact("level", "droplets", pct$1(now), "info")] },
|
|
81237
81754
|
...slice.targetHumidity === null ? {} : { tiles: { right: [{
|
|
81238
81755
|
label: t("Target", "Obiettivo"),
|
|
81239
|
-
value: pct(slice.targetHumidity)
|
|
81756
|
+
value: pct$1(slice.targetHumidity)
|
|
81240
81757
|
}] } },
|
|
81241
81758
|
...now === null ? {} : { scene: { level: now / 100 } },
|
|
81242
81759
|
rows: [row$1("humidifier", "droplets", joinText([title, slice.mode === null ? null : t(slice.mode, slice.mode)]), controls)]
|
|
@@ -81484,17 +82001,16 @@ var weatherContribution = contribution("weather", WeatherStatusSchema, (slice, c
|
|
|
81484
82001
|
});
|
|
81485
82002
|
var updateContribution = contribution("update", UpdateStatusSchema, (slice) => {
|
|
81486
82003
|
if (slice === void 0) return { reading: reading("update", "unknown") };
|
|
81487
|
-
const { currentVersion, availableVersion, inProgress
|
|
82004
|
+
const { currentVersion, availableVersion, inProgress } = slice;
|
|
81488
82005
|
const pending = availableVersion !== null && availableVersion !== "" && availableVersion !== currentVersion;
|
|
81489
82006
|
if (!pending && currentVersion === null && !inProgress) return { reading: reading("update", "unknown") };
|
|
81490
82007
|
const state = inProgress ? "running" : pending ? "standby" : "idle";
|
|
81491
82008
|
const title = inProgress ? t("Updating", "Aggiornamento in corso") : pending ? t("Update available", "Aggiornamento disponibile") : t("Up to date", "Aggiornato");
|
|
81492
82009
|
const versions = currentVersion === null ? pending ? t(`${availableVersion}`, `${availableVersion}`) : null : pending ? t(`${currentVersion} → ${availableVersion}`, `${currentVersion} → ${availableVersion}`) : t(`Version ${currentVersion}`, `Versione ${currentVersion}`);
|
|
81493
|
-
const install = pending && updatable && !inProgress ? [asAction(action("update.install", t("Install", "Installa"), "download", "update", "installUpdate", {}, "primary", "install"))] : [];
|
|
81494
82010
|
return {
|
|
81495
82011
|
reading: reading("update", state, false, title),
|
|
81496
82012
|
facts: versions === null ? [] : [fact("reading", "download", versions, pending ? "warning" : "muted")],
|
|
81497
|
-
rows: [row$1("update", "download", versions,
|
|
82013
|
+
rows: [row$1("update", "download", versions, [])]
|
|
81498
82014
|
};
|
|
81499
82015
|
});
|
|
81500
82016
|
var imageContribution = contribution("image", ImageStatusSchema, (slice, ctx) => {
|
|
@@ -81602,6 +82118,33 @@ var ON_MODE_PREFERENCE = [
|
|
|
81602
82118
|
"heat",
|
|
81603
82119
|
"cool"
|
|
81604
82120
|
];
|
|
82121
|
+
var FAN_LABEL = {
|
|
82122
|
+
auto: t("Auto", "Auto"),
|
|
82123
|
+
quiet: t("Quiet", "Silenziosa"),
|
|
82124
|
+
low: t("Low", "Bassa"),
|
|
82125
|
+
medium: t("Medium", "Media"),
|
|
82126
|
+
high: t("High", "Alta"),
|
|
82127
|
+
turbo: t("Turbo", "Turbo"),
|
|
82128
|
+
off: t("Off", "Spenta")
|
|
82129
|
+
};
|
|
82130
|
+
/** A readable label for a fan speed name; an unknown one is shown as the device reported it. */
|
|
82131
|
+
function fanLabelOf(fan) {
|
|
82132
|
+
return FAN_LABEL[fan] ?? t(fan, fan);
|
|
82133
|
+
}
|
|
82134
|
+
/** Short labels for a segmented control: one word each, so the segments stay on a line. */
|
|
82135
|
+
var MODE_SEGMENT_LABEL = {
|
|
82136
|
+
off: t("Off", "Spento"),
|
|
82137
|
+
heat: t("Heat", "Caldo"),
|
|
82138
|
+
cool: t("Cool", "Freddo"),
|
|
82139
|
+
auto: t("Auto", "Auto"),
|
|
82140
|
+
heat_cool: t("Heat/Cool", "Caldo/Freddo"),
|
|
82141
|
+
fan_only: t("Fan", "Vent."),
|
|
82142
|
+
dry: t("Dry", "Deum.")
|
|
82143
|
+
};
|
|
82144
|
+
/** The segment label of every available HVAC mode, keyed by the mode value. */
|
|
82145
|
+
function modeLabelsOf(modes) {
|
|
82146
|
+
return Object.fromEntries(modes.map((m) => [m, MODE_SEGMENT_LABEL[m]]));
|
|
82147
|
+
}
|
|
81605
82148
|
/** 22 -> "22", 22.3 -> "22.3": a trailing zero is noise on a thermostat. */
|
|
81606
82149
|
function formatDegrees(value) {
|
|
81607
82150
|
return `${Number(value.toFixed(1))}°`;
|
|
@@ -81666,11 +82209,11 @@ function rangeFrom(min, max, step) {
|
|
|
81666
82209
|
* contribute, types never do (D14). A slice that is absent or does not parse is
|
|
81667
82210
|
* "not answered": the state reads unknown, no row is drawn (D315, D393).
|
|
81668
82211
|
*/
|
|
81669
|
-
var same = (text) => t(text, text);
|
|
81670
|
-
function tile(en, it, value) {
|
|
82212
|
+
var same$1 = (text) => t(text, text);
|
|
82213
|
+
function tile$1(en, it, value) {
|
|
81671
82214
|
return {
|
|
81672
82215
|
label: t(en, it),
|
|
81673
|
-
value: same(value)
|
|
82216
|
+
value: same$1(value)
|
|
81674
82217
|
};
|
|
81675
82218
|
}
|
|
81676
82219
|
function setpointSlider(id, cap, method, valueArg, value, range) {
|
|
@@ -81705,18 +82248,19 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
81705
82248
|
const status = climateStatusText(view);
|
|
81706
82249
|
const facts = [];
|
|
81707
82250
|
if (status !== null) facts.push(fact("climate", "thermometer", status));
|
|
81708
|
-
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same(`${Math.round(view.humidity)}%`)));
|
|
81709
|
-
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
82251
|
+
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same$1(`${Math.round(view.humidity)}%`)));
|
|
82252
|
+
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same$1(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
81710
82253
|
const left = [];
|
|
81711
82254
|
const right = [];
|
|
81712
|
-
if (view.measured !== null) left.push(tile("Indoor", "In casa", formatDegrees(view.measured)));
|
|
81713
|
-
if (view.humidity !== null) left.push(tile("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
82255
|
+
if (view.measured !== null) left.push(tile$1("Indoor", "In casa", formatDegrees(view.measured)));
|
|
82256
|
+
if (view.humidity !== null) left.push(tile$1("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
81714
82257
|
const modeControls = [{
|
|
81715
82258
|
kind: "picker",
|
|
81716
82259
|
id: "climate.mode",
|
|
81717
82260
|
label: t("Mode", "Modalità"),
|
|
81718
82261
|
current: view.mode,
|
|
81719
|
-
options: [...view.availableModes],
|
|
82262
|
+
options: [...view.availableModes.filter((m) => m !== "off"), ...view.availableModes.filter((m) => m === "off")],
|
|
82263
|
+
optionLabels: modeLabelsOf(view.availableModes),
|
|
81720
82264
|
call: {
|
|
81721
82265
|
cap: "climate-control",
|
|
81722
82266
|
method: "setMode",
|
|
@@ -81744,6 +82288,7 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
81744
82288
|
label: t("Fan", "Ventola"),
|
|
81745
82289
|
current: slice.fanMode === "" ? null : slice.fanMode,
|
|
81746
82290
|
options: [...slice.availableFanModes],
|
|
82291
|
+
optionLabels: Object.fromEntries(slice.availableFanModes.map((m) => [m, fanLabelOf(m)])),
|
|
81747
82292
|
call: {
|
|
81748
82293
|
cap: "climate-control",
|
|
81749
82294
|
method: "setFanMode",
|
|
@@ -81769,14 +82314,15 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
81769
82314
|
if (fanControls.length > 0) rows.push({
|
|
81770
82315
|
id: "climate-fan",
|
|
81771
82316
|
icon: "fan",
|
|
81772
|
-
status: slice.fanMode === "" ? null : same(slice.fanMode),
|
|
82317
|
+
status: slice.fanMode === "" ? null : same$1(slice.fanMode),
|
|
81773
82318
|
controls: fanControls
|
|
81774
82319
|
});
|
|
81775
|
-
rows.push(...setpointRow(view.target === null ? null : same(formatDegrees(view.target)), view.range === null || view.target === null ? null : setpointSlider("climate.target", "climate-control", "setTarget", "target", view.target, view.range)));
|
|
82320
|
+
rows.push(...setpointRow(view.target === null ? null : same$1(formatDegrees(view.target)), view.range === null || view.target === null ? null : setpointSlider("climate.target", "climate-control", "setTarget", "target", view.target, view.range)));
|
|
81776
82321
|
const sceneMode = view.sceneMode;
|
|
81777
82322
|
return {
|
|
81778
82323
|
reading: reading("climate-control", view.isOff ? "off" : "on"),
|
|
81779
82324
|
title: view.modeLabel,
|
|
82325
|
+
...view.isOff || slice.fanMode === "" ? {} : { caption: t(`${view.modeLabel.en} · fan ${fanLabelOf(slice.fanMode).en}`, `${view.modeLabel.it} · ventola ${fanLabelOf(slice.fanMode).it}`) },
|
|
81780
82326
|
facts,
|
|
81781
82327
|
...left.length === 0 && right.length === 0 ? {} : { tiles: {
|
|
81782
82328
|
left,
|
|
@@ -81803,7 +82349,7 @@ var WATER_ON_PREFERENCE = [
|
|
|
81803
82349
|
"performance"
|
|
81804
82350
|
];
|
|
81805
82351
|
function capitalised(word) {
|
|
81806
|
-
return same(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
82352
|
+
return same$1(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
81807
82353
|
}
|
|
81808
82354
|
var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSchema, (slice) => {
|
|
81809
82355
|
if (slice === void 0 || slice.operationMode === null) return { reading: reading("climate-control", "unknown") };
|
|
@@ -81840,13 +82386,13 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
81840
82386
|
icon: "flame",
|
|
81841
82387
|
status: label,
|
|
81842
82388
|
controls: modeControls
|
|
81843
|
-
}, ...setpointRow(slice.targetTemp === null ? null : same(formatDegrees(slice.targetTemp)), range === null || slice.targetTemp === null ? null : setpointSlider("water-heater.target", "water-heater", "setTargetTemp", "temp", slice.targetTemp, range))];
|
|
82389
|
+
}, ...setpointRow(slice.targetTemp === null ? null : same$1(formatDegrees(slice.targetTemp)), range === null || slice.targetTemp === null ? null : setpointSlider("water-heater.target", "water-heater", "setTargetTemp", "temp", slice.targetTemp, range))];
|
|
81844
82390
|
const level = levelWithin(slice.targetTemp, range);
|
|
81845
82391
|
return {
|
|
81846
82392
|
reading: reading("climate-control", isOff ? "off" : "on"),
|
|
81847
82393
|
title: label,
|
|
81848
82394
|
facts: status === null ? [] : [fact("climate", "flame", status)],
|
|
81849
|
-
...slice.currentTemp === null ? {} : { tiles: { left: [tile("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
82395
|
+
...slice.currentTemp === null ? {} : { tiles: { left: [tile$1("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
81850
82396
|
scene: {
|
|
81851
82397
|
...isOff ? {} : { mode: "heat" },
|
|
81852
82398
|
...level === null ? {} : { level }
|
|
@@ -81864,11 +82410,12 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
81864
82410
|
var heatingValveContribution = contribution("heating-valve", HeatingValveStatusSchema, (slice) => {
|
|
81865
82411
|
const position = slice?.position ?? null;
|
|
81866
82412
|
if (position === null) return { reading: reading("sensor", "unknown") };
|
|
81867
|
-
const text = same(`${Math.round(position)}%`);
|
|
82413
|
+
const text = same$1(`${Math.round(position)}%`);
|
|
81868
82414
|
return {
|
|
81869
82415
|
reading: reading("sensor", position > 0 ? "running" : "idle"),
|
|
81870
82416
|
facts: [fact("valve", "gauge", t(`Valve ${text.en}`, `Valvola ${text.it}`))],
|
|
81871
|
-
tiles: { right: [tile("Valve", "Valvola", text.en)] },
|
|
82417
|
+
tiles: { right: [tile$1("Valve", "Valvola", text.en)] },
|
|
82418
|
+
...position > 0 ? { caption: t(`Heating · valve ${text.en}`, `Riscalda · valvola ${text.it}`) } : {},
|
|
81872
82419
|
scene: { level: position / 100 }
|
|
81873
82420
|
};
|
|
81874
82421
|
});
|
|
@@ -81877,9 +82424,9 @@ function sensorFragment(value, id, icon, en, it, text) {
|
|
|
81877
82424
|
if (value === null) return { reading: reading("sensor", "unknown") };
|
|
81878
82425
|
return {
|
|
81879
82426
|
reading: reading("sensor", "on"),
|
|
81880
|
-
title: same(text),
|
|
81881
|
-
facts: [fact(id, icon, same(text))],
|
|
81882
|
-
tiles: { right: [tile(en, it, text)] }
|
|
82427
|
+
title: same$1(text),
|
|
82428
|
+
facts: [fact(id, icon, same$1(text))],
|
|
82429
|
+
tiles: { right: [tile$1(en, it, text)] }
|
|
81883
82430
|
};
|
|
81884
82431
|
}
|
|
81885
82432
|
var temperatureContribution = contribution("temperature-sensor", TemperatureSensorStatusSchema, (slice) => sensorFragment(slice?.temperature ?? null, "temperature", "thermometer", "Temperature", "Temperatura", formatDegrees(slice?.temperature ?? 0)));
|
|
@@ -81934,8 +82481,8 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
81934
82481
|
return {
|
|
81935
82482
|
reading: reading("sensor", "on"),
|
|
81936
82483
|
...slice.aqi === void 0 ? {} : { title: airQualityWord(slice.aqi) },
|
|
81937
|
-
facts: parts.map((p) => fact("air-quality", "wind", same(`${p.label} ${p.value}`))),
|
|
81938
|
-
tiles: { right: parts.slice(0, 2).map((p) => tile(p.label, p.label, p.value)) }
|
|
82484
|
+
facts: parts.map((p) => fact("air-quality", "wind", same$1(`${p.label} ${p.value}`))),
|
|
82485
|
+
tiles: { right: parts.slice(0, 2).map((p) => tile$1(p.label, p.label, p.value)) }
|
|
81939
82486
|
};
|
|
81940
82487
|
}),
|
|
81941
82488
|
"carbon-monoxide": contribution("carbon-monoxide", CarbonMonoxideStatusSchema, (slice) => {
|
|
@@ -81950,15 +82497,270 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
81950
82497
|
"numeric-sensor": numericContribution,
|
|
81951
82498
|
"enum-sensor": enumContribution
|
|
81952
82499
|
};
|
|
82500
|
+
/**
|
|
82501
|
+
* The heat pump's contribution to a hero (D1026): the compressor scene, every
|
|
82502
|
+
* circuit as a row with its own label and icon, the powers as pills (the
|
|
82503
|
+
* instantaneous COP is "—" when it cannot be computed) and a "System" group with
|
|
82504
|
+
* one selector per mode. Values and their limits come from the slice, which the
|
|
82505
|
+
* gateway filled: a selector with no allowed value is not drawn, a missing
|
|
82506
|
+
* reading is never a 0 (D393).
|
|
82507
|
+
*/
|
|
82508
|
+
var CAP = "heat-pump-control";
|
|
82509
|
+
var same = (text) => t(text, text);
|
|
82510
|
+
/** The words of the values the gateway names; a value not listed is drawn as the gateway wrote it. */
|
|
82511
|
+
var VALUE_LABELS = {
|
|
82512
|
+
off: t("Off", "Off"),
|
|
82513
|
+
on: t("On", "On"),
|
|
82514
|
+
auto: t("Auto", "Auto"),
|
|
82515
|
+
manual: t("Manual", "Manuale"),
|
|
82516
|
+
low: t("Low", "Bassa"),
|
|
82517
|
+
high: t("High", "Alta"),
|
|
82518
|
+
eco: t("Eco", "Eco"),
|
|
82519
|
+
heat: t("Heat", "Caldo"),
|
|
82520
|
+
cool: t("Cool", "Freddo"),
|
|
82521
|
+
heatCool: t("Heat/cool", "Caldo/freddo"),
|
|
82522
|
+
ownprogram: t("Programme", "Programma")
|
|
82523
|
+
};
|
|
82524
|
+
function valueLabel(value) {
|
|
82525
|
+
const known = VALUE_LABELS[value];
|
|
82526
|
+
if (known !== void 0) return known;
|
|
82527
|
+
const holiday = /^hm(\d+)$/.exec(value);
|
|
82528
|
+
if (holiday?.[1] !== void 0) return t(`Programme ${holiday[1]}`, `Programma ${holiday[1]}`);
|
|
82529
|
+
return same(value);
|
|
82530
|
+
}
|
|
82531
|
+
function optionLabels(allowed) {
|
|
82532
|
+
return Object.fromEntries(allowed.map((value) => [value, valueLabel(value)]));
|
|
82533
|
+
}
|
|
82534
|
+
function picker(id, label, setting, method, args, valueArg = "mode") {
|
|
82535
|
+
return {
|
|
82536
|
+
kind: "picker",
|
|
82537
|
+
id,
|
|
82538
|
+
label,
|
|
82539
|
+
current: setting.value,
|
|
82540
|
+
options: [...setting.allowed],
|
|
82541
|
+
optionLabels: optionLabels(setting.allowed),
|
|
82542
|
+
call: {
|
|
82543
|
+
cap: CAP,
|
|
82544
|
+
method,
|
|
82545
|
+
args: { ...args }
|
|
82546
|
+
},
|
|
82547
|
+
valueArg
|
|
82548
|
+
};
|
|
82549
|
+
}
|
|
82550
|
+
/** A selector exists only where the gateway named values to choose from. */
|
|
82551
|
+
function choosable(setting) {
|
|
82552
|
+
return setting !== null && setting.allowed.length > 0;
|
|
82553
|
+
}
|
|
82554
|
+
function circuitControl(circuit) {
|
|
82555
|
+
const args = { circuitId: circuit.id };
|
|
82556
|
+
if (circuit.kind === "dhw" && choosable(circuit.temperatureLevel)) return picker(`heat-pump.${circuit.id}.level`, t("Level", "Livello"), circuit.temperatureLevel, "setDhwTemperatureLevel", args, "level");
|
|
82557
|
+
if (!choosable(circuit.operationMode)) return null;
|
|
82558
|
+
const method = circuit.kind === "dhw" ? "setDhwOperationMode" : "setCircuitOperationMode";
|
|
82559
|
+
return picker(`heat-pump.${circuit.id}.mode`, t("Mode", "Modalità"), circuit.operationMode, method, args);
|
|
82560
|
+
}
|
|
82561
|
+
/** A circuit with no reading is still a row: it shows that nothing is known, not nothing. */
|
|
82562
|
+
var UNKNOWN_STATUS = same("—");
|
|
82563
|
+
function circuitRow(circuit) {
|
|
82564
|
+
const control = circuitControl(circuit);
|
|
82565
|
+
const status = thermalStatusText(circuit.targetTemp, circuit.currentTemp) ?? UNKNOWN_STATUS;
|
|
82566
|
+
return {
|
|
82567
|
+
id: "circuit",
|
|
82568
|
+
label: same(circuit.label),
|
|
82569
|
+
icon: circuit.icon,
|
|
82570
|
+
status,
|
|
82571
|
+
controls: control === null ? [] : [control]
|
|
82572
|
+
};
|
|
82573
|
+
}
|
|
82574
|
+
var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
|
|
82575
|
+
/** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
|
|
82576
|
+
function copPill(cop) {
|
|
82577
|
+
if (cop === null) return {
|
|
82578
|
+
icon: "gauge",
|
|
82579
|
+
text: t("Instantaneous COP —", "COP istantaneo —"),
|
|
82580
|
+
tone: "muted"
|
|
82581
|
+
};
|
|
82582
|
+
const text = String(Number(cop.toFixed(1)));
|
|
82583
|
+
return {
|
|
82584
|
+
icon: "gauge",
|
|
82585
|
+
text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
|
|
82586
|
+
tone: "success"
|
|
82587
|
+
};
|
|
82588
|
+
}
|
|
82589
|
+
function powerPills(status) {
|
|
82590
|
+
const { thermalW, electricalW } = status.power;
|
|
82591
|
+
const pills = [];
|
|
82592
|
+
if (thermalW !== null) pills.push({
|
|
82593
|
+
icon: "flame",
|
|
82594
|
+
text: t(`Thermal ${kilowatts(thermalW)}`, `Termica ${kilowatts(thermalW)}`),
|
|
82595
|
+
tone: "muted"
|
|
82596
|
+
});
|
|
82597
|
+
if (electricalW !== null) pills.push({
|
|
82598
|
+
icon: "zap",
|
|
82599
|
+
text: t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
|
|
82600
|
+
tone: "muted"
|
|
82601
|
+
});
|
|
82602
|
+
pills.push(copPill(heatPumpInstantCop(status.power)));
|
|
82603
|
+
return pills;
|
|
82604
|
+
}
|
|
82605
|
+
/** The independent system modes, in the order the card draws them. */
|
|
82606
|
+
var SYSTEM_MODES = [
|
|
82607
|
+
{
|
|
82608
|
+
key: "silent",
|
|
82609
|
+
label: t("Silent", "Silenzioso"),
|
|
82610
|
+
icon: "volume-x",
|
|
82611
|
+
method: "setSilentMode"
|
|
82612
|
+
},
|
|
82613
|
+
{
|
|
82614
|
+
key: "away",
|
|
82615
|
+
label: t("Away", "Assente"),
|
|
82616
|
+
icon: "plane",
|
|
82617
|
+
method: "setAwayMode"
|
|
82618
|
+
},
|
|
82619
|
+
{
|
|
82620
|
+
key: "additionalHeater",
|
|
82621
|
+
label: t("Additional heater", "Riscaldatore aggiuntivo"),
|
|
82622
|
+
icon: "flame",
|
|
82623
|
+
method: "setAdditionalHeaterMode"
|
|
82624
|
+
},
|
|
82625
|
+
{
|
|
82626
|
+
key: "holiday",
|
|
82627
|
+
label: t("Holiday", "Vacanza"),
|
|
82628
|
+
icon: "tree-palm",
|
|
82629
|
+
method: "setHolidayMode"
|
|
82630
|
+
}
|
|
82631
|
+
];
|
|
82632
|
+
var SYSTEM_GROUP = t("System", "Sistema");
|
|
82633
|
+
var PROGRAMME = /^hm\d+$/;
|
|
82634
|
+
/**
|
|
82635
|
+
* Holiday is two segments, off / programme. Choosing "programme" keeps the programme
|
|
82636
|
+
* that is set, else the first one the gateway allowed, so a write never leaves
|
|
82637
|
+
* `allowed`. The full hm1..hm8 pick is not in the hero (D1026). A holiday whose values
|
|
82638
|
+
* are not programmes keeps the plain selector.
|
|
82639
|
+
*/
|
|
82640
|
+
function holidayRow(def, setting) {
|
|
82641
|
+
if (!setting.allowed.includes("off")) return null;
|
|
82642
|
+
const current = setting.value !== null && PROGRAMME.test(setting.value) ? setting.value : null;
|
|
82643
|
+
const programme = current ?? setting.allowed.find((v) => PROGRAMME.test(v));
|
|
82644
|
+
if (programme === void 0) return null;
|
|
82645
|
+
const control = picker("heat-pump.system.holiday", def.label, {
|
|
82646
|
+
value: setting.value,
|
|
82647
|
+
allowed: ["off", programme]
|
|
82648
|
+
}, def.method, {});
|
|
82649
|
+
const number = programme.slice(2);
|
|
82650
|
+
return {
|
|
82651
|
+
id: "system-mode",
|
|
82652
|
+
label: def.label,
|
|
82653
|
+
group: SYSTEM_GROUP,
|
|
82654
|
+
icon: def.icon,
|
|
82655
|
+
status: current === null ? null : t(`Programme ${number}`, `Programma ${number}`),
|
|
82656
|
+
controls: [control.kind === "picker" ? {
|
|
82657
|
+
...control,
|
|
82658
|
+
optionLabels: {
|
|
82659
|
+
off: t("Off", "Off"),
|
|
82660
|
+
[programme]: t("Programme", "Programma")
|
|
82661
|
+
}
|
|
82662
|
+
} : control]
|
|
82663
|
+
};
|
|
82664
|
+
}
|
|
82665
|
+
function systemRows(status) {
|
|
82666
|
+
const rows = [];
|
|
82667
|
+
for (const def of SYSTEM_MODES) {
|
|
82668
|
+
const setting = status.system[def.key];
|
|
82669
|
+
if (!choosable(setting)) continue;
|
|
82670
|
+
if (def.key === "holiday") {
|
|
82671
|
+
const holiday = holidayRow(def, setting);
|
|
82672
|
+
if (holiday !== null) {
|
|
82673
|
+
rows.push(holiday);
|
|
82674
|
+
continue;
|
|
82675
|
+
}
|
|
82676
|
+
}
|
|
82677
|
+
rows.push({
|
|
82678
|
+
id: "system-mode",
|
|
82679
|
+
label: def.label,
|
|
82680
|
+
group: SYSTEM_GROUP,
|
|
82681
|
+
icon: def.icon,
|
|
82682
|
+
status: null,
|
|
82683
|
+
controls: [picker(`heat-pump.system.${def.key}`, def.label, setting, def.method, {})]
|
|
82684
|
+
});
|
|
82685
|
+
}
|
|
82686
|
+
return rows;
|
|
82687
|
+
}
|
|
82688
|
+
function tile(en, it, value) {
|
|
82689
|
+
return {
|
|
82690
|
+
label: t(en, it),
|
|
82691
|
+
value: same(value)
|
|
82692
|
+
};
|
|
82693
|
+
}
|
|
82694
|
+
function tilesOf$1(status) {
|
|
82695
|
+
const { supply, return: back, outdoor } = status.temperatures;
|
|
82696
|
+
const left = [];
|
|
82697
|
+
const right = [];
|
|
82698
|
+
if (supply !== null) left.push(tile("Supply", "Mandata", formatDegrees(supply)));
|
|
82699
|
+
if (back !== null) left.push(tile("Return", "Ritorno", formatDegrees(back)));
|
|
82700
|
+
if (outdoor !== null) right.push(tile("Outdoor", "Esterna", formatDegrees(outdoor)));
|
|
82701
|
+
if (status.waterPressureBar !== null) right.push(tile("Pressure", "Pressione", `${Number(status.waterPressureBar.toFixed(1))} bar`));
|
|
82702
|
+
return {
|
|
82703
|
+
left,
|
|
82704
|
+
right
|
|
82705
|
+
};
|
|
82706
|
+
}
|
|
82707
|
+
function isRunning(status) {
|
|
82708
|
+
const { compressorPct, electricalW } = status.power;
|
|
82709
|
+
if (compressorPct !== null) return compressorPct > 0;
|
|
82710
|
+
if (electricalW !== null) return electricalW > 0;
|
|
82711
|
+
return null;
|
|
82712
|
+
}
|
|
82713
|
+
var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pump-status", HeatPumpStatusSchema, (slice) => {
|
|
82714
|
+
if (slice === void 0) return { reading: reading("climate-control", "unknown") };
|
|
82715
|
+
const running = isRunning(slice);
|
|
82716
|
+
const facts = [];
|
|
82717
|
+
if (slice.power.electricalW !== null) facts.push(fact("power", "zap", same(`${Math.round(slice.power.electricalW)} W`)));
|
|
82718
|
+
if (slice.power.compressorPct !== null) facts.push(fact("level", "gauge", t(`Compressor ${Math.round(slice.power.compressorPct)} %`, `Compressore ${Math.round(slice.power.compressorPct)} %`)));
|
|
82719
|
+
const charging = slice.circuits.find((c) => c.active === true);
|
|
82720
|
+
const tiles = tilesOf$1(slice);
|
|
82721
|
+
const pills = powerPills(slice);
|
|
82722
|
+
const rows = [
|
|
82723
|
+
...slice.circuits.map(circuitRow),
|
|
82724
|
+
...pills.length === 0 ? [] : [{
|
|
82725
|
+
id: "heat-pump-power",
|
|
82726
|
+
icon: "zap",
|
|
82727
|
+
status: null,
|
|
82728
|
+
controls: [],
|
|
82729
|
+
pills: [...pills]
|
|
82730
|
+
}],
|
|
82731
|
+
...systemRows(slice)
|
|
82732
|
+
];
|
|
82733
|
+
return {
|
|
82734
|
+
reading: reading("climate-control", running === true ? "running" : running === false ? "idle" : "on"),
|
|
82735
|
+
title: t("Heat pump", "Pompa di calore"),
|
|
82736
|
+
...charging === void 0 ? {} : { caption: t(`${charging.label} · heating`.toUpperCase(), `${charging.label} · in riscaldamento`.toUpperCase()) },
|
|
82737
|
+
facts,
|
|
82738
|
+
...tiles.left.length === 0 && tiles.right.length === 0 ? {} : { tiles },
|
|
82739
|
+
...slice.power.electricalW === null ? {} : { consumption: {
|
|
82740
|
+
priority: 1,
|
|
82741
|
+
slot: {
|
|
82742
|
+
kind: "power",
|
|
82743
|
+
watts: slice.power.electricalW,
|
|
82744
|
+
detail: slice.power.thermalW === null ? [] : [{
|
|
82745
|
+
label: t("Thermal", "Termica"),
|
|
82746
|
+
value: Math.round(slice.power.thermalW),
|
|
82747
|
+
unit: "W"
|
|
82748
|
+
}]
|
|
82749
|
+
}
|
|
82750
|
+
} },
|
|
82751
|
+
rows
|
|
82752
|
+
};
|
|
82753
|
+
}) };
|
|
81953
82754
|
[
|
|
81954
82755
|
...Object.values(ACCESS_FAMILY_CONTRIBUTIONS),
|
|
81955
82756
|
...Object.values(DEVICES_FAMILY_CONTRIBUTIONS),
|
|
81956
82757
|
...Object.values(GROUPS_FAMILY_CONTRIBUTIONS),
|
|
81957
82758
|
...Object.values(ACTUATORS_FAMILY_CONTRIBUTIONS),
|
|
81958
82759
|
...Object.values(SENSORS_FAMILY_CONTRIBUTIONS),
|
|
81959
|
-
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS)
|
|
82760
|
+
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
|
|
82761
|
+
...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
|
|
81960
82762
|
];
|
|
81961
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
82763
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
81962
82764
|
/**
|
|
81963
82765
|
* Who looks like what (D1023). One look per {@link DeviceType}, refined by a
|
|
81964
82766
|
* {@link DeviceRole} where the role changes how the device reads (a leak
|
|
@@ -82348,7 +83150,7 @@ lookOf({
|
|
|
82348
83150
|
({ ...lookOf({
|
|
82349
83151
|
icon: "shield-check",
|
|
82350
83152
|
on: [
|
|
82351
|
-
"
|
|
83153
|
+
"danger",
|
|
82352
83154
|
"glow",
|
|
82353
83155
|
"halo"
|
|
82354
83156
|
],
|
|
@@ -82586,8 +83388,24 @@ lookOf({
|
|
|
82586
83388
|
idle: INFO,
|
|
82587
83389
|
standby: MUTED
|
|
82588
83390
|
});
|
|
83391
|
+
lookOf({
|
|
83392
|
+
icon: "thermometer-sun",
|
|
83393
|
+
on: [
|
|
83394
|
+
"warning",
|
|
83395
|
+
"heat-rise",
|
|
83396
|
+
"rise"
|
|
83397
|
+
],
|
|
83398
|
+
off: MUTED,
|
|
83399
|
+
running: [
|
|
83400
|
+
"warning",
|
|
83401
|
+
"heat-rise",
|
|
83402
|
+
"rise"
|
|
83403
|
+
],
|
|
83404
|
+
idle: INFO,
|
|
83405
|
+
standby: MUTED
|
|
83406
|
+
});
|
|
82589
83407
|
DeviceType.Climate, DeviceType.Thermostat;
|
|
82590
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
83408
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
82591
83409
|
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
82592
83410
|
Object.freeze({
|
|
82593
83411
|
"accessories.getStatus": {
|
|
@@ -82968,13 +83786,6 @@ Object.freeze({
|
|
|
82968
83786
|
access: "view",
|
|
82969
83787
|
role: "admin"
|
|
82970
83788
|
},
|
|
82971
|
-
"addonSettings.getIntegrationFormSchema": {
|
|
82972
|
-
capName: "addon-settings",
|
|
82973
|
-
capScope: "system",
|
|
82974
|
-
addonId: null,
|
|
82975
|
-
access: "view",
|
|
82976
|
-
role: "admin"
|
|
82977
|
-
},
|
|
82978
83789
|
"addonSettings.getScopedSettings": {
|
|
82979
83790
|
capName: "addon-settings",
|
|
82980
83791
|
capScope: "system",
|
|
@@ -84760,6 +85571,13 @@ Object.freeze({
|
|
|
84760
85571
|
access: "create",
|
|
84761
85572
|
role: "admin"
|
|
84762
85573
|
},
|
|
85574
|
+
"deviceManager.checkDeviceTemplates": {
|
|
85575
|
+
capName: "device-manager",
|
|
85576
|
+
capScope: "system",
|
|
85577
|
+
addonId: null,
|
|
85578
|
+
access: "view",
|
|
85579
|
+
role: "admin"
|
|
85580
|
+
},
|
|
84763
85581
|
"deviceManager.cleanupDeletedDevicesData": {
|
|
84764
85582
|
capName: "device-manager",
|
|
84765
85583
|
capScope: "system",
|
|
@@ -85159,6 +85977,13 @@ Object.freeze({
|
|
|
85159
85977
|
access: "create",
|
|
85160
85978
|
role: "admin"
|
|
85161
85979
|
},
|
|
85980
|
+
"deviceManager.renderDeviceTemplates": {
|
|
85981
|
+
capName: "device-manager",
|
|
85982
|
+
capScope: "system",
|
|
85983
|
+
addonId: null,
|
|
85984
|
+
access: "view",
|
|
85985
|
+
role: "admin"
|
|
85986
|
+
},
|
|
85162
85987
|
"deviceManager.reportDiscoveryObservations": {
|
|
85163
85988
|
capName: "device-manager",
|
|
85164
85989
|
capScope: "system",
|
|
@@ -86090,6 +86915,111 @@ Object.freeze({
|
|
|
86090
86915
|
access: "view",
|
|
86091
86916
|
role: "viewer"
|
|
86092
86917
|
},
|
|
86918
|
+
"heatPumpControl.setAdditionalHeaterMode": {
|
|
86919
|
+
capName: "heat-pump-control",
|
|
86920
|
+
capScope: "device",
|
|
86921
|
+
addonId: null,
|
|
86922
|
+
access: "create",
|
|
86923
|
+
role: "viewer"
|
|
86924
|
+
},
|
|
86925
|
+
"heatPumpControl.setAwayMode": {
|
|
86926
|
+
capName: "heat-pump-control",
|
|
86927
|
+
capScope: "device",
|
|
86928
|
+
addonId: null,
|
|
86929
|
+
access: "create",
|
|
86930
|
+
role: "viewer"
|
|
86931
|
+
},
|
|
86932
|
+
"heatPumpControl.setCircuitComfortSetpoint": {
|
|
86933
|
+
capName: "heat-pump-control",
|
|
86934
|
+
capScope: "device",
|
|
86935
|
+
addonId: null,
|
|
86936
|
+
access: "create",
|
|
86937
|
+
role: "viewer"
|
|
86938
|
+
},
|
|
86939
|
+
"heatPumpControl.setCircuitEcoSetpoint": {
|
|
86940
|
+
capName: "heat-pump-control",
|
|
86941
|
+
capScope: "device",
|
|
86942
|
+
addonId: null,
|
|
86943
|
+
access: "create",
|
|
86944
|
+
role: "viewer"
|
|
86945
|
+
},
|
|
86946
|
+
"heatPumpControl.setCircuitHeatCoolMode": {
|
|
86947
|
+
capName: "heat-pump-control",
|
|
86948
|
+
capScope: "device",
|
|
86949
|
+
addonId: null,
|
|
86950
|
+
access: "create",
|
|
86951
|
+
role: "viewer"
|
|
86952
|
+
},
|
|
86953
|
+
"heatPumpControl.setCircuitMaxFlowTemp": {
|
|
86954
|
+
capName: "heat-pump-control",
|
|
86955
|
+
capScope: "device",
|
|
86956
|
+
addonId: null,
|
|
86957
|
+
access: "create",
|
|
86958
|
+
role: "viewer"
|
|
86959
|
+
},
|
|
86960
|
+
"heatPumpControl.setCircuitOperationMode": {
|
|
86961
|
+
capName: "heat-pump-control",
|
|
86962
|
+
capScope: "device",
|
|
86963
|
+
addonId: null,
|
|
86964
|
+
access: "create",
|
|
86965
|
+
role: "viewer"
|
|
86966
|
+
},
|
|
86967
|
+
"heatPumpControl.setCircuitSummerWinter": {
|
|
86968
|
+
capName: "heat-pump-control",
|
|
86969
|
+
capScope: "device",
|
|
86970
|
+
addonId: null,
|
|
86971
|
+
access: "create",
|
|
86972
|
+
role: "viewer"
|
|
86973
|
+
},
|
|
86974
|
+
"heatPumpControl.setDhwChargeDuration": {
|
|
86975
|
+
capName: "heat-pump-control",
|
|
86976
|
+
capScope: "device",
|
|
86977
|
+
addonId: null,
|
|
86978
|
+
access: "create",
|
|
86979
|
+
role: "viewer"
|
|
86980
|
+
},
|
|
86981
|
+
"heatPumpControl.setDhwOperationMode": {
|
|
86982
|
+
capName: "heat-pump-control",
|
|
86983
|
+
capScope: "device",
|
|
86984
|
+
addonId: null,
|
|
86985
|
+
access: "create",
|
|
86986
|
+
role: "viewer"
|
|
86987
|
+
},
|
|
86988
|
+
"heatPumpControl.setDhwTemperatureLevel": {
|
|
86989
|
+
capName: "heat-pump-control",
|
|
86990
|
+
capScope: "device",
|
|
86991
|
+
addonId: null,
|
|
86992
|
+
access: "create",
|
|
86993
|
+
role: "viewer"
|
|
86994
|
+
},
|
|
86995
|
+
"heatPumpControl.setHolidayMode": {
|
|
86996
|
+
capName: "heat-pump-control",
|
|
86997
|
+
capScope: "device",
|
|
86998
|
+
addonId: null,
|
|
86999
|
+
access: "create",
|
|
87000
|
+
role: "viewer"
|
|
87001
|
+
},
|
|
87002
|
+
"heatPumpControl.setSilentMode": {
|
|
87003
|
+
capName: "heat-pump-control",
|
|
87004
|
+
capScope: "device",
|
|
87005
|
+
addonId: null,
|
|
87006
|
+
access: "create",
|
|
87007
|
+
role: "viewer"
|
|
87008
|
+
},
|
|
87009
|
+
"heatPumpControl.startExtraHotWater": {
|
|
87010
|
+
capName: "heat-pump-control",
|
|
87011
|
+
capScope: "device",
|
|
87012
|
+
addonId: null,
|
|
87013
|
+
access: "create",
|
|
87014
|
+
role: "viewer"
|
|
87015
|
+
},
|
|
87016
|
+
"heatPumpStatus.getStatus": {
|
|
87017
|
+
capName: "heat-pump-status",
|
|
87018
|
+
capScope: "device",
|
|
87019
|
+
addonId: null,
|
|
87020
|
+
access: "view",
|
|
87021
|
+
role: "viewer"
|
|
87022
|
+
},
|
|
86093
87023
|
"heroLayout.getHeroModel": {
|
|
86094
87024
|
capName: "hero-layout",
|
|
86095
87025
|
capScope: "system",
|
|
@@ -90997,13 +91927,6 @@ Object.freeze({
|
|
|
90997
91927
|
access: "create",
|
|
90998
91928
|
role: "admin"
|
|
90999
91929
|
},
|
|
91000
|
-
"smtpProvider.verify": {
|
|
91001
|
-
capName: "smtp-provider",
|
|
91002
|
-
capScope: "system",
|
|
91003
|
-
addonId: null,
|
|
91004
|
-
access: "view",
|
|
91005
|
-
role: "admin"
|
|
91006
|
-
},
|
|
91007
91930
|
"snapshot.applyDeviceSettingsPatch": {
|
|
91008
91931
|
capName: "snapshot",
|
|
91009
91932
|
capScope: "device",
|
|
@@ -92936,7 +93859,7 @@ function projectAction(cap, action) {
|
|
|
92936
93859
|
};
|
|
92937
93860
|
}
|
|
92938
93861
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
92939
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
93862
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
92940
93863
|
/**
|
|
92941
93864
|
* Heuristic check — `device.features?.includes(profile.when.hasFeature)`.
|
|
92942
93865
|
*/
|
|
@@ -93005,7 +93928,6 @@ function offered(received) {
|
|
|
93005
93928
|
};
|
|
93006
93929
|
}
|
|
93007
93930
|
offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
|
|
93008
|
-
string().min(1).max(4096);
|
|
93009
93931
|
Object.freeze({
|
|
93010
93932
|
"accessories.getStatus": [{
|
|
93011
93933
|
name: "deviceId",
|
|
@@ -94088,6 +95010,81 @@ Object.freeze({
|
|
|
94088
95010
|
form: "single",
|
|
94089
95011
|
optional: false
|
|
94090
95012
|
}],
|
|
95013
|
+
"heatPumpControl.setAdditionalHeaterMode": [{
|
|
95014
|
+
name: "deviceId",
|
|
95015
|
+
form: "single",
|
|
95016
|
+
optional: false
|
|
95017
|
+
}],
|
|
95018
|
+
"heatPumpControl.setAwayMode": [{
|
|
95019
|
+
name: "deviceId",
|
|
95020
|
+
form: "single",
|
|
95021
|
+
optional: false
|
|
95022
|
+
}],
|
|
95023
|
+
"heatPumpControl.setCircuitComfortSetpoint": [{
|
|
95024
|
+
name: "deviceId",
|
|
95025
|
+
form: "single",
|
|
95026
|
+
optional: false
|
|
95027
|
+
}],
|
|
95028
|
+
"heatPumpControl.setCircuitEcoSetpoint": [{
|
|
95029
|
+
name: "deviceId",
|
|
95030
|
+
form: "single",
|
|
95031
|
+
optional: false
|
|
95032
|
+
}],
|
|
95033
|
+
"heatPumpControl.setCircuitHeatCoolMode": [{
|
|
95034
|
+
name: "deviceId",
|
|
95035
|
+
form: "single",
|
|
95036
|
+
optional: false
|
|
95037
|
+
}],
|
|
95038
|
+
"heatPumpControl.setCircuitMaxFlowTemp": [{
|
|
95039
|
+
name: "deviceId",
|
|
95040
|
+
form: "single",
|
|
95041
|
+
optional: false
|
|
95042
|
+
}],
|
|
95043
|
+
"heatPumpControl.setCircuitOperationMode": [{
|
|
95044
|
+
name: "deviceId",
|
|
95045
|
+
form: "single",
|
|
95046
|
+
optional: false
|
|
95047
|
+
}],
|
|
95048
|
+
"heatPumpControl.setCircuitSummerWinter": [{
|
|
95049
|
+
name: "deviceId",
|
|
95050
|
+
form: "single",
|
|
95051
|
+
optional: false
|
|
95052
|
+
}],
|
|
95053
|
+
"heatPumpControl.setDhwChargeDuration": [{
|
|
95054
|
+
name: "deviceId",
|
|
95055
|
+
form: "single",
|
|
95056
|
+
optional: false
|
|
95057
|
+
}],
|
|
95058
|
+
"heatPumpControl.setDhwOperationMode": [{
|
|
95059
|
+
name: "deviceId",
|
|
95060
|
+
form: "single",
|
|
95061
|
+
optional: false
|
|
95062
|
+
}],
|
|
95063
|
+
"heatPumpControl.setDhwTemperatureLevel": [{
|
|
95064
|
+
name: "deviceId",
|
|
95065
|
+
form: "single",
|
|
95066
|
+
optional: false
|
|
95067
|
+
}],
|
|
95068
|
+
"heatPumpControl.setHolidayMode": [{
|
|
95069
|
+
name: "deviceId",
|
|
95070
|
+
form: "single",
|
|
95071
|
+
optional: false
|
|
95072
|
+
}],
|
|
95073
|
+
"heatPumpControl.setSilentMode": [{
|
|
95074
|
+
name: "deviceId",
|
|
95075
|
+
form: "single",
|
|
95076
|
+
optional: false
|
|
95077
|
+
}],
|
|
95078
|
+
"heatPumpControl.startExtraHotWater": [{
|
|
95079
|
+
name: "deviceId",
|
|
95080
|
+
form: "single",
|
|
95081
|
+
optional: false
|
|
95082
|
+
}],
|
|
95083
|
+
"heatPumpStatus.getStatus": [{
|
|
95084
|
+
name: "deviceId",
|
|
95085
|
+
form: "single",
|
|
95086
|
+
optional: false
|
|
95087
|
+
}],
|
|
94091
95088
|
"heroLayout.getHeroModel": [{
|
|
94092
95089
|
name: "deviceId",
|
|
94093
95090
|
form: "single",
|