@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.mjs
CHANGED
|
@@ -805,7 +805,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
805
805
|
return EventCategory;
|
|
806
806
|
}({});
|
|
807
807
|
//#endregion
|
|
808
|
-
//#region ../types/dist/
|
|
808
|
+
//#region ../types/dist/composed-stable-id-DLcPInGv.mjs
|
|
809
809
|
/**
|
|
810
810
|
import { errMsg } from '@camstack/types'
|
|
811
811
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -931,6 +931,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
931
931
|
* (`reboot`, `device-admin-link`). Products are NOT its children — they are
|
|
932
932
|
* adopted beside it — and its connection settings stay on the integration. */
|
|
933
933
|
DeviceType["Gateway"] = "gateway";
|
|
934
|
+
/** A heat pump (any vendor): the compressor unit with its circuits (heating, hot
|
|
935
|
+
* water, cooling, solar), its system modes and its power. One main read-only
|
|
936
|
+
* `heat-pump-status` cap carries all of it; `heat-pump-control` sets it (D1026). */
|
|
937
|
+
DeviceType["HeatPump"] = "heat-pump";
|
|
934
938
|
return DeviceType;
|
|
935
939
|
}({});
|
|
936
940
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -1203,6 +1207,12 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1203
1207
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
1204
1208
|
return DeviceRole;
|
|
1205
1209
|
}({});
|
|
1210
|
+
/**
|
|
1211
|
+
* A composed device's stableId is this prefix plus the block id. Its own module,
|
|
1212
|
+
* free of zod, so the addon runner can read it through `@camstack/types/addon`
|
|
1213
|
+
* without loading the schema barrel (D28).
|
|
1214
|
+
*/
|
|
1215
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
1206
1216
|
//#endregion
|
|
1207
1217
|
//#region ../../node_modules/zod/v4/core/core.js
|
|
1208
1218
|
var _a$1;
|
|
@@ -6015,7 +6025,7 @@ var ZodIssueCode = {
|
|
|
6015
6025
|
var ZodFirstPartyTypeKind;
|
|
6016
6026
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6017
6027
|
//#endregion
|
|
6018
|
-
//#region ../types/dist/sleep-
|
|
6028
|
+
//#region ../types/dist/sleep-VrfKAAGN.mjs
|
|
6019
6029
|
/**
|
|
6020
6030
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6021
6031
|
* window to float samples (D455).
|
|
@@ -8256,16 +8266,6 @@ var BaseAddon = class {
|
|
|
8256
8266
|
return null;
|
|
8257
8267
|
}
|
|
8258
8268
|
/**
|
|
8259
|
-
* The form schema of ONE integration instance, or `null` to use the scoped form.
|
|
8260
|
-
*
|
|
8261
|
-
* Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
|
|
8262
|
-
* needs its connection fields, the default integration the addon's own sections. It is the
|
|
8263
|
-
* SHAPE of the form only — the values live on the instance record.
|
|
8264
|
-
*/
|
|
8265
|
-
async integrationFormSchema(_instance) {
|
|
8266
|
-
return null;
|
|
8267
|
-
}
|
|
8268
|
-
/**
|
|
8269
8269
|
* D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
|
|
8270
8270
|
* provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
|
|
8271
8271
|
* declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
|
|
@@ -8293,8 +8293,7 @@ var BaseAddon = class {
|
|
|
8293
8293
|
}
|
|
8294
8294
|
/**
|
|
8295
8295
|
* The host's read of the scoped declarations: the schema one capability declares for `scope`,
|
|
8296
|
-
* or `null`.
|
|
8297
|
-
* host asks this method.
|
|
8296
|
+
* or `null`. The hook is protected, the host asks this method.
|
|
8298
8297
|
*/
|
|
8299
8298
|
async getScopedSettingsSchema(scope, cap) {
|
|
8300
8299
|
switch (scope) {
|
|
@@ -8462,22 +8461,6 @@ var BaseAddon = class {
|
|
|
8462
8461
|
return Object.fromEntries([...collectHydratedFieldValues(form)].filter(([, value]) => value !== void 0));
|
|
8463
8462
|
}
|
|
8464
8463
|
/**
|
|
8465
|
-
* What the create wizard and the integration edit page render for one instance: the addon's
|
|
8466
|
-
* per-instance schema when it declares one, else its global schema (what they always showed).
|
|
8467
|
-
*/
|
|
8468
|
-
async getIntegrationFormSchema(instance, nodeId) {
|
|
8469
|
-
const scoped = await this.integrationFormSchema(instance);
|
|
8470
|
-
if (scoped === null) return this.scopedForm(nodeId);
|
|
8471
|
-
return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
|
|
8472
|
-
}
|
|
8473
|
-
/** The form of the scoped schemas this addon declared, hydrated from its store. */
|
|
8474
|
-
async scopedForm(nodeId) {
|
|
8475
|
-
await this.loadScopedSchemas();
|
|
8476
|
-
const schema = this.scopedFormSchema();
|
|
8477
|
-
if (!schema) return { sections: [] };
|
|
8478
|
-
return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
|
|
8479
|
-
}
|
|
8480
|
-
/**
|
|
8481
8464
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
8482
8465
|
* every `perNode: true` field carries THAT node's scoped value on its bare
|
|
8483
8466
|
* key (absent scoped key ⇒ key absent, so the schema `default` wins — no
|
|
@@ -8664,12 +8647,6 @@ var BaseAddon = class {
|
|
|
8664
8647
|
this._nodeKeysByCap = /* @__PURE__ */ new Map();
|
|
8665
8648
|
this._addonSecretTree = null;
|
|
8666
8649
|
}
|
|
8667
|
-
/** The form of an addon's scoped schemas: their sections, each shown once. */
|
|
8668
|
-
scopedFormSchema(cap) {
|
|
8669
|
-
const byId = /* @__PURE__ */ new Map();
|
|
8670
|
-
for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
|
|
8671
|
-
return byId.size === 0 ? null : { sections: [...byId.values()] };
|
|
8672
|
-
}
|
|
8673
8650
|
/** Every loaded scoped schema of `cap`, or of every loaded capability. */
|
|
8674
8651
|
loadedScopedSchemas(cap) {
|
|
8675
8652
|
if (cap !== void 0) return this._scopedByCap.get(cap) ?? [];
|
|
@@ -9259,6 +9236,10 @@ function normalizeAddonInitResult(result) {
|
|
|
9259
9236
|
if (Array.isArray(result)) return { providers: result };
|
|
9260
9237
|
return result;
|
|
9261
9238
|
}
|
|
9239
|
+
object({
|
|
9240
|
+
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
9241
|
+
params: record(string(), union([string(), number$1()])).optional()
|
|
9242
|
+
});
|
|
9262
9243
|
object({
|
|
9263
9244
|
field: string().min(1),
|
|
9264
9245
|
on: literal("advance")
|
|
@@ -9335,12 +9316,6 @@ function systemMethod(input, output, options) {
|
|
|
9335
9316
|
systemOnly: true
|
|
9336
9317
|
};
|
|
9337
9318
|
}
|
|
9338
|
-
/**
|
|
9339
|
-
* A method a SOURCE of a collection cap may legitimately not serve — OPTIONAL
|
|
9340
|
-
* on `InferProvider`. The `providerOptional: true` literal is what
|
|
9341
|
-
* `InferProvider` keys on; see {@link CapabilityMethodSchema.providerOptional}
|
|
9342
|
-
* for when this is the honest answer and when it is a soft stub.
|
|
9343
|
-
*/
|
|
9344
9319
|
function optionalMethod(input, output, options) {
|
|
9345
9320
|
return {
|
|
9346
9321
|
...method(input, output, options),
|
|
@@ -9589,15 +9564,52 @@ var PeerBytesTicketSchema = object({
|
|
|
9589
9564
|
*/
|
|
9590
9565
|
declaredBytes: number$1().int().nonnegative().nullable()
|
|
9591
9566
|
});
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9567
|
+
/**
|
|
9568
|
+
* The match a notification rule fired on (D705). Carried as a command origin so an
|
|
9569
|
+
* Action the rule starts can press `alarm-panel.trigger` as that match, not as an
|
|
9570
|
+
* anonymous press (D735). The same fields a rule fire ref freezes.
|
|
9571
|
+
*/
|
|
9572
|
+
var RuleFireOriginSchema = object({
|
|
9573
|
+
ruleId: string(),
|
|
9574
|
+
ruleName: string(),
|
|
9575
|
+
deviceId: number$1().int(),
|
|
9576
|
+
sourceDeviceId: number$1().int().optional(),
|
|
9577
|
+
recordId: string(),
|
|
9578
|
+
timestamp: number$1(),
|
|
9579
|
+
trackId: string().optional(),
|
|
9580
|
+
eventId: string().optional(),
|
|
9581
|
+
className: string().optional(),
|
|
9582
|
+
label: string().optional(),
|
|
9583
|
+
zones: array(string()).optional(),
|
|
9584
|
+
confidence: number$1().optional(),
|
|
9585
|
+
sensorChange: object({
|
|
9586
|
+
name: string(),
|
|
9587
|
+
kind: string(),
|
|
9588
|
+
state: string()
|
|
9589
|
+
}).optional(),
|
|
9590
|
+
extraStills: array(object({
|
|
9591
|
+
ownerId: string(),
|
|
9592
|
+
cameraId: number$1().int()
|
|
9593
|
+
})).optional()
|
|
9594
|
+
});
|
|
9595
|
+
discriminatedUnion("kind", [
|
|
9596
|
+
object({
|
|
9597
|
+
kind: literal("action"),
|
|
9598
|
+
actionId: string(),
|
|
9599
|
+
runId: string(),
|
|
9600
|
+
automationId: string().optional(),
|
|
9601
|
+
/** The rule fire that started this run, when one did (D705). */
|
|
9602
|
+
ruleFire: RuleFireOriginSchema.optional()
|
|
9603
|
+
}),
|
|
9604
|
+
object({
|
|
9605
|
+
kind: literal("scheduler"),
|
|
9606
|
+
schedulerId: string()
|
|
9607
|
+
}),
|
|
9608
|
+
object({
|
|
9609
|
+
kind: literal("rule"),
|
|
9610
|
+
fire: RuleFireOriginSchema
|
|
9611
|
+
})
|
|
9612
|
+
]);
|
|
9601
9613
|
/**
|
|
9602
9614
|
* One recorded device transition (D1022): a status field of a device went from
|
|
9603
9615
|
* one value to another, with who or what asked for it.
|
|
@@ -10552,7 +10564,7 @@ function t(en, it) {
|
|
|
10552
10564
|
* Things an operator switches, opens, sets or arms: lights, plugs, sirens,
|
|
10553
10565
|
* covers, valves, locks, climate, fans, alarm panels.
|
|
10554
10566
|
*/
|
|
10555
|
-
var ON = t("On", "Acceso");
|
|
10567
|
+
var ON$1 = t("On", "Acceso");
|
|
10556
10568
|
var PERCENT = t("Percentage", "Percentuale");
|
|
10557
10569
|
var OPEN_CLOSE_STATES = [
|
|
10558
10570
|
{
|
|
@@ -10612,7 +10624,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
10612
10624
|
state: [{
|
|
10613
10625
|
kind: "boolean",
|
|
10614
10626
|
field: "on",
|
|
10615
|
-
label: ON,
|
|
10627
|
+
label: ON$1,
|
|
10616
10628
|
whenTrue: t("When {device} turns on", "Quando {device} si accende"),
|
|
10617
10629
|
whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
|
|
10618
10630
|
icon: "power"
|
|
@@ -11778,7 +11790,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
11778
11790
|
state: [{
|
|
11779
11791
|
kind: "boolean",
|
|
11780
11792
|
field: "on",
|
|
11781
|
-
label: ON,
|
|
11793
|
+
label: ON$1,
|
|
11782
11794
|
whenTrue: t("When {device} turns on", "Quando {device} si accende"),
|
|
11783
11795
|
whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
|
|
11784
11796
|
icon: "power"
|
|
@@ -14190,6 +14202,133 @@ var CAMERA_CAP_VOCABULARY = {
|
|
|
14190
14202
|
}
|
|
14191
14203
|
};
|
|
14192
14204
|
/**
|
|
14205
|
+
* The heat pump (D1026): its system modes are phrased for automations, each with the
|
|
14206
|
+
* values the gateway really accepts; the per-circuit parameters need a circuit and are
|
|
14207
|
+
* set from the device page.
|
|
14208
|
+
*/
|
|
14209
|
+
var OFF = {
|
|
14210
|
+
value: "off",
|
|
14211
|
+
label: t("Off", "Off")
|
|
14212
|
+
};
|
|
14213
|
+
var AUTO = {
|
|
14214
|
+
value: "auto",
|
|
14215
|
+
label: t("Auto", "Auto")
|
|
14216
|
+
};
|
|
14217
|
+
var ON = {
|
|
14218
|
+
value: "on",
|
|
14219
|
+
label: t("On", "On")
|
|
14220
|
+
};
|
|
14221
|
+
var MANUAL = {
|
|
14222
|
+
value: "manual",
|
|
14223
|
+
label: t("Manual", "Manuale")
|
|
14224
|
+
};
|
|
14225
|
+
var HOLIDAY_PROGRAMMES = [OFF, ...[
|
|
14226
|
+
1,
|
|
14227
|
+
2,
|
|
14228
|
+
3,
|
|
14229
|
+
4,
|
|
14230
|
+
5,
|
|
14231
|
+
6,
|
|
14232
|
+
7,
|
|
14233
|
+
8
|
|
14234
|
+
].map((n) => ({
|
|
14235
|
+
value: `hm${n}`,
|
|
14236
|
+
label: t(`Programme ${n}`, `Programma ${n}`)
|
|
14237
|
+
}))];
|
|
14238
|
+
var PER_CIRCUIT = "Needs a circuit: set from the device page, not offered to automations";
|
|
14239
|
+
var HEAT_PUMP_CAP_VOCABULARY = {
|
|
14240
|
+
"heat-pump-status": {
|
|
14241
|
+
scope: "device",
|
|
14242
|
+
noun: t("Heat pump", "Pompa di calore")
|
|
14243
|
+
},
|
|
14244
|
+
"heat-pump-control": {
|
|
14245
|
+
scope: "device",
|
|
14246
|
+
noun: t("Heat pump settings", "Impostazioni pompa di calore"),
|
|
14247
|
+
actions: [
|
|
14248
|
+
{
|
|
14249
|
+
id: "heatPump.silent",
|
|
14250
|
+
method: "setSilentMode",
|
|
14251
|
+
label: t("Set silent mode", "Imposta la modalità silenziosa"),
|
|
14252
|
+
phrase: t("Set silent mode of {device} to {mode}", "Imposta la modalità silenziosa di {device} su {mode}"),
|
|
14253
|
+
icon: "volume-x",
|
|
14254
|
+
openArgs: [{
|
|
14255
|
+
key: "mode",
|
|
14256
|
+
label: t("Silent mode", "Modalità silenziosa"),
|
|
14257
|
+
offer: {
|
|
14258
|
+
kind: "enum",
|
|
14259
|
+
values: [
|
|
14260
|
+
OFF,
|
|
14261
|
+
AUTO,
|
|
14262
|
+
ON
|
|
14263
|
+
]
|
|
14264
|
+
}
|
|
14265
|
+
}]
|
|
14266
|
+
},
|
|
14267
|
+
{
|
|
14268
|
+
id: "heatPump.away",
|
|
14269
|
+
method: "setAwayMode",
|
|
14270
|
+
label: t("Set away mode", "Imposta la modalità assente"),
|
|
14271
|
+
phrase: t("Set away mode of {device} to {mode}", "Imposta la modalità assente di {device} su {mode}"),
|
|
14272
|
+
icon: "plane",
|
|
14273
|
+
openArgs: [{
|
|
14274
|
+
key: "mode",
|
|
14275
|
+
label: t("Away mode", "Modalità assente"),
|
|
14276
|
+
offer: {
|
|
14277
|
+
kind: "enum",
|
|
14278
|
+
values: [OFF, ON]
|
|
14279
|
+
}
|
|
14280
|
+
}]
|
|
14281
|
+
},
|
|
14282
|
+
{
|
|
14283
|
+
id: "heatPump.additionalHeater",
|
|
14284
|
+
method: "setAdditionalHeaterMode",
|
|
14285
|
+
label: t("Set additional heater", "Imposta il riscaldatore aggiuntivo"),
|
|
14286
|
+
phrase: t("Set the additional heater of {device} to {mode}", "Imposta il riscaldatore aggiuntivo di {device} su {mode}"),
|
|
14287
|
+
icon: "flame",
|
|
14288
|
+
openArgs: [{
|
|
14289
|
+
key: "mode",
|
|
14290
|
+
label: t("Additional heater", "Riscaldatore aggiuntivo"),
|
|
14291
|
+
offer: {
|
|
14292
|
+
kind: "enum",
|
|
14293
|
+
values: [
|
|
14294
|
+
OFF,
|
|
14295
|
+
MANUAL,
|
|
14296
|
+
AUTO
|
|
14297
|
+
]
|
|
14298
|
+
}
|
|
14299
|
+
}]
|
|
14300
|
+
},
|
|
14301
|
+
{
|
|
14302
|
+
id: "heatPump.holiday",
|
|
14303
|
+
method: "setHolidayMode",
|
|
14304
|
+
label: t("Set holiday mode", "Imposta la modalità vacanza"),
|
|
14305
|
+
phrase: t("Set holiday mode of {device} to {mode}", "Imposta la modalità vacanza di {device} su {mode}"),
|
|
14306
|
+
icon: "tree-palm",
|
|
14307
|
+
openArgs: [{
|
|
14308
|
+
key: "mode",
|
|
14309
|
+
label: t("Holiday programme", "Programma vacanza"),
|
|
14310
|
+
offer: {
|
|
14311
|
+
kind: "enum",
|
|
14312
|
+
values: HOLIDAY_PROGRAMMES
|
|
14313
|
+
}
|
|
14314
|
+
}]
|
|
14315
|
+
}
|
|
14316
|
+
],
|
|
14317
|
+
notOperatorFacing: {
|
|
14318
|
+
setCircuitOperationMode: PER_CIRCUIT,
|
|
14319
|
+
setCircuitHeatCoolMode: PER_CIRCUIT,
|
|
14320
|
+
setCircuitSummerWinter: PER_CIRCUIT,
|
|
14321
|
+
setCircuitComfortSetpoint: PER_CIRCUIT,
|
|
14322
|
+
setCircuitEcoSetpoint: PER_CIRCUIT,
|
|
14323
|
+
setCircuitMaxFlowTemp: PER_CIRCUIT,
|
|
14324
|
+
setDhwOperationMode: PER_CIRCUIT,
|
|
14325
|
+
setDhwTemperatureLevel: PER_CIRCUIT,
|
|
14326
|
+
setDhwChargeDuration: PER_CIRCUIT,
|
|
14327
|
+
startExtraHotWater: PER_CIRCUIT
|
|
14328
|
+
}
|
|
14329
|
+
}
|
|
14330
|
+
};
|
|
14331
|
+
/**
|
|
14193
14332
|
* Things an operator WATCHES: contacts, motion, leaks, smoke, measurements,
|
|
14194
14333
|
* presence, reachability, batteries, doorbells and event sources.
|
|
14195
14334
|
*/
|
|
@@ -14911,6 +15050,7 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
14911
15050
|
...ACTUATOR_CAP_VOCABULARY,
|
|
14912
15051
|
...APPLIANCE_CAP_VOCABULARY,
|
|
14913
15052
|
...CAMERA_CAP_VOCABULARY,
|
|
15053
|
+
...HEAT_PUMP_CAP_VOCABULARY,
|
|
14914
15054
|
...SENSOR_CAP_VOCABULARY,
|
|
14915
15055
|
...SYSTEM_CAP_VOCABULARY
|
|
14916
15056
|
};
|
|
@@ -15248,6 +15388,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
15248
15388
|
"group-active",
|
|
15249
15389
|
"group-commands",
|
|
15250
15390
|
"group-status",
|
|
15391
|
+
"heat-pump-control",
|
|
15392
|
+
"heat-pump-status",
|
|
15251
15393
|
"heating-valve",
|
|
15252
15394
|
"hero-layout",
|
|
15253
15395
|
"humidifier",
|
|
@@ -16113,6 +16255,48 @@ Object.freeze({
|
|
|
16113
16255
|
"valueType": "number"
|
|
16114
16256
|
}
|
|
16115
16257
|
],
|
|
16258
|
+
"heat-pump-status": [
|
|
16259
|
+
{
|
|
16260
|
+
"path": "power.thermalW",
|
|
16261
|
+
"valueType": "number"
|
|
16262
|
+
},
|
|
16263
|
+
{
|
|
16264
|
+
"path": "power.electricalW",
|
|
16265
|
+
"valueType": "number"
|
|
16266
|
+
},
|
|
16267
|
+
{
|
|
16268
|
+
"path": "power.compressorPct",
|
|
16269
|
+
"valueType": "number"
|
|
16270
|
+
},
|
|
16271
|
+
{
|
|
16272
|
+
"path": "temperatures.supply",
|
|
16273
|
+
"valueType": "number"
|
|
16274
|
+
},
|
|
16275
|
+
{
|
|
16276
|
+
"path": "temperatures.return",
|
|
16277
|
+
"valueType": "number"
|
|
16278
|
+
},
|
|
16279
|
+
{
|
|
16280
|
+
"path": "temperatures.outdoor",
|
|
16281
|
+
"valueType": "number"
|
|
16282
|
+
},
|
|
16283
|
+
{
|
|
16284
|
+
"path": "energy.thermalKwh",
|
|
16285
|
+
"valueType": "number"
|
|
16286
|
+
},
|
|
16287
|
+
{
|
|
16288
|
+
"path": "energy.electricalKwh",
|
|
16289
|
+
"valueType": "number"
|
|
16290
|
+
},
|
|
16291
|
+
{
|
|
16292
|
+
"path": "waterPressureBar",
|
|
16293
|
+
"valueType": "number"
|
|
16294
|
+
},
|
|
16295
|
+
{
|
|
16296
|
+
"path": "starts",
|
|
16297
|
+
"valueType": "number"
|
|
16298
|
+
}
|
|
16299
|
+
],
|
|
16116
16300
|
"heating-valve": [{
|
|
16117
16301
|
"path": "position",
|
|
16118
16302
|
"valueType": "number"
|
|
@@ -17253,10 +17437,6 @@ Object.freeze({
|
|
|
17253
17437
|
"uploadDataset": 72e5
|
|
17254
17438
|
}
|
|
17255
17439
|
});
|
|
17256
|
-
object({
|
|
17257
|
-
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
17258
|
-
params: record(string(), union([string(), number$1()])).optional()
|
|
17259
|
-
});
|
|
17260
17440
|
/**
|
|
17261
17441
|
* Promise-based timer helpers — used everywhere the codebase needs to
|
|
17262
17442
|
* wait, back off, or schedule a retry. Before these helpers landed, each
|
|
@@ -17282,7 +17462,7 @@ function sleep(ms) {
|
|
|
17282
17462
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
17283
17463
|
}
|
|
17284
17464
|
//#endregion
|
|
17285
|
-
//#region ../types/dist/composition-
|
|
17465
|
+
//#region ../types/dist/composition-BFJq1Y88.mjs
|
|
17286
17466
|
/**
|
|
17287
17467
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
17288
17468
|
*
|
|
@@ -18387,8 +18567,6 @@ var HelperSpecSchema = discriminatedUnion("kind", [
|
|
|
18387
18567
|
*/
|
|
18388
18568
|
/** The owner of every composed device: the `composer` builtin. */
|
|
18389
18569
|
var COMPOSER_ADDON_ID = "composer";
|
|
18390
|
-
/** A composed device's stableId is this prefix plus the block id. */
|
|
18391
|
-
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
18392
18570
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
18393
18571
|
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
18394
18572
|
/** One field of one capability of one source device. */
|
|
@@ -19160,25 +19338,6 @@ var RequiredAddonUpdateSchema = object({
|
|
|
19160
19338
|
installed: string().nullable()
|
|
19161
19339
|
});
|
|
19162
19340
|
/**
|
|
19163
|
-
* Which integration instance a settings form is for. An addon that serves several instances
|
|
19164
|
-
* (`instanceMode: multiple`) can show a different form per instance — an NVR integration
|
|
19165
|
-
* needs its connection, the default integration needs the addon's own sections.
|
|
19166
|
-
*
|
|
19167
|
-
* - `integrationId` is `null` in the create wizard: nothing exists yet, the operator is
|
|
19168
|
-
* setting up a NEW instance.
|
|
19169
|
-
* - `mode` is the wizard mode of the integration type (`getAvailableTypes`).
|
|
19170
|
-
* - `candidateStableId` is the discovery candidate a wizard was seeded from, if any.
|
|
19171
|
-
*/
|
|
19172
|
-
var IntegrationInstanceRefSchema = object({
|
|
19173
|
-
integrationId: string().nullable(),
|
|
19174
|
-
mode: _enum([
|
|
19175
|
-
"standalone",
|
|
19176
|
-
"account",
|
|
19177
|
-
"broker"
|
|
19178
|
-
]),
|
|
19179
|
-
candidateStableId: string().optional()
|
|
19180
|
-
});
|
|
19181
|
-
/**
|
|
19182
19341
|
* notification-output — canonical, capability-gated notification delivery.
|
|
19183
19342
|
*
|
|
19184
19343
|
* Apprise-derived model (see
|
|
@@ -44595,30 +44754,21 @@ function convertLegacyWhen(half) {
|
|
|
44595
44754
|
* (instants) and state leaves (durations). It replaces the flat trigger list
|
|
44596
44755
|
* plus the separate condition tree; the firing rule is in that file and in
|
|
44597
44756
|
* ADR "one tree".
|
|
44598
|
-
* - **Actions** — `
|
|
44599
|
-
* fragment of §3.2.2. See {@link AutomationActionSchema}
|
|
44600
|
-
* this had to diverge from "verbatim", and why.
|
|
44757
|
+
* - **Actions** — the `wait` and `cap` steps, plus the `{kind:'code'}`
|
|
44758
|
+
* fragment of §3.2.2. See {@link AutomationActionSchema}.
|
|
44601
44759
|
*
|
|
44602
44760
|
* A recipe stored in the old shape (`triggers` + `conditions`) still LOADS:
|
|
44603
44761
|
* {@link AutomationRecipeSchema} (the parse-anywhere schema) converts it on parse. Nothing writes it.
|
|
44604
44762
|
*/
|
|
44605
44763
|
/**
|
|
44606
|
-
* One action step.
|
|
44764
|
+
* One action step: `wait`, or a `cap` call.
|
|
44607
44765
|
*
|
|
44608
|
-
*
|
|
44609
|
-
*
|
|
44610
|
-
*
|
|
44611
|
-
*
|
|
44612
|
-
*
|
|
44613
|
-
*
|
|
44614
|
-
* a literal `z.number().int()`, and the NC runner's own `RunSequencesInput`
|
|
44615
|
-
* documents its subject device as *"for the log tag, never for routing"*. So an
|
|
44616
|
-
* NC action can never target the device that triggered it — which is fine for
|
|
44617
|
-
* the NC (its rules already scope to a device) and fatal for an automation
|
|
44618
|
-
* ("sound the siren of the camera that saw the person"). `deviceId` therefore
|
|
44619
|
-
* also accepts `{ $var }`, resolved from the run's `vars` bag BEFORE the runner
|
|
44620
|
-
* is called. The runner still receives a number and is untouched; the
|
|
44621
|
-
* resolution is the recipe's job, not the runner's.
|
|
44766
|
+
* A cap step's target is who it acts on (D983: `devices`, a `domain`, or a
|
|
44767
|
+
* `{ $var }` resolved from the run's variables); the legacy `deviceId` is still
|
|
44768
|
+
* READ, never written. The step runner (`runSteps`) owns the device-scope
|
|
44769
|
+
* check, the stop-at-first-failure and the variable substitution, once, for
|
|
44770
|
+
* every caller — automations, Actions, and the notification centre, which runs
|
|
44771
|
+
* only Actions (planning#473).
|
|
44622
44772
|
*/
|
|
44623
44773
|
var AutomationWaitStepSchema = object({
|
|
44624
44774
|
kind: literal("wait"),
|
|
@@ -44665,21 +44815,44 @@ var AutomationCapStepBaseSchema = object({
|
|
|
44665
44815
|
*/
|
|
44666
44816
|
argUnits: record(string(), string().min(1)).optional()
|
|
44667
44817
|
});
|
|
44668
|
-
|
|
44818
|
+
/**
|
|
44819
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
44820
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
44821
|
+
* This is the LEAF shape: no condition of its own.
|
|
44822
|
+
*/
|
|
44823
|
+
var LeafActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepBaseSchema.refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
44669
44824
|
message: "a cap step needs a target",
|
|
44670
44825
|
path: ["target"]
|
|
44671
44826
|
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
44672
44827
|
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
44673
44828
|
path: ["actionId"]
|
|
44674
|
-
});
|
|
44829
|
+
})]);
|
|
44675
44830
|
/**
|
|
44676
|
-
* The
|
|
44677
|
-
*
|
|
44831
|
+
* The optional guard of a step (#472): `if` is the ONE `when` tree (D980), read
|
|
44832
|
+
* on the state mirror when the step is reached; `else` runs when it is false.
|
|
44833
|
+
* An `else` holds leaf steps only — the nesting is bounded at ONE level, so a
|
|
44834
|
+
* branch can never grow a tree the trace has to draw.
|
|
44678
44835
|
*/
|
|
44679
|
-
var
|
|
44836
|
+
var stepGuardShape = {
|
|
44837
|
+
if: AutomationWhenSchema.optional(),
|
|
44838
|
+
else: array(LeafActionStepSchema).max(10).optional()
|
|
44839
|
+
};
|
|
44840
|
+
var elseNeedsIf = {
|
|
44841
|
+
message: "an else list needs the condition it is the other side of (if)",
|
|
44842
|
+
path: ["else"]
|
|
44843
|
+
};
|
|
44844
|
+
var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
44845
|
+
var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
44846
|
+
message: "a cap step needs a target",
|
|
44847
|
+
path: ["target"]
|
|
44848
|
+
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
44849
|
+
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
44850
|
+
path: ["actionId"]
|
|
44851
|
+
}).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
44852
|
+
var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
|
|
44680
44853
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
44681
|
-
|
|
44682
|
-
|
|
44854
|
+
GuardedWaitStepSchema,
|
|
44855
|
+
GuardedCapStepSchema,
|
|
44683
44856
|
object({
|
|
44684
44857
|
kind: literal("action"),
|
|
44685
44858
|
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
@@ -45059,7 +45232,7 @@ var StepDeviceTraceSchema = object({
|
|
|
45059
45232
|
outcome: _enum(["ok", "error"]),
|
|
45060
45233
|
message: string().optional()
|
|
45061
45234
|
});
|
|
45062
|
-
var
|
|
45235
|
+
var StepTraceBaseSchema = object({
|
|
45063
45236
|
/** `actions.<i>` */
|
|
45064
45237
|
path: string().min(1),
|
|
45065
45238
|
kind: string().min(1),
|
|
@@ -45078,15 +45251,35 @@ var AutomationStepTraceSchema = object({
|
|
|
45078
45251
|
* is shown as {@link REDACTED_ARG}. Absent on traces written before it existed.
|
|
45079
45252
|
*/
|
|
45080
45253
|
args: record(string(), TraceValueSchema).optional(),
|
|
45081
|
-
/**
|
|
45254
|
+
/**
|
|
45255
|
+
* The device values a templated arg printed as `—`, one `ref: reason` each
|
|
45256
|
+
* (D1021): why a sentence says "—" where a number was expected. Bounded.
|
|
45257
|
+
*/
|
|
45258
|
+
templates: array(string()).max(20).optional(),
|
|
45259
|
+
/**
|
|
45260
|
+
* What the step's own `if` read when the step was reached (#472): `true` the
|
|
45261
|
+
* step ran, `false` its `else` ran (or nothing did), `unknown` a state leaf
|
|
45262
|
+
* could not be read, so NEITHER side ran. Absent on an unguarded step.
|
|
45263
|
+
*/
|
|
45264
|
+
condition: _enum([
|
|
45265
|
+
"true",
|
|
45266
|
+
"false",
|
|
45267
|
+
"unknown"
|
|
45268
|
+
]).optional(),
|
|
45269
|
+
/** Why the condition read what it read, in the evaluator's own words. */
|
|
45270
|
+
conditionReason: string().optional(),
|
|
45271
|
+
/** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. */
|
|
45082
45272
|
outcome: _enum([
|
|
45083
45273
|
"ok",
|
|
45084
45274
|
"error",
|
|
45085
45275
|
"not-run",
|
|
45086
|
-
"empty"
|
|
45276
|
+
"empty",
|
|
45277
|
+
"skipped"
|
|
45087
45278
|
]),
|
|
45088
45279
|
message: string().optional()
|
|
45089
45280
|
});
|
|
45281
|
+
/** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
|
|
45282
|
+
var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: array(StepTraceBaseSchema).optional() });
|
|
45090
45283
|
var AutomationRunTraceSchema = object({
|
|
45091
45284
|
runId: string().min(1),
|
|
45092
45285
|
startedAt: number$1(),
|
|
@@ -45193,6 +45386,8 @@ var ActionStatusSchema = object({
|
|
|
45193
45386
|
/** The latest run's failure; null on success or when it never ran. */
|
|
45194
45387
|
lastError: string().nullable()
|
|
45195
45388
|
});
|
|
45389
|
+
/** The throttle window of an action, in seconds; absent or 0 = no throttle. */
|
|
45390
|
+
var ActionMinDelaySecSchema = number$1().int().min(0).max(86400);
|
|
45196
45391
|
var ActionEntrySchema = object({
|
|
45197
45392
|
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
45198
45393
|
id: string().min(3),
|
|
@@ -45205,6 +45400,14 @@ var ActionEntrySchema = object({
|
|
|
45205
45400
|
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
45206
45401
|
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
45207
45402
|
variables: array(ActionVariableSchema).max(20).optional(),
|
|
45403
|
+
/**
|
|
45404
|
+
* Internal only: the least time between two run STARTS. A run that begins
|
|
45405
|
+
* inside the window is skipped (`skipped-cooldown`), traced and logged. It
|
|
45406
|
+
* is an actuator's budget — "how often may this gate physically open" —
|
|
45407
|
+
* not a notification cooldown, and it is shared by every caller of the
|
|
45408
|
+
* action (two rules, a button, an automation).
|
|
45409
|
+
*/
|
|
45410
|
+
minDelaySec: ActionMinDelaySecSchema.optional(),
|
|
45208
45411
|
status: ActionStatusSchema
|
|
45209
45412
|
}).superRefine((entry, ctx) => {
|
|
45210
45413
|
if (entry.source === "internal") {
|
|
@@ -45235,7 +45438,8 @@ var ActionEntrySchema = object({
|
|
|
45235
45438
|
var ActionInputSchema = object({
|
|
45236
45439
|
name: string().min(1).max(120),
|
|
45237
45440
|
steps: array(ActionStepSchema).min(1).max(50),
|
|
45238
|
-
variables: array(ActionVariableSchema).max(20).optional()
|
|
45441
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
45442
|
+
minDelaySec: ActionMinDelaySecSchema.optional()
|
|
45239
45443
|
});
|
|
45240
45444
|
/** Who started a run. Absent = the operator pressed it. */
|
|
45241
45445
|
var ActionRunOriginSchema = object({
|
|
@@ -45262,6 +45466,7 @@ _enum([
|
|
|
45262
45466
|
"invalid-variables",
|
|
45263
45467
|
"invalid-steps",
|
|
45264
45468
|
"not-linked",
|
|
45469
|
+
"template-scope",
|
|
45265
45470
|
"busy"
|
|
45266
45471
|
]);
|
|
45267
45472
|
object({
|
|
@@ -45586,10 +45791,6 @@ method(object({
|
|
|
45586
45791
|
scope: ScopedSettingsScopeSchema,
|
|
45587
45792
|
nodeId: string().optional()
|
|
45588
45793
|
}), record(string(), unknown()).nullable()), method(object({
|
|
45589
|
-
addonId: string(),
|
|
45590
|
-
nodeId: string().optional(),
|
|
45591
|
-
instance: IntegrationInstanceRefSchema
|
|
45592
|
-
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
45593
45794
|
addonId: string(),
|
|
45594
45795
|
nodeId: string().optional()
|
|
45595
45796
|
}), object({ keys: array(string()) }).nullable(), { auth: "admin" }), method(object({
|
|
@@ -49889,7 +50090,7 @@ DeviceType.MediaPlayer, method(deviceOnly, _void(), {
|
|
|
49889
50090
|
kind: "mutation",
|
|
49890
50091
|
auth: "protected"
|
|
49891
50092
|
});
|
|
49892
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
|
|
50093
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
|
|
49893
50094
|
var NUMBER = {
|
|
49894
50095
|
kind: "fixed",
|
|
49895
50096
|
result: ["number"]
|
|
@@ -51761,6 +51962,43 @@ method(InstancePinSchema, DeviceExportStatusSchema), method(_void(), array(Expor
|
|
|
51761
51962
|
auth: "admin"
|
|
51762
51963
|
});
|
|
51763
51964
|
var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
|
|
51965
|
+
var DeviceTemplateSchema = string().min(1).max(4096);
|
|
51966
|
+
var DeviceTemplateRefusalSchema = object({
|
|
51967
|
+
reason: _enum([
|
|
51968
|
+
"too-long",
|
|
51969
|
+
"syntax",
|
|
51970
|
+
"forbidden-syntax",
|
|
51971
|
+
"forbidden-member",
|
|
51972
|
+
"unknown-filter",
|
|
51973
|
+
"ambiguous-field",
|
|
51974
|
+
"busy",
|
|
51975
|
+
"budget-exceeded",
|
|
51976
|
+
"timeout",
|
|
51977
|
+
"output-too-large",
|
|
51978
|
+
"render-failed",
|
|
51979
|
+
"out-of-scope",
|
|
51980
|
+
"unavailable"
|
|
51981
|
+
]),
|
|
51982
|
+
message: string()
|
|
51983
|
+
});
|
|
51984
|
+
var DeviceTemplateTraceEntrySchema = object({
|
|
51985
|
+
ref: string(),
|
|
51986
|
+
reason: _enum([
|
|
51987
|
+
"unknown-alias",
|
|
51988
|
+
"unknown-field",
|
|
51989
|
+
"no-field",
|
|
51990
|
+
"unavailable"
|
|
51991
|
+
])
|
|
51992
|
+
});
|
|
51993
|
+
var DeviceTemplateRenderSchema = discriminatedUnion("ok", [object({
|
|
51994
|
+
ok: literal(true),
|
|
51995
|
+
text: string(),
|
|
51996
|
+
trace: array(DeviceTemplateTraceEntrySchema)
|
|
51997
|
+
}), object({
|
|
51998
|
+
ok: literal(false),
|
|
51999
|
+
refusal: DeviceTemplateRefusalSchema,
|
|
52000
|
+
trace: array(DeviceTemplateTraceEntrySchema)
|
|
52001
|
+
})]);
|
|
51764
52002
|
/**
|
|
51765
52003
|
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
51766
52004
|
*
|
|
@@ -52475,7 +52713,13 @@ method(object({
|
|
|
52475
52713
|
auth: "admin"
|
|
52476
52714
|
}), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), DeviceMetaSchema.nullable()), method(object({
|
|
52477
52715
|
deviceId: number$1(),
|
|
52478
|
-
name: string()
|
|
52716
|
+
name: string(),
|
|
52717
|
+
/**
|
|
52718
|
+
* Absent or true: an operator rename, which stamps `userNamed`.
|
|
52719
|
+
* False: the system copying a block name onto the device. That write
|
|
52720
|
+
* must not look like the operator's, or the next reconcile freezes it.
|
|
52721
|
+
*/
|
|
52722
|
+
stampUserNamed: boolean().optional()
|
|
52479
52723
|
}), _void(), {
|
|
52480
52724
|
kind: "mutation",
|
|
52481
52725
|
auth: "admin"
|
|
@@ -52499,6 +52743,22 @@ method(object({
|
|
|
52499
52743
|
kind: "mutation",
|
|
52500
52744
|
auth: "admin"
|
|
52501
52745
|
}), method(object({
|
|
52746
|
+
templates: array(DeviceTemplateSchema).max(64),
|
|
52747
|
+
allowedDeviceIds: array(number$1().int()).optional()
|
|
52748
|
+
}), object({ results: array(DeviceTemplateRenderSchema) }), { auth: "admin" }), method(object({
|
|
52749
|
+
templates: array(string()).max(64),
|
|
52750
|
+
allowedDeviceIds: array(number$1().int()).optional()
|
|
52751
|
+
}), object({ results: array(discriminatedUnion("ok", [object({
|
|
52752
|
+
ok: literal(true),
|
|
52753
|
+
aliases: array(object({
|
|
52754
|
+
alias: string(),
|
|
52755
|
+
deviceId: number$1().int().nullable(),
|
|
52756
|
+
allowed: boolean()
|
|
52757
|
+
}))
|
|
52758
|
+
}), object({
|
|
52759
|
+
ok: literal(false),
|
|
52760
|
+
refusal: DeviceTemplateRefusalSchema
|
|
52761
|
+
})])) }), { auth: "admin" }), method(object({
|
|
52502
52762
|
deviceId: number$1(),
|
|
52503
52763
|
location: string().nullable()
|
|
52504
52764
|
}), _void(), {
|
|
@@ -55508,6 +55768,207 @@ var GroupStatusSchema = object({
|
|
|
55508
55768
|
}))
|
|
55509
55769
|
});
|
|
55510
55770
|
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
55771
|
+
/**
|
|
55772
|
+
* Heat pump settable surface (D1026): one typed method per parameter, never a
|
|
55773
|
+
* generic `set(key, value)`. The values a mode takes and the limits of a number
|
|
55774
|
+
* are the ones `heat-pump-status` carries (`allowed`, `min`, `max`, `step`),
|
|
55775
|
+
* read from the gateway; a provider refuses a value outside them. The state is
|
|
55776
|
+
* `heat-pump-status` — this cap has none.
|
|
55777
|
+
*/
|
|
55778
|
+
var deviceId = number$1().int().nonnegative();
|
|
55779
|
+
var circuitId = string().min(1);
|
|
55780
|
+
var mode = string().min(1);
|
|
55781
|
+
var temp = number$1().finite();
|
|
55782
|
+
DeviceType.HeatPump, method(object({
|
|
55783
|
+
deviceId,
|
|
55784
|
+
mode
|
|
55785
|
+
}), _void(), {
|
|
55786
|
+
kind: "mutation",
|
|
55787
|
+
auth: "protected"
|
|
55788
|
+
}), method(object({
|
|
55789
|
+
deviceId,
|
|
55790
|
+
mode
|
|
55791
|
+
}), _void(), {
|
|
55792
|
+
kind: "mutation",
|
|
55793
|
+
auth: "protected"
|
|
55794
|
+
}), method(object({
|
|
55795
|
+
deviceId,
|
|
55796
|
+
mode
|
|
55797
|
+
}), _void(), {
|
|
55798
|
+
kind: "mutation",
|
|
55799
|
+
auth: "protected"
|
|
55800
|
+
}), method(object({
|
|
55801
|
+
deviceId,
|
|
55802
|
+
mode
|
|
55803
|
+
}), _void(), {
|
|
55804
|
+
kind: "mutation",
|
|
55805
|
+
auth: "protected"
|
|
55806
|
+
}), method(object({
|
|
55807
|
+
deviceId,
|
|
55808
|
+
circuitId,
|
|
55809
|
+
mode
|
|
55810
|
+
}), _void(), {
|
|
55811
|
+
kind: "mutation",
|
|
55812
|
+
auth: "protected"
|
|
55813
|
+
}), method(object({
|
|
55814
|
+
deviceId,
|
|
55815
|
+
circuitId,
|
|
55816
|
+
mode
|
|
55817
|
+
}), _void(), {
|
|
55818
|
+
kind: "mutation",
|
|
55819
|
+
auth: "protected"
|
|
55820
|
+
}), method(object({
|
|
55821
|
+
deviceId,
|
|
55822
|
+
circuitId,
|
|
55823
|
+
mode
|
|
55824
|
+
}), _void(), {
|
|
55825
|
+
kind: "mutation",
|
|
55826
|
+
auth: "protected"
|
|
55827
|
+
}), method(object({
|
|
55828
|
+
deviceId,
|
|
55829
|
+
circuitId,
|
|
55830
|
+
temp
|
|
55831
|
+
}), _void(), {
|
|
55832
|
+
kind: "mutation",
|
|
55833
|
+
auth: "protected"
|
|
55834
|
+
}), method(object({
|
|
55835
|
+
deviceId,
|
|
55836
|
+
circuitId,
|
|
55837
|
+
temp
|
|
55838
|
+
}), _void(), {
|
|
55839
|
+
kind: "mutation",
|
|
55840
|
+
auth: "protected"
|
|
55841
|
+
}), method(object({
|
|
55842
|
+
deviceId,
|
|
55843
|
+
circuitId,
|
|
55844
|
+
temp
|
|
55845
|
+
}), _void(), {
|
|
55846
|
+
kind: "mutation",
|
|
55847
|
+
auth: "protected"
|
|
55848
|
+
}), method(object({
|
|
55849
|
+
deviceId,
|
|
55850
|
+
circuitId,
|
|
55851
|
+
mode
|
|
55852
|
+
}), _void(), {
|
|
55853
|
+
kind: "mutation",
|
|
55854
|
+
auth: "protected"
|
|
55855
|
+
}), method(object({
|
|
55856
|
+
deviceId,
|
|
55857
|
+
circuitId,
|
|
55858
|
+
level: mode
|
|
55859
|
+
}), _void(), {
|
|
55860
|
+
kind: "mutation",
|
|
55861
|
+
auth: "protected"
|
|
55862
|
+
}), method(object({
|
|
55863
|
+
deviceId,
|
|
55864
|
+
circuitId,
|
|
55865
|
+
minutes: number$1().int().positive()
|
|
55866
|
+
}), _void(), {
|
|
55867
|
+
kind: "mutation",
|
|
55868
|
+
auth: "protected"
|
|
55869
|
+
}), method(object({
|
|
55870
|
+
deviceId,
|
|
55871
|
+
circuitId
|
|
55872
|
+
}), _void(), {
|
|
55873
|
+
kind: "mutation",
|
|
55874
|
+
auth: "protected"
|
|
55875
|
+
});
|
|
55876
|
+
var HeatPumpCircuitKindSchema = _enum([
|
|
55877
|
+
"heating",
|
|
55878
|
+
"dhw",
|
|
55879
|
+
"cooling",
|
|
55880
|
+
"solar"
|
|
55881
|
+
]);
|
|
55882
|
+
/** A setting that takes one of a list of values the gateway named. */
|
|
55883
|
+
var HeatPumpOptionSettingSchema = object({
|
|
55884
|
+
/** The active value. Null when the gateway did not answer. */
|
|
55885
|
+
value: string().nullable(),
|
|
55886
|
+
/** Values the gateway accepts, in its order. Empty = read-only here. */
|
|
55887
|
+
allowed: array(string())
|
|
55888
|
+
});
|
|
55889
|
+
/** A numeric setting with the limits the gateway named. */
|
|
55890
|
+
var HeatPumpRangeSettingSchema = object({
|
|
55891
|
+
value: number$1().nullable(),
|
|
55892
|
+
min: number$1().nullable(),
|
|
55893
|
+
max: number$1().nullable(),
|
|
55894
|
+
step: number$1().nullable()
|
|
55895
|
+
});
|
|
55896
|
+
var HeatPumpCircuitSchema = object({
|
|
55897
|
+
/** Gateway id of the circuit (`hc1`, `dhw1`): the key of the series. */
|
|
55898
|
+
id: string().min(1),
|
|
55899
|
+
kind: HeatPumpCircuitKindSchema,
|
|
55900
|
+
label: string(),
|
|
55901
|
+
icon: IconKeySchema,
|
|
55902
|
+
/** Measured temperature of the circuit (room, tank, collector). */
|
|
55903
|
+
currentTemp: number$1().nullable().meta(readingMeta("temperature")),
|
|
55904
|
+
/** The setpoint in force now. */
|
|
55905
|
+
targetTemp: number$1().nullable().meta(readingMeta("temperature")),
|
|
55906
|
+
/** The operation mode in force (mirror of `operationMode.value`, for the series). */
|
|
55907
|
+
mode: string().nullable(),
|
|
55908
|
+
/** Whether the circuit is calling for heat right now. Null = unknown. */
|
|
55909
|
+
active: boolean().nullable(),
|
|
55910
|
+
operationMode: HeatPumpOptionSettingSchema.nullable(),
|
|
55911
|
+
/** Heating circuits: heat / cool / heatCool. */
|
|
55912
|
+
heatCoolMode: HeatPumpOptionSettingSchema.nullable(),
|
|
55913
|
+
/** Heating circuits: summer / winter changeover. */
|
|
55914
|
+
summerWinter: HeatPumpOptionSettingSchema.nullable(),
|
|
55915
|
+
comfortSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
55916
|
+
ecoSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
55917
|
+
maxFlowTemp: HeatPumpRangeSettingSchema.nullable(),
|
|
55918
|
+
/** Hot water: the temperature level (off / low / high / eco). */
|
|
55919
|
+
temperatureLevel: HeatPumpOptionSettingSchema.nullable(),
|
|
55920
|
+
/** Hot water: how long a charge lasts, minutes. */
|
|
55921
|
+
chargeDuration: HeatPumpRangeSettingSchema.nullable(),
|
|
55922
|
+
/** Hot water: whether an extra-hot-water charge is running. Null = no such surface. */
|
|
55923
|
+
extraHotWater: boolean().nullable()
|
|
55924
|
+
});
|
|
55925
|
+
/** The independent system modes, each with its real values. A null mode = the gateway has none. */
|
|
55926
|
+
var HeatPumpSystemSchema = object({
|
|
55927
|
+
silent: HeatPumpOptionSettingSchema.nullable(),
|
|
55928
|
+
away: HeatPumpOptionSettingSchema.nullable(),
|
|
55929
|
+
additionalHeater: HeatPumpOptionSettingSchema.nullable(),
|
|
55930
|
+
holiday: HeatPumpOptionSettingSchema.nullable()
|
|
55931
|
+
});
|
|
55932
|
+
var HeatPumpPowerSchema = object({
|
|
55933
|
+
thermalW: number$1().nullable().meta(readingMeta("power")),
|
|
55934
|
+
electricalW: number$1().nullable().meta(readingMeta("power")),
|
|
55935
|
+
/** Compressor modulation, percent. */
|
|
55936
|
+
compressorPct: number$1().nullable().meta(readingMeta("percentage"))
|
|
55937
|
+
});
|
|
55938
|
+
var HeatPumpTemperaturesSchema = object({
|
|
55939
|
+
supply: number$1().nullable().meta(readingMeta("temperature")),
|
|
55940
|
+
return: number$1().nullable().meta(readingMeta("temperature")),
|
|
55941
|
+
outdoor: number$1().nullable().meta(readingMeta("temperature"))
|
|
55942
|
+
});
|
|
55943
|
+
/** Lifetime meters, kWh: the energy of a period is computed at read time from their difference (D944). */
|
|
55944
|
+
var HeatPumpEnergySchema = object({
|
|
55945
|
+
thermalKwh: number$1().nullable().meta(readingMeta("energy")),
|
|
55946
|
+
electricalKwh: number$1().nullable().meta(readingMeta("energy"))
|
|
55947
|
+
});
|
|
55948
|
+
var HeatPumpStatusSchema = object({
|
|
55949
|
+
circuits: array(HeatPumpCircuitSchema),
|
|
55950
|
+
system: HeatPumpSystemSchema,
|
|
55951
|
+
power: HeatPumpPowerSchema,
|
|
55952
|
+
temperatures: HeatPumpTemperaturesSchema,
|
|
55953
|
+
energy: HeatPumpEnergySchema,
|
|
55954
|
+
/** Water pressure of the heating loop, bar. */
|
|
55955
|
+
waterPressureBar: number$1().nullable(),
|
|
55956
|
+
/** Compressor starts since commissioning. */
|
|
55957
|
+
starts: number$1().nullable(),
|
|
55958
|
+
/** Ms epoch when the slice was last read from the gateway. */
|
|
55959
|
+
lastFetchedAt: number$1()
|
|
55960
|
+
});
|
|
55961
|
+
/**
|
|
55962
|
+
* The instantaneous COP: thermal over electrical power. Null unless BOTH powers
|
|
55963
|
+
* are known and the unit draws power — a missing reading is never a 0 or a
|
|
55964
|
+
* division by it (D393). Computed on every read; there is no stored value.
|
|
55965
|
+
*/
|
|
55966
|
+
function heatPumpInstantCop(power) {
|
|
55967
|
+
const { thermalW, electricalW } = power;
|
|
55968
|
+
if (thermalW === null || electricalW === null || electricalW <= 0) return null;
|
|
55969
|
+
return thermalW / electricalW;
|
|
55970
|
+
}
|
|
55971
|
+
DeviceType.HeatPump;
|
|
55511
55972
|
var HeatingValveStatusSchema = object({
|
|
55512
55973
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
55513
55974
|
position: number$1().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -55665,6 +56126,7 @@ var HeroSceneSchema = object({
|
|
|
55665
56126
|
"ac",
|
|
55666
56127
|
"thermostat",
|
|
55667
56128
|
"heater",
|
|
56129
|
+
"heat-pump",
|
|
55668
56130
|
"fan",
|
|
55669
56131
|
"washer",
|
|
55670
56132
|
"dryer",
|
|
@@ -55707,7 +56169,7 @@ var HeroSceneSchema = object({
|
|
|
55707
56169
|
/** 0..1: volume, cover position, cycle progress. */
|
|
55708
56170
|
level: number$1().min(0).max(1).nullable()
|
|
55709
56171
|
});
|
|
55710
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
56172
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
55711
56173
|
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
55712
56174
|
/** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
|
|
55713
56175
|
var HeroTextSchema = object({
|
|
@@ -55715,6 +56177,7 @@ var HeroTextSchema = object({
|
|
|
55715
56177
|
it: string()
|
|
55716
56178
|
});
|
|
55717
56179
|
var HeroRowIdSchema = _enum([
|
|
56180
|
+
"progress",
|
|
55718
56181
|
"run-for",
|
|
55719
56182
|
"cycle",
|
|
55720
56183
|
"program",
|
|
@@ -55729,6 +56192,7 @@ var HeroRowIdSchema = _enum([
|
|
|
55729
56192
|
"alarm",
|
|
55730
56193
|
"fan",
|
|
55731
56194
|
"vacuum",
|
|
56195
|
+
"vacuum-suction",
|
|
55732
56196
|
"mower",
|
|
55733
56197
|
"feeder",
|
|
55734
56198
|
"fountain",
|
|
@@ -55747,7 +56211,10 @@ var HeroRowIdSchema = _enum([
|
|
|
55747
56211
|
"climate-fan",
|
|
55748
56212
|
"setpoint",
|
|
55749
56213
|
"channel",
|
|
55750
|
-
"control"
|
|
56214
|
+
"control",
|
|
56215
|
+
"circuit",
|
|
56216
|
+
"heat-pump-power",
|
|
56217
|
+
"system-mode"
|
|
55751
56218
|
]);
|
|
55752
56219
|
var HeroArgValueSchema = lazy(() => union([
|
|
55753
56220
|
string(),
|
|
@@ -55812,16 +56279,32 @@ var HeroControlSchema = discriminatedUnion("kind", [
|
|
|
55812
56279
|
label: HeroTextSchema,
|
|
55813
56280
|
current: string().nullable(),
|
|
55814
56281
|
options: array(string()),
|
|
56282
|
+
/** A readable label per option value; an option without one is drawn as its raw value. */
|
|
56283
|
+
optionLabels: record(string(), HeroTextSchema).optional(),
|
|
55815
56284
|
call: HeroCallSchema,
|
|
55816
56285
|
valueArg: string()
|
|
55817
56286
|
})
|
|
55818
56287
|
]);
|
|
56288
|
+
/** Declared by its interface: a `z.infer` of one more icon union pushes the cap's inferred type past what the compiler can print. */
|
|
56289
|
+
var HeroPillSchema = object({
|
|
56290
|
+
icon: IconKeySchema.nullable(),
|
|
56291
|
+
text: HeroTextSchema,
|
|
56292
|
+
tone: HeroToneSchema
|
|
56293
|
+
});
|
|
55819
56294
|
var HeroRowSchema = object({
|
|
55820
56295
|
id: HeroRowIdSchema,
|
|
56296
|
+
/** The row's own name when the kind's label would not tell rows of one kind apart (a circuit's label). */
|
|
56297
|
+
label: HeroTextSchema.optional(),
|
|
56298
|
+
/** A group header drawn above the row when it differs from the previous row's ("System"). */
|
|
56299
|
+
group: HeroTextSchema.optional(),
|
|
56300
|
+
/** Values drawn as pills across the row (a heat pump's powers). */
|
|
56301
|
+
pills: array(HeroPillSchema).optional(),
|
|
55821
56302
|
icon: IconKeySchema,
|
|
55822
56303
|
/** The row's status, in words. `null` = nothing to say. */
|
|
55823
56304
|
status: HeroTextSchema.nullable(),
|
|
55824
|
-
controls: array(HeroControlSchema)
|
|
56305
|
+
controls: array(HeroControlSchema),
|
|
56306
|
+
/** A bar under the row's label, 0..1; `null` / absent = no bar. */
|
|
56307
|
+
progress: number$1().min(0).max(1).nullable().optional()
|
|
55825
56308
|
});
|
|
55826
56309
|
var HeroDetailSchema = object({
|
|
55827
56310
|
label: HeroTextSchema,
|
|
@@ -55829,7 +56312,11 @@ var HeroDetailSchema = object({
|
|
|
55829
56312
|
unit: string().nullable()
|
|
55830
56313
|
});
|
|
55831
56314
|
var HeroBadgeSchema = object({
|
|
55832
|
-
id: _enum([
|
|
56315
|
+
id: _enum([
|
|
56316
|
+
"battery",
|
|
56317
|
+
"network-link",
|
|
56318
|
+
"integration"
|
|
56319
|
+
]),
|
|
55833
56320
|
icon: IconKeySchema,
|
|
55834
56321
|
tone: HeroToneSchema,
|
|
55835
56322
|
/** Percent for a battery, link quality for a link; `null` = not known. */
|
|
@@ -55877,7 +56364,13 @@ var HeroTimedRunSlotSchema = object({
|
|
|
55877
56364
|
activeUntil: number$1().nullable(),
|
|
55878
56365
|
quickRun: TimedRunQuickRunSchema,
|
|
55879
56366
|
run: HeroActionSchema,
|
|
55880
|
-
cancel: HeroActionSchema
|
|
56367
|
+
cancel: HeroActionSchema,
|
|
56368
|
+
/**
|
|
56369
|
+
* Whole units left (the limit's unit, ceil). `null` while nothing is armed.
|
|
56370
|
+
* A number, not words: the row formats it, and a text here would not fit the
|
|
56371
|
+
* hero-layout declaration.
|
|
56372
|
+
*/
|
|
56373
|
+
remaining: number$1().nullable()
|
|
55881
56374
|
});
|
|
55882
56375
|
var HeroPowerSupplySlotSchema = object({
|
|
55883
56376
|
/** The plug's state; `null` = unknown, never off. */
|
|
@@ -55929,7 +56422,12 @@ var HeroFactSchema = object({
|
|
|
55929
56422
|
var HeroSideTileSchema = object({
|
|
55930
56423
|
label: HeroTextSchema,
|
|
55931
56424
|
value: HeroTextSchema,
|
|
55932
|
-
tone: HeroToneSchema.optional()
|
|
56425
|
+
tone: HeroToneSchema.optional(),
|
|
56426
|
+
/**
|
|
56427
|
+
* Epoch ms when the tile reads a clock time (an appliance's end): a client prints it in
|
|
56428
|
+
* the viewer's own time zone; `value` is the fallback for one that cannot.
|
|
56429
|
+
*/
|
|
56430
|
+
at: number$1().optional()
|
|
55933
56431
|
});
|
|
55934
56432
|
var HeroSideTilesSchema = object({
|
|
55935
56433
|
left: array(HeroSideTileSchema).max(2),
|
|
@@ -55965,8 +56463,12 @@ var HeroModelSchema = object({
|
|
|
55965
56463
|
sideTiles: HeroSideTilesSchema,
|
|
55966
56464
|
/** The status line under the main icon. */
|
|
55967
56465
|
title: HeroTextSchema,
|
|
56466
|
+
/** The scene's top line when it says more than `title`; absent = draw the title. */
|
|
56467
|
+
caption: HeroTextSchema.optional(),
|
|
55968
56468
|
badges: array(HeroBadgeSchema),
|
|
55969
56469
|
remote: HeroRemoteSlotSchema.nullable(),
|
|
56470
|
+
/** The foot button that opens the device's history: "History", "Cycles", "Meals", "Access". */
|
|
56471
|
+
historyLabel: HeroTextSchema,
|
|
55970
56472
|
consumables: HeroConsumablesSlotSchema.nullable(),
|
|
55971
56473
|
consumption: HeroConsumptionSlotSchema.nullable(),
|
|
55972
56474
|
ownPower: HeroOwnPowerSlotSchema.nullable(),
|
|
@@ -55987,18 +56489,31 @@ var HeroModelSchema = object({
|
|
|
55987
56489
|
* 4. a trailing fact (power, else battery, else consumables).
|
|
55988
56490
|
*
|
|
55989
56491
|
* Selection rules, all taken from the model:
|
|
55990
|
-
* -
|
|
56492
|
+
* - the primary control is the device's own power; else the FIRST control of
|
|
55991
56493
|
* the FIRST row that has any (a later row's control is never promoted). When
|
|
55992
56494
|
* the model lists that part in `gated`, the row has no inline control: the
|
|
55993
56495
|
* projection never falls through to another control the caller could use.
|
|
56496
|
+
* - a timed run, when the model carries the slot, sits beside that primary:
|
|
56497
|
+
* Run while idle, Stop while armed. Gating the slot hides the control.
|
|
55994
56498
|
* - the status line is the head (what plays, else the state) plus at most
|
|
55995
|
-
* {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded
|
|
56499
|
+
* {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded, then the
|
|
56500
|
+
* time left on an armed timed run;
|
|
55996
56501
|
* - the trailing fact is the first of power, battery, consumables.
|
|
55997
56502
|
*
|
|
55998
56503
|
* `projectDeviceRow` is pure and computes nothing: it selects from a
|
|
55999
56504
|
* {@link HeroModel}. A row that needed a value the hero lacks would mean the
|
|
56000
56505
|
* model is missing it, so the fix goes in the model.
|
|
56001
56506
|
*/
|
|
56507
|
+
/**
|
|
56508
|
+
* The row's timed-run control. `id` is `timed-run.run` while idle and
|
|
56509
|
+
* `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
|
|
56510
|
+
* a Run press starts.
|
|
56511
|
+
*/
|
|
56512
|
+
var HeroRowTimedRunSchema = object({
|
|
56513
|
+
id: _enum(["timed-run.run", "timed-run.cancel"]),
|
|
56514
|
+
duration: number$1(),
|
|
56515
|
+
unit: _enum(["min", "s"])
|
|
56516
|
+
});
|
|
56002
56517
|
var HeroRowModelSchema = object({
|
|
56003
56518
|
deviceId: number$1().int(),
|
|
56004
56519
|
name: string(),
|
|
@@ -56011,6 +56526,11 @@ var HeroRowModelSchema = object({
|
|
|
56011
56526
|
statusLine: array(HeroTextSchema),
|
|
56012
56527
|
/** `null` = the type has no inline control, or the caller may not act on it. */
|
|
56013
56528
|
primary: HeroControlSchema.nullable(),
|
|
56529
|
+
/**
|
|
56530
|
+
* Beside `primary` when the device offers a timed run: Run while idle, Stop
|
|
56531
|
+
* while armed. `null` when there is no slot, or the caller may not act.
|
|
56532
|
+
*/
|
|
56533
|
+
timedRun: HeroRowTimedRunSchema.nullable(),
|
|
56014
56534
|
trailing: HeroFactSchema.nullable()
|
|
56015
56535
|
});
|
|
56016
56536
|
/**
|
|
@@ -56290,6 +56810,12 @@ var IntegrationWithStateSchema = object({
|
|
|
56290
56810
|
name: string(),
|
|
56291
56811
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
56292
56812
|
enabled: boolean(),
|
|
56813
|
+
/**
|
|
56814
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
56815
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
56816
|
+
* must not draw it as on or off (D315).
|
|
56817
|
+
*/
|
|
56818
|
+
switchUnknown: literal(true).optional(),
|
|
56293
56819
|
info: record(string(), unknown()).readonly(),
|
|
56294
56820
|
/** The discovery candidate this integration was set up from (D984). */
|
|
56295
56821
|
originStableId: string().optional(),
|
|
@@ -56303,6 +56829,12 @@ var IntegrationLiteSchema = object({
|
|
|
56303
56829
|
name: string(),
|
|
56304
56830
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
56305
56831
|
enabled: boolean(),
|
|
56832
|
+
/**
|
|
56833
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
56834
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
56835
|
+
* must not draw it as on or off (D315).
|
|
56836
|
+
*/
|
|
56837
|
+
switchUnknown: literal(true).optional(),
|
|
56306
56838
|
info: record(string(), unknown()).readonly(),
|
|
56307
56839
|
/** The discovery candidate this integration was set up from (D984). */
|
|
56308
56840
|
originStableId: string().optional(),
|
|
@@ -56401,9 +56933,9 @@ var UpdateIntegrationInputSchema = object({
|
|
|
56401
56933
|
id: string(),
|
|
56402
56934
|
name: string().optional(),
|
|
56403
56935
|
/**
|
|
56404
|
-
*
|
|
56405
|
-
*
|
|
56406
|
-
*
|
|
56936
|
+
* Honoured ONLY for a fixed builtin (`info.fixed`), whose switch is the hub's own registry flag
|
|
56937
|
+
* and works while its addon is down. Any other row is refused (a typed `BAD_REQUEST`): its
|
|
56938
|
+
* switch is `integration-instances.setInstanceEnabled`.
|
|
56407
56939
|
*/
|
|
56408
56940
|
enabled: boolean().optional(),
|
|
56409
56941
|
info: record(string(), unknown()).optional()
|
|
@@ -56437,6 +56969,12 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
56437
56969
|
* the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
|
|
56438
56970
|
* or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
|
|
56439
56971
|
* clears it.
|
|
56972
|
+
*
|
|
56973
|
+
* Who may call (epic #440): every method but `describe` and `instanceFormSchema` is open to any
|
|
56974
|
+
* session (`caller: 'scoped'`) and default-denies. An admin passes everywhere. A non-admin passes
|
|
56975
|
+
* only on a call pinned to one addon whose `describe().userScoped` is true, and that provider
|
|
56976
|
+
* filters every row on the `caller` the router injected (a notification target is somebody's
|
|
56977
|
+
* phone: a user sees and changes only their own). An addon that says nothing keeps the admin door.
|
|
56440
56978
|
*/
|
|
56441
56979
|
var ConfigSchemaPassthrough$2 = custom();
|
|
56442
56980
|
var IntegrationInstanceIdSchema = string().min(1);
|
|
@@ -56550,7 +57088,15 @@ var IntegrationInstanceDescriptionSchema = object({
|
|
|
56550
57088
|
*/
|
|
56551
57089
|
mintsId: boolean().optional(),
|
|
56552
57090
|
/** The links to other instances the provider's kinds declare; absent means none. */
|
|
56553
|
-
links: array(IntegrationInstanceLinkSchema).optional()
|
|
57091
|
+
links: array(IntegrationInstanceLinkSchema).optional(),
|
|
57092
|
+
/**
|
|
57093
|
+
* The rows belong to individual users (a notification target is somebody's phone). The router
|
|
57094
|
+
* then opens `listInstances`, `getInstance`, `createInstance`, `updateInstance`,
|
|
57095
|
+
* `setInstanceEnabled`, `deleteInstance` and `testInstance` to a NON-admin session on a call
|
|
57096
|
+
* pinned to this addon, and hands the provider the `caller` so it keeps a user to their own rows.
|
|
57097
|
+
* Absent means admin only, as it always was.
|
|
57098
|
+
*/
|
|
57099
|
+
userScoped: boolean().optional()
|
|
56554
57100
|
});
|
|
56555
57101
|
var IntegrationInstanceStatusSchema = object({
|
|
56556
57102
|
state: _enum([
|
|
@@ -56600,7 +57146,13 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
|
|
|
56600
57146
|
]).optional(),
|
|
56601
57147
|
/** The discovery candidate the wizard was seeded from (`stableId`), if any. */
|
|
56602
57148
|
candidateStableId: string().min(1).optional()
|
|
56603
|
-
}), ConfigSchemaPassthrough$2, { auth: "admin" }), method(
|
|
57149
|
+
}), ConfigSchemaPassthrough$2, { auth: "admin" }), method(looseObject({}), array(IntegrationInstanceSchema).readonly(), {
|
|
57150
|
+
auth: "protected",
|
|
57151
|
+
caller: "scoped"
|
|
57152
|
+
}), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), {
|
|
57153
|
+
auth: "protected",
|
|
57154
|
+
caller: "scoped"
|
|
57155
|
+
}), method(object({
|
|
56604
57156
|
id: IntegrationInstanceIdSchema.optional(),
|
|
56605
57157
|
name: string().min(1),
|
|
56606
57158
|
kind: string().min(1).optional(),
|
|
@@ -56622,19 +57174,23 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
|
|
|
56622
57174
|
seed: object({ info: record(string(), unknown()) }).optional()
|
|
56623
57175
|
}), object({ id: string() }), {
|
|
56624
57176
|
kind: "mutation",
|
|
56625
|
-
auth: "
|
|
57177
|
+
auth: "protected",
|
|
57178
|
+
caller: "scoped"
|
|
56626
57179
|
}), method(IntegrationInstancePatchSchema, object({ ok: literal(true) }), {
|
|
56627
57180
|
kind: "mutation",
|
|
56628
|
-
auth: "
|
|
57181
|
+
auth: "protected",
|
|
57182
|
+
caller: "scoped"
|
|
56629
57183
|
}), method(object({
|
|
56630
57184
|
id: IntegrationInstanceIdSchema,
|
|
56631
57185
|
enabled: boolean()
|
|
56632
57186
|
}), object({ ok: literal(true) }), {
|
|
56633
57187
|
kind: "mutation",
|
|
56634
|
-
auth: "
|
|
57188
|
+
auth: "protected",
|
|
57189
|
+
caller: "scoped"
|
|
56635
57190
|
}), method(object({ id: IntegrationInstanceIdSchema }), object({ ok: literal(true) }), {
|
|
56636
57191
|
kind: "mutation",
|
|
56637
|
-
auth: "
|
|
57192
|
+
auth: "protected",
|
|
57193
|
+
caller: "scoped"
|
|
56638
57194
|
}), optionalMethod(object({
|
|
56639
57195
|
id: IntegrationInstanceIdSchema.nullable(),
|
|
56640
57196
|
values: record(string(), unknown()),
|
|
@@ -56642,7 +57198,8 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
|
|
|
56642
57198
|
kind: string().min(1).optional()
|
|
56643
57199
|
}), TestConnectionResultSchema, {
|
|
56644
57200
|
kind: "mutation",
|
|
56645
|
-
auth: "
|
|
57201
|
+
auth: "protected",
|
|
57202
|
+
caller: "scoped"
|
|
56646
57203
|
});
|
|
56647
57204
|
/**
|
|
56648
57205
|
* Two-way audio / talk-back cap. Clients open a WebRTC audio-only
|
|
@@ -66797,92 +67354,21 @@ var NcZoneConditionSchema = object({
|
|
|
66797
67354
|
* membership lists are OR within the list (spec §2.3).
|
|
66798
67355
|
*/
|
|
66799
67356
|
/**
|
|
66800
|
-
* What a rule
|
|
66801
|
-
*
|
|
66802
|
-
* **No hand-maintained allowlist** (operator decision, and the right one — a
|
|
66803
|
-
* written list of methods is a third parallel map to keep aligned, and this
|
|
66804
|
-
* repo has paid for those). The boundary instead comes from a property the
|
|
66805
|
-
* capabilities already carry: an action may target only a **device-scoped**
|
|
66806
|
-
* capability method.
|
|
66807
|
-
*
|
|
66808
|
-
* That is not decoration. A rule can be authored by a NON-ADMIN — personal
|
|
66809
|
-
* rules are a supported flow — and the executor runs with the addon's
|
|
66810
|
-
* privileges, so an unbounded action is an arbitrary RPC channel with a
|
|
66811
|
-
* privilege escalation attached. Restricting to device scope excludes the
|
|
66812
|
-
* system caps (`device-manager.removeDevice` and friends) by construction,
|
|
66813
|
-
* costs nothing to maintain, and cannot rot: a cap that stops being
|
|
66814
|
-
* device-scoped stops being actuatable in the same change.
|
|
66815
|
-
*
|
|
66816
|
-
* The executor enforces it; {@link NcRuleActionSchema} carries the intent.
|
|
66817
|
-
*/
|
|
66818
|
-
/**
|
|
66819
|
-
* One step of a sequence.
|
|
66820
|
-
*
|
|
66821
|
-
* `wait` is a first-class step rather than a property of the next action: it is
|
|
66822
|
-
* what makes a sequence a SEQUENCE and not a list — "unlock, wait 5s, open"
|
|
66823
|
-
* cannot be expressed otherwise.
|
|
66824
|
-
*/
|
|
66825
|
-
var NcRuleActionSchema = discriminatedUnion("kind", [object({
|
|
66826
|
-
kind: literal("wait"),
|
|
66827
|
-
seconds: number$1().min(0).max(300)
|
|
66828
|
-
}), object({
|
|
66829
|
-
kind: literal("cap"),
|
|
66830
|
-
/**
|
|
66831
|
-
* WHO the step acts on (D983) — the only shape that is written. A sequence
|
|
66832
|
-
* stored before D983 carries `deviceId`; the sequence store reads it as a
|
|
66833
|
-
* `devices` target.
|
|
66834
|
-
*/
|
|
66835
|
-
target: ActionTargetSchema.optional(),
|
|
66836
|
-
/** The vocabulary action the step performs; required for a `domain` target. */
|
|
66837
|
-
actionId: string().min(1).optional(),
|
|
66838
|
-
/** @deprecated The pre-D983 single device. Read, never written. */
|
|
66839
|
-
deviceId: number$1().int().optional(),
|
|
66840
|
-
/** Capability name, e.g. `alarm-panel`. */
|
|
66841
|
-
cap: string().min(1),
|
|
66842
|
-
/** Method on it. The executor refuses a non-device-scoped cap. */
|
|
66843
|
-
method: string().min(1),
|
|
66844
|
-
/** Method arguments, minus `deviceId` (the executor injects it). */
|
|
66845
|
-
args: record(string(), unknown()).optional()
|
|
66846
|
-
}).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
66847
|
-
message: "a cap step needs a target",
|
|
66848
|
-
path: ["target"]
|
|
66849
|
-
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
66850
|
-
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
66851
|
-
path: ["actionId"]
|
|
66852
|
-
})]);
|
|
66853
|
-
/**
|
|
66854
|
-
* A named, ordered run of steps shared across rules, with its own throttle.
|
|
67357
|
+
* What a rule or a button runs: an **Action** of the `actions` surface
|
|
67358
|
+
* (`internal:<uuid>` or an addon's), by id, and nothing else (planning#473).
|
|
66855
67359
|
*
|
|
66856
|
-
*
|
|
66857
|
-
*
|
|
66858
|
-
*
|
|
66859
|
-
*
|
|
66860
|
-
*
|
|
66861
|
-
*
|
|
66862
|
-
* one sequence share its budget.
|
|
67360
|
+
* The notification centre has no step vocabulary of its own. The steps, the
|
|
67361
|
+
* device-scope boundary, the stop-at-first-failure, the throttle
|
|
67362
|
+
* (`minDelaySec`), the variables and the runs ledger all belong to the Action;
|
|
67363
|
+
* an operator edits them in ONE place (the Actions page) and a rule points at
|
|
67364
|
+
* the result. A rule can be authored by a non-admin (personal rules), which is
|
|
67365
|
+
* safe for the same reason: it can only name an Action an admin already wrote.
|
|
66863
67366
|
*/
|
|
66864
|
-
var
|
|
66865
|
-
|
|
66866
|
-
|
|
66867
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
66868
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
66869
|
-
});
|
|
66870
|
-
/** Create / update body — the id is minted by the provider. */
|
|
66871
|
-
var NcSharedSequenceInputSchema = object({
|
|
66872
|
-
name: string().min(1).max(120),
|
|
66873
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
66874
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
66875
|
-
});
|
|
66876
|
-
/** Bindings on one hook edge. Cap keeps a slot from becoming a second sequence editor. */
|
|
66877
|
-
var NcHookBindingsSchema = array(discriminatedUnion("kind", [object({
|
|
66878
|
-
kind: literal("sequence"),
|
|
66879
|
-
sequenceId: string().min(1)
|
|
66880
|
-
}), object({
|
|
66881
|
-
kind: literal("do"),
|
|
66882
|
-
action: NcRuleActionSchema
|
|
66883
|
-
})])).max(4);
|
|
67367
|
+
var NcActionIdSchema = string().min(1);
|
|
67368
|
+
/** Action ids one hook edge runs, in order. Capped so a slot never becomes a second editor. */
|
|
67369
|
+
var NcHookActionIdsSchema = array(NcActionIdSchema).max(4);
|
|
66884
67370
|
/**
|
|
66885
|
-
* One button carried by the notification, running
|
|
67371
|
+
* One button carried by the notification, running an Action on tap.
|
|
66886
67372
|
*
|
|
66887
67373
|
* **Read this before adding a button that does something physical.** The tap
|
|
66888
67374
|
* arrives over a link that travelled through third-party infrastructure — ntfy,
|
|
@@ -66897,9 +67383,9 @@ var NcRuleNotificationButtonSchema = object({
|
|
|
66897
67383
|
/** Stable id — travels in the callback and identifies the button in logs. */
|
|
66898
67384
|
id: string().min(1).max(64),
|
|
66899
67385
|
label: string().min(1).max(40),
|
|
66900
|
-
/**
|
|
66901
|
-
*
|
|
66902
|
-
|
|
67386
|
+
/** The Action the tap runs. The dispatcher drops a button whose Action does
|
|
67387
|
+
* not exist rather than minting a token for nothing. */
|
|
67388
|
+
actionId: NcActionIdSchema,
|
|
66903
67389
|
icon: NotificationActionIconSchema.optional(),
|
|
66904
67390
|
destructive: boolean().optional()
|
|
66905
67391
|
});
|
|
@@ -66914,25 +67400,19 @@ var NcRuleNotificationButtonSchema = object({
|
|
|
66914
67400
|
* leave). A delivery with no clear edge never produces this hook.
|
|
66915
67401
|
*/
|
|
66916
67402
|
var NcRuleActionsSchema = object({
|
|
66917
|
-
onActivation:
|
|
66918
|
-
onDeactivation:
|
|
67403
|
+
onActivation: NcHookActionIdsSchema.optional(),
|
|
67404
|
+
onDeactivation: NcHookActionIdsSchema.optional(),
|
|
66919
67405
|
/** Runs on a positive / raised match. */
|
|
66920
|
-
onTrigger:
|
|
67406
|
+
onTrigger: NcHookActionIdsSchema.optional(),
|
|
66921
67407
|
/** Runs on a clear / leave match, when the subject carries one. */
|
|
66922
|
-
onTriggerOff:
|
|
67408
|
+
onTriggerOff: NcHookActionIdsSchema.optional(),
|
|
66923
67409
|
/**
|
|
66924
|
-
* Buttons the NOTIFICATION carries, each running one
|
|
66925
|
-
*
|
|
66926
|
-
*
|
|
67410
|
+
* Buttons the NOTIFICATION carries, each running one Action when tapped.
|
|
67411
|
+
* Deliberately a REFERENCE — a button that could define its own steps would
|
|
67412
|
+
* be a parallel actuation vocabulary.
|
|
66927
67413
|
*/
|
|
66928
67414
|
buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
|
|
66929
67415
|
});
|
|
66930
|
-
object({
|
|
66931
|
-
name: string().min(1).max(120),
|
|
66932
|
-
enabled: boolean(),
|
|
66933
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
66934
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
66935
|
-
});
|
|
66936
67416
|
/**
|
|
66937
67417
|
* "This rule applies only while `deviceId` is in one of `states`."
|
|
66938
67418
|
*
|
|
@@ -68613,18 +69093,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
68613
69093
|
}), object({ success: literal(true) }), {
|
|
68614
69094
|
kind: "mutation",
|
|
68615
69095
|
auth: "admin"
|
|
68616
|
-
}), 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 }), {
|
|
68617
|
-
kind: "mutation",
|
|
68618
|
-
auth: "admin"
|
|
68619
|
-
}), method(object({
|
|
68620
|
-
sequenceId: string().min(1),
|
|
68621
|
-
sequence: NcSharedSequenceInputSchema
|
|
68622
|
-
}), object({ sequence: NcSharedSequenceSchema }), {
|
|
68623
|
-
kind: "mutation",
|
|
68624
|
-
auth: "admin"
|
|
68625
|
-
}), method(object({ sequenceId: string().min(1) }), object({ success: literal(true) }), {
|
|
68626
|
-
kind: "mutation",
|
|
68627
|
-
auth: "admin"
|
|
68628
69096
|
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
68629
69097
|
deviceId: number$1().int(),
|
|
68630
69098
|
muted: boolean()
|
|
@@ -76197,6 +76665,11 @@ var SendEmailResultSchema = object({
|
|
|
76197
76665
|
var SmtpStatusSchema = object({
|
|
76198
76666
|
/** True iff the addon has successfully verified the relay. */
|
|
76199
76667
|
ready: boolean(),
|
|
76668
|
+
/**
|
|
76669
|
+
* The tri-state behind `ready` (D315): true when the last send worked, false when it failed,
|
|
76670
|
+
* ABSENT when the relay has not sent yet (unknown, never "not verified").
|
|
76671
|
+
*/
|
|
76672
|
+
verified: boolean().optional(),
|
|
76200
76673
|
/** Operator-visible host string (no credentials). */
|
|
76201
76674
|
host: string(),
|
|
76202
76675
|
/** Last error message reported by the relay, when not ready. */
|
|
@@ -76208,10 +76681,6 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
|
|
|
76208
76681
|
kind: "mutation",
|
|
76209
76682
|
auth: "admin",
|
|
76210
76683
|
access: "create"
|
|
76211
|
-
}), method(RelayPinSchema, SmtpStatusSchema, {
|
|
76212
|
-
kind: "mutation",
|
|
76213
|
-
auth: "admin",
|
|
76214
|
-
access: "view"
|
|
76215
76684
|
}), method(RelayPinSchema, SmtpStatusSchema, { auth: "admin" });
|
|
76216
76685
|
/**
|
|
76217
76686
|
* A single device snapshot returned as base64 JPEG/PNG.
|
|
@@ -80256,7 +80725,8 @@ var AccessoryKind = {
|
|
|
80256
80725
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
80257
80726
|
};
|
|
80258
80727
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
80259
|
-
DeviceType.
|
|
80728
|
+
DeviceType.HeatPump;
|
|
80729
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
80260
80730
|
new Set(Object.values(DeviceType));
|
|
80261
80731
|
/** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
|
|
80262
80732
|
function contribution(cap, schema, build) {
|
|
@@ -80392,6 +80862,13 @@ var lockContribution = contribution("lock-control", LockControlStatusSchema, (sl
|
|
|
80392
80862
|
reading: reading("lock-control", words?.state ?? "unknown", false, words?.title),
|
|
80393
80863
|
rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(DeviceFeature.LockOpen)))],
|
|
80394
80864
|
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, "muted")] },
|
|
80865
|
+
...words === null ? {} : { tiles: { left: [{
|
|
80866
|
+
label: t("Door", "Porta"),
|
|
80867
|
+
value: title
|
|
80868
|
+
}, ...since === null ? [] : [{
|
|
80869
|
+
label: t("Since", "Da"),
|
|
80870
|
+
value: since
|
|
80871
|
+
}]] } },
|
|
80395
80872
|
...words?.door == null ? {} : { scene: { mode: words.door } }
|
|
80396
80873
|
};
|
|
80397
80874
|
});
|
|
@@ -80473,7 +80950,17 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
80473
80950
|
return {
|
|
80474
80951
|
reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
|
|
80475
80952
|
rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? t("Unknown", "Sconosciuto"), since]), alarmControls(state, modes, slice?.requiresCode ?? false))],
|
|
80476
|
-
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] }
|
|
80953
|
+
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
|
|
80954
|
+
...words === null ? {} : { tiles: {
|
|
80955
|
+
left: [{
|
|
80956
|
+
label: t("Mode", "Modalità"),
|
|
80957
|
+
value: words.title
|
|
80958
|
+
}],
|
|
80959
|
+
...since === null ? {} : { right: [{
|
|
80960
|
+
label: t("Since", "Da"),
|
|
80961
|
+
value: since
|
|
80962
|
+
}] }
|
|
80963
|
+
} }
|
|
80477
80964
|
};
|
|
80478
80965
|
}),
|
|
80479
80966
|
"automation-control": contribution("automation-control", AutomationControlStatusSchema, (slice, ctx) => {
|
|
@@ -80537,7 +81024,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
80537
81024
|
*/
|
|
80538
81025
|
var has$3 = (ctx, f) => ctx.features.includes(f);
|
|
80539
81026
|
var unknownText = t("Unknown", "Sconosciuto");
|
|
80540
|
-
var pct$
|
|
81027
|
+
var pct$2 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
80541
81028
|
var unit = (n) => Math.min(1, Math.max(0, n / 100));
|
|
80542
81029
|
/** Battery as a fact, unless the device is also bound to the `battery` cap (it already says so). */
|
|
80543
81030
|
function ownBattery(level, ctx) {
|
|
@@ -80599,7 +81086,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
80599
81086
|
},
|
|
80600
81087
|
valueArg: "direction"
|
|
80601
81088
|
});
|
|
80602
|
-
const speedText = speed === null ? null : pct$
|
|
81089
|
+
const speedText = speed === null ? null : pct$2(speed);
|
|
80603
81090
|
const preset = slice?.preset ?? "";
|
|
80604
81091
|
const status = speed === null ? unknownText : joinText([speed === 0 ? t("Off", "Spento") : t(`Speed ${speed}%`, `Velocità ${speed}%`), preset === "" ? null : t(preset, preset)]);
|
|
80605
81092
|
return {
|
|
@@ -80612,10 +81099,16 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
80612
81099
|
}],
|
|
80613
81100
|
...speedText === null ? {} : {
|
|
80614
81101
|
facts: [fact("speed", "fan", speedText, speed === 0 ? "muted" : "primary")],
|
|
80615
|
-
tiles: {
|
|
80616
|
-
|
|
80617
|
-
|
|
80618
|
-
|
|
81102
|
+
tiles: {
|
|
81103
|
+
...slice?.oscillating == null ? {} : { left: [{
|
|
81104
|
+
label: t("Oscillation", "Oscilla"),
|
|
81105
|
+
value: slice.oscillating ? t("Yes", "Sì") : t("No", "No")
|
|
81106
|
+
}] },
|
|
81107
|
+
...preset === "" ? {} : { right: [{
|
|
81108
|
+
label: t("Mode", "Modalità"),
|
|
81109
|
+
value: t(preset, preset)
|
|
81110
|
+
}] }
|
|
81111
|
+
},
|
|
80619
81112
|
scene: { level: unit(speed ?? 0) }
|
|
80620
81113
|
}
|
|
80621
81114
|
};
|
|
@@ -80679,7 +81172,8 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
80679
81172
|
const words = state === null ? null : VACUUM_WORDS[state];
|
|
80680
81173
|
const title = state === "error" && slice?.errorLabel ? t(slice.errorLabel, slice.errorLabel) : words?.title;
|
|
80681
81174
|
const controls = vacuumControls(state);
|
|
80682
|
-
|
|
81175
|
+
const suctionControls = [];
|
|
81176
|
+
if (slice !== void 0 && slice.availableFanSpeeds.length > 0) suctionControls.push({
|
|
80683
81177
|
kind: "picker",
|
|
80684
81178
|
id: "vacuum.suction",
|
|
80685
81179
|
label: t("Suction", "Aspirazione"),
|
|
@@ -80694,22 +81188,31 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
80694
81188
|
});
|
|
80695
81189
|
if (state !== null) controls.push(vac("locate", "Locate", "Trova", "map-pin", "locate"));
|
|
80696
81190
|
const progress = state === "cleaning" ? slice?.progress ?? null : null;
|
|
81191
|
+
const suction = slice?.fanSpeed == null || slice.fanSpeed === "" ? [] : [{
|
|
81192
|
+
label: t("Suction", "Aspirazione"),
|
|
81193
|
+
value: t(slice.fanSpeed, slice.fanSpeed)
|
|
81194
|
+
}];
|
|
81195
|
+
const suctionRows = suctionControls.length === 0 ? [] : [{
|
|
81196
|
+
id: "vacuum-suction",
|
|
81197
|
+
icon: "bot",
|
|
81198
|
+
status: null,
|
|
81199
|
+
controls: suctionControls
|
|
81200
|
+
}];
|
|
81201
|
+
const vacuumRows = [{
|
|
81202
|
+
id: "vacuum",
|
|
81203
|
+
icon: "bot",
|
|
81204
|
+
status: title ?? unknownText,
|
|
81205
|
+
controls
|
|
81206
|
+
}, ...suctionRows];
|
|
80697
81207
|
return {
|
|
80698
81208
|
reading: reading("vacuum-control", words?.state ?? "unknown", false, title),
|
|
80699
|
-
rows:
|
|
80700
|
-
|
|
80701
|
-
|
|
80702
|
-
|
|
80703
|
-
|
|
80704
|
-
}],
|
|
80705
|
-
|
|
80706
|
-
...progress === null ? {} : {
|
|
80707
|
-
tiles: { right: [{
|
|
80708
|
-
label: t("Progress", "Avanzamento"),
|
|
80709
|
-
value: pct$1(progress)
|
|
80710
|
-
}] },
|
|
80711
|
-
scene: { level: unit(progress) }
|
|
80712
|
-
}
|
|
81209
|
+
rows: vacuumRows,
|
|
81210
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
81211
|
+
...suction.length === 0 && progress === null ? {} : { tiles: { right: [...suction, ...progress === null ? [] : [{
|
|
81212
|
+
label: t("Progress", "Avanzamento"),
|
|
81213
|
+
value: pct$2(progress)
|
|
81214
|
+
}]] } },
|
|
81215
|
+
...progress === null ? {} : { scene: { level: unit(progress) } }
|
|
80713
81216
|
};
|
|
80714
81217
|
});
|
|
80715
81218
|
var MOWER_WORDS = {
|
|
@@ -80765,11 +81268,11 @@ var mowerContribution = contribution("lawn-mower-control", LawnMowerControlStatu
|
|
|
80765
81268
|
status: title ?? unknownText,
|
|
80766
81269
|
controls: mowerControls(activity)
|
|
80767
81270
|
}],
|
|
80768
|
-
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$
|
|
81271
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
80769
81272
|
...progress === null ? {} : {
|
|
80770
81273
|
tiles: { right: [{
|
|
80771
81274
|
label: t("Progress", "Avanzamento"),
|
|
80772
|
-
value: pct$
|
|
81275
|
+
value: pct$2(progress)
|
|
80773
81276
|
}] },
|
|
80774
81277
|
scene: { level: unit(progress) }
|
|
80775
81278
|
}
|
|
@@ -80840,10 +81343,13 @@ var feederContribution = contribution("pet-feeder", PetFeederStatusSchema, (slic
|
|
|
80840
81343
|
...last === null ? [] : [fact("last-run", "clock", t(`Last ${last} g`, `Ultimo ${last} g`))],
|
|
80841
81344
|
...ownBattery(slice?.powerSource === "battery" ? slice.batteryPower : null, ctx)
|
|
80842
81345
|
],
|
|
80843
|
-
...
|
|
81346
|
+
tiles: { left: [...slice?.foodLevel == null ? [] : [{
|
|
81347
|
+
label: t("Tank", "Serbatoio"),
|
|
81348
|
+
value: pct$2(slice.foodLevel)
|
|
81349
|
+
}], ...last === null ? [] : [{
|
|
80844
81350
|
label: t("Last portion", "Ultima porzione"),
|
|
80845
81351
|
value: t(`${last} g`, `${last} g`)
|
|
80846
|
-
}] }
|
|
81352
|
+
}]] }
|
|
80847
81353
|
};
|
|
80848
81354
|
});
|
|
80849
81355
|
var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema, (slice) => {
|
|
@@ -80871,10 +81377,13 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
|
|
|
80871
81377
|
}],
|
|
80872
81378
|
...level === null ? {} : {
|
|
80873
81379
|
facts: [fact("level", "droplets", t(`Water ${Math.round(level)}%`, `Acqua ${Math.round(level)}%`), level <= 20 ? "warning" : "primary")],
|
|
80874
|
-
tiles: {
|
|
81380
|
+
tiles: { left: [{
|
|
80875
81381
|
label: t("Water", "Acqua"),
|
|
80876
|
-
value: pct$
|
|
80877
|
-
}]
|
|
81382
|
+
value: pct$2(level)
|
|
81383
|
+
}, ...slice?.waterVolume == null ? [] : [{
|
|
81384
|
+
label: t("Volume", "Volume"),
|
|
81385
|
+
value: t(`${Math.round(slice.waterVolume)} ml`, `${Math.round(slice.waterVolume)} ml`)
|
|
81386
|
+
}]] },
|
|
80878
81387
|
scene: { level: unit(level) }
|
|
80879
81388
|
}
|
|
80880
81389
|
};
|
|
@@ -80906,14 +81415,18 @@ var DEVICES_FAMILY_CONTRIBUTIONS = {
|
|
|
80906
81415
|
* that does not parse reads `unknown`, never closed or off (D315/D393).
|
|
80907
81416
|
*/
|
|
80908
81417
|
var has$2 = (ctx, f) => ctx.features.includes(f);
|
|
80909
|
-
var pct = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
81418
|
+
var pct$1 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
80910
81419
|
var brightnessContribution = contribution("brightness", BrightnessStatusSchema, (slice) => {
|
|
80911
81420
|
const level = slice?.level ?? null;
|
|
80912
81421
|
return {
|
|
80913
81422
|
...level === null ? {} : { reading: reading("brightness", level > 0 ? "on" : "off") },
|
|
80914
81423
|
...level === null ? {} : {
|
|
80915
|
-
facts: [fact("level", "sun-dim", pct(level), level > 0 ? "primary" : "muted")],
|
|
80916
|
-
scene: { level: level / 100 }
|
|
81424
|
+
facts: [fact("level", "sun-dim", pct$1(level), level > 0 ? "primary" : "muted")],
|
|
81425
|
+
scene: { level: level / 100 },
|
|
81426
|
+
tiles: { left: [{
|
|
81427
|
+
label: t("Brightness", "Luminosità"),
|
|
81428
|
+
value: pct$1(level)
|
|
81429
|
+
}] }
|
|
80917
81430
|
},
|
|
80918
81431
|
rows: [row$1("brightness", "sun-dim", level === null ? null : t(`Brightness ${Math.round(level)}%`, `Luminosità ${Math.round(level)}%`), [{
|
|
80919
81432
|
kind: "slider",
|
|
@@ -81122,12 +81635,16 @@ function travelFragment(s, state, position, tilt, ctx) {
|
|
|
81122
81635
|
});
|
|
81123
81636
|
return {
|
|
81124
81637
|
reading: reading(s.source, words.state, false, words.title),
|
|
81125
|
-
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct(position))] },
|
|
81638
|
+
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct$1(position))] },
|
|
81639
|
+
...position === null ? {} : { tiles: { left: [{
|
|
81640
|
+
label: t("Opening", "Apertura"),
|
|
81641
|
+
value: pct$1(position)
|
|
81642
|
+
}] } },
|
|
81126
81643
|
scene: {
|
|
81127
81644
|
...words.mode === null ? {} : { mode: words.mode },
|
|
81128
81645
|
...position === null ? {} : { level: position / 100 }
|
|
81129
81646
|
},
|
|
81130
|
-
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct(position) : null]), controls)]
|
|
81647
|
+
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct$1(position) : null]), controls)]
|
|
81131
81648
|
};
|
|
81132
81649
|
}
|
|
81133
81650
|
var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
@@ -81205,10 +81722,10 @@ var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
|
81205
81722
|
const now = slice.currentHumidity;
|
|
81206
81723
|
return {
|
|
81207
81724
|
reading: reading("humidifier", state, false, title),
|
|
81208
|
-
...now === null ? {} : { facts: [fact("level", "droplets", pct(now), "info")] },
|
|
81725
|
+
...now === null ? {} : { facts: [fact("level", "droplets", pct$1(now), "info")] },
|
|
81209
81726
|
...slice.targetHumidity === null ? {} : { tiles: { right: [{
|
|
81210
81727
|
label: t("Target", "Obiettivo"),
|
|
81211
|
-
value: pct(slice.targetHumidity)
|
|
81728
|
+
value: pct$1(slice.targetHumidity)
|
|
81212
81729
|
}] } },
|
|
81213
81730
|
...now === null ? {} : { scene: { level: now / 100 } },
|
|
81214
81731
|
rows: [row$1("humidifier", "droplets", joinText([title, slice.mode === null ? null : t(slice.mode, slice.mode)]), controls)]
|
|
@@ -81456,17 +81973,16 @@ var weatherContribution = contribution("weather", WeatherStatusSchema, (slice, c
|
|
|
81456
81973
|
});
|
|
81457
81974
|
var updateContribution = contribution("update", UpdateStatusSchema, (slice) => {
|
|
81458
81975
|
if (slice === void 0) return { reading: reading("update", "unknown") };
|
|
81459
|
-
const { currentVersion, availableVersion, inProgress
|
|
81976
|
+
const { currentVersion, availableVersion, inProgress } = slice;
|
|
81460
81977
|
const pending = availableVersion !== null && availableVersion !== "" && availableVersion !== currentVersion;
|
|
81461
81978
|
if (!pending && currentVersion === null && !inProgress) return { reading: reading("update", "unknown") };
|
|
81462
81979
|
const state = inProgress ? "running" : pending ? "standby" : "idle";
|
|
81463
81980
|
const title = inProgress ? t("Updating", "Aggiornamento in corso") : pending ? t("Update available", "Aggiornamento disponibile") : t("Up to date", "Aggiornato");
|
|
81464
81981
|
const versions = currentVersion === null ? pending ? t(`${availableVersion}`, `${availableVersion}`) : null : pending ? t(`${currentVersion} → ${availableVersion}`, `${currentVersion} → ${availableVersion}`) : t(`Version ${currentVersion}`, `Versione ${currentVersion}`);
|
|
81465
|
-
const install = pending && updatable && !inProgress ? [asAction(action("update.install", t("Install", "Installa"), "download", "update", "installUpdate", {}, "primary", "install"))] : [];
|
|
81466
81982
|
return {
|
|
81467
81983
|
reading: reading("update", state, false, title),
|
|
81468
81984
|
facts: versions === null ? [] : [fact("reading", "download", versions, pending ? "warning" : "muted")],
|
|
81469
|
-
rows: [row$1("update", "download", versions,
|
|
81985
|
+
rows: [row$1("update", "download", versions, [])]
|
|
81470
81986
|
};
|
|
81471
81987
|
});
|
|
81472
81988
|
var imageContribution = contribution("image", ImageStatusSchema, (slice, ctx) => {
|
|
@@ -81574,6 +82090,33 @@ var ON_MODE_PREFERENCE = [
|
|
|
81574
82090
|
"heat",
|
|
81575
82091
|
"cool"
|
|
81576
82092
|
];
|
|
82093
|
+
var FAN_LABEL = {
|
|
82094
|
+
auto: t("Auto", "Auto"),
|
|
82095
|
+
quiet: t("Quiet", "Silenziosa"),
|
|
82096
|
+
low: t("Low", "Bassa"),
|
|
82097
|
+
medium: t("Medium", "Media"),
|
|
82098
|
+
high: t("High", "Alta"),
|
|
82099
|
+
turbo: t("Turbo", "Turbo"),
|
|
82100
|
+
off: t("Off", "Spenta")
|
|
82101
|
+
};
|
|
82102
|
+
/** A readable label for a fan speed name; an unknown one is shown as the device reported it. */
|
|
82103
|
+
function fanLabelOf(fan) {
|
|
82104
|
+
return FAN_LABEL[fan] ?? t(fan, fan);
|
|
82105
|
+
}
|
|
82106
|
+
/** Short labels for a segmented control: one word each, so the segments stay on a line. */
|
|
82107
|
+
var MODE_SEGMENT_LABEL = {
|
|
82108
|
+
off: t("Off", "Spento"),
|
|
82109
|
+
heat: t("Heat", "Caldo"),
|
|
82110
|
+
cool: t("Cool", "Freddo"),
|
|
82111
|
+
auto: t("Auto", "Auto"),
|
|
82112
|
+
heat_cool: t("Heat/Cool", "Caldo/Freddo"),
|
|
82113
|
+
fan_only: t("Fan", "Vent."),
|
|
82114
|
+
dry: t("Dry", "Deum.")
|
|
82115
|
+
};
|
|
82116
|
+
/** The segment label of every available HVAC mode, keyed by the mode value. */
|
|
82117
|
+
function modeLabelsOf(modes) {
|
|
82118
|
+
return Object.fromEntries(modes.map((m) => [m, MODE_SEGMENT_LABEL[m]]));
|
|
82119
|
+
}
|
|
81577
82120
|
/** 22 -> "22", 22.3 -> "22.3": a trailing zero is noise on a thermostat. */
|
|
81578
82121
|
function formatDegrees(value) {
|
|
81579
82122
|
return `${Number(value.toFixed(1))}°`;
|
|
@@ -81638,11 +82181,11 @@ function rangeFrom(min, max, step) {
|
|
|
81638
82181
|
* contribute, types never do (D14). A slice that is absent or does not parse is
|
|
81639
82182
|
* "not answered": the state reads unknown, no row is drawn (D315, D393).
|
|
81640
82183
|
*/
|
|
81641
|
-
var same = (text) => t(text, text);
|
|
81642
|
-
function tile(en, it, value) {
|
|
82184
|
+
var same$1 = (text) => t(text, text);
|
|
82185
|
+
function tile$1(en, it, value) {
|
|
81643
82186
|
return {
|
|
81644
82187
|
label: t(en, it),
|
|
81645
|
-
value: same(value)
|
|
82188
|
+
value: same$1(value)
|
|
81646
82189
|
};
|
|
81647
82190
|
}
|
|
81648
82191
|
function setpointSlider(id, cap, method, valueArg, value, range) {
|
|
@@ -81677,18 +82220,19 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
81677
82220
|
const status = climateStatusText(view);
|
|
81678
82221
|
const facts = [];
|
|
81679
82222
|
if (status !== null) facts.push(fact("climate", "thermometer", status));
|
|
81680
|
-
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same(`${Math.round(view.humidity)}%`)));
|
|
81681
|
-
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
82223
|
+
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same$1(`${Math.round(view.humidity)}%`)));
|
|
82224
|
+
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same$1(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
81682
82225
|
const left = [];
|
|
81683
82226
|
const right = [];
|
|
81684
|
-
if (view.measured !== null) left.push(tile("Indoor", "In casa", formatDegrees(view.measured)));
|
|
81685
|
-
if (view.humidity !== null) left.push(tile("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
82227
|
+
if (view.measured !== null) left.push(tile$1("Indoor", "In casa", formatDegrees(view.measured)));
|
|
82228
|
+
if (view.humidity !== null) left.push(tile$1("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
81686
82229
|
const modeControls = [{
|
|
81687
82230
|
kind: "picker",
|
|
81688
82231
|
id: "climate.mode",
|
|
81689
82232
|
label: t("Mode", "Modalità"),
|
|
81690
82233
|
current: view.mode,
|
|
81691
|
-
options: [...view.availableModes],
|
|
82234
|
+
options: [...view.availableModes.filter((m) => m !== "off"), ...view.availableModes.filter((m) => m === "off")],
|
|
82235
|
+
optionLabels: modeLabelsOf(view.availableModes),
|
|
81692
82236
|
call: {
|
|
81693
82237
|
cap: "climate-control",
|
|
81694
82238
|
method: "setMode",
|
|
@@ -81716,6 +82260,7 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
81716
82260
|
label: t("Fan", "Ventola"),
|
|
81717
82261
|
current: slice.fanMode === "" ? null : slice.fanMode,
|
|
81718
82262
|
options: [...slice.availableFanModes],
|
|
82263
|
+
optionLabels: Object.fromEntries(slice.availableFanModes.map((m) => [m, fanLabelOf(m)])),
|
|
81719
82264
|
call: {
|
|
81720
82265
|
cap: "climate-control",
|
|
81721
82266
|
method: "setFanMode",
|
|
@@ -81741,14 +82286,15 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
81741
82286
|
if (fanControls.length > 0) rows.push({
|
|
81742
82287
|
id: "climate-fan",
|
|
81743
82288
|
icon: "fan",
|
|
81744
|
-
status: slice.fanMode === "" ? null : same(slice.fanMode),
|
|
82289
|
+
status: slice.fanMode === "" ? null : same$1(slice.fanMode),
|
|
81745
82290
|
controls: fanControls
|
|
81746
82291
|
});
|
|
81747
|
-
rows.push(...setpointRow(view.target === null ? null : same(formatDegrees(view.target)), view.range === null || view.target === null ? null : setpointSlider("climate.target", "climate-control", "setTarget", "target", view.target, view.range)));
|
|
82292
|
+
rows.push(...setpointRow(view.target === null ? null : same$1(formatDegrees(view.target)), view.range === null || view.target === null ? null : setpointSlider("climate.target", "climate-control", "setTarget", "target", view.target, view.range)));
|
|
81748
82293
|
const sceneMode = view.sceneMode;
|
|
81749
82294
|
return {
|
|
81750
82295
|
reading: reading("climate-control", view.isOff ? "off" : "on"),
|
|
81751
82296
|
title: view.modeLabel,
|
|
82297
|
+
...view.isOff || slice.fanMode === "" ? {} : { caption: t(`${view.modeLabel.en} · fan ${fanLabelOf(slice.fanMode).en}`, `${view.modeLabel.it} · ventola ${fanLabelOf(slice.fanMode).it}`) },
|
|
81752
82298
|
facts,
|
|
81753
82299
|
...left.length === 0 && right.length === 0 ? {} : { tiles: {
|
|
81754
82300
|
left,
|
|
@@ -81775,7 +82321,7 @@ var WATER_ON_PREFERENCE = [
|
|
|
81775
82321
|
"performance"
|
|
81776
82322
|
];
|
|
81777
82323
|
function capitalised(word) {
|
|
81778
|
-
return same(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
82324
|
+
return same$1(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
81779
82325
|
}
|
|
81780
82326
|
var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSchema, (slice) => {
|
|
81781
82327
|
if (slice === void 0 || slice.operationMode === null) return { reading: reading("climate-control", "unknown") };
|
|
@@ -81812,13 +82358,13 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
81812
82358
|
icon: "flame",
|
|
81813
82359
|
status: label,
|
|
81814
82360
|
controls: modeControls
|
|
81815
|
-
}, ...setpointRow(slice.targetTemp === null ? null : same(formatDegrees(slice.targetTemp)), range === null || slice.targetTemp === null ? null : setpointSlider("water-heater.target", "water-heater", "setTargetTemp", "temp", slice.targetTemp, range))];
|
|
82361
|
+
}, ...setpointRow(slice.targetTemp === null ? null : same$1(formatDegrees(slice.targetTemp)), range === null || slice.targetTemp === null ? null : setpointSlider("water-heater.target", "water-heater", "setTargetTemp", "temp", slice.targetTemp, range))];
|
|
81816
82362
|
const level = levelWithin(slice.targetTemp, range);
|
|
81817
82363
|
return {
|
|
81818
82364
|
reading: reading("climate-control", isOff ? "off" : "on"),
|
|
81819
82365
|
title: label,
|
|
81820
82366
|
facts: status === null ? [] : [fact("climate", "flame", status)],
|
|
81821
|
-
...slice.currentTemp === null ? {} : { tiles: { left: [tile("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
82367
|
+
...slice.currentTemp === null ? {} : { tiles: { left: [tile$1("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
81822
82368
|
scene: {
|
|
81823
82369
|
...isOff ? {} : { mode: "heat" },
|
|
81824
82370
|
...level === null ? {} : { level }
|
|
@@ -81836,11 +82382,12 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
81836
82382
|
var heatingValveContribution = contribution("heating-valve", HeatingValveStatusSchema, (slice) => {
|
|
81837
82383
|
const position = slice?.position ?? null;
|
|
81838
82384
|
if (position === null) return { reading: reading("sensor", "unknown") };
|
|
81839
|
-
const text = same(`${Math.round(position)}%`);
|
|
82385
|
+
const text = same$1(`${Math.round(position)}%`);
|
|
81840
82386
|
return {
|
|
81841
82387
|
reading: reading("sensor", position > 0 ? "running" : "idle"),
|
|
81842
82388
|
facts: [fact("valve", "gauge", t(`Valve ${text.en}`, `Valvola ${text.it}`))],
|
|
81843
|
-
tiles: { right: [tile("Valve", "Valvola", text.en)] },
|
|
82389
|
+
tiles: { right: [tile$1("Valve", "Valvola", text.en)] },
|
|
82390
|
+
...position > 0 ? { caption: t(`Heating · valve ${text.en}`, `Riscalda · valvola ${text.it}`) } : {},
|
|
81844
82391
|
scene: { level: position / 100 }
|
|
81845
82392
|
};
|
|
81846
82393
|
});
|
|
@@ -81849,9 +82396,9 @@ function sensorFragment(value, id, icon, en, it, text) {
|
|
|
81849
82396
|
if (value === null) return { reading: reading("sensor", "unknown") };
|
|
81850
82397
|
return {
|
|
81851
82398
|
reading: reading("sensor", "on"),
|
|
81852
|
-
title: same(text),
|
|
81853
|
-
facts: [fact(id, icon, same(text))],
|
|
81854
|
-
tiles: { right: [tile(en, it, text)] }
|
|
82399
|
+
title: same$1(text),
|
|
82400
|
+
facts: [fact(id, icon, same$1(text))],
|
|
82401
|
+
tiles: { right: [tile$1(en, it, text)] }
|
|
81855
82402
|
};
|
|
81856
82403
|
}
|
|
81857
82404
|
var temperatureContribution = contribution("temperature-sensor", TemperatureSensorStatusSchema, (slice) => sensorFragment(slice?.temperature ?? null, "temperature", "thermometer", "Temperature", "Temperatura", formatDegrees(slice?.temperature ?? 0)));
|
|
@@ -81906,8 +82453,8 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
81906
82453
|
return {
|
|
81907
82454
|
reading: reading("sensor", "on"),
|
|
81908
82455
|
...slice.aqi === void 0 ? {} : { title: airQualityWord(slice.aqi) },
|
|
81909
|
-
facts: parts.map((p) => fact("air-quality", "wind", same(`${p.label} ${p.value}`))),
|
|
81910
|
-
tiles: { right: parts.slice(0, 2).map((p) => tile(p.label, p.label, p.value)) }
|
|
82456
|
+
facts: parts.map((p) => fact("air-quality", "wind", same$1(`${p.label} ${p.value}`))),
|
|
82457
|
+
tiles: { right: parts.slice(0, 2).map((p) => tile$1(p.label, p.label, p.value)) }
|
|
81911
82458
|
};
|
|
81912
82459
|
}),
|
|
81913
82460
|
"carbon-monoxide": contribution("carbon-monoxide", CarbonMonoxideStatusSchema, (slice) => {
|
|
@@ -81922,15 +82469,270 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
81922
82469
|
"numeric-sensor": numericContribution,
|
|
81923
82470
|
"enum-sensor": enumContribution
|
|
81924
82471
|
};
|
|
82472
|
+
/**
|
|
82473
|
+
* The heat pump's contribution to a hero (D1026): the compressor scene, every
|
|
82474
|
+
* circuit as a row with its own label and icon, the powers as pills (the
|
|
82475
|
+
* instantaneous COP is "—" when it cannot be computed) and a "System" group with
|
|
82476
|
+
* one selector per mode. Values and their limits come from the slice, which the
|
|
82477
|
+
* gateway filled: a selector with no allowed value is not drawn, a missing
|
|
82478
|
+
* reading is never a 0 (D393).
|
|
82479
|
+
*/
|
|
82480
|
+
var CAP = "heat-pump-control";
|
|
82481
|
+
var same = (text) => t(text, text);
|
|
82482
|
+
/** The words of the values the gateway names; a value not listed is drawn as the gateway wrote it. */
|
|
82483
|
+
var VALUE_LABELS = {
|
|
82484
|
+
off: t("Off", "Off"),
|
|
82485
|
+
on: t("On", "On"),
|
|
82486
|
+
auto: t("Auto", "Auto"),
|
|
82487
|
+
manual: t("Manual", "Manuale"),
|
|
82488
|
+
low: t("Low", "Bassa"),
|
|
82489
|
+
high: t("High", "Alta"),
|
|
82490
|
+
eco: t("Eco", "Eco"),
|
|
82491
|
+
heat: t("Heat", "Caldo"),
|
|
82492
|
+
cool: t("Cool", "Freddo"),
|
|
82493
|
+
heatCool: t("Heat/cool", "Caldo/freddo"),
|
|
82494
|
+
ownprogram: t("Programme", "Programma")
|
|
82495
|
+
};
|
|
82496
|
+
function valueLabel(value) {
|
|
82497
|
+
const known = VALUE_LABELS[value];
|
|
82498
|
+
if (known !== void 0) return known;
|
|
82499
|
+
const holiday = /^hm(\d+)$/.exec(value);
|
|
82500
|
+
if (holiday?.[1] !== void 0) return t(`Programme ${holiday[1]}`, `Programma ${holiday[1]}`);
|
|
82501
|
+
return same(value);
|
|
82502
|
+
}
|
|
82503
|
+
function optionLabels(allowed) {
|
|
82504
|
+
return Object.fromEntries(allowed.map((value) => [value, valueLabel(value)]));
|
|
82505
|
+
}
|
|
82506
|
+
function picker(id, label, setting, method, args, valueArg = "mode") {
|
|
82507
|
+
return {
|
|
82508
|
+
kind: "picker",
|
|
82509
|
+
id,
|
|
82510
|
+
label,
|
|
82511
|
+
current: setting.value,
|
|
82512
|
+
options: [...setting.allowed],
|
|
82513
|
+
optionLabels: optionLabels(setting.allowed),
|
|
82514
|
+
call: {
|
|
82515
|
+
cap: CAP,
|
|
82516
|
+
method,
|
|
82517
|
+
args: { ...args }
|
|
82518
|
+
},
|
|
82519
|
+
valueArg
|
|
82520
|
+
};
|
|
82521
|
+
}
|
|
82522
|
+
/** A selector exists only where the gateway named values to choose from. */
|
|
82523
|
+
function choosable(setting) {
|
|
82524
|
+
return setting !== null && setting.allowed.length > 0;
|
|
82525
|
+
}
|
|
82526
|
+
function circuitControl(circuit) {
|
|
82527
|
+
const args = { circuitId: circuit.id };
|
|
82528
|
+
if (circuit.kind === "dhw" && choosable(circuit.temperatureLevel)) return picker(`heat-pump.${circuit.id}.level`, t("Level", "Livello"), circuit.temperatureLevel, "setDhwTemperatureLevel", args, "level");
|
|
82529
|
+
if (!choosable(circuit.operationMode)) return null;
|
|
82530
|
+
const method = circuit.kind === "dhw" ? "setDhwOperationMode" : "setCircuitOperationMode";
|
|
82531
|
+
return picker(`heat-pump.${circuit.id}.mode`, t("Mode", "Modalità"), circuit.operationMode, method, args);
|
|
82532
|
+
}
|
|
82533
|
+
/** A circuit with no reading is still a row: it shows that nothing is known, not nothing. */
|
|
82534
|
+
var UNKNOWN_STATUS = same("—");
|
|
82535
|
+
function circuitRow(circuit) {
|
|
82536
|
+
const control = circuitControl(circuit);
|
|
82537
|
+
const status = thermalStatusText(circuit.targetTemp, circuit.currentTemp) ?? UNKNOWN_STATUS;
|
|
82538
|
+
return {
|
|
82539
|
+
id: "circuit",
|
|
82540
|
+
label: same(circuit.label),
|
|
82541
|
+
icon: circuit.icon,
|
|
82542
|
+
status,
|
|
82543
|
+
controls: control === null ? [] : [control]
|
|
82544
|
+
};
|
|
82545
|
+
}
|
|
82546
|
+
var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
|
|
82547
|
+
/** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
|
|
82548
|
+
function copPill(cop) {
|
|
82549
|
+
if (cop === null) return {
|
|
82550
|
+
icon: "gauge",
|
|
82551
|
+
text: t("Instantaneous COP —", "COP istantaneo —"),
|
|
82552
|
+
tone: "muted"
|
|
82553
|
+
};
|
|
82554
|
+
const text = String(Number(cop.toFixed(1)));
|
|
82555
|
+
return {
|
|
82556
|
+
icon: "gauge",
|
|
82557
|
+
text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
|
|
82558
|
+
tone: "success"
|
|
82559
|
+
};
|
|
82560
|
+
}
|
|
82561
|
+
function powerPills(status) {
|
|
82562
|
+
const { thermalW, electricalW } = status.power;
|
|
82563
|
+
const pills = [];
|
|
82564
|
+
if (thermalW !== null) pills.push({
|
|
82565
|
+
icon: "flame",
|
|
82566
|
+
text: t(`Thermal ${kilowatts(thermalW)}`, `Termica ${kilowatts(thermalW)}`),
|
|
82567
|
+
tone: "muted"
|
|
82568
|
+
});
|
|
82569
|
+
if (electricalW !== null) pills.push({
|
|
82570
|
+
icon: "zap",
|
|
82571
|
+
text: t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
|
|
82572
|
+
tone: "muted"
|
|
82573
|
+
});
|
|
82574
|
+
pills.push(copPill(heatPumpInstantCop(status.power)));
|
|
82575
|
+
return pills;
|
|
82576
|
+
}
|
|
82577
|
+
/** The independent system modes, in the order the card draws them. */
|
|
82578
|
+
var SYSTEM_MODES = [
|
|
82579
|
+
{
|
|
82580
|
+
key: "silent",
|
|
82581
|
+
label: t("Silent", "Silenzioso"),
|
|
82582
|
+
icon: "volume-x",
|
|
82583
|
+
method: "setSilentMode"
|
|
82584
|
+
},
|
|
82585
|
+
{
|
|
82586
|
+
key: "away",
|
|
82587
|
+
label: t("Away", "Assente"),
|
|
82588
|
+
icon: "plane",
|
|
82589
|
+
method: "setAwayMode"
|
|
82590
|
+
},
|
|
82591
|
+
{
|
|
82592
|
+
key: "additionalHeater",
|
|
82593
|
+
label: t("Additional heater", "Riscaldatore aggiuntivo"),
|
|
82594
|
+
icon: "flame",
|
|
82595
|
+
method: "setAdditionalHeaterMode"
|
|
82596
|
+
},
|
|
82597
|
+
{
|
|
82598
|
+
key: "holiday",
|
|
82599
|
+
label: t("Holiday", "Vacanza"),
|
|
82600
|
+
icon: "tree-palm",
|
|
82601
|
+
method: "setHolidayMode"
|
|
82602
|
+
}
|
|
82603
|
+
];
|
|
82604
|
+
var SYSTEM_GROUP = t("System", "Sistema");
|
|
82605
|
+
var PROGRAMME = /^hm\d+$/;
|
|
82606
|
+
/**
|
|
82607
|
+
* Holiday is two segments, off / programme. Choosing "programme" keeps the programme
|
|
82608
|
+
* that is set, else the first one the gateway allowed, so a write never leaves
|
|
82609
|
+
* `allowed`. The full hm1..hm8 pick is not in the hero (D1026). A holiday whose values
|
|
82610
|
+
* are not programmes keeps the plain selector.
|
|
82611
|
+
*/
|
|
82612
|
+
function holidayRow(def, setting) {
|
|
82613
|
+
if (!setting.allowed.includes("off")) return null;
|
|
82614
|
+
const current = setting.value !== null && PROGRAMME.test(setting.value) ? setting.value : null;
|
|
82615
|
+
const programme = current ?? setting.allowed.find((v) => PROGRAMME.test(v));
|
|
82616
|
+
if (programme === void 0) return null;
|
|
82617
|
+
const control = picker("heat-pump.system.holiday", def.label, {
|
|
82618
|
+
value: setting.value,
|
|
82619
|
+
allowed: ["off", programme]
|
|
82620
|
+
}, def.method, {});
|
|
82621
|
+
const number = programme.slice(2);
|
|
82622
|
+
return {
|
|
82623
|
+
id: "system-mode",
|
|
82624
|
+
label: def.label,
|
|
82625
|
+
group: SYSTEM_GROUP,
|
|
82626
|
+
icon: def.icon,
|
|
82627
|
+
status: current === null ? null : t(`Programme ${number}`, `Programma ${number}`),
|
|
82628
|
+
controls: [control.kind === "picker" ? {
|
|
82629
|
+
...control,
|
|
82630
|
+
optionLabels: {
|
|
82631
|
+
off: t("Off", "Off"),
|
|
82632
|
+
[programme]: t("Programme", "Programma")
|
|
82633
|
+
}
|
|
82634
|
+
} : control]
|
|
82635
|
+
};
|
|
82636
|
+
}
|
|
82637
|
+
function systemRows(status) {
|
|
82638
|
+
const rows = [];
|
|
82639
|
+
for (const def of SYSTEM_MODES) {
|
|
82640
|
+
const setting = status.system[def.key];
|
|
82641
|
+
if (!choosable(setting)) continue;
|
|
82642
|
+
if (def.key === "holiday") {
|
|
82643
|
+
const holiday = holidayRow(def, setting);
|
|
82644
|
+
if (holiday !== null) {
|
|
82645
|
+
rows.push(holiday);
|
|
82646
|
+
continue;
|
|
82647
|
+
}
|
|
82648
|
+
}
|
|
82649
|
+
rows.push({
|
|
82650
|
+
id: "system-mode",
|
|
82651
|
+
label: def.label,
|
|
82652
|
+
group: SYSTEM_GROUP,
|
|
82653
|
+
icon: def.icon,
|
|
82654
|
+
status: null,
|
|
82655
|
+
controls: [picker(`heat-pump.system.${def.key}`, def.label, setting, def.method, {})]
|
|
82656
|
+
});
|
|
82657
|
+
}
|
|
82658
|
+
return rows;
|
|
82659
|
+
}
|
|
82660
|
+
function tile(en, it, value) {
|
|
82661
|
+
return {
|
|
82662
|
+
label: t(en, it),
|
|
82663
|
+
value: same(value)
|
|
82664
|
+
};
|
|
82665
|
+
}
|
|
82666
|
+
function tilesOf$1(status) {
|
|
82667
|
+
const { supply, return: back, outdoor } = status.temperatures;
|
|
82668
|
+
const left = [];
|
|
82669
|
+
const right = [];
|
|
82670
|
+
if (supply !== null) left.push(tile("Supply", "Mandata", formatDegrees(supply)));
|
|
82671
|
+
if (back !== null) left.push(tile("Return", "Ritorno", formatDegrees(back)));
|
|
82672
|
+
if (outdoor !== null) right.push(tile("Outdoor", "Esterna", formatDegrees(outdoor)));
|
|
82673
|
+
if (status.waterPressureBar !== null) right.push(tile("Pressure", "Pressione", `${Number(status.waterPressureBar.toFixed(1))} bar`));
|
|
82674
|
+
return {
|
|
82675
|
+
left,
|
|
82676
|
+
right
|
|
82677
|
+
};
|
|
82678
|
+
}
|
|
82679
|
+
function isRunning(status) {
|
|
82680
|
+
const { compressorPct, electricalW } = status.power;
|
|
82681
|
+
if (compressorPct !== null) return compressorPct > 0;
|
|
82682
|
+
if (electricalW !== null) return electricalW > 0;
|
|
82683
|
+
return null;
|
|
82684
|
+
}
|
|
82685
|
+
var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pump-status", HeatPumpStatusSchema, (slice) => {
|
|
82686
|
+
if (slice === void 0) return { reading: reading("climate-control", "unknown") };
|
|
82687
|
+
const running = isRunning(slice);
|
|
82688
|
+
const facts = [];
|
|
82689
|
+
if (slice.power.electricalW !== null) facts.push(fact("power", "zap", same(`${Math.round(slice.power.electricalW)} W`)));
|
|
82690
|
+
if (slice.power.compressorPct !== null) facts.push(fact("level", "gauge", t(`Compressor ${Math.round(slice.power.compressorPct)} %`, `Compressore ${Math.round(slice.power.compressorPct)} %`)));
|
|
82691
|
+
const charging = slice.circuits.find((c) => c.active === true);
|
|
82692
|
+
const tiles = tilesOf$1(slice);
|
|
82693
|
+
const pills = powerPills(slice);
|
|
82694
|
+
const rows = [
|
|
82695
|
+
...slice.circuits.map(circuitRow),
|
|
82696
|
+
...pills.length === 0 ? [] : [{
|
|
82697
|
+
id: "heat-pump-power",
|
|
82698
|
+
icon: "zap",
|
|
82699
|
+
status: null,
|
|
82700
|
+
controls: [],
|
|
82701
|
+
pills: [...pills]
|
|
82702
|
+
}],
|
|
82703
|
+
...systemRows(slice)
|
|
82704
|
+
];
|
|
82705
|
+
return {
|
|
82706
|
+
reading: reading("climate-control", running === true ? "running" : running === false ? "idle" : "on"),
|
|
82707
|
+
title: t("Heat pump", "Pompa di calore"),
|
|
82708
|
+
...charging === void 0 ? {} : { caption: t(`${charging.label} · heating`.toUpperCase(), `${charging.label} · in riscaldamento`.toUpperCase()) },
|
|
82709
|
+
facts,
|
|
82710
|
+
...tiles.left.length === 0 && tiles.right.length === 0 ? {} : { tiles },
|
|
82711
|
+
...slice.power.electricalW === null ? {} : { consumption: {
|
|
82712
|
+
priority: 1,
|
|
82713
|
+
slot: {
|
|
82714
|
+
kind: "power",
|
|
82715
|
+
watts: slice.power.electricalW,
|
|
82716
|
+
detail: slice.power.thermalW === null ? [] : [{
|
|
82717
|
+
label: t("Thermal", "Termica"),
|
|
82718
|
+
value: Math.round(slice.power.thermalW),
|
|
82719
|
+
unit: "W"
|
|
82720
|
+
}]
|
|
82721
|
+
}
|
|
82722
|
+
} },
|
|
82723
|
+
rows
|
|
82724
|
+
};
|
|
82725
|
+
}) };
|
|
81925
82726
|
[
|
|
81926
82727
|
...Object.values(ACCESS_FAMILY_CONTRIBUTIONS),
|
|
81927
82728
|
...Object.values(DEVICES_FAMILY_CONTRIBUTIONS),
|
|
81928
82729
|
...Object.values(GROUPS_FAMILY_CONTRIBUTIONS),
|
|
81929
82730
|
...Object.values(ACTUATORS_FAMILY_CONTRIBUTIONS),
|
|
81930
82731
|
...Object.values(SENSORS_FAMILY_CONTRIBUTIONS),
|
|
81931
|
-
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS)
|
|
82732
|
+
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
|
|
82733
|
+
...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
|
|
81932
82734
|
];
|
|
81933
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
82735
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
81934
82736
|
/**
|
|
81935
82737
|
* Who looks like what (D1023). One look per {@link DeviceType}, refined by a
|
|
81936
82738
|
* {@link DeviceRole} where the role changes how the device reads (a leak
|
|
@@ -82320,7 +83122,7 @@ lookOf({
|
|
|
82320
83122
|
({ ...lookOf({
|
|
82321
83123
|
icon: "shield-check",
|
|
82322
83124
|
on: [
|
|
82323
|
-
"
|
|
83125
|
+
"danger",
|
|
82324
83126
|
"glow",
|
|
82325
83127
|
"halo"
|
|
82326
83128
|
],
|
|
@@ -82558,8 +83360,24 @@ lookOf({
|
|
|
82558
83360
|
idle: INFO,
|
|
82559
83361
|
standby: MUTED
|
|
82560
83362
|
});
|
|
83363
|
+
lookOf({
|
|
83364
|
+
icon: "thermometer-sun",
|
|
83365
|
+
on: [
|
|
83366
|
+
"warning",
|
|
83367
|
+
"heat-rise",
|
|
83368
|
+
"rise"
|
|
83369
|
+
],
|
|
83370
|
+
off: MUTED,
|
|
83371
|
+
running: [
|
|
83372
|
+
"warning",
|
|
83373
|
+
"heat-rise",
|
|
83374
|
+
"rise"
|
|
83375
|
+
],
|
|
83376
|
+
idle: INFO,
|
|
83377
|
+
standby: MUTED
|
|
83378
|
+
});
|
|
82561
83379
|
DeviceType.Climate, DeviceType.Thermostat;
|
|
82562
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
83380
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
|
|
82563
83381
|
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
82564
83382
|
Object.freeze({
|
|
82565
83383
|
"accessories.getStatus": {
|
|
@@ -82940,13 +83758,6 @@ Object.freeze({
|
|
|
82940
83758
|
access: "view",
|
|
82941
83759
|
role: "admin"
|
|
82942
83760
|
},
|
|
82943
|
-
"addonSettings.getIntegrationFormSchema": {
|
|
82944
|
-
capName: "addon-settings",
|
|
82945
|
-
capScope: "system",
|
|
82946
|
-
addonId: null,
|
|
82947
|
-
access: "view",
|
|
82948
|
-
role: "admin"
|
|
82949
|
-
},
|
|
82950
83761
|
"addonSettings.getScopedSettings": {
|
|
82951
83762
|
capName: "addon-settings",
|
|
82952
83763
|
capScope: "system",
|
|
@@ -84732,6 +85543,13 @@ Object.freeze({
|
|
|
84732
85543
|
access: "create",
|
|
84733
85544
|
role: "admin"
|
|
84734
85545
|
},
|
|
85546
|
+
"deviceManager.checkDeviceTemplates": {
|
|
85547
|
+
capName: "device-manager",
|
|
85548
|
+
capScope: "system",
|
|
85549
|
+
addonId: null,
|
|
85550
|
+
access: "view",
|
|
85551
|
+
role: "admin"
|
|
85552
|
+
},
|
|
84735
85553
|
"deviceManager.cleanupDeletedDevicesData": {
|
|
84736
85554
|
capName: "device-manager",
|
|
84737
85555
|
capScope: "system",
|
|
@@ -85131,6 +85949,13 @@ Object.freeze({
|
|
|
85131
85949
|
access: "create",
|
|
85132
85950
|
role: "admin"
|
|
85133
85951
|
},
|
|
85952
|
+
"deviceManager.renderDeviceTemplates": {
|
|
85953
|
+
capName: "device-manager",
|
|
85954
|
+
capScope: "system",
|
|
85955
|
+
addonId: null,
|
|
85956
|
+
access: "view",
|
|
85957
|
+
role: "admin"
|
|
85958
|
+
},
|
|
85134
85959
|
"deviceManager.reportDiscoveryObservations": {
|
|
85135
85960
|
capName: "device-manager",
|
|
85136
85961
|
capScope: "system",
|
|
@@ -86062,6 +86887,111 @@ Object.freeze({
|
|
|
86062
86887
|
access: "view",
|
|
86063
86888
|
role: "viewer"
|
|
86064
86889
|
},
|
|
86890
|
+
"heatPumpControl.setAdditionalHeaterMode": {
|
|
86891
|
+
capName: "heat-pump-control",
|
|
86892
|
+
capScope: "device",
|
|
86893
|
+
addonId: null,
|
|
86894
|
+
access: "create",
|
|
86895
|
+
role: "viewer"
|
|
86896
|
+
},
|
|
86897
|
+
"heatPumpControl.setAwayMode": {
|
|
86898
|
+
capName: "heat-pump-control",
|
|
86899
|
+
capScope: "device",
|
|
86900
|
+
addonId: null,
|
|
86901
|
+
access: "create",
|
|
86902
|
+
role: "viewer"
|
|
86903
|
+
},
|
|
86904
|
+
"heatPumpControl.setCircuitComfortSetpoint": {
|
|
86905
|
+
capName: "heat-pump-control",
|
|
86906
|
+
capScope: "device",
|
|
86907
|
+
addonId: null,
|
|
86908
|
+
access: "create",
|
|
86909
|
+
role: "viewer"
|
|
86910
|
+
},
|
|
86911
|
+
"heatPumpControl.setCircuitEcoSetpoint": {
|
|
86912
|
+
capName: "heat-pump-control",
|
|
86913
|
+
capScope: "device",
|
|
86914
|
+
addonId: null,
|
|
86915
|
+
access: "create",
|
|
86916
|
+
role: "viewer"
|
|
86917
|
+
},
|
|
86918
|
+
"heatPumpControl.setCircuitHeatCoolMode": {
|
|
86919
|
+
capName: "heat-pump-control",
|
|
86920
|
+
capScope: "device",
|
|
86921
|
+
addonId: null,
|
|
86922
|
+
access: "create",
|
|
86923
|
+
role: "viewer"
|
|
86924
|
+
},
|
|
86925
|
+
"heatPumpControl.setCircuitMaxFlowTemp": {
|
|
86926
|
+
capName: "heat-pump-control",
|
|
86927
|
+
capScope: "device",
|
|
86928
|
+
addonId: null,
|
|
86929
|
+
access: "create",
|
|
86930
|
+
role: "viewer"
|
|
86931
|
+
},
|
|
86932
|
+
"heatPumpControl.setCircuitOperationMode": {
|
|
86933
|
+
capName: "heat-pump-control",
|
|
86934
|
+
capScope: "device",
|
|
86935
|
+
addonId: null,
|
|
86936
|
+
access: "create",
|
|
86937
|
+
role: "viewer"
|
|
86938
|
+
},
|
|
86939
|
+
"heatPumpControl.setCircuitSummerWinter": {
|
|
86940
|
+
capName: "heat-pump-control",
|
|
86941
|
+
capScope: "device",
|
|
86942
|
+
addonId: null,
|
|
86943
|
+
access: "create",
|
|
86944
|
+
role: "viewer"
|
|
86945
|
+
},
|
|
86946
|
+
"heatPumpControl.setDhwChargeDuration": {
|
|
86947
|
+
capName: "heat-pump-control",
|
|
86948
|
+
capScope: "device",
|
|
86949
|
+
addonId: null,
|
|
86950
|
+
access: "create",
|
|
86951
|
+
role: "viewer"
|
|
86952
|
+
},
|
|
86953
|
+
"heatPumpControl.setDhwOperationMode": {
|
|
86954
|
+
capName: "heat-pump-control",
|
|
86955
|
+
capScope: "device",
|
|
86956
|
+
addonId: null,
|
|
86957
|
+
access: "create",
|
|
86958
|
+
role: "viewer"
|
|
86959
|
+
},
|
|
86960
|
+
"heatPumpControl.setDhwTemperatureLevel": {
|
|
86961
|
+
capName: "heat-pump-control",
|
|
86962
|
+
capScope: "device",
|
|
86963
|
+
addonId: null,
|
|
86964
|
+
access: "create",
|
|
86965
|
+
role: "viewer"
|
|
86966
|
+
},
|
|
86967
|
+
"heatPumpControl.setHolidayMode": {
|
|
86968
|
+
capName: "heat-pump-control",
|
|
86969
|
+
capScope: "device",
|
|
86970
|
+
addonId: null,
|
|
86971
|
+
access: "create",
|
|
86972
|
+
role: "viewer"
|
|
86973
|
+
},
|
|
86974
|
+
"heatPumpControl.setSilentMode": {
|
|
86975
|
+
capName: "heat-pump-control",
|
|
86976
|
+
capScope: "device",
|
|
86977
|
+
addonId: null,
|
|
86978
|
+
access: "create",
|
|
86979
|
+
role: "viewer"
|
|
86980
|
+
},
|
|
86981
|
+
"heatPumpControl.startExtraHotWater": {
|
|
86982
|
+
capName: "heat-pump-control",
|
|
86983
|
+
capScope: "device",
|
|
86984
|
+
addonId: null,
|
|
86985
|
+
access: "create",
|
|
86986
|
+
role: "viewer"
|
|
86987
|
+
},
|
|
86988
|
+
"heatPumpStatus.getStatus": {
|
|
86989
|
+
capName: "heat-pump-status",
|
|
86990
|
+
capScope: "device",
|
|
86991
|
+
addonId: null,
|
|
86992
|
+
access: "view",
|
|
86993
|
+
role: "viewer"
|
|
86994
|
+
},
|
|
86065
86995
|
"heroLayout.getHeroModel": {
|
|
86066
86996
|
capName: "hero-layout",
|
|
86067
86997
|
capScope: "system",
|
|
@@ -90969,13 +91899,6 @@ Object.freeze({
|
|
|
90969
91899
|
access: "create",
|
|
90970
91900
|
role: "admin"
|
|
90971
91901
|
},
|
|
90972
|
-
"smtpProvider.verify": {
|
|
90973
|
-
capName: "smtp-provider",
|
|
90974
|
-
capScope: "system",
|
|
90975
|
-
addonId: null,
|
|
90976
|
-
access: "view",
|
|
90977
|
-
role: "admin"
|
|
90978
|
-
},
|
|
90979
91902
|
"snapshot.applyDeviceSettingsPatch": {
|
|
90980
91903
|
capName: "snapshot",
|
|
90981
91904
|
capScope: "device",
|
|
@@ -92908,7 +93831,7 @@ function projectAction(cap, action) {
|
|
|
92908
93831
|
};
|
|
92909
93832
|
}
|
|
92910
93833
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
92911
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
93834
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
92912
93835
|
/**
|
|
92913
93836
|
* Heuristic check — `device.features?.includes(profile.when.hasFeature)`.
|
|
92914
93837
|
*/
|
|
@@ -92977,7 +93900,6 @@ function offered(received) {
|
|
|
92977
93900
|
};
|
|
92978
93901
|
}
|
|
92979
93902
|
offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
|
|
92980
|
-
string().min(1).max(4096);
|
|
92981
93903
|
Object.freeze({
|
|
92982
93904
|
"accessories.getStatus": [{
|
|
92983
93905
|
name: "deviceId",
|
|
@@ -94060,6 +94982,81 @@ Object.freeze({
|
|
|
94060
94982
|
form: "single",
|
|
94061
94983
|
optional: false
|
|
94062
94984
|
}],
|
|
94985
|
+
"heatPumpControl.setAdditionalHeaterMode": [{
|
|
94986
|
+
name: "deviceId",
|
|
94987
|
+
form: "single",
|
|
94988
|
+
optional: false
|
|
94989
|
+
}],
|
|
94990
|
+
"heatPumpControl.setAwayMode": [{
|
|
94991
|
+
name: "deviceId",
|
|
94992
|
+
form: "single",
|
|
94993
|
+
optional: false
|
|
94994
|
+
}],
|
|
94995
|
+
"heatPumpControl.setCircuitComfortSetpoint": [{
|
|
94996
|
+
name: "deviceId",
|
|
94997
|
+
form: "single",
|
|
94998
|
+
optional: false
|
|
94999
|
+
}],
|
|
95000
|
+
"heatPumpControl.setCircuitEcoSetpoint": [{
|
|
95001
|
+
name: "deviceId",
|
|
95002
|
+
form: "single",
|
|
95003
|
+
optional: false
|
|
95004
|
+
}],
|
|
95005
|
+
"heatPumpControl.setCircuitHeatCoolMode": [{
|
|
95006
|
+
name: "deviceId",
|
|
95007
|
+
form: "single",
|
|
95008
|
+
optional: false
|
|
95009
|
+
}],
|
|
95010
|
+
"heatPumpControl.setCircuitMaxFlowTemp": [{
|
|
95011
|
+
name: "deviceId",
|
|
95012
|
+
form: "single",
|
|
95013
|
+
optional: false
|
|
95014
|
+
}],
|
|
95015
|
+
"heatPumpControl.setCircuitOperationMode": [{
|
|
95016
|
+
name: "deviceId",
|
|
95017
|
+
form: "single",
|
|
95018
|
+
optional: false
|
|
95019
|
+
}],
|
|
95020
|
+
"heatPumpControl.setCircuitSummerWinter": [{
|
|
95021
|
+
name: "deviceId",
|
|
95022
|
+
form: "single",
|
|
95023
|
+
optional: false
|
|
95024
|
+
}],
|
|
95025
|
+
"heatPumpControl.setDhwChargeDuration": [{
|
|
95026
|
+
name: "deviceId",
|
|
95027
|
+
form: "single",
|
|
95028
|
+
optional: false
|
|
95029
|
+
}],
|
|
95030
|
+
"heatPumpControl.setDhwOperationMode": [{
|
|
95031
|
+
name: "deviceId",
|
|
95032
|
+
form: "single",
|
|
95033
|
+
optional: false
|
|
95034
|
+
}],
|
|
95035
|
+
"heatPumpControl.setDhwTemperatureLevel": [{
|
|
95036
|
+
name: "deviceId",
|
|
95037
|
+
form: "single",
|
|
95038
|
+
optional: false
|
|
95039
|
+
}],
|
|
95040
|
+
"heatPumpControl.setHolidayMode": [{
|
|
95041
|
+
name: "deviceId",
|
|
95042
|
+
form: "single",
|
|
95043
|
+
optional: false
|
|
95044
|
+
}],
|
|
95045
|
+
"heatPumpControl.setSilentMode": [{
|
|
95046
|
+
name: "deviceId",
|
|
95047
|
+
form: "single",
|
|
95048
|
+
optional: false
|
|
95049
|
+
}],
|
|
95050
|
+
"heatPumpControl.startExtraHotWater": [{
|
|
95051
|
+
name: "deviceId",
|
|
95052
|
+
form: "single",
|
|
95053
|
+
optional: false
|
|
95054
|
+
}],
|
|
95055
|
+
"heatPumpStatus.getStatus": [{
|
|
95056
|
+
name: "deviceId",
|
|
95057
|
+
form: "single",
|
|
95058
|
+
optional: false
|
|
95059
|
+
}],
|
|
94063
95060
|
"heroLayout.getHeroModel": [{
|
|
94064
95061
|
name: "deviceId",
|
|
94065
95062
|
form: "single",
|