@camstack/addon-provider-reolink 1.2.235 → 1.2.236
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 +6 -0
- package/dist/addon.js +1642 -522
- package/dist/addon.mjs +1642 -522
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -101498,7 +101498,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
101498
101498
|
return EventCategory;
|
|
101499
101499
|
}({});
|
|
101500
101500
|
//#endregion
|
|
101501
|
-
//#region ../types/dist/
|
|
101501
|
+
//#region ../types/dist/composed-stable-id-jnvhwGoH.mjs
|
|
101502
101502
|
/**
|
|
101503
101503
|
import { errMsg } from '@camstack/types'
|
|
101504
101504
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -101624,6 +101624,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
101624
101624
|
* (`reboot`, `device-admin-link`). Products are NOT its children — they are
|
|
101625
101625
|
* adopted beside it — and its connection settings stay on the integration. */
|
|
101626
101626
|
DeviceType["Gateway"] = "gateway";
|
|
101627
|
+
/** A heat pump (any vendor): the compressor unit with its circuits (heating, hot
|
|
101628
|
+
* water, cooling, solar), its system modes and its power. One main read-only
|
|
101629
|
+
* `heat-pump-status` cap carries all of it; `heat-pump-control` sets it (D1026). */
|
|
101630
|
+
DeviceType["HeatPump"] = "heat-pump";
|
|
101627
101631
|
return DeviceType;
|
|
101628
101632
|
}({});
|
|
101629
101633
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -101782,6 +101786,10 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
101782
101786
|
/** Robot mower exposes targeted mowing (all-area / zones / edges /
|
|
101783
101787
|
* spots) — gates the Mow action + map selectors. */
|
|
101784
101788
|
DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
|
|
101789
|
+
/** The device has a drive/navigation surface (`navigation` cap): a robot camera. */
|
|
101790
|
+
DeviceFeature["Navigation"] = "navigation";
|
|
101791
|
+
/** The device has a network-link reading (`network-link` cap). */
|
|
101792
|
+
DeviceFeature["NetworkLink"] = "network-link";
|
|
101785
101793
|
return DeviceFeature;
|
|
101786
101794
|
}({});
|
|
101787
101795
|
/**
|
|
@@ -101896,6 +101904,12 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
101896
101904
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
101897
101905
|
return DeviceRole;
|
|
101898
101906
|
}({});
|
|
101907
|
+
/**
|
|
101908
|
+
* A composed device's stableId is this prefix plus the block id. Its own module,
|
|
101909
|
+
* free of zod, so the addon runner can read it through `@camstack/types/addon`
|
|
101910
|
+
* without loading the schema barrel (D28).
|
|
101911
|
+
*/
|
|
101912
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
101899
101913
|
//#endregion
|
|
101900
101914
|
//#region ../../node_modules/zod/v4/core/core.js
|
|
101901
101915
|
var _a$1;
|
|
@@ -106708,7 +106722,7 @@ var ZodIssueCode = {
|
|
|
106708
106722
|
var ZodFirstPartyTypeKind;
|
|
106709
106723
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
106710
106724
|
//#endregion
|
|
106711
|
-
//#region ../types/dist/sleep-
|
|
106725
|
+
//#region ../types/dist/sleep-Dz1P6--1.mjs
|
|
106712
106726
|
/**
|
|
106713
106727
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
106714
106728
|
* window to float samples (D455).
|
|
@@ -109402,16 +109416,6 @@ var BaseAddon = class {
|
|
|
109402
109416
|
return null;
|
|
109403
109417
|
}
|
|
109404
109418
|
/**
|
|
109405
|
-
* The form schema of ONE integration instance, or `null` to use the scoped form.
|
|
109406
|
-
*
|
|
109407
|
-
* Override it only when an `instanceMode: multiple` addon's instances differ: an NVR integration
|
|
109408
|
-
* needs its connection fields, the default integration the addon's own sections. It is the
|
|
109409
|
-
* SHAPE of the form only — the values live on the instance record.
|
|
109410
|
-
*/
|
|
109411
|
-
async integrationFormSchema(_instance) {
|
|
109412
|
-
return null;
|
|
109413
|
-
}
|
|
109414
|
-
/**
|
|
109415
109419
|
* D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
|
|
109416
109420
|
* provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
|
|
109417
109421
|
* declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
|
|
@@ -109439,8 +109443,7 @@ var BaseAddon = class {
|
|
|
109439
109443
|
}
|
|
109440
109444
|
/**
|
|
109441
109445
|
* The host's read of the scoped declarations: the schema one capability declares for `scope`,
|
|
109442
|
-
* or `null`.
|
|
109443
|
-
* host asks this method.
|
|
109446
|
+
* or `null`. The hook is protected, the host asks this method.
|
|
109444
109447
|
*/
|
|
109445
109448
|
async getScopedSettingsSchema(scope, cap) {
|
|
109446
109449
|
switch (scope) {
|
|
@@ -109608,22 +109611,6 @@ var BaseAddon = class {
|
|
|
109608
109611
|
return Object.fromEntries([...collectHydratedFieldValues(form)].filter(([, value]) => value !== void 0));
|
|
109609
109612
|
}
|
|
109610
109613
|
/**
|
|
109611
|
-
* What the create wizard and the integration edit page render for one instance: the addon's
|
|
109612
|
-
* per-instance schema when it declares one, else its global schema (what they always showed).
|
|
109613
|
-
*/
|
|
109614
|
-
async getIntegrationFormSchema(instance, nodeId) {
|
|
109615
|
-
const scoped = await this.integrationFormSchema(instance);
|
|
109616
|
-
if (scoped === null) return this.scopedForm(nodeId);
|
|
109617
|
-
return hydrateSchema(scoped, {}, { inlineSecretsAsViews: true });
|
|
109618
|
-
}
|
|
109619
|
-
/** The form of the scoped schemas this addon declared, hydrated from its store. */
|
|
109620
|
-
async scopedForm(nodeId) {
|
|
109621
|
-
await this.loadScopedSchemas();
|
|
109622
|
-
const schema = this.scopedFormSchema();
|
|
109623
|
-
if (!schema) return { sections: [] };
|
|
109624
|
-
return hydrateSchema(schema, await this.readRawProjectedStore(nodeId), { inlineSecretsAsViews: true });
|
|
109625
|
-
}
|
|
109626
|
-
/**
|
|
109627
109614
|
* The raw addon store PROJECTED onto the target node's bare per-node keys:
|
|
109628
109615
|
* every `perNode: true` field carries THAT node's scoped value on its bare
|
|
109629
109616
|
* key (absent scoped key ⇒ key absent, so the schema `default` wins — no
|
|
@@ -109810,12 +109797,6 @@ var BaseAddon = class {
|
|
|
109810
109797
|
this._nodeKeysByCap = /* @__PURE__ */ new Map();
|
|
109811
109798
|
this._addonSecretTree = null;
|
|
109812
109799
|
}
|
|
109813
|
-
/** The form of an addon's scoped schemas: their sections, each shown once. */
|
|
109814
|
-
scopedFormSchema(cap) {
|
|
109815
|
-
const byId = /* @__PURE__ */ new Map();
|
|
109816
|
-
for (const entry of this.loadedScopedSchemas(cap)) for (const section of entry.schema.sections) if (!byId.has(section.id)) byId.set(section.id, section);
|
|
109817
|
-
return byId.size === 0 ? null : { sections: [...byId.values()] };
|
|
109818
|
-
}
|
|
109819
109800
|
/** Every loaded scoped schema of `cap`, or of every loaded capability. */
|
|
109820
109801
|
loadedScopedSchemas(cap) {
|
|
109821
109802
|
if (cap !== void 0) return this._scopedByCap.get(cap) ?? [];
|
|
@@ -110405,6 +110386,24 @@ function normalizeAddonInitResult(result) {
|
|
|
110405
110386
|
if (Array.isArray(result)) return { providers: result };
|
|
110406
110387
|
return result;
|
|
110407
110388
|
}
|
|
110389
|
+
object({
|
|
110390
|
+
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
110391
|
+
params: record(string(), union([string(), number$1()])).optional()
|
|
110392
|
+
});
|
|
110393
|
+
var CamstackError = class extends Error {
|
|
110394
|
+
i18nCode;
|
|
110395
|
+
i18nParams;
|
|
110396
|
+
constructor(code, params, englishMessage) {
|
|
110397
|
+
super(englishMessage);
|
|
110398
|
+
this.name = "CamstackError";
|
|
110399
|
+
this.i18nCode = code;
|
|
110400
|
+
this.i18nParams = params;
|
|
110401
|
+
}
|
|
110402
|
+
};
|
|
110403
|
+
/** `throw userError('device.not-found', { id }, 'Device 12 not found')` */
|
|
110404
|
+
function userError(code, params, englishFallback) {
|
|
110405
|
+
return new CamstackError(code, params, englishFallback);
|
|
110406
|
+
}
|
|
110408
110407
|
object({
|
|
110409
110408
|
field: string().min(1),
|
|
110410
110409
|
on: literal("advance")
|
|
@@ -110481,12 +110480,6 @@ function systemMethod(input, output, options) {
|
|
|
110481
110480
|
systemOnly: true
|
|
110482
110481
|
};
|
|
110483
110482
|
}
|
|
110484
|
-
/**
|
|
110485
|
-
* A method a SOURCE of a collection cap may legitimately not serve — OPTIONAL
|
|
110486
|
-
* on `InferProvider`. The `providerOptional: true` literal is what
|
|
110487
|
-
* `InferProvider` keys on; see {@link CapabilityMethodSchema.providerOptional}
|
|
110488
|
-
* for when this is the honest answer and when it is a soft stub.
|
|
110489
|
-
*/
|
|
110490
110483
|
function optionalMethod(input, output, options) {
|
|
110491
110484
|
return {
|
|
110492
110485
|
...method(input, output, options),
|
|
@@ -110777,15 +110770,52 @@ var PeerBytesTicketSchema = object({
|
|
|
110777
110770
|
*/
|
|
110778
110771
|
declaredBytes: number$1().int().nonnegative().nullable()
|
|
110779
110772
|
});
|
|
110780
|
-
|
|
110781
|
-
|
|
110782
|
-
|
|
110783
|
-
|
|
110784
|
-
|
|
110785
|
-
|
|
110786
|
-
|
|
110787
|
-
|
|
110788
|
-
|
|
110773
|
+
/**
|
|
110774
|
+
* The match a notification rule fired on (D705). Carried as a command origin so an
|
|
110775
|
+
* Action the rule starts can press `alarm-panel.trigger` as that match, not as an
|
|
110776
|
+
* anonymous press (D735). The same fields a rule fire ref freezes.
|
|
110777
|
+
*/
|
|
110778
|
+
var RuleFireOriginSchema = object({
|
|
110779
|
+
ruleId: string(),
|
|
110780
|
+
ruleName: string(),
|
|
110781
|
+
deviceId: number$1().int(),
|
|
110782
|
+
sourceDeviceId: number$1().int().optional(),
|
|
110783
|
+
recordId: string(),
|
|
110784
|
+
timestamp: number$1(),
|
|
110785
|
+
trackId: string().optional(),
|
|
110786
|
+
eventId: string().optional(),
|
|
110787
|
+
className: string().optional(),
|
|
110788
|
+
label: string().optional(),
|
|
110789
|
+
zones: array(string()).optional(),
|
|
110790
|
+
confidence: number$1().optional(),
|
|
110791
|
+
sensorChange: object({
|
|
110792
|
+
name: string(),
|
|
110793
|
+
kind: string(),
|
|
110794
|
+
state: string()
|
|
110795
|
+
}).optional(),
|
|
110796
|
+
extraStills: array(object({
|
|
110797
|
+
ownerId: string(),
|
|
110798
|
+
cameraId: number$1().int()
|
|
110799
|
+
})).optional()
|
|
110800
|
+
});
|
|
110801
|
+
discriminatedUnion("kind", [
|
|
110802
|
+
object({
|
|
110803
|
+
kind: literal("action"),
|
|
110804
|
+
actionId: string(),
|
|
110805
|
+
runId: string(),
|
|
110806
|
+
automationId: string().optional(),
|
|
110807
|
+
/** The rule fire that started this run, when one did (D705). */
|
|
110808
|
+
ruleFire: RuleFireOriginSchema.optional()
|
|
110809
|
+
}),
|
|
110810
|
+
object({
|
|
110811
|
+
kind: literal("scheduler"),
|
|
110812
|
+
schedulerId: string()
|
|
110813
|
+
}),
|
|
110814
|
+
object({
|
|
110815
|
+
kind: literal("rule"),
|
|
110816
|
+
fire: RuleFireOriginSchema
|
|
110817
|
+
})
|
|
110818
|
+
]);
|
|
110789
110819
|
/**
|
|
110790
110820
|
* One recorded device transition (D1022): a status field of a device went from
|
|
110791
110821
|
* one value to another, with who or what asked for it.
|
|
@@ -111371,7 +111401,7 @@ function t(en, it) {
|
|
|
111371
111401
|
* Things an operator switches, opens, sets or arms: lights, plugs, sirens,
|
|
111372
111402
|
* covers, valves, locks, climate, fans, alarm panels.
|
|
111373
111403
|
*/
|
|
111374
|
-
var ON = t("On", "Acceso");
|
|
111404
|
+
var ON$1 = t("On", "Acceso");
|
|
111375
111405
|
var PERCENT = t("Percentage", "Percentuale");
|
|
111376
111406
|
var OPEN_CLOSE_STATES = [
|
|
111377
111407
|
{
|
|
@@ -111431,7 +111461,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
111431
111461
|
state: [{
|
|
111432
111462
|
kind: "boolean",
|
|
111433
111463
|
field: "on",
|
|
111434
|
-
label: ON,
|
|
111464
|
+
label: ON$1,
|
|
111435
111465
|
whenTrue: t("When {device} turns on", "Quando {device} si accende"),
|
|
111436
111466
|
whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
|
|
111437
111467
|
icon: "power"
|
|
@@ -112597,7 +112627,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
112597
112627
|
state: [{
|
|
112598
112628
|
kind: "boolean",
|
|
112599
112629
|
field: "on",
|
|
112600
|
-
label: ON,
|
|
112630
|
+
label: ON$1,
|
|
112601
112631
|
whenTrue: t("When {device} turns on", "Quando {device} si accende"),
|
|
112602
112632
|
whenFalse: t("When {device} turns off", "Quando {device} si spegne"),
|
|
112603
112633
|
icon: "power"
|
|
@@ -115009,6 +115039,133 @@ var CAMERA_CAP_VOCABULARY = {
|
|
|
115009
115039
|
}
|
|
115010
115040
|
};
|
|
115011
115041
|
/**
|
|
115042
|
+
* The heat pump (D1026): its system modes are phrased for automations, each with the
|
|
115043
|
+
* values the gateway really accepts; the per-circuit parameters need a circuit and are
|
|
115044
|
+
* set from the device page.
|
|
115045
|
+
*/
|
|
115046
|
+
var OFF = {
|
|
115047
|
+
value: "off",
|
|
115048
|
+
label: t("Off", "Off")
|
|
115049
|
+
};
|
|
115050
|
+
var AUTO = {
|
|
115051
|
+
value: "auto",
|
|
115052
|
+
label: t("Auto", "Auto")
|
|
115053
|
+
};
|
|
115054
|
+
var ON = {
|
|
115055
|
+
value: "on",
|
|
115056
|
+
label: t("On", "On")
|
|
115057
|
+
};
|
|
115058
|
+
var MANUAL = {
|
|
115059
|
+
value: "manual",
|
|
115060
|
+
label: t("Manual", "Manuale")
|
|
115061
|
+
};
|
|
115062
|
+
var HOLIDAY_PROGRAMMES = [OFF, ...[
|
|
115063
|
+
1,
|
|
115064
|
+
2,
|
|
115065
|
+
3,
|
|
115066
|
+
4,
|
|
115067
|
+
5,
|
|
115068
|
+
6,
|
|
115069
|
+
7,
|
|
115070
|
+
8
|
|
115071
|
+
].map((n) => ({
|
|
115072
|
+
value: `hm${n}`,
|
|
115073
|
+
label: t(`Programme ${n}`, `Programma ${n}`)
|
|
115074
|
+
}))];
|
|
115075
|
+
var PER_CIRCUIT = "Needs a circuit: set from the device page, not offered to automations";
|
|
115076
|
+
var HEAT_PUMP_CAP_VOCABULARY = {
|
|
115077
|
+
"heat-pump-status": {
|
|
115078
|
+
scope: "device",
|
|
115079
|
+
noun: t("Heat pump", "Pompa di calore")
|
|
115080
|
+
},
|
|
115081
|
+
"heat-pump-control": {
|
|
115082
|
+
scope: "device",
|
|
115083
|
+
noun: t("Heat pump settings", "Impostazioni pompa di calore"),
|
|
115084
|
+
actions: [
|
|
115085
|
+
{
|
|
115086
|
+
id: "heatPump.silent",
|
|
115087
|
+
method: "setSilentMode",
|
|
115088
|
+
label: t("Set silent mode", "Imposta la modalità silenziosa"),
|
|
115089
|
+
phrase: t("Set silent mode of {device} to {mode}", "Imposta la modalità silenziosa di {device} su {mode}"),
|
|
115090
|
+
icon: "volume-x",
|
|
115091
|
+
openArgs: [{
|
|
115092
|
+
key: "mode",
|
|
115093
|
+
label: t("Silent mode", "Modalità silenziosa"),
|
|
115094
|
+
offer: {
|
|
115095
|
+
kind: "enum",
|
|
115096
|
+
values: [
|
|
115097
|
+
OFF,
|
|
115098
|
+
AUTO,
|
|
115099
|
+
ON
|
|
115100
|
+
]
|
|
115101
|
+
}
|
|
115102
|
+
}]
|
|
115103
|
+
},
|
|
115104
|
+
{
|
|
115105
|
+
id: "heatPump.away",
|
|
115106
|
+
method: "setAwayMode",
|
|
115107
|
+
label: t("Set away mode", "Imposta la modalità assente"),
|
|
115108
|
+
phrase: t("Set away mode of {device} to {mode}", "Imposta la modalità assente di {device} su {mode}"),
|
|
115109
|
+
icon: "plane",
|
|
115110
|
+
openArgs: [{
|
|
115111
|
+
key: "mode",
|
|
115112
|
+
label: t("Away mode", "Modalità assente"),
|
|
115113
|
+
offer: {
|
|
115114
|
+
kind: "enum",
|
|
115115
|
+
values: [OFF, ON]
|
|
115116
|
+
}
|
|
115117
|
+
}]
|
|
115118
|
+
},
|
|
115119
|
+
{
|
|
115120
|
+
id: "heatPump.additionalHeater",
|
|
115121
|
+
method: "setAdditionalHeaterMode",
|
|
115122
|
+
label: t("Set additional heater", "Imposta il riscaldatore aggiuntivo"),
|
|
115123
|
+
phrase: t("Set the additional heater of {device} to {mode}", "Imposta il riscaldatore aggiuntivo di {device} su {mode}"),
|
|
115124
|
+
icon: "flame",
|
|
115125
|
+
openArgs: [{
|
|
115126
|
+
key: "mode",
|
|
115127
|
+
label: t("Additional heater", "Riscaldatore aggiuntivo"),
|
|
115128
|
+
offer: {
|
|
115129
|
+
kind: "enum",
|
|
115130
|
+
values: [
|
|
115131
|
+
OFF,
|
|
115132
|
+
MANUAL,
|
|
115133
|
+
AUTO
|
|
115134
|
+
]
|
|
115135
|
+
}
|
|
115136
|
+
}]
|
|
115137
|
+
},
|
|
115138
|
+
{
|
|
115139
|
+
id: "heatPump.holiday",
|
|
115140
|
+
method: "setHolidayMode",
|
|
115141
|
+
label: t("Set holiday mode", "Imposta la modalità vacanza"),
|
|
115142
|
+
phrase: t("Set holiday mode of {device} to {mode}", "Imposta la modalità vacanza di {device} su {mode}"),
|
|
115143
|
+
icon: "tree-palm",
|
|
115144
|
+
openArgs: [{
|
|
115145
|
+
key: "mode",
|
|
115146
|
+
label: t("Holiday programme", "Programma vacanza"),
|
|
115147
|
+
offer: {
|
|
115148
|
+
kind: "enum",
|
|
115149
|
+
values: HOLIDAY_PROGRAMMES
|
|
115150
|
+
}
|
|
115151
|
+
}]
|
|
115152
|
+
}
|
|
115153
|
+
],
|
|
115154
|
+
notOperatorFacing: {
|
|
115155
|
+
setCircuitOperationMode: PER_CIRCUIT,
|
|
115156
|
+
setCircuitHeatCoolMode: PER_CIRCUIT,
|
|
115157
|
+
setCircuitSummerWinter: PER_CIRCUIT,
|
|
115158
|
+
setCircuitComfortSetpoint: PER_CIRCUIT,
|
|
115159
|
+
setCircuitEcoSetpoint: PER_CIRCUIT,
|
|
115160
|
+
setCircuitMaxFlowTemp: PER_CIRCUIT,
|
|
115161
|
+
setDhwOperationMode: PER_CIRCUIT,
|
|
115162
|
+
setDhwTemperatureLevel: PER_CIRCUIT,
|
|
115163
|
+
setDhwChargeDuration: PER_CIRCUIT,
|
|
115164
|
+
startExtraHotWater: PER_CIRCUIT
|
|
115165
|
+
}
|
|
115166
|
+
}
|
|
115167
|
+
};
|
|
115168
|
+
/**
|
|
115012
115169
|
* Things an operator WATCHES: contacts, motion, leaks, smoke, measurements,
|
|
115013
115170
|
* presence, reachability, batteries, doorbells and event sources.
|
|
115014
115171
|
*/
|
|
@@ -115730,6 +115887,7 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115730
115887
|
...ACTUATOR_CAP_VOCABULARY,
|
|
115731
115888
|
...APPLIANCE_CAP_VOCABULARY,
|
|
115732
115889
|
...CAMERA_CAP_VOCABULARY,
|
|
115890
|
+
...HEAT_PUMP_CAP_VOCABULARY,
|
|
115733
115891
|
...SENSOR_CAP_VOCABULARY,
|
|
115734
115892
|
...SYSTEM_CAP_VOCABULARY
|
|
115735
115893
|
};
|
|
@@ -115989,6 +116147,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
115989
116147
|
"group-active",
|
|
115990
116148
|
"group-commands",
|
|
115991
116149
|
"group-status",
|
|
116150
|
+
"heat-pump-control",
|
|
116151
|
+
"heat-pump-status",
|
|
115992
116152
|
"heating-valve",
|
|
115993
116153
|
"hero-layout",
|
|
115994
116154
|
"humidifier",
|
|
@@ -116854,6 +117014,48 @@ Object.freeze({
|
|
|
116854
117014
|
"valueType": "number"
|
|
116855
117015
|
}
|
|
116856
117016
|
],
|
|
117017
|
+
"heat-pump-status": [
|
|
117018
|
+
{
|
|
117019
|
+
"path": "power.thermalW",
|
|
117020
|
+
"valueType": "number"
|
|
117021
|
+
},
|
|
117022
|
+
{
|
|
117023
|
+
"path": "power.electricalW",
|
|
117024
|
+
"valueType": "number"
|
|
117025
|
+
},
|
|
117026
|
+
{
|
|
117027
|
+
"path": "power.compressorPct",
|
|
117028
|
+
"valueType": "number"
|
|
117029
|
+
},
|
|
117030
|
+
{
|
|
117031
|
+
"path": "temperatures.supply",
|
|
117032
|
+
"valueType": "number"
|
|
117033
|
+
},
|
|
117034
|
+
{
|
|
117035
|
+
"path": "temperatures.return",
|
|
117036
|
+
"valueType": "number"
|
|
117037
|
+
},
|
|
117038
|
+
{
|
|
117039
|
+
"path": "temperatures.outdoor",
|
|
117040
|
+
"valueType": "number"
|
|
117041
|
+
},
|
|
117042
|
+
{
|
|
117043
|
+
"path": "energy.thermalKwh",
|
|
117044
|
+
"valueType": "number"
|
|
117045
|
+
},
|
|
117046
|
+
{
|
|
117047
|
+
"path": "energy.electricalKwh",
|
|
117048
|
+
"valueType": "number"
|
|
117049
|
+
},
|
|
117050
|
+
{
|
|
117051
|
+
"path": "waterPressureBar",
|
|
117052
|
+
"valueType": "number"
|
|
117053
|
+
},
|
|
117054
|
+
{
|
|
117055
|
+
"path": "starts",
|
|
117056
|
+
"valueType": "number"
|
|
117057
|
+
}
|
|
117058
|
+
],
|
|
116857
117059
|
"heating-valve": [{
|
|
116858
117060
|
"path": "position",
|
|
116859
117061
|
"valueType": "number"
|
|
@@ -117994,24 +118196,6 @@ Object.freeze({
|
|
|
117994
118196
|
"uploadDataset": 72e5
|
|
117995
118197
|
}
|
|
117996
118198
|
});
|
|
117997
|
-
object({
|
|
117998
|
-
code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
|
|
117999
|
-
params: record(string(), union([string(), number$1()])).optional()
|
|
118000
|
-
});
|
|
118001
|
-
var CamstackError = class extends Error {
|
|
118002
|
-
i18nCode;
|
|
118003
|
-
i18nParams;
|
|
118004
|
-
constructor(code, params, englishMessage) {
|
|
118005
|
-
super(englishMessage);
|
|
118006
|
-
this.name = "CamstackError";
|
|
118007
|
-
this.i18nCode = code;
|
|
118008
|
-
this.i18nParams = params;
|
|
118009
|
-
}
|
|
118010
|
-
};
|
|
118011
|
-
/** `throw userError('device.not-found', { id }, 'Device 12 not found')` */
|
|
118012
|
-
function userError(code, params, englishFallback) {
|
|
118013
|
-
return new CamstackError(code, params, englishFallback);
|
|
118014
|
-
}
|
|
118015
118199
|
/**
|
|
118016
118200
|
* Promise-based timer helpers — used everywhere the codebase needs to
|
|
118017
118201
|
* wait, back off, or schedule a retry. Before these helpers landed, each
|
|
@@ -118037,7 +118221,7 @@ function sleep(ms) {
|
|
|
118037
118221
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
118038
118222
|
}
|
|
118039
118223
|
//#endregion
|
|
118040
|
-
//#region ../types/dist/
|
|
118224
|
+
//#region ../types/dist/implemented-methods-OitwyO1Y.mjs
|
|
118041
118225
|
/**
|
|
118042
118226
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
118043
118227
|
*
|
|
@@ -118992,8 +119176,6 @@ var HelperSpecSchema = discriminatedUnion("kind", [
|
|
|
118992
119176
|
source: HelperMemberSchema
|
|
118993
119177
|
})
|
|
118994
119178
|
]);
|
|
118995
|
-
/** A composed device's stableId is this prefix plus the block id. */
|
|
118996
|
-
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
118997
119179
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
118998
119180
|
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
118999
119181
|
/** One field of one capability of one source device. */
|
|
@@ -119768,25 +119950,6 @@ var RequiredAddonUpdateSchema = object({
|
|
|
119768
119950
|
installed: string().nullable()
|
|
119769
119951
|
});
|
|
119770
119952
|
/**
|
|
119771
|
-
* Which integration instance a settings form is for. An addon that serves several instances
|
|
119772
|
-
* (`instanceMode: multiple`) can show a different form per instance — an NVR integration
|
|
119773
|
-
* needs its connection, the default integration needs the addon's own sections.
|
|
119774
|
-
*
|
|
119775
|
-
* - `integrationId` is `null` in the create wizard: nothing exists yet, the operator is
|
|
119776
|
-
* setting up a NEW instance.
|
|
119777
|
-
* - `mode` is the wizard mode of the integration type (`getAvailableTypes`).
|
|
119778
|
-
* - `candidateStableId` is the discovery candidate a wizard was seeded from, if any.
|
|
119779
|
-
*/
|
|
119780
|
-
var IntegrationInstanceRefSchema = object({
|
|
119781
|
-
integrationId: string().nullable(),
|
|
119782
|
-
mode: _enum([
|
|
119783
|
-
"standalone",
|
|
119784
|
-
"account",
|
|
119785
|
-
"broker"
|
|
119786
|
-
]),
|
|
119787
|
-
candidateStableId: string().optional()
|
|
119788
|
-
});
|
|
119789
|
-
/**
|
|
119790
119953
|
* notification-output — canonical, capability-gated notification delivery.
|
|
119791
119954
|
*
|
|
119792
119955
|
* Apprise-derived model (see
|
|
@@ -120015,18 +120178,43 @@ var TargetKindLevelSchema = object({
|
|
|
120015
120178
|
requires: array(string()).optional(),
|
|
120016
120179
|
description: string().optional()
|
|
120017
120180
|
});
|
|
120181
|
+
/** Attachment capabilities for a kind (drives the degrade engine + test panel). */
|
|
120182
|
+
var TargetKindAttachmentsCapsSchema = object({
|
|
120183
|
+
mediaTypes: array(AttachmentMediaTypeSchema),
|
|
120184
|
+
mode: _enum([
|
|
120185
|
+
"url",
|
|
120186
|
+
"bytes",
|
|
120187
|
+
"both"
|
|
120188
|
+
]),
|
|
120189
|
+
max: number$1().int().nonnegative(),
|
|
120190
|
+
maxBytes: number$1().int().positive().optional()
|
|
120191
|
+
});
|
|
120192
|
+
/**
|
|
120193
|
+
* Which TEXT fields a kind delivers (#483). Alexa speaks a title and nothing
|
|
120194
|
+
* else; a push service shows both.
|
|
120195
|
+
*
|
|
120196
|
+
* `.optional()` on the caps block, never defaulted: absent = both, which is
|
|
120197
|
+
* what every kind declared before this field meant (D938's rule for a Zod
|
|
120198
|
+
* default on the addon cap path).
|
|
120199
|
+
*/
|
|
120200
|
+
var TargetKindTextCapsSchema = object({
|
|
120201
|
+
title: boolean(),
|
|
120202
|
+
body: boolean()
|
|
120203
|
+
});
|
|
120204
|
+
_enum([
|
|
120205
|
+
"title",
|
|
120206
|
+
"body",
|
|
120207
|
+
"attachments",
|
|
120208
|
+
"actions",
|
|
120209
|
+
"priority",
|
|
120210
|
+
"sound",
|
|
120211
|
+
"clickUrl"
|
|
120212
|
+
]);
|
|
120018
120213
|
/** The full capability block consulted before dispatch. */
|
|
120019
120214
|
var TargetKindCapsSchema = object({
|
|
120020
|
-
|
|
120021
|
-
|
|
120022
|
-
|
|
120023
|
-
"url",
|
|
120024
|
-
"bytes",
|
|
120025
|
-
"both"
|
|
120026
|
-
]),
|
|
120027
|
-
max: number$1().int().nonnegative(),
|
|
120028
|
-
maxBytes: number$1().int().positive().optional()
|
|
120029
|
-
}),
|
|
120215
|
+
/** Text fields this kind delivers (#483). Absent = title AND body. */
|
|
120216
|
+
text: TargetKindTextCapsSchema.optional(),
|
|
120217
|
+
attachments: TargetKindAttachmentsCapsSchema,
|
|
120030
120218
|
/** Max action buttons (0 = none). */
|
|
120031
120219
|
actions: number$1().int().nonnegative(),
|
|
120032
120220
|
/**
|
|
@@ -145831,30 +146019,21 @@ function convertLegacyWhen(half) {
|
|
|
145831
146019
|
* (instants) and state leaves (durations). It replaces the flat trigger list
|
|
145832
146020
|
* plus the separate condition tree; the firing rule is in that file and in
|
|
145833
146021
|
* ADR "one tree".
|
|
145834
|
-
* - **Actions** — `
|
|
145835
|
-
* fragment of §3.2.2. See {@link AutomationActionSchema}
|
|
145836
|
-
* this had to diverge from "verbatim", and why.
|
|
146022
|
+
* - **Actions** — the `wait` and `cap` steps, plus the `{kind:'code'}`
|
|
146023
|
+
* fragment of §3.2.2. See {@link AutomationActionSchema}.
|
|
145837
146024
|
*
|
|
145838
146025
|
* A recipe stored in the old shape (`triggers` + `conditions`) still LOADS:
|
|
145839
146026
|
* {@link AutomationRecipeSchema} (the parse-anywhere schema) converts it on parse. Nothing writes it.
|
|
145840
146027
|
*/
|
|
145841
146028
|
/**
|
|
145842
|
-
* One action step.
|
|
145843
|
-
*
|
|
145844
|
-
* `wait` and `cap` are `NcRuleActionSchema`'s two members, kept structurally
|
|
145845
|
-
* identical so `NcRuleActionRunner` runs them unchanged — its device-scope
|
|
145846
|
-
* check, stop-at-first-failure and per-sequence throttle are the whole reason
|
|
145847
|
-
* to reuse it, and none of them are re-implemented here.
|
|
146029
|
+
* One action step: `wait`, or a `cap` call.
|
|
145848
146030
|
*
|
|
145849
|
-
*
|
|
145850
|
-
*
|
|
145851
|
-
*
|
|
145852
|
-
*
|
|
145853
|
-
*
|
|
145854
|
-
*
|
|
145855
|
-
* also accepts `{ $var }`, resolved from the run's `vars` bag BEFORE the runner
|
|
145856
|
-
* is called. The runner still receives a number and is untouched; the
|
|
145857
|
-
* resolution is the recipe's job, not the runner's.
|
|
146031
|
+
* A cap step's target is who it acts on (D983: `devices`, a `domain`, or a
|
|
146032
|
+
* `{ $var }` resolved from the run's variables); the legacy `deviceId` is still
|
|
146033
|
+
* READ, never written. The step runner (`runSteps`) owns the device-scope
|
|
146034
|
+
* check, the stop-at-first-failure and the variable substitution, once, for
|
|
146035
|
+
* every caller — automations, Actions, and the notification centre, which runs
|
|
146036
|
+
* only Actions (planning#473).
|
|
145858
146037
|
*/
|
|
145859
146038
|
var AutomationWaitStepSchema = object({
|
|
145860
146039
|
kind: literal("wait"),
|
|
@@ -145901,21 +146080,44 @@ var AutomationCapStepBaseSchema = object({
|
|
|
145901
146080
|
*/
|
|
145902
146081
|
argUnits: record(string(), string().min(1)).optional()
|
|
145903
146082
|
});
|
|
145904
|
-
|
|
146083
|
+
/**
|
|
146084
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
146085
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
146086
|
+
* This is the LEAF shape: no condition of its own.
|
|
146087
|
+
*/
|
|
146088
|
+
var LeafActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepBaseSchema.refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
145905
146089
|
message: "a cap step needs a target",
|
|
145906
146090
|
path: ["target"]
|
|
145907
146091
|
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
145908
146092
|
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
145909
146093
|
path: ["actionId"]
|
|
145910
|
-
});
|
|
146094
|
+
})]);
|
|
145911
146095
|
/**
|
|
145912
|
-
* The
|
|
145913
|
-
*
|
|
146096
|
+
* The optional guard of a step (#472): `if` is the ONE `when` tree (D980), read
|
|
146097
|
+
* on the state mirror when the step is reached; `else` runs when it is false.
|
|
146098
|
+
* An `else` holds leaf steps only — the nesting is bounded at ONE level, so a
|
|
146099
|
+
* branch can never grow a tree the trace has to draw.
|
|
145914
146100
|
*/
|
|
145915
|
-
var
|
|
146101
|
+
var stepGuardShape = {
|
|
146102
|
+
if: AutomationWhenSchema.optional(),
|
|
146103
|
+
else: array(LeafActionStepSchema).max(10).optional()
|
|
146104
|
+
};
|
|
146105
|
+
var elseNeedsIf = {
|
|
146106
|
+
message: "an else list needs the condition it is the other side of (if)",
|
|
146107
|
+
path: ["else"]
|
|
146108
|
+
};
|
|
146109
|
+
var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
146110
|
+
var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
146111
|
+
message: "a cap step needs a target",
|
|
146112
|
+
path: ["target"]
|
|
146113
|
+
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
146114
|
+
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
146115
|
+
path: ["actionId"]
|
|
146116
|
+
}).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
146117
|
+
var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
|
|
145916
146118
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
145917
|
-
|
|
145918
|
-
|
|
146119
|
+
GuardedWaitStepSchema,
|
|
146120
|
+
GuardedCapStepSchema,
|
|
145919
146121
|
object({
|
|
145920
146122
|
kind: literal("action"),
|
|
145921
146123
|
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
@@ -146295,7 +146497,7 @@ var StepDeviceTraceSchema = object({
|
|
|
146295
146497
|
outcome: _enum(["ok", "error"]),
|
|
146296
146498
|
message: string().optional()
|
|
146297
146499
|
});
|
|
146298
|
-
var
|
|
146500
|
+
var StepTraceBaseSchema = object({
|
|
146299
146501
|
/** `actions.<i>` */
|
|
146300
146502
|
path: string().min(1),
|
|
146301
146503
|
kind: string().min(1),
|
|
@@ -146314,15 +146516,35 @@ var AutomationStepTraceSchema = object({
|
|
|
146314
146516
|
* is shown as {@link REDACTED_ARG}. Absent on traces written before it existed.
|
|
146315
146517
|
*/
|
|
146316
146518
|
args: record(string(), TraceValueSchema).optional(),
|
|
146317
|
-
/**
|
|
146519
|
+
/**
|
|
146520
|
+
* The device values a templated arg printed as `—`, one `ref: reason` each
|
|
146521
|
+
* (D1021): why a sentence says "—" where a number was expected. Bounded.
|
|
146522
|
+
*/
|
|
146523
|
+
templates: array(string()).max(20).optional(),
|
|
146524
|
+
/**
|
|
146525
|
+
* What the step's own `if` read when the step was reached (#472): `true` the
|
|
146526
|
+
* step ran, `false` its `else` ran (or nothing did), `unknown` a state leaf
|
|
146527
|
+
* could not be read, so NEITHER side ran. Absent on an unguarded step.
|
|
146528
|
+
*/
|
|
146529
|
+
condition: _enum([
|
|
146530
|
+
"true",
|
|
146531
|
+
"false",
|
|
146532
|
+
"unknown"
|
|
146533
|
+
]).optional(),
|
|
146534
|
+
/** Why the condition read what it read, in the evaluator's own words. */
|
|
146535
|
+
conditionReason: string().optional(),
|
|
146536
|
+
/** `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. */
|
|
146318
146537
|
outcome: _enum([
|
|
146319
146538
|
"ok",
|
|
146320
146539
|
"error",
|
|
146321
146540
|
"not-run",
|
|
146322
|
-
"empty"
|
|
146541
|
+
"empty",
|
|
146542
|
+
"skipped"
|
|
146323
146543
|
]),
|
|
146324
146544
|
message: string().optional()
|
|
146325
146545
|
});
|
|
146546
|
+
/** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
|
|
146547
|
+
var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: array(StepTraceBaseSchema).optional() });
|
|
146326
146548
|
var AutomationRunTraceSchema = object({
|
|
146327
146549
|
runId: string().min(1),
|
|
146328
146550
|
startedAt: number$1(),
|
|
@@ -146429,6 +146651,8 @@ var ActionStatusSchema = object({
|
|
|
146429
146651
|
/** The latest run's failure; null on success or when it never ran. */
|
|
146430
146652
|
lastError: string().nullable()
|
|
146431
146653
|
});
|
|
146654
|
+
/** The throttle window of an action, in seconds; absent or 0 = no throttle. */
|
|
146655
|
+
var ActionMinDelaySecSchema = number$1().int().min(0).max(86400);
|
|
146432
146656
|
var ActionEntrySchema = object({
|
|
146433
146657
|
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
146434
146658
|
id: string().min(3),
|
|
@@ -146441,6 +146665,14 @@ var ActionEntrySchema = object({
|
|
|
146441
146665
|
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
146442
146666
|
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
146443
146667
|
variables: array(ActionVariableSchema).max(20).optional(),
|
|
146668
|
+
/**
|
|
146669
|
+
* Internal only: the least time between two run STARTS. A run that begins
|
|
146670
|
+
* inside the window is skipped (`skipped-cooldown`), traced and logged. It
|
|
146671
|
+
* is an actuator's budget — "how often may this gate physically open" —
|
|
146672
|
+
* not a notification cooldown, and it is shared by every caller of the
|
|
146673
|
+
* action (two rules, a button, an automation).
|
|
146674
|
+
*/
|
|
146675
|
+
minDelaySec: ActionMinDelaySecSchema.optional(),
|
|
146444
146676
|
status: ActionStatusSchema
|
|
146445
146677
|
}).superRefine((entry, ctx) => {
|
|
146446
146678
|
if (entry.source === "internal") {
|
|
@@ -146471,7 +146703,8 @@ var ActionEntrySchema = object({
|
|
|
146471
146703
|
var ActionInputSchema = object({
|
|
146472
146704
|
name: string().min(1).max(120),
|
|
146473
146705
|
steps: array(ActionStepSchema).min(1).max(50),
|
|
146474
|
-
variables: array(ActionVariableSchema).max(20).optional()
|
|
146706
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
146707
|
+
minDelaySec: ActionMinDelaySecSchema.optional()
|
|
146475
146708
|
});
|
|
146476
146709
|
/** Who started a run. Absent = the operator pressed it. */
|
|
146477
146710
|
var ActionRunOriginSchema = object({
|
|
@@ -146498,6 +146731,7 @@ _enum([
|
|
|
146498
146731
|
"invalid-variables",
|
|
146499
146732
|
"invalid-steps",
|
|
146500
146733
|
"not-linked",
|
|
146734
|
+
"template-scope",
|
|
146501
146735
|
"busy"
|
|
146502
146736
|
]);
|
|
146503
146737
|
object({
|
|
@@ -146822,10 +147056,6 @@ method(object({
|
|
|
146822
147056
|
scope: ScopedSettingsScopeSchema,
|
|
146823
147057
|
nodeId: string().optional()
|
|
146824
147058
|
}), record(string(), unknown()).nullable()), method(object({
|
|
146825
|
-
addonId: string(),
|
|
146826
|
-
nodeId: string().optional(),
|
|
146827
|
-
instance: IntegrationInstanceRefSchema
|
|
146828
|
-
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
146829
147059
|
addonId: string(),
|
|
146830
147060
|
nodeId: string().optional()
|
|
146831
147061
|
}), object({ keys: array(string()) }).nullable(), { auth: "admin" }), method(object({
|
|
@@ -149242,7 +149472,14 @@ var CalendarInfoSchema = object({
|
|
|
149242
149472
|
id: string().min(1),
|
|
149243
149473
|
name: string().min(1),
|
|
149244
149474
|
source: CalendarSourceKindSchema,
|
|
149245
|
-
enabled: boolean()
|
|
149475
|
+
enabled: boolean(),
|
|
149476
|
+
/**
|
|
149477
|
+
* The `integration-instances` record that owns this calendar (the record the switch writes).
|
|
149478
|
+
* Every source stamps it from the record it read the calendar from, so a consumer joins on
|
|
149479
|
+
* it instead of rebuilding an id from form values. Optional on the wire so a source addon
|
|
149480
|
+
* that predates the field still lists its calendars: such a row simply has no switch.
|
|
149481
|
+
*/
|
|
149482
|
+
instanceId: string().min(1).optional()
|
|
149246
149483
|
});
|
|
149247
149484
|
/**
|
|
149248
149485
|
* Time contract of {@link CalendarEvent}.
|
|
@@ -150627,14 +150864,14 @@ var climateControlCapability = {
|
|
|
150627
150864
|
kind: "mutation",
|
|
150628
150865
|
auth: "protected"
|
|
150629
150866
|
}),
|
|
150630
|
-
setFanMode:
|
|
150867
|
+
setFanMode: optionalMethod(object({
|
|
150631
150868
|
deviceId: number$1().int().nonnegative(),
|
|
150632
150869
|
fanMode: string().min(1)
|
|
150633
150870
|
}), _void(), {
|
|
150634
150871
|
kind: "mutation",
|
|
150635
150872
|
auth: "protected"
|
|
150636
150873
|
}),
|
|
150637
|
-
setPreset:
|
|
150874
|
+
setPreset: optionalMethod(object({
|
|
150638
150875
|
deviceId: number$1().int().nonnegative(),
|
|
150639
150876
|
preset: string().min(1)
|
|
150640
150877
|
}), _void(), {
|
|
@@ -150648,7 +150885,7 @@ var climateControlCapability = {
|
|
|
150648
150885
|
kind: "mutation",
|
|
150649
150886
|
auth: "protected"
|
|
150650
150887
|
}),
|
|
150651
|
-
setTargetRange:
|
|
150888
|
+
setTargetRange: optionalMethod(object({
|
|
150652
150889
|
deviceId: number$1().int().nonnegative(),
|
|
150653
150890
|
targetLow: number$1(),
|
|
150654
150891
|
targetHigh: number$1()
|
|
@@ -150656,21 +150893,21 @@ var climateControlCapability = {
|
|
|
150656
150893
|
kind: "mutation",
|
|
150657
150894
|
auth: "protected"
|
|
150658
150895
|
}),
|
|
150659
|
-
setTargetHumidity:
|
|
150896
|
+
setTargetHumidity: optionalMethod(object({
|
|
150660
150897
|
deviceId: number$1().int().nonnegative(),
|
|
150661
150898
|
targetHumidity: number$1().min(0).max(100)
|
|
150662
150899
|
}), _void(), {
|
|
150663
150900
|
kind: "mutation",
|
|
150664
150901
|
auth: "protected"
|
|
150665
150902
|
}),
|
|
150666
|
-
setSwingVertical:
|
|
150903
|
+
setSwingVertical: optionalMethod(object({
|
|
150667
150904
|
deviceId: number$1().int().nonnegative(),
|
|
150668
150905
|
on: boolean()
|
|
150669
150906
|
}), _void(), {
|
|
150670
150907
|
kind: "mutation",
|
|
150671
150908
|
auth: "protected"
|
|
150672
150909
|
}),
|
|
150673
|
-
setSwingHorizontal:
|
|
150910
|
+
setSwingHorizontal: optionalMethod(object({
|
|
150674
150911
|
deviceId: number$1().int().nonnegative(),
|
|
150675
150912
|
on: boolean()
|
|
150676
150913
|
}), _void(), {
|
|
@@ -151770,8 +152007,12 @@ var RemoteSourceSchema = discriminatedUnion("kind", [
|
|
|
151770
152007
|
object({
|
|
151771
152008
|
...sourceBase,
|
|
151772
152009
|
kind: literal("ir"),
|
|
151773
|
-
/**
|
|
151774
|
-
|
|
152010
|
+
/**
|
|
152011
|
+
* The `ir-transmitter` device the code is sent through. Absent = the remote's
|
|
152012
|
+
* `defaultTransmitterId` at run time (a source stored before this field was
|
|
152013
|
+
* optional keeps the emitter it names).
|
|
152014
|
+
*/
|
|
152015
|
+
transmitterId: number$1().int().nonnegative().optional(),
|
|
151775
152016
|
/** The code itself; whether a transmitter could send it is `irSourceProblem`. */
|
|
151776
152017
|
payload: IrPayloadSchema
|
|
151777
152018
|
})
|
|
@@ -151925,27 +152166,27 @@ var mediaPlayerCapability = {
|
|
|
151925
152166
|
mode: "singleton",
|
|
151926
152167
|
deviceTypes: [DeviceType.MediaPlayer],
|
|
151927
152168
|
methods: {
|
|
151928
|
-
turnOn:
|
|
152169
|
+
turnOn: optionalMethod(deviceOnly, _void(), {
|
|
151929
152170
|
kind: "mutation",
|
|
151930
152171
|
auth: "protected"
|
|
151931
152172
|
}),
|
|
151932
|
-
turnOff:
|
|
152173
|
+
turnOff: optionalMethod(deviceOnly, _void(), {
|
|
151933
152174
|
kind: "mutation",
|
|
151934
152175
|
auth: "protected"
|
|
151935
152176
|
}),
|
|
151936
|
-
volumeUp:
|
|
152177
|
+
volumeUp: optionalMethod(stepInput, _void(), {
|
|
151937
152178
|
kind: "mutation",
|
|
151938
152179
|
auth: "protected"
|
|
151939
152180
|
}),
|
|
151940
|
-
volumeDown:
|
|
152181
|
+
volumeDown: optionalMethod(stepInput, _void(), {
|
|
151941
152182
|
kind: "mutation",
|
|
151942
152183
|
auth: "protected"
|
|
151943
152184
|
}),
|
|
151944
|
-
channelUp:
|
|
152185
|
+
channelUp: optionalMethod(stepInput, _void(), {
|
|
151945
152186
|
kind: "mutation",
|
|
151946
152187
|
auth: "protected"
|
|
151947
152188
|
}),
|
|
151948
|
-
channelDown:
|
|
152189
|
+
channelDown: optionalMethod(stepInput, _void(), {
|
|
151949
152190
|
kind: "mutation",
|
|
151950
152191
|
auth: "protected"
|
|
151951
152192
|
}),
|
|
@@ -151957,61 +152198,61 @@ var mediaPlayerCapability = {
|
|
|
151957
152198
|
kind: "mutation",
|
|
151958
152199
|
auth: "protected"
|
|
151959
152200
|
}),
|
|
151960
|
-
stop:
|
|
152201
|
+
stop: optionalMethod(object({ deviceId: number$1().int().nonnegative() }), _void(), {
|
|
151961
152202
|
kind: "mutation",
|
|
151962
152203
|
auth: "protected"
|
|
151963
152204
|
}),
|
|
151964
|
-
next:
|
|
152205
|
+
next: optionalMethod(object({ deviceId: number$1().int().nonnegative() }), _void(), {
|
|
151965
152206
|
kind: "mutation",
|
|
151966
152207
|
auth: "protected"
|
|
151967
152208
|
}),
|
|
151968
|
-
previous:
|
|
152209
|
+
previous: optionalMethod(object({ deviceId: number$1().int().nonnegative() }), _void(), {
|
|
151969
152210
|
kind: "mutation",
|
|
151970
152211
|
auth: "protected"
|
|
151971
152212
|
}),
|
|
151972
|
-
seek:
|
|
152213
|
+
seek: optionalMethod(object({
|
|
151973
152214
|
deviceId: number$1().int().nonnegative(),
|
|
151974
152215
|
position: number$1().int().nonnegative()
|
|
151975
152216
|
}), _void(), {
|
|
151976
152217
|
kind: "mutation",
|
|
151977
152218
|
auth: "protected"
|
|
151978
152219
|
}),
|
|
151979
|
-
setVolume:
|
|
152220
|
+
setVolume: optionalMethod(object({
|
|
151980
152221
|
deviceId: number$1().int().nonnegative(),
|
|
151981
152222
|
volumeLevel: number$1().min(0).max(100)
|
|
151982
152223
|
}), _void(), {
|
|
151983
152224
|
kind: "mutation",
|
|
151984
152225
|
auth: "protected"
|
|
151985
152226
|
}),
|
|
151986
|
-
setMute:
|
|
152227
|
+
setMute: optionalMethod(object({
|
|
151987
152228
|
deviceId: number$1().int().nonnegative(),
|
|
151988
152229
|
muted: boolean()
|
|
151989
152230
|
}), _void(), {
|
|
151990
152231
|
kind: "mutation",
|
|
151991
152232
|
auth: "protected"
|
|
151992
152233
|
}),
|
|
151993
|
-
setShuffle:
|
|
152234
|
+
setShuffle: optionalMethod(object({
|
|
151994
152235
|
deviceId: number$1().int().nonnegative(),
|
|
151995
152236
|
shuffle: boolean()
|
|
151996
152237
|
}), _void(), {
|
|
151997
152238
|
kind: "mutation",
|
|
151998
152239
|
auth: "protected"
|
|
151999
152240
|
}),
|
|
152000
|
-
setRepeat:
|
|
152241
|
+
setRepeat: optionalMethod(object({
|
|
152001
152242
|
deviceId: number$1().int().nonnegative(),
|
|
152002
152243
|
repeat: MediaPlayerRepeatSchema
|
|
152003
152244
|
}), _void(), {
|
|
152004
152245
|
kind: "mutation",
|
|
152005
152246
|
auth: "protected"
|
|
152006
152247
|
}),
|
|
152007
|
-
selectSource:
|
|
152248
|
+
selectSource: optionalMethod(object({
|
|
152008
152249
|
deviceId: number$1().int().nonnegative(),
|
|
152009
152250
|
source: string().min(1)
|
|
152010
152251
|
}), _void(), {
|
|
152011
152252
|
kind: "mutation",
|
|
152012
152253
|
auth: "protected"
|
|
152013
152254
|
}),
|
|
152014
|
-
playMedia:
|
|
152255
|
+
playMedia: optionalMethod(object({
|
|
152015
152256
|
deviceId: number$1().int().nonnegative(),
|
|
152016
152257
|
/** Media identifier / URL. */
|
|
152017
152258
|
mediaId: string().min(1),
|
|
@@ -152054,7 +152295,7 @@ var mediaPlayerCapability = {
|
|
|
152054
152295
|
isMuted: { kind: "boolean" }
|
|
152055
152296
|
} }
|
|
152056
152297
|
};
|
|
152057
|
-
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;
|
|
152298
|
+
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;
|
|
152058
152299
|
var NUMBER = {
|
|
152059
152300
|
kind: "fixed",
|
|
152060
152301
|
result: ["number"]
|
|
@@ -153033,18 +153274,18 @@ var coverCapability = {
|
|
|
153033
153274
|
kind: "mutation",
|
|
153034
153275
|
auth: "protected"
|
|
153035
153276
|
}),
|
|
153036
|
-
stop:
|
|
153277
|
+
stop: optionalMethod(object({ deviceId: number$1().int().nonnegative() }), _void(), {
|
|
153037
153278
|
kind: "mutation",
|
|
153038
153279
|
auth: "protected"
|
|
153039
153280
|
}),
|
|
153040
|
-
setPosition:
|
|
153281
|
+
setPosition: optionalMethod(object({
|
|
153041
153282
|
deviceId: number$1().int().nonnegative(),
|
|
153042
153283
|
position: number$1().min(0).max(100)
|
|
153043
153284
|
}), _void(), {
|
|
153044
153285
|
kind: "mutation",
|
|
153045
153286
|
auth: "protected"
|
|
153046
153287
|
}),
|
|
153047
|
-
setTiltPosition:
|
|
153288
|
+
setTiltPosition: optionalMethod(object({
|
|
153048
153289
|
deviceId: number$1().int().nonnegative(),
|
|
153049
153290
|
tiltPosition: number$1().min(0).max(100)
|
|
153050
153291
|
}), _void(), {
|
|
@@ -154094,6 +154335,59 @@ method(InstancePinSchema, DeviceExportStatusSchema), method(_void(), array(Expor
|
|
|
154094
154335
|
auth: "admin"
|
|
154095
154336
|
});
|
|
154096
154337
|
var DeviceAliasSchema = string().max(64).regex(/^[a-z][a-z0-9_]*$/);
|
|
154338
|
+
var DeviceTemplateSchema = string().min(1).max(4096);
|
|
154339
|
+
/** One value a caller hands the renderer for `thisDevice`. */
|
|
154340
|
+
var DeviceTemplateValueSchema = union([
|
|
154341
|
+
string(),
|
|
154342
|
+
number$1(),
|
|
154343
|
+
boolean()
|
|
154344
|
+
]);
|
|
154345
|
+
/**
|
|
154346
|
+
* The device a render is FOR (`camera` in the text) and the values the caller
|
|
154347
|
+
* knows about it that no capability carries, for example `lastPerson` and
|
|
154348
|
+
* `lastPlate`. `values` read as `camera.<name>`; a name a capability also carries
|
|
154349
|
+
* is `ambiguous` and is written `camera.values.<name>`.
|
|
154350
|
+
*/
|
|
154351
|
+
var DeviceTemplateThisDeviceSchema = object({
|
|
154352
|
+
deviceId: number$1().int(),
|
|
154353
|
+
values: record(string().min(1).max(64), DeviceTemplateValueSchema).optional()
|
|
154354
|
+
});
|
|
154355
|
+
var DeviceTemplateRefusalSchema = object({
|
|
154356
|
+
reason: _enum([
|
|
154357
|
+
"too-long",
|
|
154358
|
+
"syntax",
|
|
154359
|
+
"forbidden-syntax",
|
|
154360
|
+
"forbidden-member",
|
|
154361
|
+
"unknown-filter",
|
|
154362
|
+
"ambiguous-field",
|
|
154363
|
+
"busy",
|
|
154364
|
+
"budget-exceeded",
|
|
154365
|
+
"timeout",
|
|
154366
|
+
"output-too-large",
|
|
154367
|
+
"render-failed",
|
|
154368
|
+
"out-of-scope",
|
|
154369
|
+
"unavailable"
|
|
154370
|
+
]),
|
|
154371
|
+
message: string()
|
|
154372
|
+
});
|
|
154373
|
+
var DeviceTemplateTraceEntrySchema = object({
|
|
154374
|
+
ref: string(),
|
|
154375
|
+
reason: _enum([
|
|
154376
|
+
"unknown-alias",
|
|
154377
|
+
"unknown-field",
|
|
154378
|
+
"no-field",
|
|
154379
|
+
"unavailable"
|
|
154380
|
+
])
|
|
154381
|
+
});
|
|
154382
|
+
var DeviceTemplateRenderSchema = discriminatedUnion("ok", [object({
|
|
154383
|
+
ok: literal(true),
|
|
154384
|
+
text: string(),
|
|
154385
|
+
trace: array(DeviceTemplateTraceEntrySchema)
|
|
154386
|
+
}), object({
|
|
154387
|
+
ok: literal(false),
|
|
154388
|
+
refusal: DeviceTemplateRefusalSchema,
|
|
154389
|
+
trace: array(DeviceTemplateTraceEntrySchema)
|
|
154390
|
+
})]);
|
|
154097
154391
|
/**
|
|
154098
154392
|
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
154099
154393
|
*
|
|
@@ -154689,7 +154983,9 @@ var DeviceBindingsForDeviceSchema = object({
|
|
|
154689
154983
|
kind: _enum(["native", "wrapped"]),
|
|
154690
154984
|
providerAddonId: string(),
|
|
154691
154985
|
providerNodeId: string(),
|
|
154692
|
-
nativeAddonId: string()
|
|
154986
|
+
nativeAddonId: string(),
|
|
154987
|
+
/** The cap's methods the native provider implements; absent = all. */
|
|
154988
|
+
implementedMethods: array(string()).optional()
|
|
154693
154989
|
}))
|
|
154694
154990
|
});
|
|
154695
154991
|
/**
|
|
@@ -154901,7 +155197,13 @@ method(object({
|
|
|
154901
155197
|
auth: "admin"
|
|
154902
155198
|
}), 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({
|
|
154903
155199
|
deviceId: number$1(),
|
|
154904
|
-
name: string()
|
|
155200
|
+
name: string(),
|
|
155201
|
+
/**
|
|
155202
|
+
* Absent or true: an operator rename, which stamps `userNamed`.
|
|
155203
|
+
* False: the system copying a block name onto the device. That write
|
|
155204
|
+
* must not look like the operator's, or the next reconcile freezes it.
|
|
155205
|
+
*/
|
|
155206
|
+
stampUserNamed: boolean().optional()
|
|
154905
155207
|
}), _void(), {
|
|
154906
155208
|
kind: "mutation",
|
|
154907
155209
|
auth: "admin"
|
|
@@ -154925,6 +155227,29 @@ method(object({
|
|
|
154925
155227
|
kind: "mutation",
|
|
154926
155228
|
auth: "admin"
|
|
154927
155229
|
}), method(object({
|
|
155230
|
+
templates: array(DeviceTemplateSchema).max(64),
|
|
155231
|
+
allowedDeviceIds: array(number$1().int()).optional(),
|
|
155232
|
+
/** The device `camera` names in the texts, and the values the caller knows of it. */
|
|
155233
|
+
thisDevice: DeviceTemplateThisDeviceSchema.optional()
|
|
155234
|
+
}), object({ results: array(DeviceTemplateRenderSchema) }), { auth: "admin" }), method(object({
|
|
155235
|
+
templates: array(string()).max(64),
|
|
155236
|
+
allowedDeviceIds: array(number$1().int()).optional(),
|
|
155237
|
+
thisDevice: DeviceTemplateThisDeviceSchema.optional()
|
|
155238
|
+
}), object({ results: array(discriminatedUnion("ok", [object({
|
|
155239
|
+
ok: literal(true),
|
|
155240
|
+
aliases: array(object({
|
|
155241
|
+
alias: string(),
|
|
155242
|
+
deviceId: number$1().int().nullable(),
|
|
155243
|
+
allowed: boolean(),
|
|
155244
|
+
/** The fields the text reads on this alias, as written (`temperature`, `cap.field`). */
|
|
155245
|
+
reads: array(string())
|
|
155246
|
+
})),
|
|
155247
|
+
/** Whether the text reads the clock (`now`): it changes every minute. */
|
|
155248
|
+
readsClock: boolean()
|
|
155249
|
+
}), object({
|
|
155250
|
+
ok: literal(false),
|
|
155251
|
+
refusal: DeviceTemplateRefusalSchema
|
|
155252
|
+
})])) }), { auth: "admin" }), method(object({
|
|
154928
155253
|
deviceId: number$1(),
|
|
154929
155254
|
location: string().nullable()
|
|
154930
155255
|
}), _void(), {
|
|
@@ -157674,28 +157999,28 @@ var fanControlCapability = {
|
|
|
157674
157999
|
mode: "singleton",
|
|
157675
158000
|
deviceTypes: [DeviceType.Fan],
|
|
157676
158001
|
methods: {
|
|
157677
|
-
setPercentage:
|
|
158002
|
+
setPercentage: optionalMethod(object({
|
|
157678
158003
|
deviceId: number$1().int().nonnegative(),
|
|
157679
158004
|
speed: number$1().min(0).max(100)
|
|
157680
158005
|
}), _void(), {
|
|
157681
158006
|
kind: "mutation",
|
|
157682
158007
|
auth: "protected"
|
|
157683
158008
|
}),
|
|
157684
|
-
setPreset:
|
|
158009
|
+
setPreset: optionalMethod(object({
|
|
157685
158010
|
deviceId: number$1().int().nonnegative(),
|
|
157686
158011
|
preset: string().min(1)
|
|
157687
158012
|
}), _void(), {
|
|
157688
158013
|
kind: "mutation",
|
|
157689
158014
|
auth: "protected"
|
|
157690
158015
|
}),
|
|
157691
|
-
setDirection:
|
|
158016
|
+
setDirection: optionalMethod(object({
|
|
157692
158017
|
deviceId: number$1().int().nonnegative(),
|
|
157693
158018
|
direction: FanDirectionSchema
|
|
157694
158019
|
}), _void(), {
|
|
157695
158020
|
kind: "mutation",
|
|
157696
158021
|
auth: "protected"
|
|
157697
158022
|
}),
|
|
157698
|
-
setOscillating:
|
|
158023
|
+
setOscillating: optionalMethod(object({
|
|
157699
158024
|
deviceId: number$1().int().nonnegative(),
|
|
157700
158025
|
oscillating: boolean()
|
|
157701
158026
|
}), _void(), {
|
|
@@ -158147,6 +158472,305 @@ var groupStatusCapability = {
|
|
|
158147
158472
|
durability: "session",
|
|
158148
158473
|
history: "none"
|
|
158149
158474
|
};
|
|
158475
|
+
/**
|
|
158476
|
+
* Heat pump settable surface (D1026): one typed method per parameter, never a
|
|
158477
|
+
* generic `set(key, value)`. The values a mode takes and the limits of a number
|
|
158478
|
+
* are the ones `heat-pump-status` carries (`allowed`, `min`, `max`, `step`),
|
|
158479
|
+
* read from the gateway; a provider refuses a value outside them. The state is
|
|
158480
|
+
* `heat-pump-status` — this cap has none.
|
|
158481
|
+
*/
|
|
158482
|
+
var deviceId = number$1().int().nonnegative();
|
|
158483
|
+
var circuitId = string().min(1);
|
|
158484
|
+
var mode = string().min(1);
|
|
158485
|
+
var temp = number$1().finite();
|
|
158486
|
+
DeviceType.HeatPump, method(object({
|
|
158487
|
+
deviceId,
|
|
158488
|
+
mode
|
|
158489
|
+
}), _void(), {
|
|
158490
|
+
kind: "mutation",
|
|
158491
|
+
auth: "protected"
|
|
158492
|
+
}), method(object({
|
|
158493
|
+
deviceId,
|
|
158494
|
+
mode
|
|
158495
|
+
}), _void(), {
|
|
158496
|
+
kind: "mutation",
|
|
158497
|
+
auth: "protected"
|
|
158498
|
+
}), method(object({
|
|
158499
|
+
deviceId,
|
|
158500
|
+
mode
|
|
158501
|
+
}), _void(), {
|
|
158502
|
+
kind: "mutation",
|
|
158503
|
+
auth: "protected"
|
|
158504
|
+
}), method(object({
|
|
158505
|
+
deviceId,
|
|
158506
|
+
mode
|
|
158507
|
+
}), _void(), {
|
|
158508
|
+
kind: "mutation",
|
|
158509
|
+
auth: "protected"
|
|
158510
|
+
}), method(object({
|
|
158511
|
+
deviceId,
|
|
158512
|
+
circuitId,
|
|
158513
|
+
mode
|
|
158514
|
+
}), _void(), {
|
|
158515
|
+
kind: "mutation",
|
|
158516
|
+
auth: "protected"
|
|
158517
|
+
}), method(object({
|
|
158518
|
+
deviceId,
|
|
158519
|
+
circuitId,
|
|
158520
|
+
mode
|
|
158521
|
+
}), _void(), {
|
|
158522
|
+
kind: "mutation",
|
|
158523
|
+
auth: "protected"
|
|
158524
|
+
}), method(object({
|
|
158525
|
+
deviceId,
|
|
158526
|
+
circuitId,
|
|
158527
|
+
mode
|
|
158528
|
+
}), _void(), {
|
|
158529
|
+
kind: "mutation",
|
|
158530
|
+
auth: "protected"
|
|
158531
|
+
}), method(object({
|
|
158532
|
+
deviceId,
|
|
158533
|
+
circuitId,
|
|
158534
|
+
temp
|
|
158535
|
+
}), _void(), {
|
|
158536
|
+
kind: "mutation",
|
|
158537
|
+
auth: "protected"
|
|
158538
|
+
}), method(object({
|
|
158539
|
+
deviceId,
|
|
158540
|
+
circuitId,
|
|
158541
|
+
temp
|
|
158542
|
+
}), _void(), {
|
|
158543
|
+
kind: "mutation",
|
|
158544
|
+
auth: "protected"
|
|
158545
|
+
}), method(object({
|
|
158546
|
+
deviceId,
|
|
158547
|
+
circuitId,
|
|
158548
|
+
temp
|
|
158549
|
+
}), _void(), {
|
|
158550
|
+
kind: "mutation",
|
|
158551
|
+
auth: "protected"
|
|
158552
|
+
}), method(object({
|
|
158553
|
+
deviceId,
|
|
158554
|
+
circuitId,
|
|
158555
|
+
mode
|
|
158556
|
+
}), _void(), {
|
|
158557
|
+
kind: "mutation",
|
|
158558
|
+
auth: "protected"
|
|
158559
|
+
}), method(object({
|
|
158560
|
+
deviceId,
|
|
158561
|
+
circuitId,
|
|
158562
|
+
level: mode
|
|
158563
|
+
}), _void(), {
|
|
158564
|
+
kind: "mutation",
|
|
158565
|
+
auth: "protected"
|
|
158566
|
+
}), method(object({
|
|
158567
|
+
deviceId,
|
|
158568
|
+
circuitId,
|
|
158569
|
+
minutes: number$1().int().positive()
|
|
158570
|
+
}), _void(), {
|
|
158571
|
+
kind: "mutation",
|
|
158572
|
+
auth: "protected"
|
|
158573
|
+
}), method(object({
|
|
158574
|
+
deviceId,
|
|
158575
|
+
circuitId
|
|
158576
|
+
}), _void(), {
|
|
158577
|
+
kind: "mutation",
|
|
158578
|
+
auth: "protected"
|
|
158579
|
+
});
|
|
158580
|
+
var HeatPumpCircuitKindSchema = _enum([
|
|
158581
|
+
"heating",
|
|
158582
|
+
"dhw",
|
|
158583
|
+
"cooling",
|
|
158584
|
+
"solar"
|
|
158585
|
+
]);
|
|
158586
|
+
/** A setting that takes one of a list of values the gateway named. */
|
|
158587
|
+
var HeatPumpOptionSettingSchema = object({
|
|
158588
|
+
/** The active value. Null when the gateway did not answer. */
|
|
158589
|
+
value: string().nullable(),
|
|
158590
|
+
/** Values the gateway accepts, in its order. Empty = read-only here. */
|
|
158591
|
+
allowed: array(string())
|
|
158592
|
+
});
|
|
158593
|
+
/** A numeric setting with the limits the gateway named. */
|
|
158594
|
+
var HeatPumpRangeSettingSchema = object({
|
|
158595
|
+
value: number$1().nullable(),
|
|
158596
|
+
min: number$1().nullable(),
|
|
158597
|
+
max: number$1().nullable(),
|
|
158598
|
+
step: number$1().nullable()
|
|
158599
|
+
});
|
|
158600
|
+
var HeatPumpCircuitSchema = object({
|
|
158601
|
+
/** Gateway id of the circuit (`hc1`, `dhw1`): the key of the series. */
|
|
158602
|
+
id: string().min(1),
|
|
158603
|
+
kind: HeatPumpCircuitKindSchema,
|
|
158604
|
+
label: string(),
|
|
158605
|
+
icon: IconKeySchema,
|
|
158606
|
+
/** Measured temperature of the circuit (room, tank, collector). */
|
|
158607
|
+
currentTemp: number$1().nullable().meta(readingMeta("temperature")),
|
|
158608
|
+
/** The setpoint in force now. */
|
|
158609
|
+
targetTemp: number$1().nullable().meta(readingMeta("temperature")),
|
|
158610
|
+
/** The operation mode in force (mirror of `operationMode.value`, for the series). */
|
|
158611
|
+
mode: string().nullable(),
|
|
158612
|
+
/** Whether the circuit is calling for heat right now. Null = unknown. */
|
|
158613
|
+
active: boolean().nullable(),
|
|
158614
|
+
operationMode: HeatPumpOptionSettingSchema.nullable(),
|
|
158615
|
+
/** Heating circuits: heat / cool / heatCool. */
|
|
158616
|
+
heatCoolMode: HeatPumpOptionSettingSchema.nullable(),
|
|
158617
|
+
/** Heating circuits: summer / winter changeover. */
|
|
158618
|
+
summerWinter: HeatPumpOptionSettingSchema.nullable(),
|
|
158619
|
+
comfortSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
158620
|
+
ecoSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
158621
|
+
maxFlowTemp: HeatPumpRangeSettingSchema.nullable(),
|
|
158622
|
+
/** Hot water: the temperature level (off / low / high / eco). */
|
|
158623
|
+
temperatureLevel: HeatPumpOptionSettingSchema.nullable(),
|
|
158624
|
+
/** Hot water: how long a charge lasts, minutes. */
|
|
158625
|
+
chargeDuration: HeatPumpRangeSettingSchema.nullable(),
|
|
158626
|
+
/** Hot water: whether an extra-hot-water charge is running. Null = no such surface. */
|
|
158627
|
+
extraHotWater: boolean().nullable()
|
|
158628
|
+
});
|
|
158629
|
+
/** The independent system modes, each with its real values. A null mode = the gateway has none. */
|
|
158630
|
+
var HeatPumpSystemSchema = object({
|
|
158631
|
+
silent: HeatPumpOptionSettingSchema.nullable(),
|
|
158632
|
+
away: HeatPumpOptionSettingSchema.nullable(),
|
|
158633
|
+
additionalHeater: HeatPumpOptionSettingSchema.nullable(),
|
|
158634
|
+
holiday: HeatPumpOptionSettingSchema.nullable()
|
|
158635
|
+
});
|
|
158636
|
+
var HeatPumpPowerSchema = object({
|
|
158637
|
+
thermalW: number$1().nullable().meta(readingMeta("power")),
|
|
158638
|
+
electricalW: number$1().nullable().meta(readingMeta("power")),
|
|
158639
|
+
/** Compressor modulation, percent. */
|
|
158640
|
+
compressorPct: number$1().nullable().meta(readingMeta("percentage"))
|
|
158641
|
+
});
|
|
158642
|
+
var HeatPumpTemperaturesSchema = object({
|
|
158643
|
+
supply: number$1().nullable().meta(readingMeta("temperature")),
|
|
158644
|
+
return: number$1().nullable().meta(readingMeta("temperature")),
|
|
158645
|
+
outdoor: number$1().nullable().meta(readingMeta("temperature"))
|
|
158646
|
+
});
|
|
158647
|
+
/** Lifetime meters, kWh: the energy of a period is computed at read time from their difference (D944). */
|
|
158648
|
+
var HeatPumpEnergySchema = object({
|
|
158649
|
+
thermalKwh: number$1().nullable().meta(readingMeta("energy")),
|
|
158650
|
+
electricalKwh: number$1().nullable().meta(readingMeta("energy"))
|
|
158651
|
+
});
|
|
158652
|
+
var HeatPumpStatusSchema = object({
|
|
158653
|
+
circuits: array(HeatPumpCircuitSchema),
|
|
158654
|
+
system: HeatPumpSystemSchema,
|
|
158655
|
+
power: HeatPumpPowerSchema,
|
|
158656
|
+
temperatures: HeatPumpTemperaturesSchema,
|
|
158657
|
+
energy: HeatPumpEnergySchema,
|
|
158658
|
+
/** Water pressure of the heating loop, bar. */
|
|
158659
|
+
waterPressureBar: number$1().nullable(),
|
|
158660
|
+
/** Compressor starts since commissioning. */
|
|
158661
|
+
starts: number$1().nullable(),
|
|
158662
|
+
/** Ms epoch when the slice was last read from the gateway. */
|
|
158663
|
+
lastFetchedAt: number$1()
|
|
158664
|
+
});
|
|
158665
|
+
/**
|
|
158666
|
+
* The instantaneous COP: thermal over electrical power. Null unless BOTH powers
|
|
158667
|
+
* are known and the unit draws power — a missing reading is never a 0 or a
|
|
158668
|
+
* division by it (D393). Computed on every read; there is no stored value.
|
|
158669
|
+
*/
|
|
158670
|
+
function heatPumpInstantCop(power) {
|
|
158671
|
+
const { thermalW, electricalW } = power;
|
|
158672
|
+
if (thermalW === null || electricalW === null || electricalW <= 0) return null;
|
|
158673
|
+
return thermalW / electricalW;
|
|
158674
|
+
}
|
|
158675
|
+
var heatPumpStatusCapability = {
|
|
158676
|
+
name: "heat-pump-status",
|
|
158677
|
+
scope: "device",
|
|
158678
|
+
deviceNative: true,
|
|
158679
|
+
mode: "singleton",
|
|
158680
|
+
deviceTypes: [DeviceType.HeatPump],
|
|
158681
|
+
methods: {},
|
|
158682
|
+
status: {
|
|
158683
|
+
schema: HeatPumpStatusSchema,
|
|
158684
|
+
kind: "push"
|
|
158685
|
+
},
|
|
158686
|
+
runtimeState: HeatPumpStatusSchema,
|
|
158687
|
+
/**
|
|
158688
|
+
* Runtime-state durability: **session** — a heat pump's gateway answers on the
|
|
158689
|
+
* next poll, so a restart that clears the slice loses nothing a reader needs
|
|
158690
|
+
* (the series are recorded). See `RuntimeStateDurability`.
|
|
158691
|
+
*/
|
|
158692
|
+
durability: "session",
|
|
158693
|
+
/**
|
|
158694
|
+
* History (D850, D917): `circuits[]` is a keyed array — one series per circuit and
|
|
158695
|
+
* field, named by the circuit's label. The mode is a state (D896); the energy
|
|
158696
|
+
* totals are lifetime counters, the kWh of a period is computed at read time (D944).
|
|
158697
|
+
* The COP is never recorded: it derives from the two powers.
|
|
158698
|
+
*/
|
|
158699
|
+
history: {
|
|
158700
|
+
fields: {
|
|
158701
|
+
"power.thermalW": {
|
|
158702
|
+
kind: "gauge",
|
|
158703
|
+
unit: "W",
|
|
158704
|
+
deadband: 50,
|
|
158705
|
+
displayName: "Thermal power"
|
|
158706
|
+
},
|
|
158707
|
+
"power.electricalW": {
|
|
158708
|
+
kind: "gauge",
|
|
158709
|
+
unit: "W",
|
|
158710
|
+
deadband: 50,
|
|
158711
|
+
displayName: "Electrical power"
|
|
158712
|
+
},
|
|
158713
|
+
"power.compressorPct": {
|
|
158714
|
+
kind: "gauge",
|
|
158715
|
+
unit: "%",
|
|
158716
|
+
deadband: 2,
|
|
158717
|
+
displayName: "Compressor"
|
|
158718
|
+
},
|
|
158719
|
+
"temperatures.supply": {
|
|
158720
|
+
kind: "gauge",
|
|
158721
|
+
unit: "°C",
|
|
158722
|
+
deadband: .5,
|
|
158723
|
+
displayName: "Supply"
|
|
158724
|
+
},
|
|
158725
|
+
"temperatures.return": {
|
|
158726
|
+
kind: "gauge",
|
|
158727
|
+
unit: "°C",
|
|
158728
|
+
deadband: .5,
|
|
158729
|
+
displayName: "Return"
|
|
158730
|
+
},
|
|
158731
|
+
"temperatures.outdoor": {
|
|
158732
|
+
kind: "gauge",
|
|
158733
|
+
unit: "°C",
|
|
158734
|
+
deadband: .5,
|
|
158735
|
+
displayName: "Outdoor"
|
|
158736
|
+
},
|
|
158737
|
+
"energy.thermalKwh": {
|
|
158738
|
+
kind: "counter",
|
|
158739
|
+
unit: "kWh",
|
|
158740
|
+
displayName: "Thermal energy"
|
|
158741
|
+
},
|
|
158742
|
+
"energy.electricalKwh": {
|
|
158743
|
+
kind: "counter",
|
|
158744
|
+
unit: "kWh",
|
|
158745
|
+
displayName: "Electrical energy"
|
|
158746
|
+
}
|
|
158747
|
+
},
|
|
158748
|
+
items: {
|
|
158749
|
+
path: "circuits",
|
|
158750
|
+
key: "id",
|
|
158751
|
+
label: "label",
|
|
158752
|
+
fields: {
|
|
158753
|
+
currentTemp: {
|
|
158754
|
+
kind: "gauge",
|
|
158755
|
+
unit: "°C",
|
|
158756
|
+
deadband: .5,
|
|
158757
|
+
displayName: "Temperature"
|
|
158758
|
+
},
|
|
158759
|
+
targetTemp: {
|
|
158760
|
+
kind: "gauge",
|
|
158761
|
+
unit: "°C",
|
|
158762
|
+
minIntervalMs: 0,
|
|
158763
|
+
displayName: "Setpoint"
|
|
158764
|
+
},
|
|
158765
|
+
mode: {
|
|
158766
|
+
kind: "enum",
|
|
158767
|
+
displayName: "Mode"
|
|
158768
|
+
}
|
|
158769
|
+
}
|
|
158770
|
+
}
|
|
158771
|
+
},
|
|
158772
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
158773
|
+
};
|
|
158150
158774
|
var HeatingValveStatusSchema = object({
|
|
158151
158775
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
158152
158776
|
position: number$1().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -158361,6 +158985,7 @@ var HeroSceneSchema = object({
|
|
|
158361
158985
|
"ac",
|
|
158362
158986
|
"thermostat",
|
|
158363
158987
|
"heater",
|
|
158988
|
+
"heat-pump",
|
|
158364
158989
|
"fan",
|
|
158365
158990
|
"washer",
|
|
158366
158991
|
"dryer",
|
|
@@ -158403,7 +159028,7 @@ var HeroSceneSchema = object({
|
|
|
158403
159028
|
/** 0..1: volume, cover position, cycle progress. */
|
|
158404
159029
|
level: number$1().min(0).max(1).nullable()
|
|
158405
159030
|
});
|
|
158406
|
-
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;
|
|
159031
|
+
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;
|
|
158407
159032
|
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;
|
|
158408
159033
|
/** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
|
|
158409
159034
|
var HeroTextSchema = object({
|
|
@@ -158411,6 +159036,7 @@ var HeroTextSchema = object({
|
|
|
158411
159036
|
it: string()
|
|
158412
159037
|
});
|
|
158413
159038
|
var HeroRowIdSchema = _enum([
|
|
159039
|
+
"progress",
|
|
158414
159040
|
"run-for",
|
|
158415
159041
|
"cycle",
|
|
158416
159042
|
"program",
|
|
@@ -158425,6 +159051,7 @@ var HeroRowIdSchema = _enum([
|
|
|
158425
159051
|
"alarm",
|
|
158426
159052
|
"fan",
|
|
158427
159053
|
"vacuum",
|
|
159054
|
+
"vacuum-suction",
|
|
158428
159055
|
"mower",
|
|
158429
159056
|
"feeder",
|
|
158430
159057
|
"fountain",
|
|
@@ -158443,7 +159070,10 @@ var HeroRowIdSchema = _enum([
|
|
|
158443
159070
|
"climate-fan",
|
|
158444
159071
|
"setpoint",
|
|
158445
159072
|
"channel",
|
|
158446
|
-
"control"
|
|
159073
|
+
"control",
|
|
159074
|
+
"circuit",
|
|
159075
|
+
"heat-pump-power",
|
|
159076
|
+
"system-mode"
|
|
158447
159077
|
]);
|
|
158448
159078
|
var HeroArgValueSchema = lazy(() => union([
|
|
158449
159079
|
string(),
|
|
@@ -158508,16 +159138,32 @@ var HeroControlSchema = discriminatedUnion("kind", [
|
|
|
158508
159138
|
label: HeroTextSchema,
|
|
158509
159139
|
current: string().nullable(),
|
|
158510
159140
|
options: array(string()),
|
|
159141
|
+
/** A readable label per option value; an option without one is drawn as its raw value. */
|
|
159142
|
+
optionLabels: record(string(), HeroTextSchema).optional(),
|
|
158511
159143
|
call: HeroCallSchema,
|
|
158512
159144
|
valueArg: string()
|
|
158513
159145
|
})
|
|
158514
159146
|
]);
|
|
159147
|
+
/** Declared by its interface: a `z.infer` of one more icon union pushes the cap's inferred type past what the compiler can print. */
|
|
159148
|
+
var HeroPillSchema = object({
|
|
159149
|
+
icon: IconKeySchema.nullable(),
|
|
159150
|
+
text: HeroTextSchema,
|
|
159151
|
+
tone: HeroToneSchema
|
|
159152
|
+
});
|
|
158515
159153
|
var HeroRowSchema = object({
|
|
158516
159154
|
id: HeroRowIdSchema,
|
|
159155
|
+
/** The row's own name when the kind's label would not tell rows of one kind apart (a circuit's label). */
|
|
159156
|
+
label: HeroTextSchema.optional(),
|
|
159157
|
+
/** A group header drawn above the row when it differs from the previous row's ("System"). */
|
|
159158
|
+
group: HeroTextSchema.optional(),
|
|
159159
|
+
/** Values drawn as pills across the row (a heat pump's powers). */
|
|
159160
|
+
pills: array(HeroPillSchema).optional(),
|
|
158517
159161
|
icon: IconKeySchema,
|
|
158518
159162
|
/** The row's status, in words. `null` = nothing to say. */
|
|
158519
159163
|
status: HeroTextSchema.nullable(),
|
|
158520
|
-
controls: array(HeroControlSchema)
|
|
159164
|
+
controls: array(HeroControlSchema),
|
|
159165
|
+
/** A bar under the row's label, 0..1; `null` / absent = no bar. */
|
|
159166
|
+
progress: number$1().min(0).max(1).nullable().optional()
|
|
158521
159167
|
});
|
|
158522
159168
|
var HeroDetailSchema = object({
|
|
158523
159169
|
label: HeroTextSchema,
|
|
@@ -158525,7 +159171,11 @@ var HeroDetailSchema = object({
|
|
|
158525
159171
|
unit: string().nullable()
|
|
158526
159172
|
});
|
|
158527
159173
|
var HeroBadgeSchema = object({
|
|
158528
|
-
id: _enum([
|
|
159174
|
+
id: _enum([
|
|
159175
|
+
"battery",
|
|
159176
|
+
"network-link",
|
|
159177
|
+
"integration"
|
|
159178
|
+
]),
|
|
158529
159179
|
icon: IconKeySchema,
|
|
158530
159180
|
tone: HeroToneSchema,
|
|
158531
159181
|
/** Percent for a battery, link quality for a link; `null` = not known. */
|
|
@@ -158573,7 +159223,13 @@ var HeroTimedRunSlotSchema = object({
|
|
|
158573
159223
|
activeUntil: number$1().nullable(),
|
|
158574
159224
|
quickRun: TimedRunQuickRunSchema,
|
|
158575
159225
|
run: HeroActionSchema,
|
|
158576
|
-
cancel: HeroActionSchema
|
|
159226
|
+
cancel: HeroActionSchema,
|
|
159227
|
+
/**
|
|
159228
|
+
* Whole units left (the limit's unit, ceil). `null` while nothing is armed.
|
|
159229
|
+
* A number, not words: the row formats it, and a text here would not fit the
|
|
159230
|
+
* hero-layout declaration.
|
|
159231
|
+
*/
|
|
159232
|
+
remaining: number$1().nullable()
|
|
158577
159233
|
});
|
|
158578
159234
|
var HeroPowerSupplySlotSchema = object({
|
|
158579
159235
|
/** The plug's state; `null` = unknown, never off. */
|
|
@@ -158625,7 +159281,12 @@ var HeroFactSchema = object({
|
|
|
158625
159281
|
var HeroSideTileSchema = object({
|
|
158626
159282
|
label: HeroTextSchema,
|
|
158627
159283
|
value: HeroTextSchema,
|
|
158628
|
-
tone: HeroToneSchema.optional()
|
|
159284
|
+
tone: HeroToneSchema.optional(),
|
|
159285
|
+
/**
|
|
159286
|
+
* Epoch ms when the tile reads a clock time (an appliance's end): a client prints it in
|
|
159287
|
+
* the viewer's own time zone; `value` is the fallback for one that cannot.
|
|
159288
|
+
*/
|
|
159289
|
+
at: number$1().optional()
|
|
158629
159290
|
});
|
|
158630
159291
|
var HeroSideTilesSchema = object({
|
|
158631
159292
|
left: array(HeroSideTileSchema).max(2),
|
|
@@ -158661,8 +159322,12 @@ var HeroModelSchema = object({
|
|
|
158661
159322
|
sideTiles: HeroSideTilesSchema,
|
|
158662
159323
|
/** The status line under the main icon. */
|
|
158663
159324
|
title: HeroTextSchema,
|
|
159325
|
+
/** The scene's top line when it says more than `title`; absent = draw the title. */
|
|
159326
|
+
caption: HeroTextSchema.optional(),
|
|
158664
159327
|
badges: array(HeroBadgeSchema),
|
|
158665
159328
|
remote: HeroRemoteSlotSchema.nullable(),
|
|
159329
|
+
/** The foot button that opens the device's history: "History", "Cycles", "Meals", "Access". */
|
|
159330
|
+
historyLabel: HeroTextSchema,
|
|
158666
159331
|
consumables: HeroConsumablesSlotSchema.nullable(),
|
|
158667
159332
|
consumption: HeroConsumptionSlotSchema.nullable(),
|
|
158668
159333
|
ownPower: HeroOwnPowerSlotSchema.nullable(),
|
|
@@ -158683,18 +159348,31 @@ var HeroModelSchema = object({
|
|
|
158683
159348
|
* 4. a trailing fact (power, else battery, else consumables).
|
|
158684
159349
|
*
|
|
158685
159350
|
* Selection rules, all taken from the model:
|
|
158686
|
-
* -
|
|
159351
|
+
* - the primary control is the device's own power; else the FIRST control of
|
|
158687
159352
|
* the FIRST row that has any (a later row's control is never promoted). When
|
|
158688
159353
|
* the model lists that part in `gated`, the row has no inline control: the
|
|
158689
159354
|
* projection never falls through to another control the caller could use.
|
|
159355
|
+
* - a timed run, when the model carries the slot, sits beside that primary:
|
|
159356
|
+
* Run while idle, Stop while armed. Gating the slot hides the control.
|
|
158690
159357
|
* - the status line is the head (what plays, else the state) plus at most
|
|
158691
|
-
* {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded
|
|
159358
|
+
* {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded, then the
|
|
159359
|
+
* time left on an armed timed run;
|
|
158692
159360
|
* - the trailing fact is the first of power, battery, consumables.
|
|
158693
159361
|
*
|
|
158694
159362
|
* `projectDeviceRow` is pure and computes nothing: it selects from a
|
|
158695
159363
|
* {@link HeroModel}. A row that needed a value the hero lacks would mean the
|
|
158696
159364
|
* model is missing it, so the fix goes in the model.
|
|
158697
159365
|
*/
|
|
159366
|
+
/**
|
|
159367
|
+
* The row's timed-run control. `id` is `timed-run.run` while idle and
|
|
159368
|
+
* `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
|
|
159369
|
+
* a Run press starts.
|
|
159370
|
+
*/
|
|
159371
|
+
var HeroRowTimedRunSchema = object({
|
|
159372
|
+
id: _enum(["timed-run.run", "timed-run.cancel"]),
|
|
159373
|
+
duration: number$1(),
|
|
159374
|
+
unit: _enum(["min", "s"])
|
|
159375
|
+
});
|
|
158698
159376
|
var HeroRowModelSchema = object({
|
|
158699
159377
|
deviceId: number$1().int(),
|
|
158700
159378
|
name: string(),
|
|
@@ -158707,6 +159385,11 @@ var HeroRowModelSchema = object({
|
|
|
158707
159385
|
statusLine: array(HeroTextSchema),
|
|
158708
159386
|
/** `null` = the type has no inline control, or the caller may not act on it. */
|
|
158709
159387
|
primary: HeroControlSchema.nullable(),
|
|
159388
|
+
/**
|
|
159389
|
+
* Beside `primary` when the device offers a timed run: Run while idle, Stop
|
|
159390
|
+
* while armed. `null` when there is no slot, or the caller may not act.
|
|
159391
|
+
*/
|
|
159392
|
+
timedRun: HeroRowTimedRunSchema.nullable(),
|
|
158710
159393
|
trailing: HeroFactSchema.nullable()
|
|
158711
159394
|
});
|
|
158712
159395
|
/**
|
|
@@ -159120,6 +159803,12 @@ var IntegrationWithStateSchema = object({
|
|
|
159120
159803
|
name: string(),
|
|
159121
159804
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
159122
159805
|
enabled: boolean(),
|
|
159806
|
+
/**
|
|
159807
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
159808
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
159809
|
+
* must not draw it as on or off (D315).
|
|
159810
|
+
*/
|
|
159811
|
+
switchUnknown: literal(true).optional(),
|
|
159123
159812
|
info: record(string(), unknown()).readonly(),
|
|
159124
159813
|
/** The discovery candidate this integration was set up from (D984). */
|
|
159125
159814
|
originStableId: string().optional(),
|
|
@@ -159133,6 +159822,12 @@ var IntegrationLiteSchema = object({
|
|
|
159133
159822
|
name: string(),
|
|
159134
159823
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
159135
159824
|
enabled: boolean(),
|
|
159825
|
+
/**
|
|
159826
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
159827
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
159828
|
+
* must not draw it as on or off (D315).
|
|
159829
|
+
*/
|
|
159830
|
+
switchUnknown: literal(true).optional(),
|
|
159136
159831
|
info: record(string(), unknown()).readonly(),
|
|
159137
159832
|
/** The discovery candidate this integration was set up from (D984). */
|
|
159138
159833
|
originStableId: string().optional(),
|
|
@@ -159231,9 +159926,9 @@ var UpdateIntegrationInputSchema = object({
|
|
|
159231
159926
|
id: string(),
|
|
159232
159927
|
name: string().optional(),
|
|
159233
159928
|
/**
|
|
159234
|
-
*
|
|
159235
|
-
*
|
|
159236
|
-
*
|
|
159929
|
+
* Honoured ONLY for a fixed builtin (`info.fixed`), whose switch is the hub's own registry flag
|
|
159930
|
+
* and works while its addon is down. Any other row is refused (a typed `BAD_REQUEST`): its
|
|
159931
|
+
* switch is `integration-instances.setInstanceEnabled`.
|
|
159237
159932
|
*/
|
|
159238
159933
|
enabled: boolean().optional(),
|
|
159239
159934
|
info: record(string(), unknown()).optional()
|
|
@@ -159267,6 +159962,12 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
159267
159962
|
* the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
|
|
159268
159963
|
* or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
|
|
159269
159964
|
* clears it.
|
|
159965
|
+
*
|
|
159966
|
+
* Who may call (epic #440): every method but `describe` and `instanceFormSchema` is open to any
|
|
159967
|
+
* session (`caller: 'scoped'`) and default-denies. An admin passes everywhere. A non-admin passes
|
|
159968
|
+
* only on a call pinned to one addon whose `describe().userScoped` is true, and that provider
|
|
159969
|
+
* filters every row on the `caller` the router injected (a notification target is somebody's
|
|
159970
|
+
* phone: a user sees and changes only their own). An addon that says nothing keeps the admin door.
|
|
159270
159971
|
*/
|
|
159271
159972
|
var ConfigSchemaPassthrough$2 = custom();
|
|
159272
159973
|
var IntegrationInstanceIdSchema = string().min(1);
|
|
@@ -159380,7 +160081,15 @@ var IntegrationInstanceDescriptionSchema = object({
|
|
|
159380
160081
|
*/
|
|
159381
160082
|
mintsId: boolean().optional(),
|
|
159382
160083
|
/** The links to other instances the provider's kinds declare; absent means none. */
|
|
159383
|
-
links: array(IntegrationInstanceLinkSchema).optional()
|
|
160084
|
+
links: array(IntegrationInstanceLinkSchema).optional(),
|
|
160085
|
+
/**
|
|
160086
|
+
* The rows belong to individual users (a notification target is somebody's phone). The router
|
|
160087
|
+
* then opens `listInstances`, `getInstance`, `createInstance`, `updateInstance`,
|
|
160088
|
+
* `setInstanceEnabled`, `deleteInstance` and `testInstance` to a NON-admin session on a call
|
|
160089
|
+
* pinned to this addon, and hands the provider the `caller` so it keeps a user to their own rows.
|
|
160090
|
+
* Absent means admin only, as it always was.
|
|
160091
|
+
*/
|
|
160092
|
+
userScoped: boolean().optional()
|
|
159384
160093
|
});
|
|
159385
160094
|
var IntegrationInstanceStatusSchema = object({
|
|
159386
160095
|
state: _enum([
|
|
@@ -159438,8 +160147,14 @@ var integrationInstancesCapability = {
|
|
|
159438
160147
|
/** The discovery candidate the wizard was seeded from (`stableId`), if any. */
|
|
159439
160148
|
candidateStableId: string().min(1).optional()
|
|
159440
160149
|
}), ConfigSchemaPassthrough$2, { auth: "admin" }),
|
|
159441
|
-
listInstances: method(
|
|
159442
|
-
|
|
160150
|
+
listInstances: method(looseObject({}), array(IntegrationInstanceSchema).readonly(), {
|
|
160151
|
+
auth: "protected",
|
|
160152
|
+
caller: "scoped"
|
|
160153
|
+
}),
|
|
160154
|
+
getInstance: method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), {
|
|
160155
|
+
auth: "protected",
|
|
160156
|
+
caller: "scoped"
|
|
160157
|
+
}),
|
|
159443
160158
|
/**
|
|
159444
160159
|
* Insert the typed record. With `id` it is stored under that id (a duplicate id is refused);
|
|
159445
160160
|
* without one the PROVIDER mints it and answers it. `kind` picks one of `describe().kinds`.
|
|
@@ -159472,11 +160187,13 @@ var integrationInstancesCapability = {
|
|
|
159472
160187
|
seed: object({ info: record(string(), unknown()) }).optional()
|
|
159473
160188
|
}), object({ id: string() }), {
|
|
159474
160189
|
kind: "mutation",
|
|
159475
|
-
auth: "
|
|
160190
|
+
auth: "protected",
|
|
160191
|
+
caller: "scoped"
|
|
159476
160192
|
}),
|
|
159477
160193
|
updateInstance: method(IntegrationInstancePatchSchema, object({ ok: literal(true) }), {
|
|
159478
160194
|
kind: "mutation",
|
|
159479
|
-
auth: "
|
|
160195
|
+
auth: "protected",
|
|
160196
|
+
caller: "scoped"
|
|
159480
160197
|
}),
|
|
159481
160198
|
/**
|
|
159482
160199
|
* Switch ONE instance on or off, for every role; a missing record is created from the addon's
|
|
@@ -159488,7 +160205,8 @@ var integrationInstancesCapability = {
|
|
|
159488
160205
|
enabled: boolean()
|
|
159489
160206
|
}), object({ ok: literal(true) }), {
|
|
159490
160207
|
kind: "mutation",
|
|
159491
|
-
auth: "
|
|
160208
|
+
auth: "protected",
|
|
160209
|
+
caller: "scoped"
|
|
159492
160210
|
}),
|
|
159493
160211
|
/**
|
|
159494
160212
|
* Delete the record and its keychain refs together. For an instance that brings devices the hub
|
|
@@ -159497,7 +160215,8 @@ var integrationInstancesCapability = {
|
|
|
159497
160215
|
*/
|
|
159498
160216
|
deleteInstance: method(object({ id: IntegrationInstanceIdSchema }), object({ ok: literal(true) }), {
|
|
159499
160217
|
kind: "mutation",
|
|
159500
|
-
auth: "
|
|
160218
|
+
auth: "protected",
|
|
160219
|
+
caller: "scoped"
|
|
159501
160220
|
}),
|
|
159502
160221
|
testInstance: optionalMethod(object({
|
|
159503
160222
|
id: IntegrationInstanceIdSchema.nullable(),
|
|
@@ -159506,7 +160225,8 @@ var integrationInstancesCapability = {
|
|
|
159506
160225
|
kind: string().min(1).optional()
|
|
159507
160226
|
}), TestConnectionResultSchema, {
|
|
159508
160227
|
kind: "mutation",
|
|
159509
|
-
auth: "
|
|
160228
|
+
auth: "protected",
|
|
160229
|
+
caller: "scoped"
|
|
159510
160230
|
})
|
|
159511
160231
|
}
|
|
159512
160232
|
};
|
|
@@ -161378,7 +162098,7 @@ var lockControlCapability = {
|
|
|
161378
162098
|
kind: "mutation",
|
|
161379
162099
|
auth: "protected"
|
|
161380
162100
|
}),
|
|
161381
|
-
open:
|
|
162101
|
+
open: optionalMethod(object({ deviceId: number$1().int().nonnegative() }), _void(), {
|
|
161382
162102
|
kind: "mutation",
|
|
161383
162103
|
auth: "protected"
|
|
161384
162104
|
})
|
|
@@ -162596,7 +163316,7 @@ object({
|
|
|
162596
163316
|
deviceId: number$1().int().optional(),
|
|
162597
163317
|
atBefore: number$1().optional(),
|
|
162598
163318
|
where: RecordWhereSchema.optional()
|
|
162599
|
-
}), object({ count: number$1().int().nonnegative() }), object({}), object({ store: Rows }), object({ patch: Rows }), object({}), object({ keys: array(string().min(1)) }), object({ removed: array(string()) }), object({ refs: array(string()) }), object({ values: record(string(), string().nullable()) }), object({
|
|
163319
|
+
}), object({ count: number$1().int().nonnegative() }), object({}), object({ store: Rows }), object({ patch: Rows }), object({}), object({ keys: array(string().min(1)) }), object({ removed: array(string()) }), object({}), object({ deviceIds: array(number$1().int()) }), object({ deviceIds: array(number$1().int()) }), object({ blobs: record(string(), Rows) }), object({ refs: array(string()) }), object({ values: record(string(), string().nullable()) }), object({
|
|
162600
163320
|
ref: string().min(1),
|
|
162601
163321
|
value: string()
|
|
162602
163322
|
}), object({}), object({ refs: array(string()) }), object({ deleted: number$1().int().nonnegative() }), object({}), object({ integrations: array(MigrationIntegrationSchema) }), object({ id: string().min(1) }), MigrationIntegrationSchema.nullable(), object({
|
|
@@ -162607,7 +163327,7 @@ object({
|
|
|
162607
163327
|
integrationId: string().nullable(),
|
|
162608
163328
|
/** Whether the device carries any stored config; its content is not offered. */
|
|
162609
163329
|
hasConfig: boolean()
|
|
162610
|
-
}).nullable(), object({
|
|
163330
|
+
}).nullable(), object({ deviceIds: array(number$1().int()) }), object({ aliases: record(string(), string()) }), object({
|
|
162611
163331
|
deviceId: number$1().int(),
|
|
162612
163332
|
integrationId: string().min(1)
|
|
162613
163333
|
}), object({}), object({}), object({ nodeId: string() }), object({}), object({});
|
|
@@ -169905,92 +170625,21 @@ var NcZoneConditionSchema = object({
|
|
|
169905
170625
|
* membership lists are OR within the list (spec §2.3).
|
|
169906
170626
|
*/
|
|
169907
170627
|
/**
|
|
169908
|
-
* What a rule
|
|
169909
|
-
*
|
|
169910
|
-
* **No hand-maintained allowlist** (operator decision, and the right one — a
|
|
169911
|
-
* written list of methods is a third parallel map to keep aligned, and this
|
|
169912
|
-
* repo has paid for those). The boundary instead comes from a property the
|
|
169913
|
-
* capabilities already carry: an action may target only a **device-scoped**
|
|
169914
|
-
* capability method.
|
|
170628
|
+
* What a rule or a button runs: an **Action** of the `actions` surface
|
|
170629
|
+
* (`internal:<uuid>` or an addon's), by id, and nothing else (planning#473).
|
|
169915
170630
|
*
|
|
169916
|
-
*
|
|
169917
|
-
*
|
|
169918
|
-
*
|
|
169919
|
-
*
|
|
169920
|
-
*
|
|
169921
|
-
*
|
|
169922
|
-
* device-scoped stops being actuatable in the same change.
|
|
169923
|
-
*
|
|
169924
|
-
* The executor enforces it; {@link NcRuleActionSchema} carries the intent.
|
|
170631
|
+
* The notification centre has no step vocabulary of its own. The steps, the
|
|
170632
|
+
* device-scope boundary, the stop-at-first-failure, the throttle
|
|
170633
|
+
* (`minDelaySec`), the variables and the runs ledger all belong to the Action;
|
|
170634
|
+
* an operator edits them in ONE place (the Actions page) and a rule points at
|
|
170635
|
+
* the result. A rule can be authored by a non-admin (personal rules), which is
|
|
170636
|
+
* safe for the same reason: it can only name an Action an admin already wrote.
|
|
169925
170637
|
*/
|
|
170638
|
+
var NcActionIdSchema = string().min(1);
|
|
170639
|
+
/** Action ids one hook edge runs, in order. Capped so a slot never becomes a second editor. */
|
|
170640
|
+
var NcHookActionIdsSchema = array(NcActionIdSchema).max(4);
|
|
169926
170641
|
/**
|
|
169927
|
-
* One
|
|
169928
|
-
*
|
|
169929
|
-
* `wait` is a first-class step rather than a property of the next action: it is
|
|
169930
|
-
* what makes a sequence a SEQUENCE and not a list — "unlock, wait 5s, open"
|
|
169931
|
-
* cannot be expressed otherwise.
|
|
169932
|
-
*/
|
|
169933
|
-
var NcRuleActionSchema = discriminatedUnion("kind", [object({
|
|
169934
|
-
kind: literal("wait"),
|
|
169935
|
-
seconds: number$1().min(0).max(300)
|
|
169936
|
-
}), object({
|
|
169937
|
-
kind: literal("cap"),
|
|
169938
|
-
/**
|
|
169939
|
-
* WHO the step acts on (D983) — the only shape that is written. A sequence
|
|
169940
|
-
* stored before D983 carries `deviceId`; the sequence store reads it as a
|
|
169941
|
-
* `devices` target.
|
|
169942
|
-
*/
|
|
169943
|
-
target: ActionTargetSchema.optional(),
|
|
169944
|
-
/** The vocabulary action the step performs; required for a `domain` target. */
|
|
169945
|
-
actionId: string().min(1).optional(),
|
|
169946
|
-
/** @deprecated The pre-D983 single device. Read, never written. */
|
|
169947
|
-
deviceId: number$1().int().optional(),
|
|
169948
|
-
/** Capability name, e.g. `alarm-panel`. */
|
|
169949
|
-
cap: string().min(1),
|
|
169950
|
-
/** Method on it. The executor refuses a non-device-scoped cap. */
|
|
169951
|
-
method: string().min(1),
|
|
169952
|
-
/** Method arguments, minus `deviceId` (the executor injects it). */
|
|
169953
|
-
args: record(string(), unknown()).optional()
|
|
169954
|
-
}).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
169955
|
-
message: "a cap step needs a target",
|
|
169956
|
-
path: ["target"]
|
|
169957
|
-
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
169958
|
-
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
169959
|
-
path: ["actionId"]
|
|
169960
|
-
})]);
|
|
169961
|
-
/**
|
|
169962
|
-
* A named, ordered run of steps shared across rules, with its own throttle.
|
|
169963
|
-
*
|
|
169964
|
-
* Sequences live in the notification centre's sequence store — never inline on
|
|
169965
|
-
* a rule. A rule binds to one by id ({@link NcActionBindingSchema}), and a
|
|
169966
|
-
* button names one the same way. `minDelaySec` exists because a noisy rule
|
|
169967
|
-
* otherwise hammers a physical actuator — the rule's own cooldown governs
|
|
169968
|
-
* NOTIFICATIONS, which is a different budget from "how often may this gate
|
|
169969
|
-
* actually open". The throttle key is the sequence id, so two rules sharing
|
|
169970
|
-
* one sequence share its budget.
|
|
169971
|
-
*/
|
|
169972
|
-
var NcSharedSequenceSchema = object({
|
|
169973
|
-
id: string().min(1),
|
|
169974
|
-
name: string().min(1).max(120),
|
|
169975
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
169976
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
169977
|
-
});
|
|
169978
|
-
/** Create / update body — the id is minted by the provider. */
|
|
169979
|
-
var NcSharedSequenceInputSchema = object({
|
|
169980
|
-
name: string().min(1).max(120),
|
|
169981
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
169982
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
169983
|
-
});
|
|
169984
|
-
/** Bindings on one hook edge. Cap keeps a slot from becoming a second sequence editor. */
|
|
169985
|
-
var NcHookBindingsSchema = array(discriminatedUnion("kind", [object({
|
|
169986
|
-
kind: literal("sequence"),
|
|
169987
|
-
sequenceId: string().min(1)
|
|
169988
|
-
}), object({
|
|
169989
|
-
kind: literal("do"),
|
|
169990
|
-
action: NcRuleActionSchema
|
|
169991
|
-
})])).max(4);
|
|
169992
|
-
/**
|
|
169993
|
-
* One button carried by the notification, running a shared sequence on tap.
|
|
170642
|
+
* One button carried by the notification, running an Action on tap.
|
|
169994
170643
|
*
|
|
169995
170644
|
* **Read this before adding a button that does something physical.** The tap
|
|
169996
170645
|
* arrives over a link that travelled through third-party infrastructure — ntfy,
|
|
@@ -170005,9 +170654,9 @@ var NcRuleNotificationButtonSchema = object({
|
|
|
170005
170654
|
/** Stable id — travels in the callback and identifies the button in logs. */
|
|
170006
170655
|
id: string().min(1).max(64),
|
|
170007
170656
|
label: string().min(1).max(40),
|
|
170008
|
-
/**
|
|
170009
|
-
*
|
|
170010
|
-
|
|
170657
|
+
/** The Action the tap runs. The dispatcher drops a button whose Action does
|
|
170658
|
+
* not exist rather than minting a token for nothing. */
|
|
170659
|
+
actionId: NcActionIdSchema,
|
|
170011
170660
|
icon: NotificationActionIconSchema.optional(),
|
|
170012
170661
|
destructive: boolean().optional()
|
|
170013
170662
|
});
|
|
@@ -170022,25 +170671,19 @@ var NcRuleNotificationButtonSchema = object({
|
|
|
170022
170671
|
* leave). A delivery with no clear edge never produces this hook.
|
|
170023
170672
|
*/
|
|
170024
170673
|
var NcRuleActionsSchema = object({
|
|
170025
|
-
onActivation:
|
|
170026
|
-
onDeactivation:
|
|
170674
|
+
onActivation: NcHookActionIdsSchema.optional(),
|
|
170675
|
+
onDeactivation: NcHookActionIdsSchema.optional(),
|
|
170027
170676
|
/** Runs on a positive / raised match. */
|
|
170028
|
-
onTrigger:
|
|
170677
|
+
onTrigger: NcHookActionIdsSchema.optional(),
|
|
170029
170678
|
/** Runs on a clear / leave match, when the subject carries one. */
|
|
170030
|
-
onTriggerOff:
|
|
170679
|
+
onTriggerOff: NcHookActionIdsSchema.optional(),
|
|
170031
170680
|
/**
|
|
170032
|
-
* Buttons the NOTIFICATION carries, each running one
|
|
170033
|
-
*
|
|
170034
|
-
*
|
|
170681
|
+
* Buttons the NOTIFICATION carries, each running one Action when tapped.
|
|
170682
|
+
* Deliberately a REFERENCE — a button that could define its own steps would
|
|
170683
|
+
* be a parallel actuation vocabulary.
|
|
170035
170684
|
*/
|
|
170036
170685
|
buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
|
|
170037
170686
|
});
|
|
170038
|
-
object({
|
|
170039
|
-
name: string().min(1).max(120),
|
|
170040
|
-
enabled: boolean(),
|
|
170041
|
-
minDelaySec: number$1().int().min(0).max(86400).optional(),
|
|
170042
|
-
actions: array(NcRuleActionSchema).min(1)
|
|
170043
|
-
});
|
|
170044
170687
|
/**
|
|
170045
170688
|
* "This rule applies only while `deviceId` is in one of `states`."
|
|
170046
170689
|
*
|
|
@@ -170339,6 +170982,16 @@ var NcRuleTargetSchema = object({
|
|
|
170339
170982
|
*/
|
|
170340
170983
|
params: record(string(), unknown()).optional()
|
|
170341
170984
|
});
|
|
170985
|
+
var NcTargetOverrideSchema = object({
|
|
170986
|
+
template: object({
|
|
170987
|
+
title: string().max(500).optional(),
|
|
170988
|
+
body: string().max(2e3).optional()
|
|
170989
|
+
}).optional(),
|
|
170990
|
+
schedule: NcScheduleSchema.optional(),
|
|
170991
|
+
priority: number$1().int().min(1).max(5).optional()
|
|
170992
|
+
});
|
|
170993
|
+
/** Per-target settings keyed by target id (#487). */
|
|
170994
|
+
var NcTargetOverridesSchema = record(string(), NcTargetOverrideSchema);
|
|
170342
170995
|
/**
|
|
170343
170996
|
* WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
|
|
170344
170997
|
*
|
|
@@ -170620,6 +171273,13 @@ var NcRuleInputSchema = object({
|
|
|
170620
171273
|
* targets.
|
|
170621
171274
|
*/
|
|
170622
171275
|
targetUsers: array(string()).optional(),
|
|
171276
|
+
/**
|
|
171277
|
+
* Per-target settings keyed by target id (#487): texts, schedule, priority.
|
|
171278
|
+
* Absent (and an absent entry) = the rule's own values. A patch that omits
|
|
171279
|
+
* the key keeps the stored map; a patch that names it REPLACES it whole —
|
|
171280
|
+
* `{}` empties it.
|
|
171281
|
+
*/
|
|
171282
|
+
targetOverrides: NcTargetOverridesSchema.optional(),
|
|
170623
171283
|
/** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
|
|
170624
171284
|
* detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
|
|
170625
171285
|
media: NcMediaPolicySchema.default({}),
|
|
@@ -171721,18 +172381,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
171721
172381
|
}), object({ success: literal(true) }), {
|
|
171722
172382
|
kind: "mutation",
|
|
171723
172383
|
auth: "admin"
|
|
171724
|
-
}), 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 }), {
|
|
171725
|
-
kind: "mutation",
|
|
171726
|
-
auth: "admin"
|
|
171727
|
-
}), method(object({
|
|
171728
|
-
sequenceId: string().min(1),
|
|
171729
|
-
sequence: NcSharedSequenceInputSchema
|
|
171730
|
-
}), object({ sequence: NcSharedSequenceSchema }), {
|
|
171731
|
-
kind: "mutation",
|
|
171732
|
-
auth: "admin"
|
|
171733
|
-
}), method(object({ sequenceId: string().min(1) }), object({ success: literal(true) }), {
|
|
171734
|
-
kind: "mutation",
|
|
171735
|
-
auth: "admin"
|
|
171736
172384
|
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
171737
172385
|
deviceId: number$1().int(),
|
|
171738
172386
|
muted: boolean()
|
|
@@ -172217,53 +172865,41 @@ setOverlay: method(object({
|
|
|
172217
172865
|
}
|
|
172218
172866
|
}] }
|
|
172219
172867
|
};
|
|
172220
|
-
_enum([
|
|
172221
|
-
"value",
|
|
172222
|
-
"unit",
|
|
172223
|
-
"full"
|
|
172224
|
-
]);
|
|
172225
|
-
_enum([
|
|
172226
|
-
"value+unit",
|
|
172227
|
-
"value",
|
|
172228
|
-
"unit"
|
|
172229
|
-
]);
|
|
172230
172868
|
/**
|
|
172231
|
-
*
|
|
172232
|
-
*
|
|
172233
|
-
*
|
|
172869
|
+
* `osd-manager` — the ORCHESTRATOR over the device-scope `osd` cap.
|
|
172870
|
+
*
|
|
172871
|
+
* The `osd` cap is the firmware contract: it probes a camera's overlay
|
|
172872
|
+
* SLOTS and writes literal text into one. It has no idea WHERE that text
|
|
172873
|
+
* comes from, and it must not — a driver that grew a "show the temperature
|
|
172874
|
+
* here" feature would grow it once per vendor.
|
|
172875
|
+
*
|
|
172876
|
+
* This cap owns the other half: a per-(camera, slot) BINDING that says
|
|
172877
|
+
* which value feeds the slot, how it is formatted, and under which
|
|
172878
|
+
* conditions it is shown at all. Named TEMPLATES combine many device
|
|
172879
|
+
* fields into one overlay string (plugin catalog OSD Manager parity).
|
|
172234
172880
|
*/
|
|
172235
|
-
var OsdTemplatePickSchema = object({
|
|
172236
|
-
containerId: number$1().int().optional(),
|
|
172237
|
-
deviceId: number$1().int()
|
|
172238
|
-
});
|
|
172239
172881
|
/**
|
|
172240
|
-
*
|
|
172241
|
-
*
|
|
172242
|
-
* `{
|
|
172243
|
-
*
|
|
172882
|
+
* The text of a named template: a device template (D1021) —
|
|
172883
|
+
* `{{ camera.temperature | round(1) }}`, `{{ now | time('HH:mm') }}`,
|
|
172884
|
+
* `{% if camera.motion %}MOTION{% endif %}` — rendered by the ONE hub renderer
|
|
172885
|
+
* (`device-manager.renderDeviceTemplates`), never by this addon.
|
|
172886
|
+
*
|
|
172887
|
+
* Two names belong to the render rather than to a device:
|
|
172888
|
+
* - `now` is the clock; `time('HH:mm')` prints it in the server's zone.
|
|
172889
|
+
* - `camera` is the camera the overlay is on, so one template serves every
|
|
172890
|
+
* camera. `camera.lastPerson` and `camera.lastPlate` are the most recent
|
|
172891
|
+
* recognition persisted for it (empty text until there is one, with
|
|
172892
|
+
* `| default('')`).
|
|
172244
172893
|
*/
|
|
172245
|
-
var
|
|
172246
|
-
/** Token stem in the parser, e.g. `t` → `{t}` / `{t.value}`. Unique within the template. */
|
|
172247
|
-
alias: string().min(1).max(32).regex(/^[A-Za-z][A-Za-z0-9_-]*$/, "alias must start with a letter"),
|
|
172248
|
-
pick: OsdTemplatePickSchema,
|
|
172249
|
-
capName: string().min(1).max(64),
|
|
172250
|
-
valuePath: string().min(1).max(64),
|
|
172251
|
-
/** Convert TO this unit at render (`tryConvertUnit`). Absent = source unit. */
|
|
172252
|
-
displayUnit: string().max(16).optional(),
|
|
172253
|
-
maxDecimals: number$1().int().min(0).max(4).default(1),
|
|
172254
|
-
/** Raw value → display text (same shape as slot binding). Empty string hides. */
|
|
172255
|
-
valueMap: record(string(), string()).optional()
|
|
172256
|
-
});
|
|
172894
|
+
var OSD_TEMPLATE_TEXT_MAX = 1024;
|
|
172257
172895
|
/**
|
|
172258
|
-
* A named template:
|
|
172259
|
-
*
|
|
172896
|
+
* A named template: the unit of reuse. A slot points at one by id; editing it
|
|
172897
|
+
* changes every slot that points at it, on every camera.
|
|
172260
172898
|
*/
|
|
172261
172899
|
var OsdNamedTemplateSchema = object({
|
|
172262
172900
|
id: string().min(1).max(64),
|
|
172263
172901
|
name: string().min(1).max(64),
|
|
172264
|
-
|
|
172265
|
-
/** Parser with alias placeholders, e.g. `{t.value} {t.unit} / {h}`. */
|
|
172266
|
-
parser: string().max(256).default("")
|
|
172902
|
+
text: string().max(OSD_TEMPLATE_TEXT_MAX).default("")
|
|
172267
172903
|
});
|
|
172268
172904
|
/** Where a slot's value comes from. */
|
|
172269
172905
|
var OsdSourceSchema = discriminatedUnion("kind", [
|
|
@@ -172272,26 +172908,6 @@ var OsdSourceSchema = discriminatedUnion("kind", [
|
|
|
172272
172908
|
kind: literal("static"),
|
|
172273
172909
|
text: string().max(64)
|
|
172274
172910
|
}),
|
|
172275
|
-
object({
|
|
172276
|
-
kind: literal("clock"),
|
|
172277
|
-
/** Token pattern: `YYYY MM DD HH mm ss`. Everything else is literal. */
|
|
172278
|
-
pattern: string().min(1).max(32).default("HH:mm"),
|
|
172279
|
-
/** IANA zone. Omitted = the server's zone. */
|
|
172280
|
-
timezone: string().min(1).max(64).optional()
|
|
172281
|
-
}),
|
|
172282
|
-
object({
|
|
172283
|
-
kind: literal("device-state"),
|
|
172284
|
-
deviceId: number$1().int().optional(),
|
|
172285
|
-
capName: string().min(1).max(64),
|
|
172286
|
-
/** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
|
|
172287
|
-
valuePath: string().min(1).max(64),
|
|
172288
|
-
/** Convert TO this unit at render. Absent = no conversion. */
|
|
172289
|
-
displayUnit: string().max(16).optional()
|
|
172290
|
-
}),
|
|
172291
|
-
object({
|
|
172292
|
-
kind: literal("latest-recognition"),
|
|
172293
|
-
recognition: _enum(["person", "plate"])
|
|
172294
|
-
}),
|
|
172295
172911
|
object({
|
|
172296
172912
|
kind: literal("template"),
|
|
172297
172913
|
templateId: string().min(1).max(64)
|
|
@@ -172301,15 +172917,6 @@ var OsdSlotBindingSchema = object({
|
|
|
172301
172917
|
/** Off = the manager stops driving this slot. It does NOT clear it. */
|
|
172302
172918
|
enabled: boolean().default(true),
|
|
172303
172919
|
source: OsdSourceSchema,
|
|
172304
|
-
/** `${value}` and `${unit}` are substituted; every occurrence. */
|
|
172305
|
-
template: string().max(96).default("${value}"),
|
|
172306
|
-
/**
|
|
172307
|
-
* Decimal places for a numeric value. `0` yields an integer — the
|
|
172308
|
-
* documented workaround for firmwares that reject `.` in overlay text.
|
|
172309
|
-
*/
|
|
172310
|
-
maxDecimals: number$1().int().min(0).max(4).default(1),
|
|
172311
|
-
/** Raw value → display text, e.g. `{"true":"MOTION","false":""}`. */
|
|
172312
|
-
valueMap: record(string(), string()).optional(),
|
|
172313
172920
|
/** Time windows in which the slot is shown. Absent = always. */
|
|
172314
172921
|
schedule: NcScheduleSchema.optional(),
|
|
172315
172922
|
/**
|
|
@@ -172351,31 +172958,21 @@ var OsdRenderResultSchema = object({
|
|
|
172351
172958
|
/** Why, whenever the outcome is not a plain write. Never silent. */
|
|
172352
172959
|
reason: string().optional()
|
|
172353
172960
|
});
|
|
172354
|
-
var OsdSourceValueTypeEnum = _enum([
|
|
172355
|
-
"number",
|
|
172356
|
-
"boolean",
|
|
172357
|
-
"string",
|
|
172358
|
-
"enum"
|
|
172359
|
-
]);
|
|
172360
172961
|
/**
|
|
172361
|
-
*
|
|
172362
|
-
*
|
|
172363
|
-
*
|
|
172962
|
+
* A template rendered for one camera without being saved: what the editor
|
|
172963
|
+
* previews. `text` is what the overlay would carry; a refused render has a
|
|
172964
|
+
* `reason` and an empty text.
|
|
172364
172965
|
*/
|
|
172365
|
-
var
|
|
172366
|
-
|
|
172367
|
-
|
|
172368
|
-
|
|
172369
|
-
|
|
172370
|
-
label: string(),
|
|
172371
|
-
valueType: OsdSourceValueTypeEnum,
|
|
172372
|
-
/** Present for `enum`; the editor offers these as `valueMap` keys. */
|
|
172373
|
-
enumValues: array(string()).readonly().optional()
|
|
172966
|
+
var OsdTemplatePreviewSchema = object({
|
|
172967
|
+
ok: boolean(),
|
|
172968
|
+
text: string(),
|
|
172969
|
+
/** The refusal, or `ref: reason` per value that printed `—`. */
|
|
172970
|
+
notes: array(string())
|
|
172374
172971
|
});
|
|
172375
172972
|
method(object({ deviceId: number$1().int() }), object({
|
|
172376
172973
|
supported: boolean(),
|
|
172377
172974
|
slots: array(OsdSlotViewSchema)
|
|
172378
|
-
}), { auth: "admin" }), method(object({
|
|
172975
|
+
}), { auth: "admin" }), method(object({}), object({
|
|
172379
172976
|
supported: array(string()),
|
|
172380
172977
|
catalog: array(NcConditionDescriptorSchema)
|
|
172381
172978
|
}), { auth: "admin" }), method(object({
|
|
@@ -172417,6 +173014,12 @@ method(object({ deviceId: number$1().int() }), object({
|
|
|
172417
173014
|
}), OsdRenderResultSchema, {
|
|
172418
173015
|
kind: "mutation",
|
|
172419
173016
|
auth: "admin"
|
|
173017
|
+
}), method(object({
|
|
173018
|
+
deviceId: number$1().int(),
|
|
173019
|
+
text: string().max(OSD_TEMPLATE_TEXT_MAX)
|
|
173020
|
+
}), OsdTemplatePreviewSchema, {
|
|
173021
|
+
kind: "mutation",
|
|
173022
|
+
auth: "admin"
|
|
172420
173023
|
}), method(object({ deviceId: number$1().int() }), object({ results: array(OsdRenderResultSchema) }), {
|
|
172421
173024
|
kind: "mutation",
|
|
172422
173025
|
auth: "admin"
|
|
@@ -177981,7 +178584,6 @@ var RemoteCustomButtonSchema = object({
|
|
|
177981
178584
|
/** What the operator calls it, and what a voice command may name. */
|
|
177982
178585
|
name: string().min(1).max(60)
|
|
177983
178586
|
});
|
|
177984
|
-
var RemotePowerModeSchema = _enum(["toggle", "discrete"]);
|
|
177985
178587
|
/**
|
|
177986
178588
|
* The source rules: every step role is bound, ids and names are unique, a
|
|
177987
178589
|
* channel number belongs to one `digits` source, and no name or id is another
|
|
@@ -178062,7 +178664,6 @@ var RemoteConfigSchema = object({
|
|
|
178062
178664
|
sources: array(RemoteSourceSchema).max(200).default([]),
|
|
178063
178665
|
/** The pause between two steps of a source: the television's receiver, not a repeat. */
|
|
178064
178666
|
stepDelayMs: number$1().int().min(100).max(REMOTE_STEP_DELAY_MAX_MS).default(500),
|
|
178065
|
-
power: object({ mode: RemotePowerModeSchema }),
|
|
178066
178667
|
/**
|
|
178067
178668
|
* READ-ONLY: sources a stored configuration carries that no longer parse,
|
|
178068
178669
|
* left out of `sources` with the reason (`readStoredRemoteConfig`). Never
|
|
@@ -178166,6 +178767,11 @@ var RemoteLayoutButtonSchema = object({
|
|
|
178166
178767
|
/** Absent = the plain rendering every layout had before shapes existed. */
|
|
178167
178768
|
shape: RemoteButtonShapeSchema.optional(),
|
|
178168
178769
|
tone: RemoteButtonToneSchema.optional(),
|
|
178770
|
+
/**
|
|
178771
|
+
* Draw the label on a colour-toned key. A colour key shows only its colour
|
|
178772
|
+
* by default; a remote whose plastic prints letters on them (A B C D) sets it.
|
|
178773
|
+
*/
|
|
178774
|
+
showLegend: boolean().optional(),
|
|
178169
178775
|
/** The group this button belongs to; it must lie inside that group's rectangle. */
|
|
178170
178776
|
groupId: string().min(1).max(40).optional()
|
|
178171
178777
|
});
|
|
@@ -178303,7 +178909,6 @@ var RemoteBoundCommandSchema = object({
|
|
|
178303
178909
|
});
|
|
178304
178910
|
var RemoteCommandListSchema = object({
|
|
178305
178911
|
layoutTemplateId: string().nullable(),
|
|
178306
|
-
power: object({ mode: RemotePowerModeSchema }),
|
|
178307
178912
|
/** Only the roles that are BOUND — the ones a press can reach. */
|
|
178308
178913
|
commands: array(RemoteBoundCommandSchema),
|
|
178309
178914
|
/** The sources the operator declared; empty when none (planning#460). */
|
|
@@ -178316,7 +178921,8 @@ var RemoteRefusalReasonSchema = _enum([
|
|
|
178316
178921
|
"unknown-source",
|
|
178317
178922
|
"unbound-step",
|
|
178318
178923
|
"undeclared-channel",
|
|
178319
|
-
"press-timeout"
|
|
178924
|
+
"press-timeout",
|
|
178925
|
+
"no-transmitter"
|
|
178320
178926
|
]);
|
|
178321
178927
|
var RemoteSendResultSchema = discriminatedUnion("status", [
|
|
178322
178928
|
object({
|
|
@@ -178409,7 +179015,8 @@ var RemoteComponentButtonSchema = object({
|
|
|
178409
179015
|
icon: string().min(1).max(60).optional(),
|
|
178410
179016
|
label: string().min(1).max(40).optional(),
|
|
178411
179017
|
shape: RemoteButtonShapeSchema.optional(),
|
|
178412
|
-
tone: RemoteButtonToneSchema.optional()
|
|
179018
|
+
tone: RemoteButtonToneSchema.optional(),
|
|
179019
|
+
showLegend: boolean().optional()
|
|
178413
179020
|
});
|
|
178414
179021
|
var RemoteLayoutComponentSchema = object({
|
|
178415
179022
|
id: string().max(80).regex(COMPONENT_ID_RE, { message: "<namespace>:<name>, lowercase" }),
|
|
@@ -179608,6 +180215,11 @@ var SendEmailResultSchema = object({
|
|
|
179608
180215
|
var SmtpStatusSchema = object({
|
|
179609
180216
|
/** True iff the addon has successfully verified the relay. */
|
|
179610
180217
|
ready: boolean(),
|
|
180218
|
+
/**
|
|
180219
|
+
* The tri-state behind `ready` (D315): true when the last send worked, false when it failed,
|
|
180220
|
+
* ABSENT when the relay has not sent yet (unknown, never "not verified").
|
|
180221
|
+
*/
|
|
180222
|
+
verified: boolean().optional(),
|
|
179611
180223
|
/** Operator-visible host string (no credentials). */
|
|
179612
180224
|
host: string(),
|
|
179613
180225
|
/** Last error message reported by the relay, when not ready. */
|
|
@@ -179619,10 +180231,6 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
|
|
|
179619
180231
|
kind: "mutation",
|
|
179620
180232
|
auth: "admin",
|
|
179621
180233
|
access: "create"
|
|
179622
|
-
}), method(RelayPinSchema, SmtpStatusSchema, {
|
|
179623
|
-
kind: "mutation",
|
|
179624
|
-
auth: "admin",
|
|
179625
|
-
access: "view"
|
|
179626
180234
|
}), method(RelayPinSchema, SmtpStatusSchema, { auth: "admin" });
|
|
179627
180235
|
/**
|
|
179628
180236
|
* A single device snapshot returned as base64 JPEG/PNG.
|
|
@@ -182667,7 +183275,7 @@ var valveCapability = {
|
|
|
182667
183275
|
kind: "mutation",
|
|
182668
183276
|
auth: "protected"
|
|
182669
183277
|
}),
|
|
182670
|
-
setPosition:
|
|
183278
|
+
setPosition: optionalMethod(object({
|
|
182671
183279
|
deviceId: number$1().int().nonnegative(),
|
|
182672
183280
|
position: number$1().min(0).max(100)
|
|
182673
183281
|
}), _void(), {
|
|
@@ -185236,6 +185844,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
185236
185844
|
groupCommands: groupCommandsCapability,
|
|
185237
185845
|
groupStatus: groupStatusCapability,
|
|
185238
185846
|
heatingValve: heatingValveCapability,
|
|
185847
|
+
heatPumpStatus: heatPumpStatusCapability,
|
|
185239
185848
|
humidifier: humidifierCapability,
|
|
185240
185849
|
humiditySensor: humiditySensorCapability,
|
|
185241
185850
|
image: imageCapability,
|
|
@@ -186519,7 +187128,8 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
186519
187128
|
return toDeviceSummary(device, this.addonId);
|
|
186520
187129
|
}
|
|
186521
187130
|
};
|
|
186522
|
-
DeviceType.
|
|
187131
|
+
DeviceType.HeatPump;
|
|
187132
|
+
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;
|
|
186523
187133
|
new Set(Object.values(DeviceType));
|
|
186524
187134
|
/** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
|
|
186525
187135
|
function contribution(cap, schema, build) {
|
|
@@ -186655,6 +187265,13 @@ var lockContribution = contribution("lock-control", LockControlStatusSchema, (sl
|
|
|
186655
187265
|
reading: reading("lock-control", words?.state ?? "unknown", false, words?.title),
|
|
186656
187266
|
rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(DeviceFeature.LockOpen)))],
|
|
186657
187267
|
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, "muted")] },
|
|
187268
|
+
...words === null ? {} : { tiles: { left: [{
|
|
187269
|
+
label: t("Door", "Porta"),
|
|
187270
|
+
value: title
|
|
187271
|
+
}, ...since === null ? [] : [{
|
|
187272
|
+
label: t("Since", "Da"),
|
|
187273
|
+
value: since
|
|
187274
|
+
}]] } },
|
|
186658
187275
|
...words?.door == null ? {} : { scene: { mode: words.door } }
|
|
186659
187276
|
};
|
|
186660
187277
|
});
|
|
@@ -186736,7 +187353,17 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
186736
187353
|
return {
|
|
186737
187354
|
reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
|
|
186738
187355
|
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))],
|
|
186739
|
-
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] }
|
|
187356
|
+
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
|
|
187357
|
+
...words === null ? {} : { tiles: {
|
|
187358
|
+
left: [{
|
|
187359
|
+
label: t("Mode", "Modalità"),
|
|
187360
|
+
value: words.title
|
|
187361
|
+
}],
|
|
187362
|
+
...since === null ? {} : { right: [{
|
|
187363
|
+
label: t("Since", "Da"),
|
|
187364
|
+
value: since
|
|
187365
|
+
}] }
|
|
187366
|
+
} }
|
|
186740
187367
|
};
|
|
186741
187368
|
}),
|
|
186742
187369
|
"automation-control": contribution("automation-control", AutomationControlStatusSchema, (slice, ctx) => {
|
|
@@ -186800,7 +187427,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
186800
187427
|
*/
|
|
186801
187428
|
var has$3 = (ctx, f) => ctx.features.includes(f);
|
|
186802
187429
|
var unknownText = t("Unknown", "Sconosciuto");
|
|
186803
|
-
var pct$
|
|
187430
|
+
var pct$2 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
186804
187431
|
var unit = (n) => Math.min(1, Math.max(0, n / 100));
|
|
186805
187432
|
/** Battery as a fact, unless the device is also bound to the `battery` cap (it already says so). */
|
|
186806
187433
|
function ownBattery(level, ctx) {
|
|
@@ -186862,7 +187489,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
186862
187489
|
},
|
|
186863
187490
|
valueArg: "direction"
|
|
186864
187491
|
});
|
|
186865
|
-
const speedText = speed === null ? null : pct$
|
|
187492
|
+
const speedText = speed === null ? null : pct$2(speed);
|
|
186866
187493
|
const preset = slice?.preset ?? "";
|
|
186867
187494
|
const status = speed === null ? unknownText : joinText([speed === 0 ? t("Off", "Spento") : t(`Speed ${speed}%`, `Velocità ${speed}%`), preset === "" ? null : t(preset, preset)]);
|
|
186868
187495
|
return {
|
|
@@ -186875,10 +187502,16 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
186875
187502
|
}],
|
|
186876
187503
|
...speedText === null ? {} : {
|
|
186877
187504
|
facts: [fact("speed", "fan", speedText, speed === 0 ? "muted" : "primary")],
|
|
186878
|
-
tiles: {
|
|
186879
|
-
|
|
186880
|
-
|
|
186881
|
-
|
|
187505
|
+
tiles: {
|
|
187506
|
+
...slice?.oscillating == null ? {} : { left: [{
|
|
187507
|
+
label: t("Oscillation", "Oscilla"),
|
|
187508
|
+
value: slice.oscillating ? t("Yes", "Sì") : t("No", "No")
|
|
187509
|
+
}] },
|
|
187510
|
+
...preset === "" ? {} : { right: [{
|
|
187511
|
+
label: t("Mode", "Modalità"),
|
|
187512
|
+
value: t(preset, preset)
|
|
187513
|
+
}] }
|
|
187514
|
+
},
|
|
186882
187515
|
scene: { level: unit(speed ?? 0) }
|
|
186883
187516
|
}
|
|
186884
187517
|
};
|
|
@@ -186942,7 +187575,8 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
186942
187575
|
const words = state === null ? null : VACUUM_WORDS[state];
|
|
186943
187576
|
const title = state === "error" && slice?.errorLabel ? t(slice.errorLabel, slice.errorLabel) : words?.title;
|
|
186944
187577
|
const controls = vacuumControls(state);
|
|
186945
|
-
|
|
187578
|
+
const suctionControls = [];
|
|
187579
|
+
if (slice !== void 0 && slice.availableFanSpeeds.length > 0) suctionControls.push({
|
|
186946
187580
|
kind: "picker",
|
|
186947
187581
|
id: "vacuum.suction",
|
|
186948
187582
|
label: t("Suction", "Aspirazione"),
|
|
@@ -186957,22 +187591,31 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
186957
187591
|
});
|
|
186958
187592
|
if (state !== null) controls.push(vac("locate", "Locate", "Trova", "map-pin", "locate"));
|
|
186959
187593
|
const progress = state === "cleaning" ? slice?.progress ?? null : null;
|
|
187594
|
+
const suction = slice?.fanSpeed == null || slice.fanSpeed === "" ? [] : [{
|
|
187595
|
+
label: t("Suction", "Aspirazione"),
|
|
187596
|
+
value: t(slice.fanSpeed, slice.fanSpeed)
|
|
187597
|
+
}];
|
|
187598
|
+
const suctionRows = suctionControls.length === 0 ? [] : [{
|
|
187599
|
+
id: "vacuum-suction",
|
|
187600
|
+
icon: "bot",
|
|
187601
|
+
status: null,
|
|
187602
|
+
controls: suctionControls
|
|
187603
|
+
}];
|
|
187604
|
+
const vacuumRows = [{
|
|
187605
|
+
id: "vacuum",
|
|
187606
|
+
icon: "bot",
|
|
187607
|
+
status: title ?? unknownText,
|
|
187608
|
+
controls
|
|
187609
|
+
}, ...suctionRows];
|
|
186960
187610
|
return {
|
|
186961
187611
|
reading: reading("vacuum-control", words?.state ?? "unknown", false, title),
|
|
186962
|
-
rows:
|
|
186963
|
-
|
|
186964
|
-
|
|
186965
|
-
|
|
186966
|
-
|
|
186967
|
-
}],
|
|
186968
|
-
|
|
186969
|
-
...progress === null ? {} : {
|
|
186970
|
-
tiles: { right: [{
|
|
186971
|
-
label: t("Progress", "Avanzamento"),
|
|
186972
|
-
value: pct$1(progress)
|
|
186973
|
-
}] },
|
|
186974
|
-
scene: { level: unit(progress) }
|
|
186975
|
-
}
|
|
187612
|
+
rows: vacuumRows,
|
|
187613
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
187614
|
+
...suction.length === 0 && progress === null ? {} : { tiles: { right: [...suction, ...progress === null ? [] : [{
|
|
187615
|
+
label: t("Progress", "Avanzamento"),
|
|
187616
|
+
value: pct$2(progress)
|
|
187617
|
+
}]] } },
|
|
187618
|
+
...progress === null ? {} : { scene: { level: unit(progress) } }
|
|
186976
187619
|
};
|
|
186977
187620
|
});
|
|
186978
187621
|
var MOWER_WORDS = {
|
|
@@ -187028,11 +187671,11 @@ var mowerContribution = contribution("lawn-mower-control", LawnMowerControlStatu
|
|
|
187028
187671
|
status: title ?? unknownText,
|
|
187029
187672
|
controls: mowerControls(activity)
|
|
187030
187673
|
}],
|
|
187031
|
-
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$
|
|
187674
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
187032
187675
|
...progress === null ? {} : {
|
|
187033
187676
|
tiles: { right: [{
|
|
187034
187677
|
label: t("Progress", "Avanzamento"),
|
|
187035
|
-
value: pct$
|
|
187678
|
+
value: pct$2(progress)
|
|
187036
187679
|
}] },
|
|
187037
187680
|
scene: { level: unit(progress) }
|
|
187038
187681
|
}
|
|
@@ -187103,10 +187746,13 @@ var feederContribution = contribution("pet-feeder", PetFeederStatusSchema, (slic
|
|
|
187103
187746
|
...last === null ? [] : [fact("last-run", "clock", t(`Last ${last} g`, `Ultimo ${last} g`))],
|
|
187104
187747
|
...ownBattery(slice?.powerSource === "battery" ? slice.batteryPower : null, ctx)
|
|
187105
187748
|
],
|
|
187106
|
-
...
|
|
187749
|
+
tiles: { left: [...slice?.foodLevel == null ? [] : [{
|
|
187750
|
+
label: t("Tank", "Serbatoio"),
|
|
187751
|
+
value: pct$2(slice.foodLevel)
|
|
187752
|
+
}], ...last === null ? [] : [{
|
|
187107
187753
|
label: t("Last portion", "Ultima porzione"),
|
|
187108
187754
|
value: t(`${last} g`, `${last} g`)
|
|
187109
|
-
}] }
|
|
187755
|
+
}]] }
|
|
187110
187756
|
};
|
|
187111
187757
|
});
|
|
187112
187758
|
var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema, (slice) => {
|
|
@@ -187134,10 +187780,13 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
|
|
|
187134
187780
|
}],
|
|
187135
187781
|
...level === null ? {} : {
|
|
187136
187782
|
facts: [fact("level", "droplets", t(`Water ${Math.round(level)}%`, `Acqua ${Math.round(level)}%`), level <= 20 ? "warning" : "primary")],
|
|
187137
|
-
tiles: {
|
|
187783
|
+
tiles: { left: [{
|
|
187138
187784
|
label: t("Water", "Acqua"),
|
|
187139
|
-
value: pct$
|
|
187140
|
-
}]
|
|
187785
|
+
value: pct$2(level)
|
|
187786
|
+
}, ...slice?.waterVolume == null ? [] : [{
|
|
187787
|
+
label: t("Volume", "Volume"),
|
|
187788
|
+
value: t(`${Math.round(slice.waterVolume)} ml`, `${Math.round(slice.waterVolume)} ml`)
|
|
187789
|
+
}]] },
|
|
187141
187790
|
scene: { level: unit(level) }
|
|
187142
187791
|
}
|
|
187143
187792
|
};
|
|
@@ -187169,14 +187818,18 @@ var DEVICES_FAMILY_CONTRIBUTIONS = {
|
|
|
187169
187818
|
* that does not parse reads `unknown`, never closed or off (D315/D393).
|
|
187170
187819
|
*/
|
|
187171
187820
|
var has$2 = (ctx, f) => ctx.features.includes(f);
|
|
187172
|
-
var pct = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
187821
|
+
var pct$1 = (n) => t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
187173
187822
|
var brightnessContribution = contribution("brightness", BrightnessStatusSchema, (slice) => {
|
|
187174
187823
|
const level = slice?.level ?? null;
|
|
187175
187824
|
return {
|
|
187176
187825
|
...level === null ? {} : { reading: reading("brightness", level > 0 ? "on" : "off") },
|
|
187177
187826
|
...level === null ? {} : {
|
|
187178
|
-
facts: [fact("level", "sun-dim", pct(level), level > 0 ? "primary" : "muted")],
|
|
187179
|
-
scene: { level: level / 100 }
|
|
187827
|
+
facts: [fact("level", "sun-dim", pct$1(level), level > 0 ? "primary" : "muted")],
|
|
187828
|
+
scene: { level: level / 100 },
|
|
187829
|
+
tiles: { left: [{
|
|
187830
|
+
label: t("Brightness", "Luminosità"),
|
|
187831
|
+
value: pct$1(level)
|
|
187832
|
+
}] }
|
|
187180
187833
|
},
|
|
187181
187834
|
rows: [row$1("brightness", "sun-dim", level === null ? null : t(`Brightness ${Math.round(level)}%`, `Luminosità ${Math.round(level)}%`), [{
|
|
187182
187835
|
kind: "slider",
|
|
@@ -187385,12 +188038,16 @@ function travelFragment(s, state, position, tilt, ctx) {
|
|
|
187385
188038
|
});
|
|
187386
188039
|
return {
|
|
187387
188040
|
reading: reading(s.source, words.state, false, words.title),
|
|
187388
|
-
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct(position))] },
|
|
188041
|
+
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct$1(position))] },
|
|
188042
|
+
...position === null ? {} : { tiles: { left: [{
|
|
188043
|
+
label: t("Opening", "Apertura"),
|
|
188044
|
+
value: pct$1(position)
|
|
188045
|
+
}] } },
|
|
187389
188046
|
scene: {
|
|
187390
188047
|
...words.mode === null ? {} : { mode: words.mode },
|
|
187391
188048
|
...position === null ? {} : { level: position / 100 }
|
|
187392
188049
|
},
|
|
187393
|
-
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct(position) : null]), controls)]
|
|
188050
|
+
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct$1(position) : null]), controls)]
|
|
187394
188051
|
};
|
|
187395
188052
|
}
|
|
187396
188053
|
var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
@@ -187468,10 +188125,10 @@ var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
|
187468
188125
|
const now = slice.currentHumidity;
|
|
187469
188126
|
return {
|
|
187470
188127
|
reading: reading("humidifier", state, false, title),
|
|
187471
|
-
...now === null ? {} : { facts: [fact("level", "droplets", pct(now), "info")] },
|
|
188128
|
+
...now === null ? {} : { facts: [fact("level", "droplets", pct$1(now), "info")] },
|
|
187472
188129
|
...slice.targetHumidity === null ? {} : { tiles: { right: [{
|
|
187473
188130
|
label: t("Target", "Obiettivo"),
|
|
187474
|
-
value: pct(slice.targetHumidity)
|
|
188131
|
+
value: pct$1(slice.targetHumidity)
|
|
187475
188132
|
}] } },
|
|
187476
188133
|
...now === null ? {} : { scene: { level: now / 100 } },
|
|
187477
188134
|
rows: [row$1("humidifier", "droplets", joinText([title, slice.mode === null ? null : t(slice.mode, slice.mode)]), controls)]
|
|
@@ -187719,17 +188376,16 @@ var weatherContribution = contribution("weather", WeatherStatusSchema, (slice, c
|
|
|
187719
188376
|
});
|
|
187720
188377
|
var updateContribution = contribution("update", UpdateStatusSchema, (slice) => {
|
|
187721
188378
|
if (slice === void 0) return { reading: reading("update", "unknown") };
|
|
187722
|
-
const { currentVersion, availableVersion, inProgress
|
|
188379
|
+
const { currentVersion, availableVersion, inProgress } = slice;
|
|
187723
188380
|
const pending = availableVersion !== null && availableVersion !== "" && availableVersion !== currentVersion;
|
|
187724
188381
|
if (!pending && currentVersion === null && !inProgress) return { reading: reading("update", "unknown") };
|
|
187725
188382
|
const state = inProgress ? "running" : pending ? "standby" : "idle";
|
|
187726
188383
|
const title = inProgress ? t("Updating", "Aggiornamento in corso") : pending ? t("Update available", "Aggiornamento disponibile") : t("Up to date", "Aggiornato");
|
|
187727
188384
|
const versions = currentVersion === null ? pending ? t(`${availableVersion}`, `${availableVersion}`) : null : pending ? t(`${currentVersion} → ${availableVersion}`, `${currentVersion} → ${availableVersion}`) : t(`Version ${currentVersion}`, `Versione ${currentVersion}`);
|
|
187728
|
-
const install = pending && updatable && !inProgress ? [asAction(action("update.install", t("Install", "Installa"), "download", "update", "installUpdate", {}, "primary", "install"))] : [];
|
|
187729
188385
|
return {
|
|
187730
188386
|
reading: reading("update", state, false, title),
|
|
187731
188387
|
facts: versions === null ? [] : [fact("reading", "download", versions, pending ? "warning" : "muted")],
|
|
187732
|
-
rows: [row$1("update", "download", versions,
|
|
188388
|
+
rows: [row$1("update", "download", versions, [])]
|
|
187733
188389
|
};
|
|
187734
188390
|
});
|
|
187735
188391
|
var imageContribution = contribution("image", ImageStatusSchema, (slice, ctx) => {
|
|
@@ -187837,6 +188493,33 @@ var ON_MODE_PREFERENCE = [
|
|
|
187837
188493
|
"heat",
|
|
187838
188494
|
"cool"
|
|
187839
188495
|
];
|
|
188496
|
+
var FAN_LABEL = {
|
|
188497
|
+
auto: t("Auto", "Auto"),
|
|
188498
|
+
quiet: t("Quiet", "Silenziosa"),
|
|
188499
|
+
low: t("Low", "Bassa"),
|
|
188500
|
+
medium: t("Medium", "Media"),
|
|
188501
|
+
high: t("High", "Alta"),
|
|
188502
|
+
turbo: t("Turbo", "Turbo"),
|
|
188503
|
+
off: t("Off", "Spenta")
|
|
188504
|
+
};
|
|
188505
|
+
/** A readable label for a fan speed name; an unknown one is shown as the device reported it. */
|
|
188506
|
+
function fanLabelOf(fan) {
|
|
188507
|
+
return FAN_LABEL[fan] ?? t(fan, fan);
|
|
188508
|
+
}
|
|
188509
|
+
/** Short labels for a segmented control: one word each, so the segments stay on a line. */
|
|
188510
|
+
var MODE_SEGMENT_LABEL = {
|
|
188511
|
+
off: t("Off", "Spento"),
|
|
188512
|
+
heat: t("Heat", "Caldo"),
|
|
188513
|
+
cool: t("Cool", "Freddo"),
|
|
188514
|
+
auto: t("Auto", "Auto"),
|
|
188515
|
+
heat_cool: t("Heat/Cool", "Caldo/Freddo"),
|
|
188516
|
+
fan_only: t("Fan", "Vent."),
|
|
188517
|
+
dry: t("Dry", "Deum.")
|
|
188518
|
+
};
|
|
188519
|
+
/** The segment label of every available HVAC mode, keyed by the mode value. */
|
|
188520
|
+
function modeLabelsOf(modes) {
|
|
188521
|
+
return Object.fromEntries(modes.map((m) => [m, MODE_SEGMENT_LABEL[m]]));
|
|
188522
|
+
}
|
|
187840
188523
|
/** 22 -> "22", 22.3 -> "22.3": a trailing zero is noise on a thermostat. */
|
|
187841
188524
|
function formatDegrees(value) {
|
|
187842
188525
|
return `${Number(value.toFixed(1))}°`;
|
|
@@ -187901,11 +188584,11 @@ function rangeFrom(min, max, step) {
|
|
|
187901
188584
|
* contribute, types never do (D14). A slice that is absent or does not parse is
|
|
187902
188585
|
* "not answered": the state reads unknown, no row is drawn (D315, D393).
|
|
187903
188586
|
*/
|
|
187904
|
-
var same = (text) => t(text, text);
|
|
187905
|
-
function tile(en, it, value) {
|
|
188587
|
+
var same$1 = (text) => t(text, text);
|
|
188588
|
+
function tile$1(en, it, value) {
|
|
187906
188589
|
return {
|
|
187907
188590
|
label: t(en, it),
|
|
187908
|
-
value: same(value)
|
|
188591
|
+
value: same$1(value)
|
|
187909
188592
|
};
|
|
187910
188593
|
}
|
|
187911
188594
|
function setpointSlider(id, cap, method, valueArg, value, range) {
|
|
@@ -187940,18 +188623,19 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
187940
188623
|
const status = climateStatusText(view);
|
|
187941
188624
|
const facts = [];
|
|
187942
188625
|
if (status !== null) facts.push(fact("climate", "thermometer", status));
|
|
187943
|
-
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same(`${Math.round(view.humidity)}%`)));
|
|
187944
|
-
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
188626
|
+
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same$1(`${Math.round(view.humidity)}%`)));
|
|
188627
|
+
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same$1(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
187945
188628
|
const left = [];
|
|
187946
188629
|
const right = [];
|
|
187947
|
-
if (view.measured !== null) left.push(tile("Indoor", "In casa", formatDegrees(view.measured)));
|
|
187948
|
-
if (view.humidity !== null) left.push(tile("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
188630
|
+
if (view.measured !== null) left.push(tile$1("Indoor", "In casa", formatDegrees(view.measured)));
|
|
188631
|
+
if (view.humidity !== null) left.push(tile$1("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
187949
188632
|
const modeControls = [{
|
|
187950
188633
|
kind: "picker",
|
|
187951
188634
|
id: "climate.mode",
|
|
187952
188635
|
label: t("Mode", "Modalità"),
|
|
187953
188636
|
current: view.mode,
|
|
187954
|
-
options: [...view.availableModes],
|
|
188637
|
+
options: [...view.availableModes.filter((m) => m !== "off"), ...view.availableModes.filter((m) => m === "off")],
|
|
188638
|
+
optionLabels: modeLabelsOf(view.availableModes),
|
|
187955
188639
|
call: {
|
|
187956
188640
|
cap: "climate-control",
|
|
187957
188641
|
method: "setMode",
|
|
@@ -187979,6 +188663,7 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
187979
188663
|
label: t("Fan", "Ventola"),
|
|
187980
188664
|
current: slice.fanMode === "" ? null : slice.fanMode,
|
|
187981
188665
|
options: [...slice.availableFanModes],
|
|
188666
|
+
optionLabels: Object.fromEntries(slice.availableFanModes.map((m) => [m, fanLabelOf(m)])),
|
|
187982
188667
|
call: {
|
|
187983
188668
|
cap: "climate-control",
|
|
187984
188669
|
method: "setFanMode",
|
|
@@ -188004,14 +188689,15 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
188004
188689
|
if (fanControls.length > 0) rows.push({
|
|
188005
188690
|
id: "climate-fan",
|
|
188006
188691
|
icon: "fan",
|
|
188007
|
-
status: slice.fanMode === "" ? null : same(slice.fanMode),
|
|
188692
|
+
status: slice.fanMode === "" ? null : same$1(slice.fanMode),
|
|
188008
188693
|
controls: fanControls
|
|
188009
188694
|
});
|
|
188010
|
-
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)));
|
|
188695
|
+
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)));
|
|
188011
188696
|
const sceneMode = view.sceneMode;
|
|
188012
188697
|
return {
|
|
188013
188698
|
reading: reading("climate-control", view.isOff ? "off" : "on"),
|
|
188014
188699
|
title: view.modeLabel,
|
|
188700
|
+
...view.isOff || slice.fanMode === "" ? {} : { caption: t(`${view.modeLabel.en} · fan ${fanLabelOf(slice.fanMode).en}`, `${view.modeLabel.it} · ventola ${fanLabelOf(slice.fanMode).it}`) },
|
|
188015
188701
|
facts,
|
|
188016
188702
|
...left.length === 0 && right.length === 0 ? {} : { tiles: {
|
|
188017
188703
|
left,
|
|
@@ -188038,7 +188724,7 @@ var WATER_ON_PREFERENCE = [
|
|
|
188038
188724
|
"performance"
|
|
188039
188725
|
];
|
|
188040
188726
|
function capitalised(word) {
|
|
188041
|
-
return same(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
188727
|
+
return same$1(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
188042
188728
|
}
|
|
188043
188729
|
var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSchema, (slice) => {
|
|
188044
188730
|
if (slice === void 0 || slice.operationMode === null) return { reading: reading("climate-control", "unknown") };
|
|
@@ -188075,13 +188761,13 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
188075
188761
|
icon: "flame",
|
|
188076
188762
|
status: label,
|
|
188077
188763
|
controls: modeControls
|
|
188078
|
-
}, ...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))];
|
|
188764
|
+
}, ...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))];
|
|
188079
188765
|
const level = levelWithin(slice.targetTemp, range);
|
|
188080
188766
|
return {
|
|
188081
188767
|
reading: reading("climate-control", isOff ? "off" : "on"),
|
|
188082
188768
|
title: label,
|
|
188083
188769
|
facts: status === null ? [] : [fact("climate", "flame", status)],
|
|
188084
|
-
...slice.currentTemp === null ? {} : { tiles: { left: [tile("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
188770
|
+
...slice.currentTemp === null ? {} : { tiles: { left: [tile$1("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
188085
188771
|
scene: {
|
|
188086
188772
|
...isOff ? {} : { mode: "heat" },
|
|
188087
188773
|
...level === null ? {} : { level }
|
|
@@ -188099,11 +188785,12 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
188099
188785
|
var heatingValveContribution = contribution("heating-valve", HeatingValveStatusSchema, (slice) => {
|
|
188100
188786
|
const position = slice?.position ?? null;
|
|
188101
188787
|
if (position === null) return { reading: reading("sensor", "unknown") };
|
|
188102
|
-
const text = same(`${Math.round(position)}%`);
|
|
188788
|
+
const text = same$1(`${Math.round(position)}%`);
|
|
188103
188789
|
return {
|
|
188104
188790
|
reading: reading("sensor", position > 0 ? "running" : "idle"),
|
|
188105
188791
|
facts: [fact("valve", "gauge", t(`Valve ${text.en}`, `Valvola ${text.it}`))],
|
|
188106
|
-
tiles: { right: [tile("Valve", "Valvola", text.en)] },
|
|
188792
|
+
tiles: { right: [tile$1("Valve", "Valvola", text.en)] },
|
|
188793
|
+
...position > 0 ? { caption: t(`Heating · valve ${text.en}`, `Riscalda · valvola ${text.it}`) } : {},
|
|
188107
188794
|
scene: { level: position / 100 }
|
|
188108
188795
|
};
|
|
188109
188796
|
});
|
|
@@ -188112,9 +188799,9 @@ function sensorFragment(value, id, icon, en, it, text) {
|
|
|
188112
188799
|
if (value === null) return { reading: reading("sensor", "unknown") };
|
|
188113
188800
|
return {
|
|
188114
188801
|
reading: reading("sensor", "on"),
|
|
188115
|
-
title: same(text),
|
|
188116
|
-
facts: [fact(id, icon, same(text))],
|
|
188117
|
-
tiles: { right: [tile(en, it, text)] }
|
|
188802
|
+
title: same$1(text),
|
|
188803
|
+
facts: [fact(id, icon, same$1(text))],
|
|
188804
|
+
tiles: { right: [tile$1(en, it, text)] }
|
|
188118
188805
|
};
|
|
188119
188806
|
}
|
|
188120
188807
|
var temperatureContribution = contribution("temperature-sensor", TemperatureSensorStatusSchema, (slice) => sensorFragment(slice?.temperature ?? null, "temperature", "thermometer", "Temperature", "Temperatura", formatDegrees(slice?.temperature ?? 0)));
|
|
@@ -188169,8 +188856,8 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
188169
188856
|
return {
|
|
188170
188857
|
reading: reading("sensor", "on"),
|
|
188171
188858
|
...slice.aqi === void 0 ? {} : { title: airQualityWord(slice.aqi) },
|
|
188172
|
-
facts: parts.map((p) => fact("air-quality", "wind", same(`${p.label} ${p.value}`))),
|
|
188173
|
-
tiles: { right: parts.slice(0, 2).map((p) => tile(p.label, p.label, p.value)) }
|
|
188859
|
+
facts: parts.map((p) => fact("air-quality", "wind", same$1(`${p.label} ${p.value}`))),
|
|
188860
|
+
tiles: { right: parts.slice(0, 2).map((p) => tile$1(p.label, p.label, p.value)) }
|
|
188174
188861
|
};
|
|
188175
188862
|
}),
|
|
188176
188863
|
"carbon-monoxide": contribution("carbon-monoxide", CarbonMonoxideStatusSchema, (slice) => {
|
|
@@ -188185,15 +188872,270 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
188185
188872
|
"numeric-sensor": numericContribution,
|
|
188186
188873
|
"enum-sensor": enumContribution
|
|
188187
188874
|
};
|
|
188875
|
+
/**
|
|
188876
|
+
* The heat pump's contribution to a hero (D1026): the compressor scene, every
|
|
188877
|
+
* circuit as a row with its own label and icon, the powers as pills (the
|
|
188878
|
+
* instantaneous COP is "—" when it cannot be computed) and a "System" group with
|
|
188879
|
+
* one selector per mode. Values and their limits come from the slice, which the
|
|
188880
|
+
* gateway filled: a selector with no allowed value is not drawn, a missing
|
|
188881
|
+
* reading is never a 0 (D393).
|
|
188882
|
+
*/
|
|
188883
|
+
var CAP = "heat-pump-control";
|
|
188884
|
+
var same = (text) => t(text, text);
|
|
188885
|
+
/** The words of the values the gateway names; a value not listed is drawn as the gateway wrote it. */
|
|
188886
|
+
var VALUE_LABELS = {
|
|
188887
|
+
off: t("Off", "Off"),
|
|
188888
|
+
on: t("On", "On"),
|
|
188889
|
+
auto: t("Auto", "Auto"),
|
|
188890
|
+
manual: t("Manual", "Manuale"),
|
|
188891
|
+
low: t("Low", "Bassa"),
|
|
188892
|
+
high: t("High", "Alta"),
|
|
188893
|
+
eco: t("Eco", "Eco"),
|
|
188894
|
+
heat: t("Heat", "Caldo"),
|
|
188895
|
+
cool: t("Cool", "Freddo"),
|
|
188896
|
+
heatCool: t("Heat/cool", "Caldo/freddo"),
|
|
188897
|
+
ownprogram: t("Programme", "Programma")
|
|
188898
|
+
};
|
|
188899
|
+
function valueLabel(value) {
|
|
188900
|
+
const known = VALUE_LABELS[value];
|
|
188901
|
+
if (known !== void 0) return known;
|
|
188902
|
+
const holiday = /^hm(\d+)$/.exec(value);
|
|
188903
|
+
if (holiday?.[1] !== void 0) return t(`Programme ${holiday[1]}`, `Programma ${holiday[1]}`);
|
|
188904
|
+
return same(value);
|
|
188905
|
+
}
|
|
188906
|
+
function optionLabels(allowed) {
|
|
188907
|
+
return Object.fromEntries(allowed.map((value) => [value, valueLabel(value)]));
|
|
188908
|
+
}
|
|
188909
|
+
function picker(id, label, setting, method, args, valueArg = "mode") {
|
|
188910
|
+
return {
|
|
188911
|
+
kind: "picker",
|
|
188912
|
+
id,
|
|
188913
|
+
label,
|
|
188914
|
+
current: setting.value,
|
|
188915
|
+
options: [...setting.allowed],
|
|
188916
|
+
optionLabels: optionLabels(setting.allowed),
|
|
188917
|
+
call: {
|
|
188918
|
+
cap: CAP,
|
|
188919
|
+
method,
|
|
188920
|
+
args: { ...args }
|
|
188921
|
+
},
|
|
188922
|
+
valueArg
|
|
188923
|
+
};
|
|
188924
|
+
}
|
|
188925
|
+
/** A selector exists only where the gateway named values to choose from. */
|
|
188926
|
+
function choosable(setting) {
|
|
188927
|
+
return setting !== null && setting.allowed.length > 0;
|
|
188928
|
+
}
|
|
188929
|
+
function circuitControl(circuit) {
|
|
188930
|
+
const args = { circuitId: circuit.id };
|
|
188931
|
+
if (circuit.kind === "dhw" && choosable(circuit.temperatureLevel)) return picker(`heat-pump.${circuit.id}.level`, t("Level", "Livello"), circuit.temperatureLevel, "setDhwTemperatureLevel", args, "level");
|
|
188932
|
+
if (!choosable(circuit.operationMode)) return null;
|
|
188933
|
+
const method = circuit.kind === "dhw" ? "setDhwOperationMode" : "setCircuitOperationMode";
|
|
188934
|
+
return picker(`heat-pump.${circuit.id}.mode`, t("Mode", "Modalità"), circuit.operationMode, method, args);
|
|
188935
|
+
}
|
|
188936
|
+
/** A circuit with no reading is still a row: it shows that nothing is known, not nothing. */
|
|
188937
|
+
var UNKNOWN_STATUS = same("—");
|
|
188938
|
+
function circuitRow(circuit) {
|
|
188939
|
+
const control = circuitControl(circuit);
|
|
188940
|
+
const status = thermalStatusText(circuit.targetTemp, circuit.currentTemp) ?? UNKNOWN_STATUS;
|
|
188941
|
+
return {
|
|
188942
|
+
id: "circuit",
|
|
188943
|
+
label: same(circuit.label),
|
|
188944
|
+
icon: circuit.icon,
|
|
188945
|
+
status,
|
|
188946
|
+
controls: control === null ? [] : [control]
|
|
188947
|
+
};
|
|
188948
|
+
}
|
|
188949
|
+
var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
|
|
188950
|
+
/** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
|
|
188951
|
+
function copPill(cop) {
|
|
188952
|
+
if (cop === null) return {
|
|
188953
|
+
icon: "gauge",
|
|
188954
|
+
text: t("Instantaneous COP —", "COP istantaneo —"),
|
|
188955
|
+
tone: "muted"
|
|
188956
|
+
};
|
|
188957
|
+
const text = String(Number(cop.toFixed(1)));
|
|
188958
|
+
return {
|
|
188959
|
+
icon: "gauge",
|
|
188960
|
+
text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
|
|
188961
|
+
tone: "success"
|
|
188962
|
+
};
|
|
188963
|
+
}
|
|
188964
|
+
function powerPills(status) {
|
|
188965
|
+
const { thermalW, electricalW } = status.power;
|
|
188966
|
+
const pills = [];
|
|
188967
|
+
if (thermalW !== null) pills.push({
|
|
188968
|
+
icon: "flame",
|
|
188969
|
+
text: t(`Thermal ${kilowatts(thermalW)}`, `Termica ${kilowatts(thermalW)}`),
|
|
188970
|
+
tone: "muted"
|
|
188971
|
+
});
|
|
188972
|
+
if (electricalW !== null) pills.push({
|
|
188973
|
+
icon: "zap",
|
|
188974
|
+
text: t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
|
|
188975
|
+
tone: "muted"
|
|
188976
|
+
});
|
|
188977
|
+
pills.push(copPill(heatPumpInstantCop(status.power)));
|
|
188978
|
+
return pills;
|
|
188979
|
+
}
|
|
188980
|
+
/** The independent system modes, in the order the card draws them. */
|
|
188981
|
+
var SYSTEM_MODES = [
|
|
188982
|
+
{
|
|
188983
|
+
key: "silent",
|
|
188984
|
+
label: t("Silent", "Silenzioso"),
|
|
188985
|
+
icon: "volume-x",
|
|
188986
|
+
method: "setSilentMode"
|
|
188987
|
+
},
|
|
188988
|
+
{
|
|
188989
|
+
key: "away",
|
|
188990
|
+
label: t("Away", "Assente"),
|
|
188991
|
+
icon: "plane",
|
|
188992
|
+
method: "setAwayMode"
|
|
188993
|
+
},
|
|
188994
|
+
{
|
|
188995
|
+
key: "additionalHeater",
|
|
188996
|
+
label: t("Additional heater", "Riscaldatore aggiuntivo"),
|
|
188997
|
+
icon: "flame",
|
|
188998
|
+
method: "setAdditionalHeaterMode"
|
|
188999
|
+
},
|
|
189000
|
+
{
|
|
189001
|
+
key: "holiday",
|
|
189002
|
+
label: t("Holiday", "Vacanza"),
|
|
189003
|
+
icon: "tree-palm",
|
|
189004
|
+
method: "setHolidayMode"
|
|
189005
|
+
}
|
|
189006
|
+
];
|
|
189007
|
+
var SYSTEM_GROUP = t("System", "Sistema");
|
|
189008
|
+
var PROGRAMME = /^hm\d+$/;
|
|
189009
|
+
/**
|
|
189010
|
+
* Holiday is two segments, off / programme. Choosing "programme" keeps the programme
|
|
189011
|
+
* that is set, else the first one the gateway allowed, so a write never leaves
|
|
189012
|
+
* `allowed`. The full hm1..hm8 pick is not in the hero (D1026). A holiday whose values
|
|
189013
|
+
* are not programmes keeps the plain selector.
|
|
189014
|
+
*/
|
|
189015
|
+
function holidayRow(def, setting) {
|
|
189016
|
+
if (!setting.allowed.includes("off")) return null;
|
|
189017
|
+
const current = setting.value !== null && PROGRAMME.test(setting.value) ? setting.value : null;
|
|
189018
|
+
const programme = current ?? setting.allowed.find((v) => PROGRAMME.test(v));
|
|
189019
|
+
if (programme === void 0) return null;
|
|
189020
|
+
const control = picker("heat-pump.system.holiday", def.label, {
|
|
189021
|
+
value: setting.value,
|
|
189022
|
+
allowed: ["off", programme]
|
|
189023
|
+
}, def.method, {});
|
|
189024
|
+
const number = programme.slice(2);
|
|
189025
|
+
return {
|
|
189026
|
+
id: "system-mode",
|
|
189027
|
+
label: def.label,
|
|
189028
|
+
group: SYSTEM_GROUP,
|
|
189029
|
+
icon: def.icon,
|
|
189030
|
+
status: current === null ? null : t(`Programme ${number}`, `Programma ${number}`),
|
|
189031
|
+
controls: [control.kind === "picker" ? {
|
|
189032
|
+
...control,
|
|
189033
|
+
optionLabels: {
|
|
189034
|
+
off: t("Off", "Off"),
|
|
189035
|
+
[programme]: t("Programme", "Programma")
|
|
189036
|
+
}
|
|
189037
|
+
} : control]
|
|
189038
|
+
};
|
|
189039
|
+
}
|
|
189040
|
+
function systemRows(status) {
|
|
189041
|
+
const rows = [];
|
|
189042
|
+
for (const def of SYSTEM_MODES) {
|
|
189043
|
+
const setting = status.system[def.key];
|
|
189044
|
+
if (!choosable(setting)) continue;
|
|
189045
|
+
if (def.key === "holiday") {
|
|
189046
|
+
const holiday = holidayRow(def, setting);
|
|
189047
|
+
if (holiday !== null) {
|
|
189048
|
+
rows.push(holiday);
|
|
189049
|
+
continue;
|
|
189050
|
+
}
|
|
189051
|
+
}
|
|
189052
|
+
rows.push({
|
|
189053
|
+
id: "system-mode",
|
|
189054
|
+
label: def.label,
|
|
189055
|
+
group: SYSTEM_GROUP,
|
|
189056
|
+
icon: def.icon,
|
|
189057
|
+
status: null,
|
|
189058
|
+
controls: [picker(`heat-pump.system.${def.key}`, def.label, setting, def.method, {})]
|
|
189059
|
+
});
|
|
189060
|
+
}
|
|
189061
|
+
return rows;
|
|
189062
|
+
}
|
|
189063
|
+
function tile(en, it, value) {
|
|
189064
|
+
return {
|
|
189065
|
+
label: t(en, it),
|
|
189066
|
+
value: same(value)
|
|
189067
|
+
};
|
|
189068
|
+
}
|
|
189069
|
+
function tilesOf$1(status) {
|
|
189070
|
+
const { supply, return: back, outdoor } = status.temperatures;
|
|
189071
|
+
const left = [];
|
|
189072
|
+
const right = [];
|
|
189073
|
+
if (supply !== null) left.push(tile("Supply", "Mandata", formatDegrees(supply)));
|
|
189074
|
+
if (back !== null) left.push(tile("Return", "Ritorno", formatDegrees(back)));
|
|
189075
|
+
if (outdoor !== null) right.push(tile("Outdoor", "Esterna", formatDegrees(outdoor)));
|
|
189076
|
+
if (status.waterPressureBar !== null) right.push(tile("Pressure", "Pressione", `${Number(status.waterPressureBar.toFixed(1))} bar`));
|
|
189077
|
+
return {
|
|
189078
|
+
left,
|
|
189079
|
+
right
|
|
189080
|
+
};
|
|
189081
|
+
}
|
|
189082
|
+
function isRunning(status) {
|
|
189083
|
+
const { compressorPct, electricalW } = status.power;
|
|
189084
|
+
if (compressorPct !== null) return compressorPct > 0;
|
|
189085
|
+
if (electricalW !== null) return electricalW > 0;
|
|
189086
|
+
return null;
|
|
189087
|
+
}
|
|
189088
|
+
var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pump-status", HeatPumpStatusSchema, (slice) => {
|
|
189089
|
+
if (slice === void 0) return { reading: reading("climate-control", "unknown") };
|
|
189090
|
+
const running = isRunning(slice);
|
|
189091
|
+
const facts = [];
|
|
189092
|
+
if (slice.power.electricalW !== null) facts.push(fact("power", "zap", same(`${Math.round(slice.power.electricalW)} W`)));
|
|
189093
|
+
if (slice.power.compressorPct !== null) facts.push(fact("level", "gauge", t(`Compressor ${Math.round(slice.power.compressorPct)} %`, `Compressore ${Math.round(slice.power.compressorPct)} %`)));
|
|
189094
|
+
const charging = slice.circuits.find((c) => c.active === true);
|
|
189095
|
+
const tiles = tilesOf$1(slice);
|
|
189096
|
+
const pills = powerPills(slice);
|
|
189097
|
+
const rows = [
|
|
189098
|
+
...slice.circuits.map(circuitRow),
|
|
189099
|
+
...pills.length === 0 ? [] : [{
|
|
189100
|
+
id: "heat-pump-power",
|
|
189101
|
+
icon: "zap",
|
|
189102
|
+
status: null,
|
|
189103
|
+
controls: [],
|
|
189104
|
+
pills: [...pills]
|
|
189105
|
+
}],
|
|
189106
|
+
...systemRows(slice)
|
|
189107
|
+
];
|
|
189108
|
+
return {
|
|
189109
|
+
reading: reading("climate-control", running === true ? "running" : running === false ? "idle" : "on"),
|
|
189110
|
+
title: t("Heat pump", "Pompa di calore"),
|
|
189111
|
+
...charging === void 0 ? {} : { caption: t(`${charging.label} · heating`.toUpperCase(), `${charging.label} · in riscaldamento`.toUpperCase()) },
|
|
189112
|
+
facts,
|
|
189113
|
+
...tiles.left.length === 0 && tiles.right.length === 0 ? {} : { tiles },
|
|
189114
|
+
...slice.power.electricalW === null ? {} : { consumption: {
|
|
189115
|
+
priority: 1,
|
|
189116
|
+
slot: {
|
|
189117
|
+
kind: "power",
|
|
189118
|
+
watts: slice.power.electricalW,
|
|
189119
|
+
detail: slice.power.thermalW === null ? [] : [{
|
|
189120
|
+
label: t("Thermal", "Termica"),
|
|
189121
|
+
value: Math.round(slice.power.thermalW),
|
|
189122
|
+
unit: "W"
|
|
189123
|
+
}]
|
|
189124
|
+
}
|
|
189125
|
+
} },
|
|
189126
|
+
rows
|
|
189127
|
+
};
|
|
189128
|
+
}) };
|
|
188188
189129
|
[
|
|
188189
189130
|
...Object.values(ACCESS_FAMILY_CONTRIBUTIONS),
|
|
188190
189131
|
...Object.values(DEVICES_FAMILY_CONTRIBUTIONS),
|
|
188191
189132
|
...Object.values(GROUPS_FAMILY_CONTRIBUTIONS),
|
|
188192
189133
|
...Object.values(ACTUATORS_FAMILY_CONTRIBUTIONS),
|
|
188193
189134
|
...Object.values(SENSORS_FAMILY_CONTRIBUTIONS),
|
|
188194
|
-
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS)
|
|
189135
|
+
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
|
|
189136
|
+
...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
|
|
188195
189137
|
];
|
|
188196
|
-
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;
|
|
189138
|
+
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;
|
|
188197
189139
|
/**
|
|
188198
189140
|
* Who looks like what (D1023). One look per {@link DeviceType}, refined by a
|
|
188199
189141
|
* {@link DeviceRole} where the role changes how the device reads (a leak
|
|
@@ -188583,7 +189525,7 @@ lookOf({
|
|
|
188583
189525
|
({ ...lookOf({
|
|
188584
189526
|
icon: "shield-check",
|
|
188585
189527
|
on: [
|
|
188586
|
-
"
|
|
189528
|
+
"danger",
|
|
188587
189529
|
"glow",
|
|
188588
189530
|
"halo"
|
|
188589
189531
|
],
|
|
@@ -188821,8 +189763,24 @@ lookOf({
|
|
|
188821
189763
|
idle: INFO,
|
|
188822
189764
|
standby: MUTED
|
|
188823
189765
|
});
|
|
189766
|
+
lookOf({
|
|
189767
|
+
icon: "thermometer-sun",
|
|
189768
|
+
on: [
|
|
189769
|
+
"warning",
|
|
189770
|
+
"heat-rise",
|
|
189771
|
+
"rise"
|
|
189772
|
+
],
|
|
189773
|
+
off: MUTED,
|
|
189774
|
+
running: [
|
|
189775
|
+
"warning",
|
|
189776
|
+
"heat-rise",
|
|
189777
|
+
"rise"
|
|
189778
|
+
],
|
|
189779
|
+
idle: INFO,
|
|
189780
|
+
standby: MUTED
|
|
189781
|
+
});
|
|
188824
189782
|
DeviceType.Climate, DeviceType.Thermostat;
|
|
188825
|
-
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;
|
|
189783
|
+
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;
|
|
188826
189784
|
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;
|
|
188827
189785
|
Object.freeze({
|
|
188828
189786
|
"accessories.getStatus": {
|
|
@@ -189203,13 +190161,6 @@ Object.freeze({
|
|
|
189203
190161
|
access: "view",
|
|
189204
190162
|
role: "admin"
|
|
189205
190163
|
},
|
|
189206
|
-
"addonSettings.getIntegrationFormSchema": {
|
|
189207
|
-
capName: "addon-settings",
|
|
189208
|
-
capScope: "system",
|
|
189209
|
-
addonId: null,
|
|
189210
|
-
access: "view",
|
|
189211
|
-
role: "admin"
|
|
189212
|
-
},
|
|
189213
190164
|
"addonSettings.getScopedSettings": {
|
|
189214
190165
|
capName: "addon-settings",
|
|
189215
190166
|
capScope: "system",
|
|
@@ -190995,6 +191946,13 @@ Object.freeze({
|
|
|
190995
191946
|
access: "create",
|
|
190996
191947
|
role: "admin"
|
|
190997
191948
|
},
|
|
191949
|
+
"deviceManager.checkDeviceTemplates": {
|
|
191950
|
+
capName: "device-manager",
|
|
191951
|
+
capScope: "system",
|
|
191952
|
+
addonId: null,
|
|
191953
|
+
access: "view",
|
|
191954
|
+
role: "admin"
|
|
191955
|
+
},
|
|
190998
191956
|
"deviceManager.cleanupDeletedDevicesData": {
|
|
190999
191957
|
capName: "device-manager",
|
|
191000
191958
|
capScope: "system",
|
|
@@ -191394,6 +192352,13 @@ Object.freeze({
|
|
|
191394
192352
|
access: "create",
|
|
191395
192353
|
role: "admin"
|
|
191396
192354
|
},
|
|
192355
|
+
"deviceManager.renderDeviceTemplates": {
|
|
192356
|
+
capName: "device-manager",
|
|
192357
|
+
capScope: "system",
|
|
192358
|
+
addonId: null,
|
|
192359
|
+
access: "view",
|
|
192360
|
+
role: "admin"
|
|
192361
|
+
},
|
|
191397
192362
|
"deviceManager.reportDiscoveryObservations": {
|
|
191398
192363
|
capName: "device-manager",
|
|
191399
192364
|
capScope: "system",
|
|
@@ -192325,6 +193290,111 @@ Object.freeze({
|
|
|
192325
193290
|
access: "view",
|
|
192326
193291
|
role: "viewer"
|
|
192327
193292
|
},
|
|
193293
|
+
"heatPumpControl.setAdditionalHeaterMode": {
|
|
193294
|
+
capName: "heat-pump-control",
|
|
193295
|
+
capScope: "device",
|
|
193296
|
+
addonId: null,
|
|
193297
|
+
access: "create",
|
|
193298
|
+
role: "viewer"
|
|
193299
|
+
},
|
|
193300
|
+
"heatPumpControl.setAwayMode": {
|
|
193301
|
+
capName: "heat-pump-control",
|
|
193302
|
+
capScope: "device",
|
|
193303
|
+
addonId: null,
|
|
193304
|
+
access: "create",
|
|
193305
|
+
role: "viewer"
|
|
193306
|
+
},
|
|
193307
|
+
"heatPumpControl.setCircuitComfortSetpoint": {
|
|
193308
|
+
capName: "heat-pump-control",
|
|
193309
|
+
capScope: "device",
|
|
193310
|
+
addonId: null,
|
|
193311
|
+
access: "create",
|
|
193312
|
+
role: "viewer"
|
|
193313
|
+
},
|
|
193314
|
+
"heatPumpControl.setCircuitEcoSetpoint": {
|
|
193315
|
+
capName: "heat-pump-control",
|
|
193316
|
+
capScope: "device",
|
|
193317
|
+
addonId: null,
|
|
193318
|
+
access: "create",
|
|
193319
|
+
role: "viewer"
|
|
193320
|
+
},
|
|
193321
|
+
"heatPumpControl.setCircuitHeatCoolMode": {
|
|
193322
|
+
capName: "heat-pump-control",
|
|
193323
|
+
capScope: "device",
|
|
193324
|
+
addonId: null,
|
|
193325
|
+
access: "create",
|
|
193326
|
+
role: "viewer"
|
|
193327
|
+
},
|
|
193328
|
+
"heatPumpControl.setCircuitMaxFlowTemp": {
|
|
193329
|
+
capName: "heat-pump-control",
|
|
193330
|
+
capScope: "device",
|
|
193331
|
+
addonId: null,
|
|
193332
|
+
access: "create",
|
|
193333
|
+
role: "viewer"
|
|
193334
|
+
},
|
|
193335
|
+
"heatPumpControl.setCircuitOperationMode": {
|
|
193336
|
+
capName: "heat-pump-control",
|
|
193337
|
+
capScope: "device",
|
|
193338
|
+
addonId: null,
|
|
193339
|
+
access: "create",
|
|
193340
|
+
role: "viewer"
|
|
193341
|
+
},
|
|
193342
|
+
"heatPumpControl.setCircuitSummerWinter": {
|
|
193343
|
+
capName: "heat-pump-control",
|
|
193344
|
+
capScope: "device",
|
|
193345
|
+
addonId: null,
|
|
193346
|
+
access: "create",
|
|
193347
|
+
role: "viewer"
|
|
193348
|
+
},
|
|
193349
|
+
"heatPumpControl.setDhwChargeDuration": {
|
|
193350
|
+
capName: "heat-pump-control",
|
|
193351
|
+
capScope: "device",
|
|
193352
|
+
addonId: null,
|
|
193353
|
+
access: "create",
|
|
193354
|
+
role: "viewer"
|
|
193355
|
+
},
|
|
193356
|
+
"heatPumpControl.setDhwOperationMode": {
|
|
193357
|
+
capName: "heat-pump-control",
|
|
193358
|
+
capScope: "device",
|
|
193359
|
+
addonId: null,
|
|
193360
|
+
access: "create",
|
|
193361
|
+
role: "viewer"
|
|
193362
|
+
},
|
|
193363
|
+
"heatPumpControl.setDhwTemperatureLevel": {
|
|
193364
|
+
capName: "heat-pump-control",
|
|
193365
|
+
capScope: "device",
|
|
193366
|
+
addonId: null,
|
|
193367
|
+
access: "create",
|
|
193368
|
+
role: "viewer"
|
|
193369
|
+
},
|
|
193370
|
+
"heatPumpControl.setHolidayMode": {
|
|
193371
|
+
capName: "heat-pump-control",
|
|
193372
|
+
capScope: "device",
|
|
193373
|
+
addonId: null,
|
|
193374
|
+
access: "create",
|
|
193375
|
+
role: "viewer"
|
|
193376
|
+
},
|
|
193377
|
+
"heatPumpControl.setSilentMode": {
|
|
193378
|
+
capName: "heat-pump-control",
|
|
193379
|
+
capScope: "device",
|
|
193380
|
+
addonId: null,
|
|
193381
|
+
access: "create",
|
|
193382
|
+
role: "viewer"
|
|
193383
|
+
},
|
|
193384
|
+
"heatPumpControl.startExtraHotWater": {
|
|
193385
|
+
capName: "heat-pump-control",
|
|
193386
|
+
capScope: "device",
|
|
193387
|
+
addonId: null,
|
|
193388
|
+
access: "create",
|
|
193389
|
+
role: "viewer"
|
|
193390
|
+
},
|
|
193391
|
+
"heatPumpStatus.getStatus": {
|
|
193392
|
+
capName: "heat-pump-status",
|
|
193393
|
+
capScope: "device",
|
|
193394
|
+
addonId: null,
|
|
193395
|
+
access: "view",
|
|
193396
|
+
role: "viewer"
|
|
193397
|
+
},
|
|
192328
193398
|
"heroLayout.getHeroModel": {
|
|
192329
193399
|
capName: "hero-layout",
|
|
192330
193400
|
capScope: "system",
|
|
@@ -194082,13 +195152,6 @@ Object.freeze({
|
|
|
194082
195152
|
access: "create",
|
|
194083
195153
|
role: "admin"
|
|
194084
195154
|
},
|
|
194085
|
-
"notificationRules.createSequence": {
|
|
194086
|
-
capName: "notification-rules",
|
|
194087
|
-
capScope: "system",
|
|
194088
|
-
addonId: null,
|
|
194089
|
-
access: "create",
|
|
194090
|
-
role: "admin"
|
|
194091
|
-
},
|
|
194092
195155
|
"notificationRules.createSnooze": {
|
|
194093
195156
|
capName: "notification-rules",
|
|
194094
195157
|
capScope: "system",
|
|
@@ -194110,13 +195173,6 @@ Object.freeze({
|
|
|
194110
195173
|
access: "delete",
|
|
194111
195174
|
role: "admin"
|
|
194112
195175
|
},
|
|
194113
|
-
"notificationRules.deleteSequence": {
|
|
194114
|
-
capName: "notification-rules",
|
|
194115
|
-
capScope: "system",
|
|
194116
|
-
addonId: null,
|
|
194117
|
-
access: "delete",
|
|
194118
|
-
role: "admin"
|
|
194119
|
-
},
|
|
194120
195176
|
"notificationRules.getAlarmConfig": {
|
|
194121
195177
|
capName: "notification-rules",
|
|
194122
195178
|
capScope: "system",
|
|
@@ -194166,13 +195222,6 @@ Object.freeze({
|
|
|
194166
195222
|
access: "view",
|
|
194167
195223
|
role: "admin"
|
|
194168
195224
|
},
|
|
194169
|
-
"notificationRules.getSequence": {
|
|
194170
|
-
capName: "notification-rules",
|
|
194171
|
-
capScope: "system",
|
|
194172
|
-
addonId: null,
|
|
194173
|
-
access: "view",
|
|
194174
|
-
role: "admin"
|
|
194175
|
-
},
|
|
194176
195225
|
"notificationRules.getTemplateCatalog": {
|
|
194177
195226
|
capName: "notification-rules",
|
|
194178
195227
|
capScope: "system",
|
|
@@ -194194,13 +195243,6 @@ Object.freeze({
|
|
|
194194
195243
|
access: "view",
|
|
194195
195244
|
role: "admin"
|
|
194196
195245
|
},
|
|
194197
|
-
"notificationRules.listSequences": {
|
|
194198
|
-
capName: "notification-rules",
|
|
194199
|
-
capScope: "system",
|
|
194200
|
-
addonId: null,
|
|
194201
|
-
access: "view",
|
|
194202
|
-
role: "admin"
|
|
194203
|
-
},
|
|
194204
195246
|
"notificationRules.listSnoozes": {
|
|
194205
195247
|
capName: "notification-rules",
|
|
194206
195248
|
capScope: "system",
|
|
@@ -194271,13 +195313,6 @@ Object.freeze({
|
|
|
194271
195313
|
access: "create",
|
|
194272
195314
|
role: "admin"
|
|
194273
195315
|
},
|
|
194274
|
-
"notificationRules.updateSequence": {
|
|
194275
|
-
capName: "notification-rules",
|
|
194276
|
-
capScope: "system",
|
|
194277
|
-
addonId: null,
|
|
194278
|
-
access: "create",
|
|
194279
|
-
role: "admin"
|
|
194280
|
-
},
|
|
194281
195316
|
"notifier.cancel": {
|
|
194282
195317
|
capName: "notifier",
|
|
194283
195318
|
capScope: "device",
|
|
@@ -194362,21 +195397,21 @@ Object.freeze({
|
|
|
194362
195397
|
access: "view",
|
|
194363
195398
|
role: "admin"
|
|
194364
195399
|
},
|
|
194365
|
-
"osdManager.
|
|
195400
|
+
"osdManager.listTemplates": {
|
|
194366
195401
|
capName: "osd-manager",
|
|
194367
195402
|
capScope: "system",
|
|
194368
195403
|
addonId: null,
|
|
194369
195404
|
access: "view",
|
|
194370
195405
|
role: "admin"
|
|
194371
195406
|
},
|
|
194372
|
-
"osdManager.
|
|
195407
|
+
"osdManager.previewSlot": {
|
|
194373
195408
|
capName: "osd-manager",
|
|
194374
195409
|
capScope: "system",
|
|
194375
195410
|
addonId: null,
|
|
194376
|
-
access: "
|
|
195411
|
+
access: "create",
|
|
194377
195412
|
role: "admin"
|
|
194378
195413
|
},
|
|
194379
|
-
"osdManager.
|
|
195414
|
+
"osdManager.previewTemplate": {
|
|
194380
195415
|
capName: "osd-manager",
|
|
194381
195416
|
capScope: "system",
|
|
194382
195417
|
addonId: null,
|
|
@@ -197232,13 +198267,6 @@ Object.freeze({
|
|
|
197232
198267
|
access: "create",
|
|
197233
198268
|
role: "admin"
|
|
197234
198269
|
},
|
|
197235
|
-
"smtpProvider.verify": {
|
|
197236
|
-
capName: "smtp-provider",
|
|
197237
|
-
capScope: "system",
|
|
197238
|
-
addonId: null,
|
|
197239
|
-
access: "view",
|
|
197240
|
-
role: "admin"
|
|
197241
|
-
},
|
|
197242
198270
|
"snapshot.applyDeviceSettingsPatch": {
|
|
197243
198271
|
capName: "snapshot",
|
|
197244
198272
|
capScope: "device",
|
|
@@ -199171,8 +200199,26 @@ function projectAction(cap, action) {
|
|
|
199171
200199
|
};
|
|
199172
200200
|
}
|
|
199173
200201
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
199174
|
-
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;
|
|
200202
|
+
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;
|
|
199175
200203
|
DeviceFeature.BatteryOperated;
|
|
200204
|
+
function bound(cap, methods = [], authority = "reported") {
|
|
200205
|
+
return {
|
|
200206
|
+
kind: "cap",
|
|
200207
|
+
cap,
|
|
200208
|
+
methods,
|
|
200209
|
+
authority
|
|
200210
|
+
};
|
|
200211
|
+
}
|
|
200212
|
+
function derived(cap, methods = []) {
|
|
200213
|
+
return bound(cap, methods, "derived");
|
|
200214
|
+
}
|
|
200215
|
+
DeviceFeature.BatteryOperated, DeviceFeature.Rebootable, derived("reboot", ["reboot"]), DeviceFeature.Resyncable, DeviceFeature.NativeSnapshot, DeviceFeature.DoorbellButton, derived("doorbell"), DeviceFeature.TwoWayAudio, derived("intercom", [
|
|
200216
|
+
"startTalkSession",
|
|
200217
|
+
"pushTalkAudio",
|
|
200218
|
+
"endTalkSession"
|
|
200219
|
+
]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockPinRequired, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.AlarmPinRequired, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasMap, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasMap, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
|
|
200220
|
+
var ALL_FEATURES = Object.values(DeviceFeature);
|
|
200221
|
+
new Set(ALL_FEATURES);
|
|
199176
200222
|
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
199177
200223
|
var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
|
|
199178
200224
|
var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
|
|
@@ -199364,7 +200410,6 @@ function createRuntimeStateBridge(params) {
|
|
|
199364
200410
|
getStatus
|
|
199365
200411
|
};
|
|
199366
200412
|
}
|
|
199367
|
-
string().min(1).max(4096);
|
|
199368
200413
|
Object.freeze({
|
|
199369
200414
|
"accessories.getStatus": [{
|
|
199370
200415
|
name: "deviceId",
|
|
@@ -200447,6 +201492,81 @@ Object.freeze({
|
|
|
200447
201492
|
form: "single",
|
|
200448
201493
|
optional: false
|
|
200449
201494
|
}],
|
|
201495
|
+
"heatPumpControl.setAdditionalHeaterMode": [{
|
|
201496
|
+
name: "deviceId",
|
|
201497
|
+
form: "single",
|
|
201498
|
+
optional: false
|
|
201499
|
+
}],
|
|
201500
|
+
"heatPumpControl.setAwayMode": [{
|
|
201501
|
+
name: "deviceId",
|
|
201502
|
+
form: "single",
|
|
201503
|
+
optional: false
|
|
201504
|
+
}],
|
|
201505
|
+
"heatPumpControl.setCircuitComfortSetpoint": [{
|
|
201506
|
+
name: "deviceId",
|
|
201507
|
+
form: "single",
|
|
201508
|
+
optional: false
|
|
201509
|
+
}],
|
|
201510
|
+
"heatPumpControl.setCircuitEcoSetpoint": [{
|
|
201511
|
+
name: "deviceId",
|
|
201512
|
+
form: "single",
|
|
201513
|
+
optional: false
|
|
201514
|
+
}],
|
|
201515
|
+
"heatPumpControl.setCircuitHeatCoolMode": [{
|
|
201516
|
+
name: "deviceId",
|
|
201517
|
+
form: "single",
|
|
201518
|
+
optional: false
|
|
201519
|
+
}],
|
|
201520
|
+
"heatPumpControl.setCircuitMaxFlowTemp": [{
|
|
201521
|
+
name: "deviceId",
|
|
201522
|
+
form: "single",
|
|
201523
|
+
optional: false
|
|
201524
|
+
}],
|
|
201525
|
+
"heatPumpControl.setCircuitOperationMode": [{
|
|
201526
|
+
name: "deviceId",
|
|
201527
|
+
form: "single",
|
|
201528
|
+
optional: false
|
|
201529
|
+
}],
|
|
201530
|
+
"heatPumpControl.setCircuitSummerWinter": [{
|
|
201531
|
+
name: "deviceId",
|
|
201532
|
+
form: "single",
|
|
201533
|
+
optional: false
|
|
201534
|
+
}],
|
|
201535
|
+
"heatPumpControl.setDhwChargeDuration": [{
|
|
201536
|
+
name: "deviceId",
|
|
201537
|
+
form: "single",
|
|
201538
|
+
optional: false
|
|
201539
|
+
}],
|
|
201540
|
+
"heatPumpControl.setDhwOperationMode": [{
|
|
201541
|
+
name: "deviceId",
|
|
201542
|
+
form: "single",
|
|
201543
|
+
optional: false
|
|
201544
|
+
}],
|
|
201545
|
+
"heatPumpControl.setDhwTemperatureLevel": [{
|
|
201546
|
+
name: "deviceId",
|
|
201547
|
+
form: "single",
|
|
201548
|
+
optional: false
|
|
201549
|
+
}],
|
|
201550
|
+
"heatPumpControl.setHolidayMode": [{
|
|
201551
|
+
name: "deviceId",
|
|
201552
|
+
form: "single",
|
|
201553
|
+
optional: false
|
|
201554
|
+
}],
|
|
201555
|
+
"heatPumpControl.setSilentMode": [{
|
|
201556
|
+
name: "deviceId",
|
|
201557
|
+
form: "single",
|
|
201558
|
+
optional: false
|
|
201559
|
+
}],
|
|
201560
|
+
"heatPumpControl.startExtraHotWater": [{
|
|
201561
|
+
name: "deviceId",
|
|
201562
|
+
form: "single",
|
|
201563
|
+
optional: false
|
|
201564
|
+
}],
|
|
201565
|
+
"heatPumpStatus.getStatus": [{
|
|
201566
|
+
name: "deviceId",
|
|
201567
|
+
form: "single",
|
|
201568
|
+
optional: false
|
|
201569
|
+
}],
|
|
200450
201570
|
"heroLayout.getHeroModel": [{
|
|
200451
201571
|
name: "deviceId",
|
|
200452
201572
|
form: "single",
|
|
@@ -200906,12 +202026,12 @@ Object.freeze({
|
|
|
200906
202026
|
form: "single",
|
|
200907
202027
|
optional: false
|
|
200908
202028
|
}],
|
|
200909
|
-
"osdManager.
|
|
202029
|
+
"osdManager.previewSlot": [{
|
|
200910
202030
|
name: "deviceId",
|
|
200911
202031
|
form: "single",
|
|
200912
202032
|
optional: false
|
|
200913
202033
|
}],
|
|
200914
|
-
"osdManager.
|
|
202034
|
+
"osdManager.previewTemplate": [{
|
|
200915
202035
|
name: "deviceId",
|
|
200916
202036
|
form: "single",
|
|
200917
202037
|
optional: false
|