@camstack/types 1.2.533 → 1.2.535
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 +33 -0
- package/dist/addon/base-addon.d.ts +1 -20
- package/dist/addon/notification-targets.d.ts +34 -9
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/addon-settings.cap.d.ts +0 -41
- package/dist/capabilities/capability-definition.d.ts +26 -2
- package/dist/capabilities/heat-pump-control.cap.d.ts +83 -0
- package/dist/capabilities/heat-pump-status.cap.d.ts +517 -0
- package/dist/capabilities/hero-layout.cap.d.ts +46 -0
- package/dist/capabilities/index.d.ts +5 -1
- package/dist/capabilities/integration-instances.cap.d.ts +22 -7
- package/dist/capabilities/integrations.cap.d.ts +13 -0
- package/dist/capabilities/smtp-provider.cap.d.ts +2 -10
- package/dist/client.js +24 -7
- package/dist/client.mjs +24 -7
- package/dist/{composition-BjHGoicU.js → composition-BxalDSTt.js} +1 -1
- package/dist/{composition-CXCX78IR.mjs → composition-C6TZGqUb.mjs} +1 -1
- package/dist/device/cap-vocabulary/entries/heat-pump.d.ts +4 -0
- package/dist/device/device-type.d.ts +5 -1
- package/dist/device/hero/build-hero-model.d.ts +2 -0
- package/dist/device/hero/climate-view.d.ts +4 -0
- package/dist/device/hero/hero-contributions-heat-pump.d.ts +2 -0
- package/dist/device/hero/hero-fragment.d.ts +4 -0
- package/dist/device/hero/hero-layout.d.ts +1 -0
- package/dist/device/hero/hero-look.d.ts +6 -0
- package/dist/device/hero/hero-model.d.ts +80 -1
- package/dist/device/hero/hero-row.d.ts +5 -0
- package/dist/device/hero/hero-scene.d.ts +4 -1
- package/dist/device/hero/index.d.ts +1 -1
- package/dist/{device-type-BaYa0UGS.js → device-type-BfvqqzRp.js} +4 -0
- package/dist/{device-type-CbDhVwFP.mjs → device-type-DTTZKB2I.mjs} +4 -0
- package/dist/generated/addon-api.d.ts +122 -17
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/capability-router-map.d.ts +8 -2
- package/dist/generated/customize-catalog.d.ts +1 -1
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +5 -0
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +2 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/i18n/camstack-error.d.ts +8 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1580 -208
- package/dist/index.mjs +1560 -208
- package/dist/interfaces/addon.d.ts +0 -6
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-ComzlWyT.js → sleep-CCAQ_PEp.js} +278 -99
- package/dist/{sleep-CS5Xp1iQ.mjs → sleep-DnVqHJc4.mjs} +267 -100
- package/package.json +1 -1
- package/dist/addon/integration-instance-ref.d.ts +0 -21
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-CCAQ_PEp.js");
|
|
3
3
|
const require_event_category = require("./event-category-BC4RRerT.js");
|
|
4
|
-
const require_device_type = require("./device-type-
|
|
5
|
-
const require_composition = require("./composition-
|
|
4
|
+
const require_device_type = require("./device-type-BfvqqzRp.js");
|
|
5
|
+
const require_composition = require("./composition-BxalDSTt.js");
|
|
6
6
|
const require_node_color = require("./node-color.js");
|
|
7
7
|
const require_convert = require("./convert-BmtM6K-5.js");
|
|
8
8
|
const require_enums = require("./enums.js");
|
|
@@ -410,27 +410,6 @@ function describeUnmet(unmet) {
|
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
|
-
//#region src/addon/integration-instance-ref.ts
|
|
414
|
-
/**
|
|
415
|
-
* Which integration instance a settings form is for. An addon that serves several instances
|
|
416
|
-
* (`instanceMode: multiple`) can show a different form per instance — an NVR integration
|
|
417
|
-
* needs its connection, the default integration needs the addon's own sections.
|
|
418
|
-
*
|
|
419
|
-
* - `integrationId` is `null` in the create wizard: nothing exists yet, the operator is
|
|
420
|
-
* setting up a NEW instance.
|
|
421
|
-
* - `mode` is the wizard mode of the integration type (`getAvailableTypes`).
|
|
422
|
-
* - `candidateStableId` is the discovery candidate a wizard was seeded from, if any.
|
|
423
|
-
*/
|
|
424
|
-
var IntegrationInstanceRefSchema = zod.z.object({
|
|
425
|
-
integrationId: zod.z.string().nullable(),
|
|
426
|
-
mode: zod.z.enum([
|
|
427
|
-
"standalone",
|
|
428
|
-
"account",
|
|
429
|
-
"broker"
|
|
430
|
-
]),
|
|
431
|
-
candidateStableId: zod.z.string().optional()
|
|
432
|
-
});
|
|
433
|
-
//#endregion
|
|
434
413
|
//#region src/addon/build-addon-route-provider.ts
|
|
435
414
|
/**
|
|
436
415
|
* Build an `IAddonRouteProvider` from a list of routes. Implements
|
|
@@ -875,8 +854,8 @@ function composeInstanceKinds(parts, base) {
|
|
|
875
854
|
instanceFormSchema: async ({ id, kind }) => {
|
|
876
855
|
return (id === null ? byKind(kind) : await holderOf(id)).provider.instanceFormSchema({ id });
|
|
877
856
|
},
|
|
878
|
-
listInstances: async () => {
|
|
879
|
-
return (await Promise.all(parts.map(async (part) => (await part.provider.listInstances()).map((instance) => tagged(part, instance))))).flat();
|
|
857
|
+
listInstances: async (input) => {
|
|
858
|
+
return (await Promise.all(parts.map(async (part) => (await part.provider.listInstances(input)).map((instance) => tagged(part, instance))))).flat();
|
|
880
859
|
},
|
|
881
860
|
getInstance: async ({ id }) => {
|
|
882
861
|
for (const part of parts) {
|
|
@@ -1678,6 +1657,105 @@ function notificationTargetParts(records, spec) {
|
|
|
1678
1657
|
}];
|
|
1679
1658
|
});
|
|
1680
1659
|
}
|
|
1660
|
+
/** The body key that names the user a PERSONAL target belongs to (the open blob, no schema change). */
|
|
1661
|
+
var TARGET_OWNER_KEY = "ownerUserId";
|
|
1662
|
+
/**
|
|
1663
|
+
* The authorisation of a target as the instance door sees it. An admin (and an in-process caller
|
|
1664
|
+
* that holds no session) keeps the admin door: every target, any change. A user sees and changes
|
|
1665
|
+
* only the targets whose `ownerUserId` is theirs, and a target with no owner (a global target the
|
|
1666
|
+
* operator made) is nobody's. Nothing a client sends moves the owner of a user's target: the
|
|
1667
|
+
* server stamps it from the caller.
|
|
1668
|
+
*/
|
|
1669
|
+
function scopeInstancesToCaller(inner, logger) {
|
|
1670
|
+
const ownerOf = (instance) => instance.formValues[TARGET_OWNER_KEY];
|
|
1671
|
+
const owned = (instance, userId) => instance !== null && ownerOf(instance) === userId;
|
|
1672
|
+
const requireOwned = async (id, userId) => {
|
|
1673
|
+
if (!owned(await inner.getInstance({ id }), userId)) throw require_sleep.forbiddenError(`target not owned: ${id}`);
|
|
1674
|
+
};
|
|
1675
|
+
/** The user's own values: whatever the client sent for the owner is dropped and re-stamped. */
|
|
1676
|
+
const stamped = (values, userId) => ({
|
|
1677
|
+
...values,
|
|
1678
|
+
[TARGET_OWNER_KEY]: userId
|
|
1679
|
+
});
|
|
1680
|
+
const userOnly = (caller) => caller !== void 0 && !caller.isAdmin ? caller : void 0;
|
|
1681
|
+
const test = inner.testInstance?.bind(inner);
|
|
1682
|
+
return {
|
|
1683
|
+
...inner,
|
|
1684
|
+
describe: async () => ({
|
|
1685
|
+
...await inner.describe(),
|
|
1686
|
+
userScoped: true
|
|
1687
|
+
}),
|
|
1688
|
+
listInstances: async (input) => {
|
|
1689
|
+
const all = await inner.listInstances(input);
|
|
1690
|
+
const user = input?.["mine"] === true ? input.caller : userOnly(input?.caller);
|
|
1691
|
+
return user === void 0 ? all : all.filter((instance) => owned(instance, user.userId));
|
|
1692
|
+
},
|
|
1693
|
+
getInstance: async (input) => {
|
|
1694
|
+
const found = await inner.getInstance(input);
|
|
1695
|
+
const user = userOnly(input.caller);
|
|
1696
|
+
return user === void 0 || owned(found, user.userId) ? found : null;
|
|
1697
|
+
},
|
|
1698
|
+
createInstance: async (input) => {
|
|
1699
|
+
const user = userOnly(input.caller);
|
|
1700
|
+
if (user === void 0) return inner.createInstance(input);
|
|
1701
|
+
const { id: _id, seed: _seed, ...rest } = input;
|
|
1702
|
+
const created = await inner.createInstance({
|
|
1703
|
+
...rest,
|
|
1704
|
+
values: stamped(input.values, user.userId)
|
|
1705
|
+
});
|
|
1706
|
+
logger.info("notification target created", { meta: {
|
|
1707
|
+
targetId: created.id,
|
|
1708
|
+
owner: user.userId
|
|
1709
|
+
} });
|
|
1710
|
+
return created;
|
|
1711
|
+
},
|
|
1712
|
+
updateInstance: async (input) => {
|
|
1713
|
+
const user = userOnly(input.caller);
|
|
1714
|
+
if (user === void 0) return inner.updateInstance(input);
|
|
1715
|
+
await requireOwned(input.id, user.userId);
|
|
1716
|
+
const updated = await inner.updateInstance({
|
|
1717
|
+
...input,
|
|
1718
|
+
values: stamped(input.values, user.userId)
|
|
1719
|
+
});
|
|
1720
|
+
logger.info("notification target updated", { meta: {
|
|
1721
|
+
targetId: input.id,
|
|
1722
|
+
owner: user.userId
|
|
1723
|
+
} });
|
|
1724
|
+
return updated;
|
|
1725
|
+
},
|
|
1726
|
+
setInstanceEnabled: async (input) => {
|
|
1727
|
+
const user = userOnly(input.caller);
|
|
1728
|
+
if (user === void 0) return inner.setInstanceEnabled(input);
|
|
1729
|
+
await requireOwned(input.id, user.userId);
|
|
1730
|
+
const switched = await inner.setInstanceEnabled(input);
|
|
1731
|
+
logger.info("notification target switched", { meta: {
|
|
1732
|
+
targetId: input.id,
|
|
1733
|
+
owner: user.userId,
|
|
1734
|
+
enabled: input.enabled
|
|
1735
|
+
} });
|
|
1736
|
+
return switched;
|
|
1737
|
+
},
|
|
1738
|
+
deleteInstance: async (input) => {
|
|
1739
|
+
const user = userOnly(input.caller);
|
|
1740
|
+
if (user === void 0) return inner.deleteInstance(input);
|
|
1741
|
+
await requireOwned(input.id, user.userId);
|
|
1742
|
+
const deleted = await inner.deleteInstance(input);
|
|
1743
|
+
logger.info("notification target deleted", { meta: {
|
|
1744
|
+
targetId: input.id,
|
|
1745
|
+
owner: user.userId
|
|
1746
|
+
} });
|
|
1747
|
+
return deleted;
|
|
1748
|
+
},
|
|
1749
|
+
...test === void 0 ? {} : { testInstance: async (input) => {
|
|
1750
|
+
const user = userOnly(input.caller);
|
|
1751
|
+
if (user !== void 0) {
|
|
1752
|
+
if (input.id === null) throw require_sleep.forbiddenError("a draft target is tested by an admin");
|
|
1753
|
+
await requireOwned(input.id, user.userId);
|
|
1754
|
+
}
|
|
1755
|
+
return test(input);
|
|
1756
|
+
} }
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
1681
1759
|
/** The `integration-instances` provider of a notification provider: one kind per target kind. */
|
|
1682
1760
|
function buildNotificationTargetInstances(records, spec) {
|
|
1683
1761
|
const parts = notificationTargetParts(records, spec);
|
|
@@ -1689,6 +1767,13 @@ function buildNotificationTargetInstances(records, spec) {
|
|
|
1689
1767
|
mintsId: true
|
|
1690
1768
|
});
|
|
1691
1769
|
}
|
|
1770
|
+
/**
|
|
1771
|
+
* The same provider, for a notification provider whose targets belong to users (the notifiers
|
|
1772
|
+
* addon): `describe().userScoped`, and every row filtered on the caller.
|
|
1773
|
+
*/
|
|
1774
|
+
function buildUserScopedNotificationTargetInstances(records, spec, logger) {
|
|
1775
|
+
return scopeInstancesToCaller(buildNotificationTargetInstances(records, spec), logger);
|
|
1776
|
+
}
|
|
1692
1777
|
/** The secret keys of a kind's body: the descriptor's `password` fields (top level). */
|
|
1693
1778
|
function secretKeysOf(descriptor) {
|
|
1694
1779
|
const { shape } = fieldsOf$1(descriptor);
|
|
@@ -1700,11 +1785,14 @@ function secretKeysOf(descriptor) {
|
|
|
1700
1785
|
/**
|
|
1701
1786
|
* Move every old row to the record of its kind under the SAME id: the config flat beside the name and
|
|
1702
1787
|
* the switch, each secret written to the keychain by the door and READ BACK before the old row goes.
|
|
1703
|
-
* One bad row never aborts the others: a row whose write or read-back fails (or disagrees) is undone
|
|
1704
|
-
*
|
|
1705
|
-
*
|
|
1706
|
-
*
|
|
1707
|
-
*
|
|
1788
|
+
* One bad row never aborts the others: a row whose write or read-back fails (or disagrees) is undone
|
|
1789
|
+
* and its old row stays where it was, still served by the store through its legacy source. A row of a
|
|
1790
|
+
* kind this provider does not serve is left alone the same way (`skipped`, nothing to retry).
|
|
1791
|
+
* Idempotent: a row the new kind already holds equal is only dropped from the old kind.
|
|
1792
|
+
*
|
|
1793
|
+
* A row that FAILED makes the run throw, after every other row was tried: the ledger then records
|
|
1794
|
+
* `failed`, not `applied`, and the migration runs again on the next boot until each row has moved.
|
|
1795
|
+
* Reporting `done` over a row that merely failed once would leave it in the retired kind for good.
|
|
1708
1796
|
*/
|
|
1709
1797
|
async function moveTargetRows(ports, secretKeysByKind) {
|
|
1710
1798
|
const rows = await ports.listOld();
|
|
@@ -1714,6 +1802,7 @@ async function moveTargetRows(ports, secretKeysByKind) {
|
|
|
1714
1802
|
};
|
|
1715
1803
|
let converted = 0;
|
|
1716
1804
|
let skipped = 0;
|
|
1805
|
+
const failed = [];
|
|
1717
1806
|
for (const row of rows) {
|
|
1718
1807
|
if (!ports.hasKind(row.kind)) {
|
|
1719
1808
|
skipped += 1;
|
|
@@ -1727,7 +1816,7 @@ async function moveTargetRows(ports, secretKeysByKind) {
|
|
|
1727
1816
|
const reason = await moveOne(ports, row, secretKeysByKind(row.kind));
|
|
1728
1817
|
if (reason === null) converted += 1;
|
|
1729
1818
|
else {
|
|
1730
|
-
|
|
1819
|
+
failed.push(`${row.id} (${reason})`);
|
|
1731
1820
|
ports.skipped({
|
|
1732
1821
|
id: row.id,
|
|
1733
1822
|
kind: row.kind,
|
|
@@ -1735,6 +1824,7 @@ async function moveTargetRows(ports, secretKeysByKind) {
|
|
|
1735
1824
|
});
|
|
1736
1825
|
}
|
|
1737
1826
|
}
|
|
1827
|
+
if (failed.length > 0) throw new Error(`${failed.length} notification target(s) did not move and stay served from the retired kind; the migration runs again: ${failed.join(", ")}`);
|
|
1738
1828
|
return {
|
|
1739
1829
|
outcome: converted > 0 ? "done" : "already-done",
|
|
1740
1830
|
summary: {
|
|
@@ -1790,6 +1880,25 @@ function legacyTargetsOver(oldKind, logger) {
|
|
|
1790
1880
|
}
|
|
1791
1881
|
};
|
|
1792
1882
|
}
|
|
1883
|
+
/**
|
|
1884
|
+
* The retired kind as a lazy legacy source: it is declared on the store's first list (or delete),
|
|
1885
|
+
* on every boot, not only while the migration runs, so a row the migration could not move stays
|
|
1886
|
+
* visible through `legacy` and readable.
|
|
1887
|
+
*/
|
|
1888
|
+
function retiredTargetsOver(records, retired, logger) {
|
|
1889
|
+
let source = null;
|
|
1890
|
+
const open = async () => {
|
|
1891
|
+
if (source === null) {
|
|
1892
|
+
await records.declare({ [retired.name]: retired });
|
|
1893
|
+
source = legacyTargetsOver(records.kind(retired), logger);
|
|
1894
|
+
}
|
|
1895
|
+
return source;
|
|
1896
|
+
};
|
|
1897
|
+
return {
|
|
1898
|
+
list: async () => (await open()).list(),
|
|
1899
|
+
delete: async (id) => (await open()).delete(id)
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1793
1902
|
/** The ports over the records: the retired kind in, the per-kind records out. */
|
|
1794
1903
|
function targetRowPortsOver(deps) {
|
|
1795
1904
|
const handles = deps.store.handlesByKind();
|
|
@@ -1808,7 +1917,7 @@ function targetRowPortsOver(deps) {
|
|
|
1808
1917
|
},
|
|
1809
1918
|
dropOld: (id) => deps.legacy.delete(id),
|
|
1810
1919
|
skipped: (row) => {
|
|
1811
|
-
deps.logger.warn("notification target left in its
|
|
1920
|
+
deps.logger.warn("notification target left in its retired kind", { meta: {
|
|
1812
1921
|
targetId: row.id,
|
|
1813
1922
|
kind: row.kind,
|
|
1814
1923
|
reason: row.reason
|
|
@@ -36724,11 +36833,6 @@ var addonSettingsCapability = {
|
|
|
36724
36833
|
scope: ScopedSettingsScopeSchema,
|
|
36725
36834
|
nodeId: zod.z.string().optional()
|
|
36726
36835
|
}), zod.z.record(zod.z.string(), zod.z.unknown()).nullable()),
|
|
36727
|
-
getIntegrationFormSchema: require_sleep.method(zod.z.object({
|
|
36728
|
-
addonId: zod.z.string(),
|
|
36729
|
-
nodeId: zod.z.string().optional(),
|
|
36730
|
-
instance: IntegrationInstanceRefSchema
|
|
36731
|
-
}), SettingsSchemaWithValuesSchema.nullable()),
|
|
36732
36836
|
getDeclaredSettingsKeys: require_sleep.method(zod.z.object({
|
|
36733
36837
|
addonId: zod.z.string(),
|
|
36734
36838
|
nodeId: zod.z.string().optional()
|
|
@@ -43093,7 +43197,7 @@ function irSourceProblem(source) {
|
|
|
43093
43197
|
throw err;
|
|
43094
43198
|
}
|
|
43095
43199
|
}
|
|
43096
|
-
function same$
|
|
43200
|
+
function same$2(a, b) {
|
|
43097
43201
|
return a.trim().toLowerCase() === b.trim().toLowerCase();
|
|
43098
43202
|
}
|
|
43099
43203
|
/** The `digits` source that declares this channel number, or null. */
|
|
@@ -43107,7 +43211,7 @@ function findChannelSource(sources, number) {
|
|
|
43107
43211
|
* the number reach the same source; nothing else is guessed.
|
|
43108
43212
|
*/
|
|
43109
43213
|
function resolveRemoteSource(sources, query) {
|
|
43110
|
-
const byName = sources.find((source) => same$
|
|
43214
|
+
const byName = sources.find((source) => same$2(source.name, query));
|
|
43111
43215
|
if (byName !== void 0) return byName;
|
|
43112
43216
|
const byId = sources.find((source) => source.id === query.trim());
|
|
43113
43217
|
if (byId !== void 0) return byId;
|
|
@@ -43475,7 +43579,8 @@ var CAP_CUSTOMIZE_CATALOG = {
|
|
|
43475
43579
|
require_device_type.DeviceType.Washer,
|
|
43476
43580
|
require_device_type.DeviceType.Heater,
|
|
43477
43581
|
require_device_type.DeviceType.Dryer,
|
|
43478
|
-
require_device_type.DeviceType.Gateway
|
|
43582
|
+
require_device_type.DeviceType.Gateway,
|
|
43583
|
+
require_device_type.DeviceType.HeatPump
|
|
43479
43584
|
],
|
|
43480
43585
|
apply: "add",
|
|
43481
43586
|
vocabularyCap: "consumables",
|
|
@@ -45130,7 +45235,7 @@ async function runFanOut(calls, invoke) {
|
|
|
45130
45235
|
//#region src/generated/history-catalog.ts
|
|
45131
45236
|
/**
|
|
45132
45237
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
45133
|
-
*
|
|
45238
|
+
* 44 caps with series (87 series), 37 caps answered `'none'`.
|
|
45134
45239
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
45135
45240
|
*/
|
|
45136
45241
|
var HISTORY_CATALOG = {
|
|
@@ -45288,6 +45393,54 @@ var HISTORY_CATALOG = {
|
|
|
45288
45393
|
},
|
|
45289
45394
|
"flood": { "flooded": { kind: "boolean" } },
|
|
45290
45395
|
"gas": { "detected": { kind: "boolean" } },
|
|
45396
|
+
"heat-pump-status": {
|
|
45397
|
+
"power.thermalW": {
|
|
45398
|
+
kind: "gauge",
|
|
45399
|
+
unit: "W",
|
|
45400
|
+
deadband: 50,
|
|
45401
|
+
displayName: "Thermal power"
|
|
45402
|
+
},
|
|
45403
|
+
"power.electricalW": {
|
|
45404
|
+
kind: "gauge",
|
|
45405
|
+
unit: "W",
|
|
45406
|
+
deadband: 50,
|
|
45407
|
+
displayName: "Electrical power"
|
|
45408
|
+
},
|
|
45409
|
+
"power.compressorPct": {
|
|
45410
|
+
kind: "gauge",
|
|
45411
|
+
unit: "%",
|
|
45412
|
+
deadband: 2,
|
|
45413
|
+
displayName: "Compressor"
|
|
45414
|
+
},
|
|
45415
|
+
"temperatures.supply": {
|
|
45416
|
+
kind: "gauge",
|
|
45417
|
+
unit: "°C",
|
|
45418
|
+
deadband: .5,
|
|
45419
|
+
displayName: "Supply"
|
|
45420
|
+
},
|
|
45421
|
+
"temperatures.return": {
|
|
45422
|
+
kind: "gauge",
|
|
45423
|
+
unit: "°C",
|
|
45424
|
+
deadband: .5,
|
|
45425
|
+
displayName: "Return"
|
|
45426
|
+
},
|
|
45427
|
+
"temperatures.outdoor": {
|
|
45428
|
+
kind: "gauge",
|
|
45429
|
+
unit: "°C",
|
|
45430
|
+
deadband: .5,
|
|
45431
|
+
displayName: "Outdoor"
|
|
45432
|
+
},
|
|
45433
|
+
"energy.thermalKwh": {
|
|
45434
|
+
kind: "counter",
|
|
45435
|
+
unit: "kWh",
|
|
45436
|
+
displayName: "Thermal energy"
|
|
45437
|
+
},
|
|
45438
|
+
"energy.electricalKwh": {
|
|
45439
|
+
kind: "counter",
|
|
45440
|
+
unit: "kWh",
|
|
45441
|
+
displayName: "Electrical energy"
|
|
45442
|
+
}
|
|
45443
|
+
},
|
|
45291
45444
|
"heating-valve": { "position": {
|
|
45292
45445
|
kind: "gauge",
|
|
45293
45446
|
unit: "%",
|
|
@@ -45501,38 +45654,63 @@ var HISTORY_CATALOG = {
|
|
|
45501
45654
|
};
|
|
45502
45655
|
/**
|
|
45503
45656
|
* Keyed-array series (D917), projected from every `history.items` block:
|
|
45504
|
-
*
|
|
45657
|
+
* 2 caps (6 item fields). The item key is the series SCOPE;
|
|
45505
45658
|
* the series key is `cap:<capName>.<path>[].<field>`.
|
|
45506
45659
|
*/
|
|
45507
|
-
var HISTORY_ITEM_CATALOG = {
|
|
45508
|
-
|
|
45509
|
-
|
|
45510
|
-
|
|
45511
|
-
|
|
45512
|
-
|
|
45513
|
-
|
|
45514
|
-
|
|
45515
|
-
|
|
45516
|
-
|
|
45517
|
-
|
|
45518
|
-
|
|
45519
|
-
|
|
45520
|
-
|
|
45521
|
-
|
|
45522
|
-
|
|
45523
|
-
|
|
45524
|
-
|
|
45525
|
-
|
|
45526
|
-
|
|
45527
|
-
|
|
45528
|
-
|
|
45529
|
-
|
|
45530
|
-
|
|
45531
|
-
|
|
45532
|
-
|
|
45660
|
+
var HISTORY_ITEM_CATALOG = {
|
|
45661
|
+
"consumables": {
|
|
45662
|
+
path: "items",
|
|
45663
|
+
key: "key",
|
|
45664
|
+
label: "label",
|
|
45665
|
+
fields: {
|
|
45666
|
+
"level": {
|
|
45667
|
+
kind: "gauge",
|
|
45668
|
+
unit: "%",
|
|
45669
|
+
deadband: 2,
|
|
45670
|
+
displayName: "Level"
|
|
45671
|
+
},
|
|
45672
|
+
"status": {
|
|
45673
|
+
kind: "enum",
|
|
45674
|
+
displayName: "Status",
|
|
45675
|
+
values: [
|
|
45676
|
+
"ok",
|
|
45677
|
+
"low",
|
|
45678
|
+
"empty",
|
|
45679
|
+
"full",
|
|
45680
|
+
"replace"
|
|
45681
|
+
]
|
|
45682
|
+
},
|
|
45683
|
+
"remaining.value": {
|
|
45684
|
+
kind: "gauge",
|
|
45685
|
+
deadband: 1,
|
|
45686
|
+
displayName: "Remaining"
|
|
45687
|
+
}
|
|
45688
|
+
}
|
|
45689
|
+
},
|
|
45690
|
+
"heat-pump-status": {
|
|
45691
|
+
path: "circuits",
|
|
45692
|
+
key: "id",
|
|
45693
|
+
label: "label",
|
|
45694
|
+
fields: {
|
|
45695
|
+
"currentTemp": {
|
|
45696
|
+
kind: "gauge",
|
|
45697
|
+
unit: "°C",
|
|
45698
|
+
deadband: .5,
|
|
45699
|
+
displayName: "Temperature"
|
|
45700
|
+
},
|
|
45701
|
+
"targetTemp": {
|
|
45702
|
+
kind: "gauge",
|
|
45703
|
+
unit: "°C",
|
|
45704
|
+
minIntervalMs: 0,
|
|
45705
|
+
displayName: "Setpoint"
|
|
45706
|
+
},
|
|
45707
|
+
"mode": {
|
|
45708
|
+
kind: "enum",
|
|
45709
|
+
displayName: "Mode"
|
|
45710
|
+
}
|
|
45533
45711
|
}
|
|
45534
45712
|
}
|
|
45535
|
-
}
|
|
45713
|
+
};
|
|
45536
45714
|
/** Caps that declared `history: 'none'`, sorted. */
|
|
45537
45715
|
var HISTORY_NONE_CAPS = [
|
|
45538
45716
|
"audio-metrics",
|
|
@@ -54806,6 +54984,350 @@ var groupStatusCapability = {
|
|
|
54806
54984
|
history: "none"
|
|
54807
54985
|
};
|
|
54808
54986
|
//#endregion
|
|
54987
|
+
//#region src/capabilities/heat-pump-control.cap.ts
|
|
54988
|
+
/**
|
|
54989
|
+
* Heat pump settable surface (D1026): one typed method per parameter, never a
|
|
54990
|
+
* generic `set(key, value)`. The values a mode takes and the limits of a number
|
|
54991
|
+
* are the ones `heat-pump-status` carries (`allowed`, `min`, `max`, `step`),
|
|
54992
|
+
* read from the gateway; a provider refuses a value outside them. The state is
|
|
54993
|
+
* `heat-pump-status` — this cap has none.
|
|
54994
|
+
*/
|
|
54995
|
+
var deviceId = zod.z.number().int().nonnegative();
|
|
54996
|
+
var circuitId = zod.z.string().min(1);
|
|
54997
|
+
var mode = zod.z.string().min(1);
|
|
54998
|
+
var temp = zod.z.number().finite();
|
|
54999
|
+
var heatPumpControlCapability = {
|
|
55000
|
+
name: "heat-pump-control",
|
|
55001
|
+
scope: "device",
|
|
55002
|
+
deviceNative: true,
|
|
55003
|
+
mode: "singleton",
|
|
55004
|
+
deviceTypes: [require_device_type.DeviceType.HeatPump],
|
|
55005
|
+
methods: {
|
|
55006
|
+
/** off / auto / on. */
|
|
55007
|
+
setSilentMode: require_sleep.method(zod.z.object({
|
|
55008
|
+
deviceId,
|
|
55009
|
+
mode
|
|
55010
|
+
}), zod.z.void(), {
|
|
55011
|
+
kind: "mutation",
|
|
55012
|
+
auth: "protected"
|
|
55013
|
+
}),
|
|
55014
|
+
/** off / on. */
|
|
55015
|
+
setAwayMode: require_sleep.method(zod.z.object({
|
|
55016
|
+
deviceId,
|
|
55017
|
+
mode
|
|
55018
|
+
}), zod.z.void(), {
|
|
55019
|
+
kind: "mutation",
|
|
55020
|
+
auth: "protected"
|
|
55021
|
+
}),
|
|
55022
|
+
/** off / manual / auto. */
|
|
55023
|
+
setAdditionalHeaterMode: require_sleep.method(zod.z.object({
|
|
55024
|
+
deviceId,
|
|
55025
|
+
mode
|
|
55026
|
+
}), zod.z.void(), {
|
|
55027
|
+
kind: "mutation",
|
|
55028
|
+
auth: "protected"
|
|
55029
|
+
}),
|
|
55030
|
+
/** off / hm1 .. hm8 (the programmes the gateway lists). */
|
|
55031
|
+
setHolidayMode: require_sleep.method(zod.z.object({
|
|
55032
|
+
deviceId,
|
|
55033
|
+
mode
|
|
55034
|
+
}), zod.z.void(), {
|
|
55035
|
+
kind: "mutation",
|
|
55036
|
+
auth: "protected"
|
|
55037
|
+
}),
|
|
55038
|
+
setCircuitOperationMode: require_sleep.method(zod.z.object({
|
|
55039
|
+
deviceId,
|
|
55040
|
+
circuitId,
|
|
55041
|
+
mode
|
|
55042
|
+
}), zod.z.void(), {
|
|
55043
|
+
kind: "mutation",
|
|
55044
|
+
auth: "protected"
|
|
55045
|
+
}),
|
|
55046
|
+
setCircuitHeatCoolMode: require_sleep.method(zod.z.object({
|
|
55047
|
+
deviceId,
|
|
55048
|
+
circuitId,
|
|
55049
|
+
mode
|
|
55050
|
+
}), zod.z.void(), {
|
|
55051
|
+
kind: "mutation",
|
|
55052
|
+
auth: "protected"
|
|
55053
|
+
}),
|
|
55054
|
+
setCircuitSummerWinter: require_sleep.method(zod.z.object({
|
|
55055
|
+
deviceId,
|
|
55056
|
+
circuitId,
|
|
55057
|
+
mode
|
|
55058
|
+
}), zod.z.void(), {
|
|
55059
|
+
kind: "mutation",
|
|
55060
|
+
auth: "protected"
|
|
55061
|
+
}),
|
|
55062
|
+
setCircuitComfortSetpoint: require_sleep.method(zod.z.object({
|
|
55063
|
+
deviceId,
|
|
55064
|
+
circuitId,
|
|
55065
|
+
temp
|
|
55066
|
+
}), zod.z.void(), {
|
|
55067
|
+
kind: "mutation",
|
|
55068
|
+
auth: "protected"
|
|
55069
|
+
}),
|
|
55070
|
+
setCircuitEcoSetpoint: require_sleep.method(zod.z.object({
|
|
55071
|
+
deviceId,
|
|
55072
|
+
circuitId,
|
|
55073
|
+
temp
|
|
55074
|
+
}), zod.z.void(), {
|
|
55075
|
+
kind: "mutation",
|
|
55076
|
+
auth: "protected"
|
|
55077
|
+
}),
|
|
55078
|
+
setCircuitMaxFlowTemp: require_sleep.method(zod.z.object({
|
|
55079
|
+
deviceId,
|
|
55080
|
+
circuitId,
|
|
55081
|
+
temp
|
|
55082
|
+
}), zod.z.void(), {
|
|
55083
|
+
kind: "mutation",
|
|
55084
|
+
auth: "protected"
|
|
55085
|
+
}),
|
|
55086
|
+
setDhwOperationMode: require_sleep.method(zod.z.object({
|
|
55087
|
+
deviceId,
|
|
55088
|
+
circuitId,
|
|
55089
|
+
mode
|
|
55090
|
+
}), zod.z.void(), {
|
|
55091
|
+
kind: "mutation",
|
|
55092
|
+
auth: "protected"
|
|
55093
|
+
}),
|
|
55094
|
+
setDhwTemperatureLevel: require_sleep.method(zod.z.object({
|
|
55095
|
+
deviceId,
|
|
55096
|
+
circuitId,
|
|
55097
|
+
level: mode
|
|
55098
|
+
}), zod.z.void(), {
|
|
55099
|
+
kind: "mutation",
|
|
55100
|
+
auth: "protected"
|
|
55101
|
+
}),
|
|
55102
|
+
setDhwChargeDuration: require_sleep.method(zod.z.object({
|
|
55103
|
+
deviceId,
|
|
55104
|
+
circuitId,
|
|
55105
|
+
minutes: zod.z.number().int().positive()
|
|
55106
|
+
}), zod.z.void(), {
|
|
55107
|
+
kind: "mutation",
|
|
55108
|
+
auth: "protected"
|
|
55109
|
+
}),
|
|
55110
|
+
/** Start an extra-hot-water charge now: an action, not a stored mode. */
|
|
55111
|
+
startExtraHotWater: require_sleep.method(zod.z.object({
|
|
55112
|
+
deviceId,
|
|
55113
|
+
circuitId
|
|
55114
|
+
}), zod.z.void(), {
|
|
55115
|
+
kind: "mutation",
|
|
55116
|
+
auth: "protected"
|
|
55117
|
+
})
|
|
55118
|
+
}
|
|
55119
|
+
};
|
|
55120
|
+
//#endregion
|
|
55121
|
+
//#region src/capabilities/heat-pump-status.cap.ts
|
|
55122
|
+
/**
|
|
55123
|
+
* Heat pump status (D1026): the one main, READ-ONLY cap of a heat pump. Every
|
|
55124
|
+
* circuit the gateway reports is an entry of `circuits[]` — heating, hot water,
|
|
55125
|
+
* cooling or solar, any number — so no circuit needs a device of its own to be
|
|
55126
|
+
* seen. The settable parameters are typed methods of `heat-pump-control`; the
|
|
55127
|
+
* values they take and their limits (`allowed`, `min`, `max`, `step`) are read
|
|
55128
|
+
* from the gateway and carried here, never written in code.
|
|
55129
|
+
*
|
|
55130
|
+
* A value the gateway did not report is `null`, never `0` (D393). The COP is not
|
|
55131
|
+
* a field: it is computed from the two powers at read time
|
|
55132
|
+
* ({@link heatPumpInstantCop}).
|
|
55133
|
+
*/
|
|
55134
|
+
/** The kinds of circuit a heat pump serves. */
|
|
55135
|
+
var HEAT_PUMP_CIRCUIT_KINDS = [
|
|
55136
|
+
"heating",
|
|
55137
|
+
"dhw",
|
|
55138
|
+
"cooling",
|
|
55139
|
+
"solar"
|
|
55140
|
+
];
|
|
55141
|
+
var HeatPumpCircuitKindSchema = zod.z.enum(HEAT_PUMP_CIRCUIT_KINDS);
|
|
55142
|
+
/** A setting that takes one of a list of values the gateway named. */
|
|
55143
|
+
var HeatPumpOptionSettingSchema = zod.z.object({
|
|
55144
|
+
/** The active value. Null when the gateway did not answer. */
|
|
55145
|
+
value: zod.z.string().nullable(),
|
|
55146
|
+
/** Values the gateway accepts, in its order. Empty = read-only here. */
|
|
55147
|
+
allowed: zod.z.array(zod.z.string())
|
|
55148
|
+
});
|
|
55149
|
+
/** A numeric setting with the limits the gateway named. */
|
|
55150
|
+
var HeatPumpRangeSettingSchema = zod.z.object({
|
|
55151
|
+
value: zod.z.number().nullable(),
|
|
55152
|
+
min: zod.z.number().nullable(),
|
|
55153
|
+
max: zod.z.number().nullable(),
|
|
55154
|
+
step: zod.z.number().nullable()
|
|
55155
|
+
});
|
|
55156
|
+
var HeatPumpCircuitSchema = zod.z.object({
|
|
55157
|
+
/** Gateway id of the circuit (`hc1`, `dhw1`): the key of the series. */
|
|
55158
|
+
id: zod.z.string().min(1),
|
|
55159
|
+
kind: HeatPumpCircuitKindSchema,
|
|
55160
|
+
label: zod.z.string(),
|
|
55161
|
+
icon: IconKeySchema,
|
|
55162
|
+
/** Measured temperature of the circuit (room, tank, collector). */
|
|
55163
|
+
currentTemp: zod.z.number().nullable().meta(require_sleep.readingMeta("temperature")),
|
|
55164
|
+
/** The setpoint in force now. */
|
|
55165
|
+
targetTemp: zod.z.number().nullable().meta(require_sleep.readingMeta("temperature")),
|
|
55166
|
+
/** The operation mode in force (mirror of `operationMode.value`, for the series). */
|
|
55167
|
+
mode: zod.z.string().nullable(),
|
|
55168
|
+
/** Whether the circuit is calling for heat right now. Null = unknown. */
|
|
55169
|
+
active: zod.z.boolean().nullable(),
|
|
55170
|
+
operationMode: HeatPumpOptionSettingSchema.nullable(),
|
|
55171
|
+
/** Heating circuits: heat / cool / heatCool. */
|
|
55172
|
+
heatCoolMode: HeatPumpOptionSettingSchema.nullable(),
|
|
55173
|
+
/** Heating circuits: summer / winter changeover. */
|
|
55174
|
+
summerWinter: HeatPumpOptionSettingSchema.nullable(),
|
|
55175
|
+
comfortSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
55176
|
+
ecoSetpoint: HeatPumpRangeSettingSchema.nullable(),
|
|
55177
|
+
maxFlowTemp: HeatPumpRangeSettingSchema.nullable(),
|
|
55178
|
+
/** Hot water: the temperature level (off / low / high / eco). */
|
|
55179
|
+
temperatureLevel: HeatPumpOptionSettingSchema.nullable(),
|
|
55180
|
+
/** Hot water: how long a charge lasts, minutes. */
|
|
55181
|
+
chargeDuration: HeatPumpRangeSettingSchema.nullable(),
|
|
55182
|
+
/** Hot water: whether an extra-hot-water charge is running. Null = no such surface. */
|
|
55183
|
+
extraHotWater: zod.z.boolean().nullable()
|
|
55184
|
+
});
|
|
55185
|
+
/** The independent system modes, each with its real values. A null mode = the gateway has none. */
|
|
55186
|
+
var HeatPumpSystemSchema = zod.z.object({
|
|
55187
|
+
silent: HeatPumpOptionSettingSchema.nullable(),
|
|
55188
|
+
away: HeatPumpOptionSettingSchema.nullable(),
|
|
55189
|
+
additionalHeater: HeatPumpOptionSettingSchema.nullable(),
|
|
55190
|
+
holiday: HeatPumpOptionSettingSchema.nullable()
|
|
55191
|
+
});
|
|
55192
|
+
var HeatPumpPowerSchema = zod.z.object({
|
|
55193
|
+
thermalW: zod.z.number().nullable().meta(require_sleep.readingMeta("power")),
|
|
55194
|
+
electricalW: zod.z.number().nullable().meta(require_sleep.readingMeta("power")),
|
|
55195
|
+
/** Compressor modulation, percent. */
|
|
55196
|
+
compressorPct: zod.z.number().nullable().meta(require_sleep.readingMeta("percentage"))
|
|
55197
|
+
});
|
|
55198
|
+
var HeatPumpTemperaturesSchema = zod.z.object({
|
|
55199
|
+
supply: zod.z.number().nullable().meta(require_sleep.readingMeta("temperature")),
|
|
55200
|
+
return: zod.z.number().nullable().meta(require_sleep.readingMeta("temperature")),
|
|
55201
|
+
outdoor: zod.z.number().nullable().meta(require_sleep.readingMeta("temperature"))
|
|
55202
|
+
});
|
|
55203
|
+
/** Lifetime meters, kWh: the energy of a period is computed at read time from their difference (D944). */
|
|
55204
|
+
var HeatPumpEnergySchema = zod.z.object({
|
|
55205
|
+
thermalKwh: zod.z.number().nullable().meta(require_sleep.readingMeta("energy")),
|
|
55206
|
+
electricalKwh: zod.z.number().nullable().meta(require_sleep.readingMeta("energy"))
|
|
55207
|
+
});
|
|
55208
|
+
var HeatPumpStatusSchema = zod.z.object({
|
|
55209
|
+
circuits: zod.z.array(HeatPumpCircuitSchema),
|
|
55210
|
+
system: HeatPumpSystemSchema,
|
|
55211
|
+
power: HeatPumpPowerSchema,
|
|
55212
|
+
temperatures: HeatPumpTemperaturesSchema,
|
|
55213
|
+
energy: HeatPumpEnergySchema,
|
|
55214
|
+
/** Water pressure of the heating loop, bar. */
|
|
55215
|
+
waterPressureBar: zod.z.number().nullable(),
|
|
55216
|
+
/** Compressor starts since commissioning. */
|
|
55217
|
+
starts: zod.z.number().nullable(),
|
|
55218
|
+
/** Ms epoch when the slice was last read from the gateway. */
|
|
55219
|
+
lastFetchedAt: zod.z.number()
|
|
55220
|
+
});
|
|
55221
|
+
/**
|
|
55222
|
+
* The instantaneous COP: thermal over electrical power. Null unless BOTH powers
|
|
55223
|
+
* are known and the unit draws power — a missing reading is never a 0 or a
|
|
55224
|
+
* division by it (D393). Computed on every read; there is no stored value.
|
|
55225
|
+
*/
|
|
55226
|
+
function heatPumpInstantCop(power) {
|
|
55227
|
+
const { thermalW, electricalW } = power;
|
|
55228
|
+
if (thermalW === null || electricalW === null || electricalW <= 0) return null;
|
|
55229
|
+
return thermalW / electricalW;
|
|
55230
|
+
}
|
|
55231
|
+
var heatPumpStatusCapability = {
|
|
55232
|
+
name: "heat-pump-status",
|
|
55233
|
+
scope: "device",
|
|
55234
|
+
deviceNative: true,
|
|
55235
|
+
mode: "singleton",
|
|
55236
|
+
deviceTypes: [require_device_type.DeviceType.HeatPump],
|
|
55237
|
+
methods: {},
|
|
55238
|
+
status: {
|
|
55239
|
+
schema: HeatPumpStatusSchema,
|
|
55240
|
+
kind: "push"
|
|
55241
|
+
},
|
|
55242
|
+
runtimeState: HeatPumpStatusSchema,
|
|
55243
|
+
/**
|
|
55244
|
+
* Runtime-state durability: **session** — a heat pump's gateway answers on the
|
|
55245
|
+
* next poll, so a restart that clears the slice loses nothing a reader needs
|
|
55246
|
+
* (the series are recorded). See `RuntimeStateDurability`.
|
|
55247
|
+
*/
|
|
55248
|
+
durability: "session",
|
|
55249
|
+
/**
|
|
55250
|
+
* History (D850, D917): `circuits[]` is a keyed array — one series per circuit and
|
|
55251
|
+
* field, named by the circuit's label. The mode is a state (D896); the energy
|
|
55252
|
+
* totals are lifetime counters, the kWh of a period is computed at read time (D944).
|
|
55253
|
+
* The COP is never recorded: it derives from the two powers.
|
|
55254
|
+
*/
|
|
55255
|
+
history: {
|
|
55256
|
+
fields: {
|
|
55257
|
+
"power.thermalW": {
|
|
55258
|
+
kind: "gauge",
|
|
55259
|
+
unit: "W",
|
|
55260
|
+
deadband: 50,
|
|
55261
|
+
displayName: "Thermal power"
|
|
55262
|
+
},
|
|
55263
|
+
"power.electricalW": {
|
|
55264
|
+
kind: "gauge",
|
|
55265
|
+
unit: "W",
|
|
55266
|
+
deadband: 50,
|
|
55267
|
+
displayName: "Electrical power"
|
|
55268
|
+
},
|
|
55269
|
+
"power.compressorPct": {
|
|
55270
|
+
kind: "gauge",
|
|
55271
|
+
unit: "%",
|
|
55272
|
+
deadband: 2,
|
|
55273
|
+
displayName: "Compressor"
|
|
55274
|
+
},
|
|
55275
|
+
"temperatures.supply": {
|
|
55276
|
+
kind: "gauge",
|
|
55277
|
+
unit: "°C",
|
|
55278
|
+
deadband: .5,
|
|
55279
|
+
displayName: "Supply"
|
|
55280
|
+
},
|
|
55281
|
+
"temperatures.return": {
|
|
55282
|
+
kind: "gauge",
|
|
55283
|
+
unit: "°C",
|
|
55284
|
+
deadband: .5,
|
|
55285
|
+
displayName: "Return"
|
|
55286
|
+
},
|
|
55287
|
+
"temperatures.outdoor": {
|
|
55288
|
+
kind: "gauge",
|
|
55289
|
+
unit: "°C",
|
|
55290
|
+
deadband: .5,
|
|
55291
|
+
displayName: "Outdoor"
|
|
55292
|
+
},
|
|
55293
|
+
"energy.thermalKwh": {
|
|
55294
|
+
kind: "counter",
|
|
55295
|
+
unit: "kWh",
|
|
55296
|
+
displayName: "Thermal energy"
|
|
55297
|
+
},
|
|
55298
|
+
"energy.electricalKwh": {
|
|
55299
|
+
kind: "counter",
|
|
55300
|
+
unit: "kWh",
|
|
55301
|
+
displayName: "Electrical energy"
|
|
55302
|
+
}
|
|
55303
|
+
},
|
|
55304
|
+
items: {
|
|
55305
|
+
path: "circuits",
|
|
55306
|
+
key: "id",
|
|
55307
|
+
label: "label",
|
|
55308
|
+
fields: {
|
|
55309
|
+
currentTemp: {
|
|
55310
|
+
kind: "gauge",
|
|
55311
|
+
unit: "°C",
|
|
55312
|
+
deadband: .5,
|
|
55313
|
+
displayName: "Temperature"
|
|
55314
|
+
},
|
|
55315
|
+
targetTemp: {
|
|
55316
|
+
kind: "gauge",
|
|
55317
|
+
unit: "°C",
|
|
55318
|
+
minIntervalMs: 0,
|
|
55319
|
+
displayName: "Setpoint"
|
|
55320
|
+
},
|
|
55321
|
+
mode: {
|
|
55322
|
+
kind: "enum",
|
|
55323
|
+
displayName: "Mode"
|
|
55324
|
+
}
|
|
55325
|
+
}
|
|
55326
|
+
}
|
|
55327
|
+
},
|
|
55328
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
55329
|
+
};
|
|
55330
|
+
//#endregion
|
|
54809
55331
|
//#region src/capabilities/heating-valve.cap.ts
|
|
54810
55332
|
var HeatingValveStatusSchema = zod.z.object({
|
|
54811
55333
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
@@ -55078,6 +55600,7 @@ var HERO_SCENES = [
|
|
|
55078
55600
|
"ac",
|
|
55079
55601
|
"thermostat",
|
|
55080
55602
|
"heater",
|
|
55603
|
+
"heat-pump",
|
|
55081
55604
|
"fan",
|
|
55082
55605
|
"washer",
|
|
55083
55606
|
"dryer",
|
|
@@ -55148,6 +55671,7 @@ var HERO_SCENE_BY_TYPE = {
|
|
|
55148
55671
|
[require_device_type.DeviceType.Valve]: "control-dial",
|
|
55149
55672
|
[require_device_type.DeviceType.Humidifier]: "control-dial",
|
|
55150
55673
|
[require_device_type.DeviceType.WaterHeater]: "heater",
|
|
55674
|
+
[require_device_type.DeviceType.HeatPump]: "heat-pump",
|
|
55151
55675
|
[require_device_type.DeviceType.Fan]: "fan",
|
|
55152
55676
|
[require_device_type.DeviceType.MediaPlayer]: "tv",
|
|
55153
55677
|
[require_device_type.DeviceType.AlarmPanel]: "alarm",
|
|
@@ -55270,6 +55794,7 @@ var HeroTextSchema = zod.z.object({
|
|
|
55270
55794
|
*/
|
|
55271
55795
|
/** The rows a layout may carry. Each is built from the caps the device is bound to. */
|
|
55272
55796
|
var HERO_ROW_IDS = [
|
|
55797
|
+
"progress",
|
|
55273
55798
|
"run-for",
|
|
55274
55799
|
"cycle",
|
|
55275
55800
|
"program",
|
|
@@ -55284,6 +55809,7 @@ var HERO_ROW_IDS = [
|
|
|
55284
55809
|
"alarm",
|
|
55285
55810
|
"fan",
|
|
55286
55811
|
"vacuum",
|
|
55812
|
+
"vacuum-suction",
|
|
55287
55813
|
"mower",
|
|
55288
55814
|
"feeder",
|
|
55289
55815
|
"fountain",
|
|
@@ -55302,9 +55828,56 @@ var HERO_ROW_IDS = [
|
|
|
55302
55828
|
"climate-fan",
|
|
55303
55829
|
"setpoint",
|
|
55304
55830
|
"channel",
|
|
55305
|
-
"control"
|
|
55831
|
+
"control",
|
|
55832
|
+
"circuit",
|
|
55833
|
+
"heat-pump-power",
|
|
55834
|
+
"system-mode"
|
|
55306
55835
|
];
|
|
55307
55836
|
var HeroRowIdSchema = zod.z.enum(HERO_ROW_IDS);
|
|
55837
|
+
/**
|
|
55838
|
+
* The label a row carries at its left ("Phase | value | action"), per row id: the
|
|
55839
|
+
* vocabulary of layout A, so no client names a row itself.
|
|
55840
|
+
*/
|
|
55841
|
+
var HERO_ROW_LABELS = {
|
|
55842
|
+
progress: require_sleep.t("Progress", "Avanzamento"),
|
|
55843
|
+
"run-for": require_sleep.t("Run for", "Avvia per"),
|
|
55844
|
+
cycle: require_sleep.t("Cycle", "Ciclo"),
|
|
55845
|
+
program: require_sleep.t("Program", "Programma"),
|
|
55846
|
+
"appliance-power": require_sleep.t("Appliance", "Elettrodomestico"),
|
|
55847
|
+
"now-playing": require_sleep.t("Now playing", "In riproduzione"),
|
|
55848
|
+
playback: require_sleep.t("Playback", "Riproduzione"),
|
|
55849
|
+
volume: require_sleep.t("Volume", "Volume"),
|
|
55850
|
+
source: require_sleep.t("Source", "Sorgente"),
|
|
55851
|
+
contact: require_sleep.t("Door", "Porta"),
|
|
55852
|
+
"motion-trigger": require_sleep.t("Motion", "Movimento"),
|
|
55853
|
+
lock: require_sleep.t("Lock", "Serratura"),
|
|
55854
|
+
alarm: require_sleep.t("Alarm", "Allarme"),
|
|
55855
|
+
fan: require_sleep.t("Fan", "Ventola"),
|
|
55856
|
+
vacuum: require_sleep.t("Cleaning", "Pulizia"),
|
|
55857
|
+
"vacuum-suction": require_sleep.t("Suction", "Aspirazione"),
|
|
55858
|
+
mower: require_sleep.t("Mowing", "Taglio"),
|
|
55859
|
+
feeder: require_sleep.t("Feed now", "Eroga ora"),
|
|
55860
|
+
fountain: require_sleep.t("Pump", "Pompa"),
|
|
55861
|
+
"pump-cycle": require_sleep.t("Pump cycle", "Ciclo pompa"),
|
|
55862
|
+
automation: require_sleep.t("Automation", "Automazione"),
|
|
55863
|
+
script: require_sleep.t("Script", "Script"),
|
|
55864
|
+
"do-not-disturb": require_sleep.t("Do not disturb", "Non disturbare"),
|
|
55865
|
+
brightness: require_sleep.t("Brightness", "Luminosità"),
|
|
55866
|
+
color: require_sleep.t("Colour", "Colore"),
|
|
55867
|
+
cover: require_sleep.t("Position", "Posizione"),
|
|
55868
|
+
valve: require_sleep.t("Valve", "Valvola"),
|
|
55869
|
+
humidifier: require_sleep.t("Humidifier", "Umidificatore"),
|
|
55870
|
+
update: require_sleep.t("Firmware", "Firmware"),
|
|
55871
|
+
button: require_sleep.t("Action", "Azione"),
|
|
55872
|
+
"climate-mode": require_sleep.t("Mode", "Modalità"),
|
|
55873
|
+
"climate-fan": require_sleep.t("Fan", "Ventola"),
|
|
55874
|
+
setpoint: require_sleep.t("Setpoint", "Temperatura"),
|
|
55875
|
+
channel: require_sleep.t("Channel", "Canale"),
|
|
55876
|
+
control: require_sleep.t("Control", "Controllo"),
|
|
55877
|
+
circuit: require_sleep.t("Circuit", "Circuito"),
|
|
55878
|
+
"heat-pump-power": require_sleep.t("Power", "Potenza"),
|
|
55879
|
+
"system-mode": require_sleep.t("Mode", "Modalità")
|
|
55880
|
+
};
|
|
55308
55881
|
var HeroArgValueSchema = zod.z.lazy(() => zod.z.union([
|
|
55309
55882
|
zod.z.string(),
|
|
55310
55883
|
zod.z.number(),
|
|
@@ -55312,6 +55885,28 @@ var HeroArgValueSchema = zod.z.lazy(() => zod.z.union([
|
|
|
55312
55885
|
zod.z.record(zod.z.string(), HeroArgValueSchema)
|
|
55313
55886
|
]));
|
|
55314
55887
|
var HeroArgsSchema = zod.z.record(zod.z.string(), HeroArgValueSchema);
|
|
55888
|
+
function setArgAt(args, keys, value) {
|
|
55889
|
+
const [head, ...rest] = keys;
|
|
55890
|
+
if (head === void 0) return args;
|
|
55891
|
+
if (rest.length === 0) return {
|
|
55892
|
+
...args,
|
|
55893
|
+
[head]: value
|
|
55894
|
+
};
|
|
55895
|
+
const child = args[head];
|
|
55896
|
+
const base = typeof child === "object" ? child : {};
|
|
55897
|
+
return {
|
|
55898
|
+
...args,
|
|
55899
|
+
[head]: setArgAt(base, rest, value)
|
|
55900
|
+
};
|
|
55901
|
+
}
|
|
55902
|
+
/**
|
|
55903
|
+
* `args` with the chosen value set at `path` (`level`, or `control.value` for a value
|
|
55904
|
+
* that lives inside a nested argument). The original is not touched; a renderer builds
|
|
55905
|
+
* the call of a slider or picker with this.
|
|
55906
|
+
*/
|
|
55907
|
+
function heroArgsWithValue(args, path, value) {
|
|
55908
|
+
return setArgAt(args, path.split("."), value);
|
|
55909
|
+
}
|
|
55315
55910
|
/** A cap method called on the hero's device. */
|
|
55316
55911
|
var HeroCallSchema = zod.z.object({
|
|
55317
55912
|
cap: zod.z.string(),
|
|
@@ -55368,16 +55963,32 @@ var HeroControlSchema = zod.z.discriminatedUnion("kind", [
|
|
|
55368
55963
|
label: HeroTextSchema,
|
|
55369
55964
|
current: zod.z.string().nullable(),
|
|
55370
55965
|
options: zod.z.array(zod.z.string()),
|
|
55966
|
+
/** A readable label per option value; an option without one is drawn as its raw value. */
|
|
55967
|
+
optionLabels: zod.z.record(zod.z.string(), HeroTextSchema).optional(),
|
|
55371
55968
|
call: HeroCallSchema,
|
|
55372
55969
|
valueArg: zod.z.string()
|
|
55373
55970
|
})
|
|
55374
55971
|
]);
|
|
55972
|
+
/** Declared by its interface: a `z.infer` of one more icon union pushes the cap's inferred type past what the compiler can print. */
|
|
55973
|
+
var HeroPillSchema = zod.z.object({
|
|
55974
|
+
icon: IconKeySchema.nullable(),
|
|
55975
|
+
text: HeroTextSchema,
|
|
55976
|
+
tone: HeroToneSchema
|
|
55977
|
+
});
|
|
55375
55978
|
var HeroRowSchema = zod.z.object({
|
|
55376
55979
|
id: HeroRowIdSchema,
|
|
55980
|
+
/** The row's own name when the kind's label would not tell rows of one kind apart (a circuit's label). */
|
|
55981
|
+
label: HeroTextSchema.optional(),
|
|
55982
|
+
/** A group header drawn above the row when it differs from the previous row's ("System"). */
|
|
55983
|
+
group: HeroTextSchema.optional(),
|
|
55984
|
+
/** Values drawn as pills across the row (a heat pump's powers). */
|
|
55985
|
+
pills: zod.z.array(HeroPillSchema).optional(),
|
|
55377
55986
|
icon: IconKeySchema,
|
|
55378
55987
|
/** The row's status, in words. `null` = nothing to say. */
|
|
55379
55988
|
status: HeroTextSchema.nullable(),
|
|
55380
|
-
controls: zod.z.array(HeroControlSchema)
|
|
55989
|
+
controls: zod.z.array(HeroControlSchema),
|
|
55990
|
+
/** A bar under the row's label, 0..1; `null` / absent = no bar. */
|
|
55991
|
+
progress: zod.z.number().min(0).max(1).nullable().optional()
|
|
55381
55992
|
});
|
|
55382
55993
|
var HeroDetailSchema = zod.z.object({
|
|
55383
55994
|
label: HeroTextSchema,
|
|
@@ -55385,7 +55996,11 @@ var HeroDetailSchema = zod.z.object({
|
|
|
55385
55996
|
unit: zod.z.string().nullable()
|
|
55386
55997
|
});
|
|
55387
55998
|
var HeroBadgeSchema = zod.z.object({
|
|
55388
|
-
id: zod.z.enum([
|
|
55999
|
+
id: zod.z.enum([
|
|
56000
|
+
"battery",
|
|
56001
|
+
"network-link",
|
|
56002
|
+
"integration"
|
|
56003
|
+
]),
|
|
55389
56004
|
icon: IconKeySchema,
|
|
55390
56005
|
tone: HeroToneSchema,
|
|
55391
56006
|
/** Percent for a battery, link quality for a link; `null` = not known. */
|
|
@@ -55486,7 +56101,12 @@ var HeroFactSchema = zod.z.object({
|
|
|
55486
56101
|
var HeroSideTileSchema = zod.z.object({
|
|
55487
56102
|
label: HeroTextSchema,
|
|
55488
56103
|
value: HeroTextSchema,
|
|
55489
|
-
tone: HeroToneSchema.optional()
|
|
56104
|
+
tone: HeroToneSchema.optional(),
|
|
56105
|
+
/**
|
|
56106
|
+
* Epoch ms when the tile reads a clock time (an appliance's end): a client prints it in
|
|
56107
|
+
* the viewer's own time zone; `value` is the fallback for one that cannot.
|
|
56108
|
+
*/
|
|
56109
|
+
at: zod.z.number().optional()
|
|
55490
56110
|
});
|
|
55491
56111
|
var HeroSideTilesSchema = zod.z.object({
|
|
55492
56112
|
left: zod.z.array(HeroSideTileSchema).max(2),
|
|
@@ -55522,8 +56142,12 @@ var HeroModelSchema = zod.z.object({
|
|
|
55522
56142
|
sideTiles: HeroSideTilesSchema,
|
|
55523
56143
|
/** The status line under the main icon. */
|
|
55524
56144
|
title: HeroTextSchema,
|
|
56145
|
+
/** The scene's top line when it says more than `title`; absent = draw the title. */
|
|
56146
|
+
caption: HeroTextSchema.optional(),
|
|
55525
56147
|
badges: zod.z.array(HeroBadgeSchema),
|
|
55526
56148
|
remote: HeroRemoteSlotSchema.nullable(),
|
|
56149
|
+
/** The foot button that opens the device's history: "History", "Cycles", "Meals", "Access". */
|
|
56150
|
+
historyLabel: HeroTextSchema,
|
|
55527
56151
|
consumables: HeroConsumablesSlotSchema.nullable(),
|
|
55528
56152
|
consumption: HeroConsumptionSlotSchema.nullable(),
|
|
55529
56153
|
ownPower: HeroOwnPowerSlotSchema.nullable(),
|
|
@@ -56064,6 +56688,12 @@ var IntegrationWithStateSchema = zod.z.object({
|
|
|
56064
56688
|
name: zod.z.string(),
|
|
56065
56689
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
56066
56690
|
enabled: zod.z.boolean(),
|
|
56691
|
+
/**
|
|
56692
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
56693
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
56694
|
+
* must not draw it as on or off (D315).
|
|
56695
|
+
*/
|
|
56696
|
+
switchUnknown: zod.z.literal(true).optional(),
|
|
56067
56697
|
info: zod.z.record(zod.z.string(), zod.z.unknown()).readonly(),
|
|
56068
56698
|
/** The discovery candidate this integration was set up from (D984). */
|
|
56069
56699
|
originStableId: zod.z.string().optional(),
|
|
@@ -56077,6 +56707,12 @@ var IntegrationLiteSchema = zod.z.object({
|
|
|
56077
56707
|
name: zod.z.string(),
|
|
56078
56708
|
/** A projection of the instance body's switch (`setInstanceEnabled` is the only writer). */
|
|
56079
56709
|
enabled: zod.z.boolean(),
|
|
56710
|
+
/**
|
|
56711
|
+
* True when the addon that holds the switch did not answer (down, failed, or keeps no record for
|
|
56712
|
+
* this row): `enabled` is then the stored registry flag, a stale value, not the state. A reader
|
|
56713
|
+
* must not draw it as on or off (D315).
|
|
56714
|
+
*/
|
|
56715
|
+
switchUnknown: zod.z.literal(true).optional(),
|
|
56080
56716
|
info: zod.z.record(zod.z.string(), zod.z.unknown()).readonly(),
|
|
56081
56717
|
/** The discovery candidate this integration was set up from (D984). */
|
|
56082
56718
|
originStableId: zod.z.string().optional(),
|
|
@@ -56175,9 +56811,9 @@ var UpdateIntegrationInputSchema = zod.z.object({
|
|
|
56175
56811
|
id: zod.z.string(),
|
|
56176
56812
|
name: zod.z.string().optional(),
|
|
56177
56813
|
/**
|
|
56178
|
-
*
|
|
56179
|
-
*
|
|
56180
|
-
*
|
|
56814
|
+
* Honoured ONLY for a fixed builtin (`info.fixed`), whose switch is the hub's own registry flag
|
|
56815
|
+
* and works while its addon is down. Any other row is refused (a typed `BAD_REQUEST`): its
|
|
56816
|
+
* switch is `integration-instances.setInstanceEnabled`.
|
|
56181
56817
|
*/
|
|
56182
56818
|
enabled: zod.z.boolean().optional(),
|
|
56183
56819
|
info: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
@@ -56198,6 +56834,13 @@ var integrationsCapability = {
|
|
|
56198
56834
|
kind: "mutation",
|
|
56199
56835
|
auth: "admin"
|
|
56200
56836
|
}),
|
|
56837
|
+
/**
|
|
56838
|
+
* Delete an integration from the hub side: its devices, its registry row and its record, and
|
|
56839
|
+
* announce it. It works while the addon that owns the instance is down (installed but
|
|
56840
|
+
* crashed), where `integration-instances.deleteInstance` has no provider to route to; with the
|
|
56841
|
+
* provider up the record is removed through it as well. A fixed builtin and an instance a link
|
|
56842
|
+
* names are refused first.
|
|
56843
|
+
*/
|
|
56201
56844
|
delete: require_sleep.method(zod.z.object({ id: zod.z.string() }), DeleteIntegrationResultSchema, {
|
|
56202
56845
|
kind: "mutation",
|
|
56203
56846
|
auth: "admin"
|
|
@@ -56227,6 +56870,12 @@ var integrationsCapability = {
|
|
|
56227
56870
|
* the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
|
|
56228
56871
|
* or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
|
|
56229
56872
|
* clears it.
|
|
56873
|
+
*
|
|
56874
|
+
* Who may call (epic #440): every method but `describe` and `instanceFormSchema` is open to any
|
|
56875
|
+
* session (`caller: 'scoped'`) and default-denies. An admin passes everywhere. A non-admin passes
|
|
56876
|
+
* only on a call pinned to one addon whose `describe().userScoped` is true, and that provider
|
|
56877
|
+
* filters every row on the `caller` the router injected (a notification target is somebody's
|
|
56878
|
+
* phone: a user sees and changes only their own). An addon that says nothing keeps the admin door.
|
|
56230
56879
|
*/
|
|
56231
56880
|
var ConfigSchemaPassthrough$2 = zod.z.custom();
|
|
56232
56881
|
var IntegrationInstanceIdSchema = zod.z.string().min(1);
|
|
@@ -56340,7 +56989,15 @@ var IntegrationInstanceDescriptionSchema = zod.z.object({
|
|
|
56340
56989
|
*/
|
|
56341
56990
|
mintsId: zod.z.boolean().optional(),
|
|
56342
56991
|
/** The links to other instances the provider's kinds declare; absent means none. */
|
|
56343
|
-
links: zod.z.array(IntegrationInstanceLinkSchema).optional()
|
|
56992
|
+
links: zod.z.array(IntegrationInstanceLinkSchema).optional(),
|
|
56993
|
+
/**
|
|
56994
|
+
* The rows belong to individual users (a notification target is somebody's phone). The router
|
|
56995
|
+
* then opens `listInstances`, `getInstance`, `createInstance`, `updateInstance`,
|
|
56996
|
+
* `setInstanceEnabled`, `deleteInstance` and `testInstance` to a NON-admin session on a call
|
|
56997
|
+
* pinned to this addon, and hands the provider the `caller` so it keeps a user to their own rows.
|
|
56998
|
+
* Absent means admin only, as it always was.
|
|
56999
|
+
*/
|
|
57000
|
+
userScoped: zod.z.boolean().optional()
|
|
56344
57001
|
});
|
|
56345
57002
|
var IntegrationInstanceStatusSchema = zod.z.object({
|
|
56346
57003
|
state: zod.z.enum([
|
|
@@ -56398,8 +57055,14 @@ var integrationInstancesCapability = {
|
|
|
56398
57055
|
/** The discovery candidate the wizard was seeded from (`stableId`), if any. */
|
|
56399
57056
|
candidateStableId: zod.z.string().min(1).optional()
|
|
56400
57057
|
}), ConfigSchemaPassthrough$2, { auth: "admin" }),
|
|
56401
|
-
listInstances: require_sleep.method(zod.z.
|
|
56402
|
-
|
|
57058
|
+
listInstances: require_sleep.method(zod.z.looseObject({}), zod.z.array(IntegrationInstanceSchema).readonly(), {
|
|
57059
|
+
auth: "protected",
|
|
57060
|
+
caller: "scoped"
|
|
57061
|
+
}),
|
|
57062
|
+
getInstance: require_sleep.method(zod.z.object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), {
|
|
57063
|
+
auth: "protected",
|
|
57064
|
+
caller: "scoped"
|
|
57065
|
+
}),
|
|
56403
57066
|
/**
|
|
56404
57067
|
* Insert the typed record. With `id` it is stored under that id (a duplicate id is refused);
|
|
56405
57068
|
* without one the PROVIDER mints it and answers it. `kind` picks one of `describe().kinds`.
|
|
@@ -56432,11 +57095,13 @@ var integrationInstancesCapability = {
|
|
|
56432
57095
|
seed: zod.z.object({ info: zod.z.record(zod.z.string(), zod.z.unknown()) }).optional()
|
|
56433
57096
|
}), zod.z.object({ id: zod.z.string() }), {
|
|
56434
57097
|
kind: "mutation",
|
|
56435
|
-
auth: "
|
|
57098
|
+
auth: "protected",
|
|
57099
|
+
caller: "scoped"
|
|
56436
57100
|
}),
|
|
56437
57101
|
updateInstance: require_sleep.method(IntegrationInstancePatchSchema, zod.z.object({ ok: zod.z.literal(true) }), {
|
|
56438
57102
|
kind: "mutation",
|
|
56439
|
-
auth: "
|
|
57103
|
+
auth: "protected",
|
|
57104
|
+
caller: "scoped"
|
|
56440
57105
|
}),
|
|
56441
57106
|
/**
|
|
56442
57107
|
* Switch ONE instance on or off, for every role; a missing record is created from the addon's
|
|
@@ -56448,7 +57113,8 @@ var integrationInstancesCapability = {
|
|
|
56448
57113
|
enabled: zod.z.boolean()
|
|
56449
57114
|
}), zod.z.object({ ok: zod.z.literal(true) }), {
|
|
56450
57115
|
kind: "mutation",
|
|
56451
|
-
auth: "
|
|
57116
|
+
auth: "protected",
|
|
57117
|
+
caller: "scoped"
|
|
56452
57118
|
}),
|
|
56453
57119
|
/**
|
|
56454
57120
|
* Delete the record and its keychain refs together. For an instance that brings devices the hub
|
|
@@ -56457,7 +57123,8 @@ var integrationInstancesCapability = {
|
|
|
56457
57123
|
*/
|
|
56458
57124
|
deleteInstance: require_sleep.method(zod.z.object({ id: IntegrationInstanceIdSchema }), zod.z.object({ ok: zod.z.literal(true) }), {
|
|
56459
57125
|
kind: "mutation",
|
|
56460
|
-
auth: "
|
|
57126
|
+
auth: "protected",
|
|
57127
|
+
caller: "scoped"
|
|
56461
57128
|
}),
|
|
56462
57129
|
testInstance: require_sleep.optionalMethod(zod.z.object({
|
|
56463
57130
|
id: IntegrationInstanceIdSchema.nullable(),
|
|
@@ -56466,7 +57133,8 @@ var integrationInstancesCapability = {
|
|
|
56466
57133
|
kind: zod.z.string().min(1).optional()
|
|
56467
57134
|
}), TestConnectionResultSchema, {
|
|
56468
57135
|
kind: "mutation",
|
|
56469
|
-
auth: "
|
|
57136
|
+
auth: "protected",
|
|
57137
|
+
caller: "scoped"
|
|
56470
57138
|
})
|
|
56471
57139
|
}
|
|
56472
57140
|
};
|
|
@@ -83829,6 +84497,11 @@ var SendEmailResultSchema = zod.z.object({
|
|
|
83829
84497
|
var SmtpStatusSchema = zod.z.object({
|
|
83830
84498
|
/** True iff the addon has successfully verified the relay. */
|
|
83831
84499
|
ready: zod.z.boolean(),
|
|
84500
|
+
/**
|
|
84501
|
+
* The tri-state behind `ready` (D315): true when the last send worked, false when it failed,
|
|
84502
|
+
* ABSENT when the relay has not sent yet (unknown, never "not verified").
|
|
84503
|
+
*/
|
|
84504
|
+
verified: zod.z.boolean().optional(),
|
|
83832
84505
|
/** Operator-visible host string (no credentials). */
|
|
83833
84506
|
host: zod.z.string(),
|
|
83834
84507
|
/** Last error message reported by the relay, when not ready. */
|
|
@@ -83848,13 +84521,6 @@ var smtpProviderCapability = {
|
|
|
83848
84521
|
auth: "admin",
|
|
83849
84522
|
access: "create"
|
|
83850
84523
|
}),
|
|
83851
|
-
/** Round-trip ping against the SMTP relay (EHLO + AUTH if configured).
|
|
83852
|
-
* Used by the operator's "Test connection" button. */
|
|
83853
|
-
verify: require_sleep.method(RelayPinSchema, SmtpStatusSchema, {
|
|
83854
|
-
kind: "mutation",
|
|
83855
|
-
auth: "admin",
|
|
83856
|
-
access: "view"
|
|
83857
|
-
}),
|
|
83858
84524
|
getStatus: require_sleep.method(RelayPinSchema, SmtpStatusSchema, { auth: "admin" })
|
|
83859
84525
|
}
|
|
83860
84526
|
};
|
|
@@ -89391,6 +90057,8 @@ var CAPABILITY_NAMES = {
|
|
|
89391
90057
|
groupActive: "group-active",
|
|
89392
90058
|
groupCommands: "group-commands",
|
|
89393
90059
|
groupStatus: "group-status",
|
|
90060
|
+
heatPumpControl: "heat-pump-control",
|
|
90061
|
+
heatPumpStatus: "heat-pump-status",
|
|
89394
90062
|
heatingValve: "heating-valve",
|
|
89395
90063
|
heroLayout: "hero-layout",
|
|
89396
90064
|
humidifier: "humidifier",
|
|
@@ -89846,6 +90514,14 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
89846
90514
|
key: "groupStatus",
|
|
89847
90515
|
name: "group-status"
|
|
89848
90516
|
},
|
|
90517
|
+
{
|
|
90518
|
+
key: "heatPumpControl",
|
|
90519
|
+
name: "heat-pump-control"
|
|
90520
|
+
},
|
|
90521
|
+
{
|
|
90522
|
+
key: "heatPumpStatus",
|
|
90523
|
+
name: "heat-pump-status"
|
|
90524
|
+
},
|
|
89849
90525
|
{
|
|
89850
90526
|
key: "heatingValve",
|
|
89851
90527
|
name: "heating-valve"
|
|
@@ -90420,6 +91096,8 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
90420
91096
|
groupActiveCapability,
|
|
90421
91097
|
groupCommandsCapability,
|
|
90422
91098
|
groupStatusCapability,
|
|
91099
|
+
heatPumpControlCapability,
|
|
91100
|
+
heatPumpStatusCapability,
|
|
90423
91101
|
heatingValveCapability,
|
|
90424
91102
|
heroLayoutCapability,
|
|
90425
91103
|
humidifierCapability,
|
|
@@ -97981,6 +98659,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
97981
98659
|
groupCommands: groupCommandsCapability,
|
|
97982
98660
|
groupStatus: groupStatusCapability,
|
|
97983
98661
|
heatingValve: heatingValveCapability,
|
|
98662
|
+
heatPumpStatus: heatPumpStatusCapability,
|
|
97984
98663
|
humidifier: humidifierCapability,
|
|
97985
98664
|
humiditySensor: humiditySensorCapability,
|
|
97986
98665
|
image: imageCapability,
|
|
@@ -100033,6 +100712,7 @@ var DEVICE_TYPE_CONTROL_KIND = {
|
|
|
100033
100712
|
[require_device_type.DeviceType.Valve]: "valve",
|
|
100034
100713
|
[require_device_type.DeviceType.Humidifier]: "humidifier",
|
|
100035
100714
|
[require_device_type.DeviceType.WaterHeater]: "water-heater",
|
|
100715
|
+
[require_device_type.DeviceType.HeatPump]: "dummy",
|
|
100036
100716
|
[require_device_type.DeviceType.Camera]: "dummy",
|
|
100037
100717
|
[require_device_type.DeviceType.Hub]: "dummy",
|
|
100038
100718
|
[require_device_type.DeviceType.Switch]: "switch",
|
|
@@ -100308,6 +100988,13 @@ var lockContribution = contribution("lock-control", LockControlStatusSchema, (sl
|
|
|
100308
100988
|
reading: reading("lock-control", words?.state ?? "unknown", false, words?.title),
|
|
100309
100989
|
rows: [row$1("lock", state === "locked" || state === "locking" ? "lock" : "lock-open", joinText([title, since]), lockControls(state, ctx.features.includes(require_device_type.DeviceFeature.LockOpen)))],
|
|
100310
100990
|
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, "muted")] },
|
|
100991
|
+
...words === null ? {} : { tiles: { left: [{
|
|
100992
|
+
label: require_sleep.t("Door", "Porta"),
|
|
100993
|
+
value: title
|
|
100994
|
+
}, ...since === null ? [] : [{
|
|
100995
|
+
label: require_sleep.t("Since", "Da"),
|
|
100996
|
+
value: since
|
|
100997
|
+
}]] } },
|
|
100311
100998
|
...words?.door == null ? {} : { scene: { mode: words.door } }
|
|
100312
100999
|
};
|
|
100313
101000
|
});
|
|
@@ -100389,7 +101076,17 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
100389
101076
|
return {
|
|
100390
101077
|
reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
|
|
100391
101078
|
rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? require_sleep.t("Unknown", "Sconosciuto"), since]), alarmControls(state, modes, slice?.requiresCode ?? false))],
|
|
100392
|
-
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] }
|
|
101079
|
+
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
|
|
101080
|
+
...words === null ? {} : { tiles: {
|
|
101081
|
+
left: [{
|
|
101082
|
+
label: require_sleep.t("Mode", "Modalità"),
|
|
101083
|
+
value: words.title
|
|
101084
|
+
}],
|
|
101085
|
+
...since === null ? {} : { right: [{
|
|
101086
|
+
label: require_sleep.t("Since", "Da"),
|
|
101087
|
+
value: since
|
|
101088
|
+
}] }
|
|
101089
|
+
} }
|
|
100393
101090
|
};
|
|
100394
101091
|
}),
|
|
100395
101092
|
"automation-control": contribution("automation-control", AutomationControlStatusSchema, (slice, ctx) => {
|
|
@@ -100455,7 +101152,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
100455
101152
|
*/
|
|
100456
101153
|
var has$3 = (ctx, f) => ctx.features.includes(f);
|
|
100457
101154
|
var unknownText = require_sleep.t("Unknown", "Sconosciuto");
|
|
100458
|
-
var pct$
|
|
101155
|
+
var pct$2 = (n) => require_sleep.t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
100459
101156
|
var unit = (n) => Math.min(1, Math.max(0, n / 100));
|
|
100460
101157
|
/** Battery as a fact, unless the device is also bound to the `battery` cap (it already says so). */
|
|
100461
101158
|
function ownBattery(level, ctx) {
|
|
@@ -100517,7 +101214,7 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
100517
101214
|
},
|
|
100518
101215
|
valueArg: "direction"
|
|
100519
101216
|
});
|
|
100520
|
-
const speedText = speed === null ? null : pct$
|
|
101217
|
+
const speedText = speed === null ? null : pct$2(speed);
|
|
100521
101218
|
const preset = slice?.preset ?? "";
|
|
100522
101219
|
const status = speed === null ? unknownText : joinText([speed === 0 ? require_sleep.t("Off", "Spento") : require_sleep.t(`Speed ${speed}%`, `Velocità ${speed}%`), preset === "" ? null : require_sleep.t(preset, preset)]);
|
|
100523
101220
|
return {
|
|
@@ -100530,10 +101227,16 @@ var fanContribution = contribution("fan-control", FanControlStatusSchema, (slice
|
|
|
100530
101227
|
}],
|
|
100531
101228
|
...speedText === null ? {} : {
|
|
100532
101229
|
facts: [fact("speed", "fan", speedText, speed === 0 ? "muted" : "primary")],
|
|
100533
|
-
tiles: {
|
|
100534
|
-
|
|
100535
|
-
|
|
100536
|
-
|
|
101230
|
+
tiles: {
|
|
101231
|
+
...slice?.oscillating == null ? {} : { left: [{
|
|
101232
|
+
label: require_sleep.t("Oscillation", "Oscilla"),
|
|
101233
|
+
value: slice.oscillating ? require_sleep.t("Yes", "Sì") : require_sleep.t("No", "No")
|
|
101234
|
+
}] },
|
|
101235
|
+
...preset === "" ? {} : { right: [{
|
|
101236
|
+
label: require_sleep.t("Mode", "Modalità"),
|
|
101237
|
+
value: require_sleep.t(preset, preset)
|
|
101238
|
+
}] }
|
|
101239
|
+
},
|
|
100537
101240
|
scene: { level: unit(speed ?? 0) }
|
|
100538
101241
|
}
|
|
100539
101242
|
};
|
|
@@ -100597,7 +101300,8 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
100597
101300
|
const words = state === null ? null : VACUUM_WORDS[state];
|
|
100598
101301
|
const title = state === "error" && slice?.errorLabel ? require_sleep.t(slice.errorLabel, slice.errorLabel) : words?.title;
|
|
100599
101302
|
const controls = vacuumControls(state);
|
|
100600
|
-
|
|
101303
|
+
const suctionControls = [];
|
|
101304
|
+
if (slice !== void 0 && slice.availableFanSpeeds.length > 0) suctionControls.push({
|
|
100601
101305
|
kind: "picker",
|
|
100602
101306
|
id: "vacuum.suction",
|
|
100603
101307
|
label: require_sleep.t("Suction", "Aspirazione"),
|
|
@@ -100612,22 +101316,31 @@ var vacuumContribution = contribution("vacuum-control", VacuumControlStatusSchem
|
|
|
100612
101316
|
});
|
|
100613
101317
|
if (state !== null) controls.push(vac("locate", "Locate", "Trova", "map-pin", "locate"));
|
|
100614
101318
|
const progress = state === "cleaning" ? slice?.progress ?? null : null;
|
|
101319
|
+
const suction = slice?.fanSpeed == null || slice.fanSpeed === "" ? [] : [{
|
|
101320
|
+
label: require_sleep.t("Suction", "Aspirazione"),
|
|
101321
|
+
value: require_sleep.t(slice.fanSpeed, slice.fanSpeed)
|
|
101322
|
+
}];
|
|
101323
|
+
const suctionRows = suctionControls.length === 0 ? [] : [{
|
|
101324
|
+
id: "vacuum-suction",
|
|
101325
|
+
icon: "bot",
|
|
101326
|
+
status: null,
|
|
101327
|
+
controls: suctionControls
|
|
101328
|
+
}];
|
|
101329
|
+
const vacuumRows = [{
|
|
101330
|
+
id: "vacuum",
|
|
101331
|
+
icon: "bot",
|
|
101332
|
+
status: title ?? unknownText,
|
|
101333
|
+
controls
|
|
101334
|
+
}, ...suctionRows];
|
|
100615
101335
|
return {
|
|
100616
101336
|
reading: reading("vacuum-control", words?.state ?? "unknown", false, title),
|
|
100617
|
-
rows:
|
|
100618
|
-
|
|
100619
|
-
|
|
100620
|
-
|
|
100621
|
-
|
|
100622
|
-
}],
|
|
100623
|
-
|
|
100624
|
-
...progress === null ? {} : {
|
|
100625
|
-
tiles: { right: [{
|
|
100626
|
-
label: require_sleep.t("Progress", "Avanzamento"),
|
|
100627
|
-
value: pct$1(progress)
|
|
100628
|
-
}] },
|
|
100629
|
-
scene: { level: unit(progress) }
|
|
100630
|
-
}
|
|
101337
|
+
rows: vacuumRows,
|
|
101338
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
101339
|
+
...suction.length === 0 && progress === null ? {} : { tiles: { right: [...suction, ...progress === null ? [] : [{
|
|
101340
|
+
label: require_sleep.t("Progress", "Avanzamento"),
|
|
101341
|
+
value: pct$2(progress)
|
|
101342
|
+
}]] } },
|
|
101343
|
+
...progress === null ? {} : { scene: { level: unit(progress) } }
|
|
100631
101344
|
};
|
|
100632
101345
|
});
|
|
100633
101346
|
var MOWER_WORDS = {
|
|
@@ -100683,11 +101396,11 @@ var mowerContribution = contribution("lawn-mower-control", LawnMowerControlStatu
|
|
|
100683
101396
|
status: title ?? unknownText,
|
|
100684
101397
|
controls: mowerControls(activity)
|
|
100685
101398
|
}],
|
|
100686
|
-
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$
|
|
101399
|
+
facts: [...ownBattery(slice?.batteryLevel ?? null, ctx), ...progress === null ? [] : [fact("progress", "activity", pct$2(progress), "primary")]],
|
|
100687
101400
|
...progress === null ? {} : {
|
|
100688
101401
|
tiles: { right: [{
|
|
100689
101402
|
label: require_sleep.t("Progress", "Avanzamento"),
|
|
100690
|
-
value: pct$
|
|
101403
|
+
value: pct$2(progress)
|
|
100691
101404
|
}] },
|
|
100692
101405
|
scene: { level: unit(progress) }
|
|
100693
101406
|
}
|
|
@@ -100758,10 +101471,13 @@ var feederContribution = contribution("pet-feeder", PetFeederStatusSchema, (slic
|
|
|
100758
101471
|
...last === null ? [] : [fact("last-run", "clock", require_sleep.t(`Last ${last} g`, `Ultimo ${last} g`))],
|
|
100759
101472
|
...ownBattery(slice?.powerSource === "battery" ? slice.batteryPower : null, ctx)
|
|
100760
101473
|
],
|
|
100761
|
-
...
|
|
101474
|
+
tiles: { left: [...slice?.foodLevel == null ? [] : [{
|
|
101475
|
+
label: require_sleep.t("Tank", "Serbatoio"),
|
|
101476
|
+
value: pct$2(slice.foodLevel)
|
|
101477
|
+
}], ...last === null ? [] : [{
|
|
100762
101478
|
label: require_sleep.t("Last portion", "Ultima porzione"),
|
|
100763
101479
|
value: require_sleep.t(`${last} g`, `${last} g`)
|
|
100764
|
-
}] }
|
|
101480
|
+
}]] }
|
|
100765
101481
|
};
|
|
100766
101482
|
});
|
|
100767
101483
|
var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema, (slice) => {
|
|
@@ -100789,10 +101505,13 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
|
|
|
100789
101505
|
}],
|
|
100790
101506
|
...level === null ? {} : {
|
|
100791
101507
|
facts: [fact("level", "droplets", require_sleep.t(`Water ${Math.round(level)}%`, `Acqua ${Math.round(level)}%`), level <= 20 ? "warning" : "primary")],
|
|
100792
|
-
tiles: {
|
|
101508
|
+
tiles: { left: [{
|
|
100793
101509
|
label: require_sleep.t("Water", "Acqua"),
|
|
100794
|
-
value: pct$
|
|
100795
|
-
}]
|
|
101510
|
+
value: pct$2(level)
|
|
101511
|
+
}, ...slice?.waterVolume == null ? [] : [{
|
|
101512
|
+
label: require_sleep.t("Volume", "Volume"),
|
|
101513
|
+
value: require_sleep.t(`${Math.round(slice.waterVolume)} ml`, `${Math.round(slice.waterVolume)} ml`)
|
|
101514
|
+
}]] },
|
|
100796
101515
|
scene: { level: unit(level) }
|
|
100797
101516
|
}
|
|
100798
101517
|
};
|
|
@@ -100826,14 +101545,18 @@ var DEVICES_FAMILY_CONTRIBUTIONS = {
|
|
|
100826
101545
|
* that does not parse reads `unknown`, never closed or off (D315/D393).
|
|
100827
101546
|
*/
|
|
100828
101547
|
var has$2 = (ctx, f) => ctx.features.includes(f);
|
|
100829
|
-
var pct = (n) => require_sleep.t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
101548
|
+
var pct$1 = (n) => require_sleep.t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
100830
101549
|
var brightnessContribution = contribution("brightness", BrightnessStatusSchema, (slice) => {
|
|
100831
101550
|
const level = slice?.level ?? null;
|
|
100832
101551
|
return {
|
|
100833
101552
|
...level === null ? {} : { reading: reading("brightness", level > 0 ? "on" : "off") },
|
|
100834
101553
|
...level === null ? {} : {
|
|
100835
|
-
facts: [fact("level", "sun-dim", pct(level), level > 0 ? "primary" : "muted")],
|
|
100836
|
-
scene: { level: level / 100 }
|
|
101554
|
+
facts: [fact("level", "sun-dim", pct$1(level), level > 0 ? "primary" : "muted")],
|
|
101555
|
+
scene: { level: level / 100 },
|
|
101556
|
+
tiles: { left: [{
|
|
101557
|
+
label: require_sleep.t("Brightness", "Luminosità"),
|
|
101558
|
+
value: pct$1(level)
|
|
101559
|
+
}] }
|
|
100837
101560
|
},
|
|
100838
101561
|
rows: [row$1("brightness", "sun-dim", level === null ? null : require_sleep.t(`Brightness ${Math.round(level)}%`, `Luminosità ${Math.round(level)}%`), [{
|
|
100839
101562
|
kind: "slider",
|
|
@@ -101042,12 +101765,16 @@ function travelFragment(s, state, position, tilt, ctx) {
|
|
|
101042
101765
|
});
|
|
101043
101766
|
return {
|
|
101044
101767
|
reading: reading(s.source, words.state, false, words.title),
|
|
101045
|
-
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct(position))] },
|
|
101768
|
+
...position === null ? {} : { facts: [fact("level", "arrow-up-down", pct$1(position))] },
|
|
101769
|
+
...position === null ? {} : { tiles: { left: [{
|
|
101770
|
+
label: require_sleep.t("Opening", "Apertura"),
|
|
101771
|
+
value: pct$1(position)
|
|
101772
|
+
}] } },
|
|
101046
101773
|
scene: {
|
|
101047
101774
|
...words.mode === null ? {} : { mode: words.mode },
|
|
101048
101775
|
...position === null ? {} : { level: position / 100 }
|
|
101049
101776
|
},
|
|
101050
|
-
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct(position) : null]), controls)]
|
|
101777
|
+
rows: [row$1(s.rowId, "arrow-up-down", joinText([words.title, position !== null && state !== "open" ? pct$1(position) : null]), controls)]
|
|
101051
101778
|
};
|
|
101052
101779
|
}
|
|
101053
101780
|
var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
@@ -101125,10 +101852,10 @@ var ACTUATORS_FAMILY_CONTRIBUTIONS = {
|
|
|
101125
101852
|
const now = slice.currentHumidity;
|
|
101126
101853
|
return {
|
|
101127
101854
|
reading: reading("humidifier", state, false, title),
|
|
101128
|
-
...now === null ? {} : { facts: [fact("level", "droplets", pct(now), "info")] },
|
|
101855
|
+
...now === null ? {} : { facts: [fact("level", "droplets", pct$1(now), "info")] },
|
|
101129
101856
|
...slice.targetHumidity === null ? {} : { tiles: { right: [{
|
|
101130
101857
|
label: require_sleep.t("Target", "Obiettivo"),
|
|
101131
|
-
value: pct(slice.targetHumidity)
|
|
101858
|
+
value: pct$1(slice.targetHumidity)
|
|
101132
101859
|
}] } },
|
|
101133
101860
|
...now === null ? {} : { scene: { level: now / 100 } },
|
|
101134
101861
|
rows: [row$1("humidifier", "droplets", joinText([title, slice.mode === null ? null : require_sleep.t(slice.mode, slice.mode)]), controls)]
|
|
@@ -101378,17 +102105,16 @@ var weatherContribution = contribution("weather", WeatherStatusSchema, (slice, c
|
|
|
101378
102105
|
});
|
|
101379
102106
|
var updateContribution = contribution("update", UpdateStatusSchema, (slice) => {
|
|
101380
102107
|
if (slice === void 0) return { reading: reading("update", "unknown") };
|
|
101381
|
-
const { currentVersion, availableVersion, inProgress
|
|
102108
|
+
const { currentVersion, availableVersion, inProgress } = slice;
|
|
101382
102109
|
const pending = availableVersion !== null && availableVersion !== "" && availableVersion !== currentVersion;
|
|
101383
102110
|
if (!pending && currentVersion === null && !inProgress) return { reading: reading("update", "unknown") };
|
|
101384
102111
|
const state = inProgress ? "running" : pending ? "standby" : "idle";
|
|
101385
102112
|
const title = inProgress ? require_sleep.t("Updating", "Aggiornamento in corso") : pending ? require_sleep.t("Update available", "Aggiornamento disponibile") : require_sleep.t("Up to date", "Aggiornato");
|
|
101386
102113
|
const versions = currentVersion === null ? pending ? require_sleep.t(`${availableVersion}`, `${availableVersion}`) : null : pending ? require_sleep.t(`${currentVersion} → ${availableVersion}`, `${currentVersion} → ${availableVersion}`) : require_sleep.t(`Version ${currentVersion}`, `Versione ${currentVersion}`);
|
|
101387
|
-
const install = pending && updatable && !inProgress ? [asAction(action("update.install", require_sleep.t("Install", "Installa"), "download", "update", "installUpdate", {}, "primary", "install"))] : [];
|
|
101388
102114
|
return {
|
|
101389
102115
|
reading: reading("update", state, false, title),
|
|
101390
102116
|
facts: versions === null ? [] : [fact("reading", "download", versions, pending ? "warning" : "muted")],
|
|
101391
|
-
rows: [row$1("update", "download", versions,
|
|
102117
|
+
rows: [row$1("update", "download", versions, [])]
|
|
101392
102118
|
};
|
|
101393
102119
|
});
|
|
101394
102120
|
var imageContribution = contribution("image", ImageStatusSchema, (slice, ctx) => {
|
|
@@ -101498,6 +102224,33 @@ var ON_MODE_PREFERENCE = [
|
|
|
101498
102224
|
"heat",
|
|
101499
102225
|
"cool"
|
|
101500
102226
|
];
|
|
102227
|
+
var FAN_LABEL = {
|
|
102228
|
+
auto: require_sleep.t("Auto", "Auto"),
|
|
102229
|
+
quiet: require_sleep.t("Quiet", "Silenziosa"),
|
|
102230
|
+
low: require_sleep.t("Low", "Bassa"),
|
|
102231
|
+
medium: require_sleep.t("Medium", "Media"),
|
|
102232
|
+
high: require_sleep.t("High", "Alta"),
|
|
102233
|
+
turbo: require_sleep.t("Turbo", "Turbo"),
|
|
102234
|
+
off: require_sleep.t("Off", "Spenta")
|
|
102235
|
+
};
|
|
102236
|
+
/** A readable label for a fan speed name; an unknown one is shown as the device reported it. */
|
|
102237
|
+
function fanLabelOf(fan) {
|
|
102238
|
+
return FAN_LABEL[fan] ?? require_sleep.t(fan, fan);
|
|
102239
|
+
}
|
|
102240
|
+
/** Short labels for a segmented control: one word each, so the segments stay on a line. */
|
|
102241
|
+
var MODE_SEGMENT_LABEL = {
|
|
102242
|
+
off: require_sleep.t("Off", "Spento"),
|
|
102243
|
+
heat: require_sleep.t("Heat", "Caldo"),
|
|
102244
|
+
cool: require_sleep.t("Cool", "Freddo"),
|
|
102245
|
+
auto: require_sleep.t("Auto", "Auto"),
|
|
102246
|
+
heat_cool: require_sleep.t("Heat/Cool", "Caldo/Freddo"),
|
|
102247
|
+
fan_only: require_sleep.t("Fan", "Vent."),
|
|
102248
|
+
dry: require_sleep.t("Dry", "Deum.")
|
|
102249
|
+
};
|
|
102250
|
+
/** The segment label of every available HVAC mode, keyed by the mode value. */
|
|
102251
|
+
function modeLabelsOf(modes) {
|
|
102252
|
+
return Object.fromEntries(modes.map((m) => [m, MODE_SEGMENT_LABEL[m]]));
|
|
102253
|
+
}
|
|
101501
102254
|
/** 22 -> "22", 22.3 -> "22.3": a trailing zero is noise on a thermostat. */
|
|
101502
102255
|
function formatDegrees(value) {
|
|
101503
102256
|
return `${Number(value.toFixed(1))}°`;
|
|
@@ -101564,11 +102317,11 @@ function rangeFrom(min, max, step) {
|
|
|
101564
102317
|
* contribute, types never do (D14). A slice that is absent or does not parse is
|
|
101565
102318
|
* "not answered": the state reads unknown, no row is drawn (D315, D393).
|
|
101566
102319
|
*/
|
|
101567
|
-
var same = (text) => require_sleep.t(text, text);
|
|
101568
|
-
function tile(en, it, value) {
|
|
102320
|
+
var same$1 = (text) => require_sleep.t(text, text);
|
|
102321
|
+
function tile$1(en, it, value) {
|
|
101569
102322
|
return {
|
|
101570
102323
|
label: require_sleep.t(en, it),
|
|
101571
|
-
value: same(value)
|
|
102324
|
+
value: same$1(value)
|
|
101572
102325
|
};
|
|
101573
102326
|
}
|
|
101574
102327
|
function setpointSlider(id, cap, method, valueArg, value, range) {
|
|
@@ -101603,18 +102356,19 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
101603
102356
|
const status = climateStatusText(view);
|
|
101604
102357
|
const facts = [];
|
|
101605
102358
|
if (status !== null) facts.push(fact("climate", "thermometer", status));
|
|
101606
|
-
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same(`${Math.round(view.humidity)}%`)));
|
|
101607
|
-
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
102359
|
+
if (view.humidity !== null) facts.push(fact("humidity", "droplets", same$1(`${Math.round(view.humidity)}%`)));
|
|
102360
|
+
if (view.targetHumidity !== null) facts.push(fact("humidity", "droplets", same$1(`→ ${Math.round(view.targetHumidity)}%`)));
|
|
101608
102361
|
const left = [];
|
|
101609
102362
|
const right = [];
|
|
101610
|
-
if (view.measured !== null) left.push(tile("Indoor", "In casa", formatDegrees(view.measured)));
|
|
101611
|
-
if (view.humidity !== null) left.push(tile("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
102363
|
+
if (view.measured !== null) left.push(tile$1("Indoor", "In casa", formatDegrees(view.measured)));
|
|
102364
|
+
if (view.humidity !== null) left.push(tile$1("Humidity", "Umidità", `${Math.round(view.humidity)}%`));
|
|
101612
102365
|
const modeControls = [{
|
|
101613
102366
|
kind: "picker",
|
|
101614
102367
|
id: "climate.mode",
|
|
101615
102368
|
label: require_sleep.t("Mode", "Modalità"),
|
|
101616
102369
|
current: view.mode,
|
|
101617
|
-
options: [...view.availableModes],
|
|
102370
|
+
options: [...view.availableModes.filter((m) => m !== "off"), ...view.availableModes.filter((m) => m === "off")],
|
|
102371
|
+
optionLabels: modeLabelsOf(view.availableModes),
|
|
101618
102372
|
call: {
|
|
101619
102373
|
cap: "climate-control",
|
|
101620
102374
|
method: "setMode",
|
|
@@ -101642,6 +102396,7 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
101642
102396
|
label: require_sleep.t("Fan", "Ventola"),
|
|
101643
102397
|
current: slice.fanMode === "" ? null : slice.fanMode,
|
|
101644
102398
|
options: [...slice.availableFanModes],
|
|
102399
|
+
optionLabels: Object.fromEntries(slice.availableFanModes.map((m) => [m, fanLabelOf(m)])),
|
|
101645
102400
|
call: {
|
|
101646
102401
|
cap: "climate-control",
|
|
101647
102402
|
method: "setFanMode",
|
|
@@ -101667,14 +102422,15 @@ var climateContribution = contribution("climate-control", ClimateControlStatusSc
|
|
|
101667
102422
|
if (fanControls.length > 0) rows.push({
|
|
101668
102423
|
id: "climate-fan",
|
|
101669
102424
|
icon: "fan",
|
|
101670
|
-
status: slice.fanMode === "" ? null : same(slice.fanMode),
|
|
102425
|
+
status: slice.fanMode === "" ? null : same$1(slice.fanMode),
|
|
101671
102426
|
controls: fanControls
|
|
101672
102427
|
});
|
|
101673
|
-
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)));
|
|
102428
|
+
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)));
|
|
101674
102429
|
const sceneMode = view.sceneMode;
|
|
101675
102430
|
return {
|
|
101676
102431
|
reading: reading("climate-control", view.isOff ? "off" : "on"),
|
|
101677
102432
|
title: view.modeLabel,
|
|
102433
|
+
...view.isOff || slice.fanMode === "" ? {} : { caption: require_sleep.t(`${view.modeLabel.en} · fan ${fanLabelOf(slice.fanMode).en}`, `${view.modeLabel.it} · ventola ${fanLabelOf(slice.fanMode).it}`) },
|
|
101678
102434
|
facts,
|
|
101679
102435
|
...left.length === 0 && right.length === 0 ? {} : { tiles: {
|
|
101680
102436
|
left,
|
|
@@ -101701,7 +102457,7 @@ var WATER_ON_PREFERENCE = [
|
|
|
101701
102457
|
"performance"
|
|
101702
102458
|
];
|
|
101703
102459
|
function capitalised(word) {
|
|
101704
|
-
return same(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
102460
|
+
return same$1(word.charAt(0).toUpperCase() + word.slice(1).replace(/_/g, " "));
|
|
101705
102461
|
}
|
|
101706
102462
|
var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSchema, (slice) => {
|
|
101707
102463
|
if (slice === void 0 || slice.operationMode === null) return { reading: reading("climate-control", "unknown") };
|
|
@@ -101738,13 +102494,13 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
101738
102494
|
icon: "flame",
|
|
101739
102495
|
status: label,
|
|
101740
102496
|
controls: modeControls
|
|
101741
|
-
}, ...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))];
|
|
102497
|
+
}, ...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))];
|
|
101742
102498
|
const level = levelWithin(slice.targetTemp, range);
|
|
101743
102499
|
return {
|
|
101744
102500
|
reading: reading("climate-control", isOff ? "off" : "on"),
|
|
101745
102501
|
title: label,
|
|
101746
102502
|
facts: status === null ? [] : [fact("climate", "flame", status)],
|
|
101747
|
-
...slice.currentTemp === null ? {} : { tiles: { left: [tile("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
102503
|
+
...slice.currentTemp === null ? {} : { tiles: { left: [tile$1("Water", "Acqua", formatDegrees(slice.currentTemp))] } },
|
|
101748
102504
|
scene: {
|
|
101749
102505
|
...isOff ? {} : { mode: "heat" },
|
|
101750
102506
|
...level === null ? {} : { level }
|
|
@@ -101762,11 +102518,12 @@ var waterHeaterContribution = contribution("water-heater", WaterHeaterStatusSche
|
|
|
101762
102518
|
var heatingValveContribution = contribution("heating-valve", HeatingValveStatusSchema, (slice) => {
|
|
101763
102519
|
const position = slice?.position ?? null;
|
|
101764
102520
|
if (position === null) return { reading: reading("sensor", "unknown") };
|
|
101765
|
-
const text = same(`${Math.round(position)}%`);
|
|
102521
|
+
const text = same$1(`${Math.round(position)}%`);
|
|
101766
102522
|
return {
|
|
101767
102523
|
reading: reading("sensor", position > 0 ? "running" : "idle"),
|
|
101768
102524
|
facts: [fact("valve", "gauge", require_sleep.t(`Valve ${text.en}`, `Valvola ${text.it}`))],
|
|
101769
|
-
tiles: { right: [tile("Valve", "Valvola", text.en)] },
|
|
102525
|
+
tiles: { right: [tile$1("Valve", "Valvola", text.en)] },
|
|
102526
|
+
...position > 0 ? { caption: require_sleep.t(`Heating · valve ${text.en}`, `Riscalda · valvola ${text.it}`) } : {},
|
|
101770
102527
|
scene: { level: position / 100 }
|
|
101771
102528
|
};
|
|
101772
102529
|
});
|
|
@@ -101775,9 +102532,9 @@ function sensorFragment(value, id, icon, en, it, text) {
|
|
|
101775
102532
|
if (value === null) return { reading: reading("sensor", "unknown") };
|
|
101776
102533
|
return {
|
|
101777
102534
|
reading: reading("sensor", "on"),
|
|
101778
|
-
title: same(text),
|
|
101779
|
-
facts: [fact(id, icon, same(text))],
|
|
101780
|
-
tiles: { right: [tile(en, it, text)] }
|
|
102535
|
+
title: same$1(text),
|
|
102536
|
+
facts: [fact(id, icon, same$1(text))],
|
|
102537
|
+
tiles: { right: [tile$1(en, it, text)] }
|
|
101781
102538
|
};
|
|
101782
102539
|
}
|
|
101783
102540
|
var temperatureContribution = contribution("temperature-sensor", TemperatureSensorStatusSchema, (slice) => sensorFragment(slice?.temperature ?? null, "temperature", "thermometer", "Temperature", "Temperatura", formatDegrees(slice?.temperature ?? 0)));
|
|
@@ -101832,8 +102589,8 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
101832
102589
|
return {
|
|
101833
102590
|
reading: reading("sensor", "on"),
|
|
101834
102591
|
...slice.aqi === void 0 ? {} : { title: airQualityWord(slice.aqi) },
|
|
101835
|
-
facts: parts.map((p) => fact("air-quality", "wind", same(`${p.label} ${p.value}`))),
|
|
101836
|
-
tiles: { right: parts.slice(0, 2).map((p) => tile(p.label, p.label, p.value)) }
|
|
102592
|
+
facts: parts.map((p) => fact("air-quality", "wind", same$1(`${p.label} ${p.value}`))),
|
|
102593
|
+
tiles: { right: parts.slice(0, 2).map((p) => tile$1(p.label, p.label, p.value)) }
|
|
101837
102594
|
};
|
|
101838
102595
|
}),
|
|
101839
102596
|
"carbon-monoxide": contribution("carbon-monoxide", CarbonMonoxideStatusSchema, (slice) => {
|
|
@@ -101849,6 +102606,256 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
|
|
|
101849
102606
|
"enum-sensor": enumContribution
|
|
101850
102607
|
};
|
|
101851
102608
|
//#endregion
|
|
102609
|
+
//#region src/device/hero/hero-contributions-heat-pump.ts
|
|
102610
|
+
/**
|
|
102611
|
+
* The heat pump's contribution to a hero (D1026): the compressor scene, every
|
|
102612
|
+
* circuit as a row with its own label and icon, the powers as pills (the
|
|
102613
|
+
* instantaneous COP only when both powers are known) and a "System" group with
|
|
102614
|
+
* one selector per mode. Values and their limits come from the slice, which the
|
|
102615
|
+
* gateway filled: a selector with no allowed value is not drawn, a missing
|
|
102616
|
+
* reading is never a 0 (D393).
|
|
102617
|
+
*/
|
|
102618
|
+
var CAP = "heat-pump-control";
|
|
102619
|
+
var same = (text) => require_sleep.t(text, text);
|
|
102620
|
+
/** The words of the values the gateway names; a value not listed is drawn as the gateway wrote it. */
|
|
102621
|
+
var VALUE_LABELS = {
|
|
102622
|
+
off: require_sleep.t("Off", "Off"),
|
|
102623
|
+
on: require_sleep.t("On", "On"),
|
|
102624
|
+
auto: require_sleep.t("Auto", "Auto"),
|
|
102625
|
+
manual: require_sleep.t("Manual", "Manuale"),
|
|
102626
|
+
low: require_sleep.t("Low", "Bassa"),
|
|
102627
|
+
high: require_sleep.t("High", "Alta"),
|
|
102628
|
+
eco: require_sleep.t("Eco", "Eco"),
|
|
102629
|
+
heat: require_sleep.t("Heat", "Caldo"),
|
|
102630
|
+
cool: require_sleep.t("Cool", "Freddo"),
|
|
102631
|
+
heatCool: require_sleep.t("Heat/cool", "Caldo/freddo"),
|
|
102632
|
+
ownprogram: require_sleep.t("Programme", "Programma")
|
|
102633
|
+
};
|
|
102634
|
+
function valueLabel(value) {
|
|
102635
|
+
const known = VALUE_LABELS[value];
|
|
102636
|
+
if (known !== void 0) return known;
|
|
102637
|
+
const holiday = /^hm(\d+)$/.exec(value);
|
|
102638
|
+
if (holiday?.[1] !== void 0) return require_sleep.t(`Programme ${holiday[1]}`, `Programma ${holiday[1]}`);
|
|
102639
|
+
return same(value);
|
|
102640
|
+
}
|
|
102641
|
+
function optionLabels(allowed) {
|
|
102642
|
+
return Object.fromEntries(allowed.map((value) => [value, valueLabel(value)]));
|
|
102643
|
+
}
|
|
102644
|
+
function picker(id, label, setting, method, args, valueArg = "mode") {
|
|
102645
|
+
return {
|
|
102646
|
+
kind: "picker",
|
|
102647
|
+
id,
|
|
102648
|
+
label,
|
|
102649
|
+
current: setting.value,
|
|
102650
|
+
options: [...setting.allowed],
|
|
102651
|
+
optionLabels: optionLabels(setting.allowed),
|
|
102652
|
+
call: {
|
|
102653
|
+
cap: CAP,
|
|
102654
|
+
method,
|
|
102655
|
+
args: { ...args }
|
|
102656
|
+
},
|
|
102657
|
+
valueArg
|
|
102658
|
+
};
|
|
102659
|
+
}
|
|
102660
|
+
/** A selector exists only where the gateway named values to choose from. */
|
|
102661
|
+
function choosable(setting) {
|
|
102662
|
+
return setting !== null && setting.allowed.length > 0;
|
|
102663
|
+
}
|
|
102664
|
+
function circuitControl(circuit) {
|
|
102665
|
+
const args = { circuitId: circuit.id };
|
|
102666
|
+
if (circuit.kind === "dhw" && choosable(circuit.temperatureLevel)) return picker(`heat-pump.${circuit.id}.level`, require_sleep.t("Level", "Livello"), circuit.temperatureLevel, "setDhwTemperatureLevel", args, "level");
|
|
102667
|
+
if (!choosable(circuit.operationMode)) return null;
|
|
102668
|
+
const method = circuit.kind === "dhw" ? "setDhwOperationMode" : "setCircuitOperationMode";
|
|
102669
|
+
return picker(`heat-pump.${circuit.id}.mode`, require_sleep.t("Mode", "Modalità"), circuit.operationMode, method, args);
|
|
102670
|
+
}
|
|
102671
|
+
/** A circuit with no reading is still a row: it shows that nothing is known, not nothing. */
|
|
102672
|
+
var UNKNOWN_STATUS = same("—");
|
|
102673
|
+
function circuitRow(circuit) {
|
|
102674
|
+
const control = circuitControl(circuit);
|
|
102675
|
+
const status = thermalStatusText(circuit.targetTemp, circuit.currentTemp) ?? UNKNOWN_STATUS;
|
|
102676
|
+
return {
|
|
102677
|
+
id: "circuit",
|
|
102678
|
+
label: same(circuit.label),
|
|
102679
|
+
icon: circuit.icon,
|
|
102680
|
+
status,
|
|
102681
|
+
controls: control === null ? [] : [control]
|
|
102682
|
+
};
|
|
102683
|
+
}
|
|
102684
|
+
var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
|
|
102685
|
+
function powerPills(status) {
|
|
102686
|
+
const { thermalW, electricalW } = status.power;
|
|
102687
|
+
const cop = heatPumpInstantCop(status.power);
|
|
102688
|
+
const pills = [];
|
|
102689
|
+
if (thermalW !== null) pills.push({
|
|
102690
|
+
icon: "flame",
|
|
102691
|
+
text: require_sleep.t(`Thermal ${kilowatts(thermalW)}`, `Termica ${kilowatts(thermalW)}`),
|
|
102692
|
+
tone: "muted"
|
|
102693
|
+
});
|
|
102694
|
+
if (electricalW !== null) pills.push({
|
|
102695
|
+
icon: "zap",
|
|
102696
|
+
text: require_sleep.t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
|
|
102697
|
+
tone: "muted"
|
|
102698
|
+
});
|
|
102699
|
+
if (cop !== null) {
|
|
102700
|
+
const text = String(Number(cop.toFixed(1)));
|
|
102701
|
+
pills.push({
|
|
102702
|
+
icon: "gauge",
|
|
102703
|
+
text: require_sleep.t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
|
|
102704
|
+
tone: "success"
|
|
102705
|
+
});
|
|
102706
|
+
}
|
|
102707
|
+
return pills;
|
|
102708
|
+
}
|
|
102709
|
+
/** The independent system modes, in the order the card draws them. */
|
|
102710
|
+
var SYSTEM_MODES = [
|
|
102711
|
+
{
|
|
102712
|
+
key: "silent",
|
|
102713
|
+
label: require_sleep.t("Silent", "Silenzioso"),
|
|
102714
|
+
icon: "volume-x",
|
|
102715
|
+
method: "setSilentMode"
|
|
102716
|
+
},
|
|
102717
|
+
{
|
|
102718
|
+
key: "away",
|
|
102719
|
+
label: require_sleep.t("Away", "Assente"),
|
|
102720
|
+
icon: "plane",
|
|
102721
|
+
method: "setAwayMode"
|
|
102722
|
+
},
|
|
102723
|
+
{
|
|
102724
|
+
key: "additionalHeater",
|
|
102725
|
+
label: require_sleep.t("Additional heater", "Riscaldatore aggiuntivo"),
|
|
102726
|
+
icon: "flame",
|
|
102727
|
+
method: "setAdditionalHeaterMode"
|
|
102728
|
+
},
|
|
102729
|
+
{
|
|
102730
|
+
key: "holiday",
|
|
102731
|
+
label: require_sleep.t("Holiday", "Vacanza"),
|
|
102732
|
+
icon: "tree-palm",
|
|
102733
|
+
method: "setHolidayMode"
|
|
102734
|
+
}
|
|
102735
|
+
];
|
|
102736
|
+
var SYSTEM_GROUP = require_sleep.t("System", "Sistema");
|
|
102737
|
+
var PROGRAMME = /^hm\d+$/;
|
|
102738
|
+
/**
|
|
102739
|
+
* Holiday is two segments, off / programme. Choosing "programme" keeps the programme
|
|
102740
|
+
* that is set, else the first one the gateway allowed, so a write never leaves
|
|
102741
|
+
* `allowed`. The full hm1..hm8 pick is not in the hero (D1026). A holiday whose values
|
|
102742
|
+
* are not programmes keeps the plain selector.
|
|
102743
|
+
*/
|
|
102744
|
+
function holidayRow(def, setting) {
|
|
102745
|
+
if (!setting.allowed.includes("off")) return null;
|
|
102746
|
+
const current = setting.value !== null && PROGRAMME.test(setting.value) ? setting.value : null;
|
|
102747
|
+
const programme = current ?? setting.allowed.find((v) => PROGRAMME.test(v));
|
|
102748
|
+
if (programme === void 0) return null;
|
|
102749
|
+
const control = picker("heat-pump.system.holiday", def.label, {
|
|
102750
|
+
value: setting.value,
|
|
102751
|
+
allowed: ["off", programme]
|
|
102752
|
+
}, def.method, {});
|
|
102753
|
+
const number = programme.slice(2);
|
|
102754
|
+
return {
|
|
102755
|
+
id: "system-mode",
|
|
102756
|
+
label: def.label,
|
|
102757
|
+
group: SYSTEM_GROUP,
|
|
102758
|
+
icon: def.icon,
|
|
102759
|
+
status: current === null ? null : require_sleep.t(`Programme ${number}`, `Programma ${number}`),
|
|
102760
|
+
controls: [control.kind === "picker" ? {
|
|
102761
|
+
...control,
|
|
102762
|
+
optionLabels: {
|
|
102763
|
+
off: require_sleep.t("Off", "Off"),
|
|
102764
|
+
[programme]: require_sleep.t("Programme", "Programma")
|
|
102765
|
+
}
|
|
102766
|
+
} : control]
|
|
102767
|
+
};
|
|
102768
|
+
}
|
|
102769
|
+
function systemRows(status) {
|
|
102770
|
+
const rows = [];
|
|
102771
|
+
for (const def of SYSTEM_MODES) {
|
|
102772
|
+
const setting = status.system[def.key];
|
|
102773
|
+
if (!choosable(setting)) continue;
|
|
102774
|
+
if (def.key === "holiday") {
|
|
102775
|
+
const holiday = holidayRow(def, setting);
|
|
102776
|
+
if (holiday !== null) {
|
|
102777
|
+
rows.push(holiday);
|
|
102778
|
+
continue;
|
|
102779
|
+
}
|
|
102780
|
+
}
|
|
102781
|
+
rows.push({
|
|
102782
|
+
id: "system-mode",
|
|
102783
|
+
label: def.label,
|
|
102784
|
+
group: SYSTEM_GROUP,
|
|
102785
|
+
icon: def.icon,
|
|
102786
|
+
status: null,
|
|
102787
|
+
controls: [picker(`heat-pump.system.${def.key}`, def.label, setting, def.method, {})]
|
|
102788
|
+
});
|
|
102789
|
+
}
|
|
102790
|
+
return rows;
|
|
102791
|
+
}
|
|
102792
|
+
function tile(en, it, value) {
|
|
102793
|
+
return {
|
|
102794
|
+
label: require_sleep.t(en, it),
|
|
102795
|
+
value: same(value)
|
|
102796
|
+
};
|
|
102797
|
+
}
|
|
102798
|
+
function tilesOf$1(status) {
|
|
102799
|
+
const { supply, return: back, outdoor } = status.temperatures;
|
|
102800
|
+
const left = [];
|
|
102801
|
+
const right = [];
|
|
102802
|
+
if (supply !== null) left.push(tile("Supply", "Mandata", formatDegrees(supply)));
|
|
102803
|
+
if (back !== null) left.push(tile("Return", "Ritorno", formatDegrees(back)));
|
|
102804
|
+
if (outdoor !== null) right.push(tile("Outdoor", "Esterna", formatDegrees(outdoor)));
|
|
102805
|
+
if (status.waterPressureBar !== null) right.push(tile("Pressure", "Pressione", `${Number(status.waterPressureBar.toFixed(1))} bar`));
|
|
102806
|
+
return {
|
|
102807
|
+
left,
|
|
102808
|
+
right
|
|
102809
|
+
};
|
|
102810
|
+
}
|
|
102811
|
+
function isRunning(status) {
|
|
102812
|
+
const { compressorPct, electricalW } = status.power;
|
|
102813
|
+
if (compressorPct !== null) return compressorPct > 0;
|
|
102814
|
+
if (electricalW !== null) return electricalW > 0;
|
|
102815
|
+
return null;
|
|
102816
|
+
}
|
|
102817
|
+
var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pump-status", HeatPumpStatusSchema, (slice) => {
|
|
102818
|
+
if (slice === void 0) return { reading: reading("climate-control", "unknown") };
|
|
102819
|
+
const running = isRunning(slice);
|
|
102820
|
+
const facts = [];
|
|
102821
|
+
if (slice.power.electricalW !== null) facts.push(fact("power", "zap", same(`${Math.round(slice.power.electricalW)} W`)));
|
|
102822
|
+
if (slice.power.compressorPct !== null) facts.push(fact("level", "gauge", require_sleep.t(`Compressor ${Math.round(slice.power.compressorPct)} %`, `Compressore ${Math.round(slice.power.compressorPct)} %`)));
|
|
102823
|
+
const charging = slice.circuits.find((c) => c.active === true);
|
|
102824
|
+
const tiles = tilesOf$1(slice);
|
|
102825
|
+
const pills = powerPills(slice);
|
|
102826
|
+
const rows = [
|
|
102827
|
+
...slice.circuits.map(circuitRow),
|
|
102828
|
+
...pills.length === 0 ? [] : [{
|
|
102829
|
+
id: "heat-pump-power",
|
|
102830
|
+
icon: "zap",
|
|
102831
|
+
status: null,
|
|
102832
|
+
controls: [],
|
|
102833
|
+
pills: [...pills]
|
|
102834
|
+
}],
|
|
102835
|
+
...systemRows(slice)
|
|
102836
|
+
];
|
|
102837
|
+
return {
|
|
102838
|
+
reading: reading("climate-control", running === true ? "running" : running === false ? "idle" : "on"),
|
|
102839
|
+
title: require_sleep.t("Heat pump", "Pompa di calore"),
|
|
102840
|
+
...charging === void 0 ? {} : { caption: require_sleep.t(`${charging.label} · heating`.toUpperCase(), `${charging.label} · in riscaldamento`.toUpperCase()) },
|
|
102841
|
+
facts,
|
|
102842
|
+
...tiles.left.length === 0 && tiles.right.length === 0 ? {} : { tiles },
|
|
102843
|
+
...slice.power.electricalW === null ? {} : { consumption: {
|
|
102844
|
+
priority: 1,
|
|
102845
|
+
slot: {
|
|
102846
|
+
kind: "power",
|
|
102847
|
+
watts: slice.power.electricalW,
|
|
102848
|
+
detail: slice.power.thermalW === null ? [] : [{
|
|
102849
|
+
label: require_sleep.t("Thermal", "Termica"),
|
|
102850
|
+
value: Math.round(slice.power.thermalW),
|
|
102851
|
+
unit: "W"
|
|
102852
|
+
}]
|
|
102853
|
+
}
|
|
102854
|
+
} },
|
|
102855
|
+
rows
|
|
102856
|
+
};
|
|
102857
|
+
}) };
|
|
102858
|
+
//#endregion
|
|
101852
102859
|
//#region src/device/hero/media-player-view.ts
|
|
101853
102860
|
/** The position to show at `nowMs`: the reported one, advanced while playing when it is stamped. */
|
|
101854
102861
|
function projectedPositionMs(status, nowMs) {
|
|
@@ -102058,6 +103065,13 @@ function minutesLeft(seconds) {
|
|
|
102058
103065
|
const m = Math.ceil(seconds / 60);
|
|
102059
103066
|
return require_sleep.t(`${m} min left`, `${m} min rimanenti`);
|
|
102060
103067
|
}
|
|
103068
|
+
/** A time left as a tile reads it: "38 min", "1 h 12". */
|
|
103069
|
+
function durationText(seconds) {
|
|
103070
|
+
const m = Math.ceil(seconds / 60);
|
|
103071
|
+
if (m < 60) return require_sleep.t(`${m} min`, `${m} min`);
|
|
103072
|
+
const text = `${Math.floor(m / 60)} h ${String(m % 60).padStart(2, "0")}`;
|
|
103073
|
+
return require_sleep.t(text, text);
|
|
103074
|
+
}
|
|
102061
103075
|
function deviceTypeOf(type) {
|
|
102062
103076
|
return Object.values(require_device_type.DeviceType).find((t) => t === type);
|
|
102063
103077
|
}
|
|
@@ -102074,7 +103088,7 @@ var switchContribution = contribution("switch", SwitchStatusSchema, (slice) => {
|
|
|
102074
103088
|
}
|
|
102075
103089
|
};
|
|
102076
103090
|
});
|
|
102077
|
-
var runningStateContribution = contribution("running-state", RunningStateStatusSchema, (slice) => {
|
|
103091
|
+
var runningStateContribution = contribution("running-state", RunningStateStatusSchema, (slice, ctx) => {
|
|
102078
103092
|
const running = slice?.running ?? null;
|
|
102079
103093
|
const phase = slice?.phase ?? null;
|
|
102080
103094
|
const detail = [];
|
|
@@ -102088,13 +103102,6 @@ var runningStateContribution = contribution("running-state", RunningStateStatusS
|
|
|
102088
103102
|
value: phase,
|
|
102089
103103
|
unit: null
|
|
102090
103104
|
});
|
|
102091
|
-
const head = running === null ? require_sleep.t("Unknown", "Sconosciuto") : running ? require_sleep.t("Running", "In funzione") : require_sleep.t("Idle", "Inattivo");
|
|
102092
|
-
const row = {
|
|
102093
|
-
id: "cycle",
|
|
102094
|
-
icon: "activity",
|
|
102095
|
-
status: phase === null || running !== true ? head : require_sleep.t(`${head.en} · ${phase}`, `${head.it} · ${phase}`),
|
|
102096
|
-
controls: []
|
|
102097
|
-
};
|
|
102098
103105
|
return {
|
|
102099
103106
|
reading: reading("running-state", running === null ? "unknown" : running ? "running" : "idle"),
|
|
102100
103107
|
consumption: {
|
|
@@ -102107,8 +103114,17 @@ var runningStateContribution = contribution("running-state", RunningStateStatusS
|
|
|
102107
103114
|
detail
|
|
102108
103115
|
}
|
|
102109
103116
|
},
|
|
102110
|
-
|
|
102111
|
-
...
|
|
103117
|
+
...phase !== null && running === true ? { facts: [fact("phase", "activity", require_sleep.t(phase, phase), "primary")] } : {},
|
|
103118
|
+
...running === true && (phase !== null || slice?.since != null) ? { tiles: {
|
|
103119
|
+
...phase === null ? {} : { left: [{
|
|
103120
|
+
label: require_sleep.t("Phase", "Fase"),
|
|
103121
|
+
value: require_sleep.t(phase, phase)
|
|
103122
|
+
}] },
|
|
103123
|
+
...slice?.since == null || elapsedText(slice.since, ctx.now) === null ? {} : { right: [{
|
|
103124
|
+
label: require_sleep.t("Started", "Avviata"),
|
|
103125
|
+
value: elapsedText(slice.since, ctx.now) ?? require_sleep.t("", "")
|
|
103126
|
+
}] }
|
|
103127
|
+
} } : {}
|
|
102112
103128
|
};
|
|
102113
103129
|
});
|
|
102114
103130
|
var powerMeterContribution = contribution("power-meter", PowerMeterStatusSchema, (slice) => {
|
|
@@ -102141,6 +103157,7 @@ var powerMeterContribution = contribution("power-meter", PowerMeterStatusSchema,
|
|
|
102141
103157
|
}
|
|
102142
103158
|
},
|
|
102143
103159
|
facts: [fact("power", "zap", text, watts > 0 ? "primary" : "muted")],
|
|
103160
|
+
tilesFallback: true,
|
|
102144
103161
|
tiles: {
|
|
102145
103162
|
right: [{
|
|
102146
103163
|
label: require_sleep.t("Power", "Potenza"),
|
|
@@ -102171,6 +103188,7 @@ var batteryContribution = contribution("battery", BatteryStatusSchema, (slice) =
|
|
|
102171
103188
|
badges: [badge],
|
|
102172
103189
|
...level === null ? {} : {
|
|
102173
103190
|
facts: [fact("battery", "battery", badge.label, badge.tone)],
|
|
103191
|
+
tilesFallback: true,
|
|
102174
103192
|
tiles: { left: [{
|
|
102175
103193
|
label: require_sleep.t("Battery", "Batteria"),
|
|
102176
103194
|
value: require_sleep.t(`${level}%`, `${level}%`),
|
|
@@ -102224,6 +103242,14 @@ var motionTriggerContribution = contribution("motion-trigger", MotionTriggerStat
|
|
|
102224
103242
|
controls: [toggle]
|
|
102225
103243
|
}] };
|
|
102226
103244
|
});
|
|
103245
|
+
/** The armed run's length: "Timer 25 min". */
|
|
103246
|
+
function timerTile(quickRun) {
|
|
103247
|
+
const text = `${quickRun.duration} ${quickRun.unit}`;
|
|
103248
|
+
return {
|
|
103249
|
+
label: require_sleep.t("Timer", "Timer"),
|
|
103250
|
+
value: require_sleep.t(text, text)
|
|
103251
|
+
};
|
|
103252
|
+
}
|
|
102227
103253
|
var timedRunContribution = contribution("timed-run", TimedRunStatusSchema, (slice, ctx) => {
|
|
102228
103254
|
const type = deviceTypeOf(ctx.type);
|
|
102229
103255
|
const limit = type === void 0 ? void 0 : TIMED_RUN_LIMITS[type];
|
|
@@ -102244,6 +103270,7 @@ var timedRunContribution = contribution("timed-run", TimedRunStatusSchema, (slic
|
|
|
102244
103270
|
status: activeUntil === null ? require_sleep.t(`Run for ${quickRun.duration} ${quickRun.unit}`, `Avvia per ${quickRun.duration} ${quickRun.unit}`) : require_sleep.t(`Stops in ${left} min`, `Si ferma tra ${left} min`),
|
|
102245
103271
|
controls: activeUntil === null ? [asAction(run)] : [asAction(cancel), asAction(restart)]
|
|
102246
103272
|
};
|
|
103273
|
+
const armed = activeUntil === null ? {} : { right: [timerTile(quickRun)] };
|
|
102247
103274
|
return {
|
|
102248
103275
|
timedRun: {
|
|
102249
103276
|
activeUntil,
|
|
@@ -102251,7 +103278,9 @@ var timedRunContribution = contribution("timed-run", TimedRunStatusSchema, (slic
|
|
|
102251
103278
|
run,
|
|
102252
103279
|
cancel
|
|
102253
103280
|
},
|
|
102254
|
-
rows: [row]
|
|
103281
|
+
rows: [row],
|
|
103282
|
+
tilesFallback: true,
|
|
103283
|
+
tiles: armed
|
|
102255
103284
|
};
|
|
102256
103285
|
});
|
|
102257
103286
|
var powerSourceContribution = contribution("power-source", PowerSourceStateSchema, (slice, ctx) => ({ powerSupply: {
|
|
@@ -102292,15 +103321,43 @@ var consumablesContribution = contribution("consumables", ConsumablesStatusSchem
|
|
|
102292
103321
|
...attention === 0 ? {} : { facts: [fact("consumables", null, require_sleep.t(`${attention} to check`, `${attention} da controllare`), "warning")] }
|
|
102293
103322
|
};
|
|
102294
103323
|
});
|
|
102295
|
-
var
|
|
103324
|
+
var pct = (n) => require_sleep.t(`${Math.round(n)}%`, `${Math.round(n)}%`);
|
|
103325
|
+
var dishCycle = (id, en, it, icon, method, emphasis = "normal") => asAction(action(`cycle.${id}`, require_sleep.t(en, it), icon, "dishwasher", method, {}, emphasis));
|
|
103326
|
+
/** Pause / resume / stop, per what the appliance is doing; nothing while it is not running. */
|
|
103327
|
+
function dishwasherCycleControls(state) {
|
|
103328
|
+
if (state === "running") return [dishCycle("pause", "Pause", "Pausa", "pause", "pause"), dishCycle("stop", "Stop", "Stop", "square", "stop")];
|
|
103329
|
+
if (state === "paused") return [dishCycle("resume", "Resume", "Riprendi", "play", "resume", "primary"), dishCycle("stop", "Stop", "Stop", "square", "stop")];
|
|
103330
|
+
return [];
|
|
103331
|
+
}
|
|
103332
|
+
var OPERATION_WORDS = {
|
|
103333
|
+
Run: require_sleep.t("Running", "In corso"),
|
|
103334
|
+
Pause: require_sleep.t("Paused", "In pausa"),
|
|
103335
|
+
Finished: require_sleep.t("Finished", "Finito"),
|
|
103336
|
+
Ready: require_sleep.t("Ready", "Pronta"),
|
|
103337
|
+
Inactive: require_sleep.t("Idle", "Inattiva"),
|
|
103338
|
+
DelayedStart: require_sleep.t("Delayed start", "Avvio ritardato"),
|
|
103339
|
+
ActionRequired: require_sleep.t("Action needed", "Serve un intervento"),
|
|
103340
|
+
Error: require_sleep.t("Error", "Errore"),
|
|
103341
|
+
Aborting: require_sleep.t("Stopping", "Arresto")
|
|
103342
|
+
};
|
|
103343
|
+
var dishwasherContribution = contribution("dishwasher", DishwasherStatusSchema, (slice, ctx) => {
|
|
102296
103344
|
const state = slice === void 0 || slice.state === "unavailable" ? "unknown" : slice.state === "running" ? "running" : slice.state === "error" ? "alert" : "idle";
|
|
102297
|
-
const
|
|
102298
|
-
const
|
|
102299
|
-
|
|
102300
|
-
|
|
102301
|
-
|
|
102302
|
-
|
|
102303
|
-
|
|
103345
|
+
const rows = [];
|
|
103346
|
+
const progress = slice?.progress ?? null;
|
|
103347
|
+
if (progress !== null) rows.push({
|
|
103348
|
+
id: "progress",
|
|
103349
|
+
icon: "activity",
|
|
103350
|
+
status: pct(progress),
|
|
103351
|
+
controls: [],
|
|
103352
|
+
progress: progress / 100
|
|
103353
|
+
});
|
|
103354
|
+
const cycle = dishwasherCycleControls(slice?.state);
|
|
103355
|
+
if (cycle.length > 0) rows.push({
|
|
103356
|
+
id: "cycle",
|
|
103357
|
+
icon: "activity",
|
|
103358
|
+
status: null,
|
|
103359
|
+
controls: cycle
|
|
103360
|
+
});
|
|
102304
103361
|
if (slice?.powerOn != null) rows.push({
|
|
102305
103362
|
id: "appliance-power",
|
|
102306
103363
|
icon: "power",
|
|
@@ -102315,16 +103372,32 @@ var dishwasherContribution = contribution("dishwasher", DishwasherStatusSchema,
|
|
|
102315
103372
|
}]
|
|
102316
103373
|
});
|
|
102317
103374
|
const remaining = slice?.remaining ?? null;
|
|
103375
|
+
const phase = slice?.operationState == null ? null : OPERATION_WORDS[slice.operationState] ?? null;
|
|
103376
|
+
const program = slice?.program ?? slice?.selectedProgram ?? null;
|
|
103377
|
+
const left = [...phase === null ? [] : [{
|
|
103378
|
+
label: require_sleep.t("Phase", "Fase"),
|
|
103379
|
+
value: phase
|
|
103380
|
+
}], ...program === null ? [] : [{
|
|
103381
|
+
label: require_sleep.t("Program", "Programma"),
|
|
103382
|
+
value: require_sleep.t(program, program)
|
|
103383
|
+
}]];
|
|
102318
103384
|
return {
|
|
102319
103385
|
reading: reading("dishwasher", state),
|
|
102320
103386
|
rows,
|
|
102321
|
-
...remaining === null ? {} : {
|
|
102322
|
-
|
|
102323
|
-
|
|
102324
|
-
|
|
102325
|
-
|
|
103387
|
+
...remaining === null ? {} : { facts: [fact("remaining", "timer", minutesLeft(remaining), "primary")] },
|
|
103388
|
+
tiles: {
|
|
103389
|
+
left,
|
|
103390
|
+
...remaining === null ? {} : { right: [{
|
|
103391
|
+
label: require_sleep.t("Ends", "Fine"),
|
|
103392
|
+
value: minutesLeft(remaining),
|
|
103393
|
+
tone: "warning",
|
|
103394
|
+
at: ctx.now + remaining * 1e3
|
|
103395
|
+
}, {
|
|
103396
|
+
label: require_sleep.t("Left", "Restano"),
|
|
103397
|
+
value: durationText(remaining)
|
|
102326
103398
|
}] }
|
|
102327
|
-
}
|
|
103399
|
+
},
|
|
103400
|
+
...progress === null ? {} : { scene: { level: progress / 100 } }
|
|
102328
103401
|
};
|
|
102329
103402
|
});
|
|
102330
103403
|
var has$1 = (ctx, f) => ctx.features.includes(f);
|
|
@@ -102382,6 +103455,44 @@ function volumeControls(view, volumeLevel, muted) {
|
|
|
102382
103455
|
});
|
|
102383
103456
|
return controls;
|
|
102384
103457
|
}
|
|
103458
|
+
var clock = (ms) => {
|
|
103459
|
+
const total = Math.max(0, Math.floor(ms / 1e3));
|
|
103460
|
+
const h = Math.floor(total / 3600);
|
|
103461
|
+
const m = Math.floor(total % 3600 / 60);
|
|
103462
|
+
const sec = String(total % 60).padStart(2, "0");
|
|
103463
|
+
return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${sec}` : `${m}:${sec}`;
|
|
103464
|
+
};
|
|
103465
|
+
var REPEAT_MODES = [
|
|
103466
|
+
"off",
|
|
103467
|
+
"all",
|
|
103468
|
+
"one"
|
|
103469
|
+
];
|
|
103470
|
+
/** Shuffle and repeat, drawn only when the player declares them and reports a value. */
|
|
103471
|
+
function modeControls(view, shuffle, repeat) {
|
|
103472
|
+
const controls = [];
|
|
103473
|
+
if (view.shuffle) controls.push({
|
|
103474
|
+
kind: "toggle",
|
|
103475
|
+
id: "playback.shuffle",
|
|
103476
|
+
label: require_sleep.t("Shuffle", "Casuale"),
|
|
103477
|
+
on: shuffle,
|
|
103478
|
+
turnOn: action("playback.shuffle.on", require_sleep.t("Shuffle on", "Casuale attivo"), "shuffle", "media-player", "setShuffle", { shuffle: true }),
|
|
103479
|
+
turnOff: action("playback.shuffle.off", require_sleep.t("Shuffle off", "Casuale disattivo"), "shuffle", "media-player", "setShuffle", { shuffle: false })
|
|
103480
|
+
});
|
|
103481
|
+
if (view.repeat) controls.push({
|
|
103482
|
+
kind: "picker",
|
|
103483
|
+
id: "playback.repeat",
|
|
103484
|
+
label: require_sleep.t("Repeat", "Ripeti"),
|
|
103485
|
+
current: repeat,
|
|
103486
|
+
options: [...REPEAT_MODES],
|
|
103487
|
+
call: {
|
|
103488
|
+
cap: "media-player",
|
|
103489
|
+
method: "setRepeat",
|
|
103490
|
+
args: {}
|
|
103491
|
+
},
|
|
103492
|
+
valueArg: "repeat"
|
|
103493
|
+
});
|
|
103494
|
+
return controls;
|
|
103495
|
+
}
|
|
102385
103496
|
/** Every contributing cap, in the order their fragments are merged. */
|
|
102386
103497
|
var HERO_CAP_CONTRIBUTIONS = [
|
|
102387
103498
|
contribution("media-player", MediaPlayerStatusSchema, (slice, ctx) => {
|
|
@@ -102397,7 +103508,7 @@ var HERO_CAP_CONTRIBUTIONS = [
|
|
|
102397
103508
|
controls: []
|
|
102398
103509
|
});
|
|
102399
103510
|
}
|
|
102400
|
-
const playback = playbackControls(view, ctx);
|
|
103511
|
+
const playback = [...playbackControls(view, ctx), ...modeControls(view, slice?.shuffle ?? null, slice?.repeat ?? null)];
|
|
102401
103512
|
if (playback.length > 0) rows.push({
|
|
102402
103513
|
id: "playback",
|
|
102403
103514
|
icon: "play",
|
|
@@ -102447,13 +103558,30 @@ var HERO_CAP_CONTRIBUTIONS = [
|
|
|
102447
103558
|
const facts = [];
|
|
102448
103559
|
if (sourceNow !== null) facts.push(fact("source", "radio", require_sleep.t(sourceNow, sourceNow)));
|
|
102449
103560
|
if (volumeNow !== null) facts.push(fact("volume", "volume-2", require_sleep.t(`${volumeNow}%`, `${volumeNow}%`)));
|
|
103561
|
+
const duration = slice?.duration ?? null;
|
|
103562
|
+
const position = slice === void 0 ? null : projectedPositionMs(slice, ctx.now);
|
|
103563
|
+
if (position !== null && duration !== null && duration > 0) {
|
|
103564
|
+
const line = `${clock(position)} / ${clock(duration)}`;
|
|
103565
|
+
facts.push(fact("progress", "activity", require_sleep.t(line, line)));
|
|
103566
|
+
}
|
|
103567
|
+
const trackNow = slice?.currentMedia?.title ?? null;
|
|
103568
|
+
const mediaTiles = {
|
|
103569
|
+
left: [...trackNow === null ? [] : [{
|
|
103570
|
+
label: require_sleep.t("Track", "Brano"),
|
|
103571
|
+
value: require_sleep.t(trackNow, trackNow)
|
|
103572
|
+
}], ...sourceNow === null ? [] : [{
|
|
103573
|
+
label: require_sleep.t("Source", "Sorgente"),
|
|
103574
|
+
value: require_sleep.t(sourceNow, sourceNow)
|
|
103575
|
+
}]],
|
|
103576
|
+
right: volumeNow === null ? [] : [{
|
|
103577
|
+
label: require_sleep.t("Volume", "Volume"),
|
|
103578
|
+
value: require_sleep.t(`${volumeNow}%`, `${volumeNow}%`)
|
|
103579
|
+
}]
|
|
103580
|
+
};
|
|
102450
103581
|
return {
|
|
102451
103582
|
reading: mediaReading(view),
|
|
102452
103583
|
facts,
|
|
102453
|
-
...
|
|
102454
|
-
label: require_sleep.t("Volume", "Volume"),
|
|
102455
|
-
value: require_sleep.t(`${volumeNow}%`, `${volumeNow}%`)
|
|
102456
|
-
}] } },
|
|
103584
|
+
...mediaTiles.left.length === 0 && mediaTiles.right.length === 0 ? {} : { tiles: mediaTiles },
|
|
102457
103585
|
scene: {
|
|
102458
103586
|
...mode === null ? {} : { mode },
|
|
102459
103587
|
...volumeNow === null ? {} : { level: volumeNow / 100 }
|
|
@@ -102486,7 +103614,8 @@ var HERO_CAP_CONTRIBUTIONS = [
|
|
|
102486
103614
|
...Object.values(GROUPS_FAMILY_CONTRIBUTIONS),
|
|
102487
103615
|
...Object.values(ACTUATORS_FAMILY_CONTRIBUTIONS),
|
|
102488
103616
|
...Object.values(SENSORS_FAMILY_CONTRIBUTIONS),
|
|
102489
|
-
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS)
|
|
103617
|
+
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
|
|
103618
|
+
...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
|
|
102490
103619
|
];
|
|
102491
103620
|
//#endregion
|
|
102492
103621
|
//#region src/device/hero/hero-layout.ts
|
|
@@ -102511,9 +103640,10 @@ var MEDIA_PLAYER_LAYOUT = { rows: [
|
|
|
102511
103640
|
"source",
|
|
102512
103641
|
"do-not-disturb"
|
|
102513
103642
|
] };
|
|
102514
|
-
var APPLIANCE_LAYOUT = { rows: ["cycle"] };
|
|
103643
|
+
var APPLIANCE_LAYOUT = { rows: ["progress", "cycle"] };
|
|
102515
103644
|
/** Its Home Connect PowerState is a secondary row action, never the own-power slot. */
|
|
102516
103645
|
var DISHWASHER_LAYOUT = { rows: [
|
|
103646
|
+
"progress",
|
|
102517
103647
|
"cycle",
|
|
102518
103648
|
"program",
|
|
102519
103649
|
"appliance-power"
|
|
@@ -102523,11 +103653,17 @@ var CLIMATE_LAYOUT = { rows: [
|
|
|
102523
103653
|
"climate-fan",
|
|
102524
103654
|
"setpoint"
|
|
102525
103655
|
] };
|
|
103656
|
+
/** The circuits, then the power pills, then the System group, one row per mode (D1026). */
|
|
103657
|
+
var HEAT_PUMP_LAYOUT = { rows: [
|
|
103658
|
+
"circuit",
|
|
103659
|
+
"heat-pump-power",
|
|
103660
|
+
"system-mode"
|
|
103661
|
+
] };
|
|
102526
103662
|
var SWITCH_LAYOUT = { rows: ["motion-trigger"] };
|
|
102527
103663
|
var LOCK_LAYOUT = { rows: ["lock"] };
|
|
102528
103664
|
var ALARM_LAYOUT = { rows: ["alarm"] };
|
|
102529
103665
|
var FAN_LAYOUT = { rows: ["fan"] };
|
|
102530
|
-
var VACUUM_LAYOUT = { rows: ["vacuum"] };
|
|
103666
|
+
var VACUUM_LAYOUT = { rows: ["vacuum", "vacuum-suction"] };
|
|
102531
103667
|
var MOWER_LAYOUT = { rows: ["mower"] };
|
|
102532
103668
|
var FEEDER_LAYOUT = { rows: ["feeder"] };
|
|
102533
103669
|
var FOUNTAIN_LAYOUT = { rows: ["fountain", "pump-cycle"] };
|
|
@@ -102566,6 +103702,7 @@ var HERO_LAYOUT_BY_TYPE = {
|
|
|
102566
103702
|
[require_device_type.DeviceType.Valve]: VALVE_LAYOUT,
|
|
102567
103703
|
[require_device_type.DeviceType.Humidifier]: HUMIDIFIER_LAYOUT,
|
|
102568
103704
|
[require_device_type.DeviceType.WaterHeater]: CLIMATE_LAYOUT,
|
|
103705
|
+
[require_device_type.DeviceType.HeatPump]: HEAT_PUMP_LAYOUT,
|
|
102569
103706
|
[require_device_type.DeviceType.Fan]: FAN_LAYOUT,
|
|
102570
103707
|
[require_device_type.DeviceType.MediaPlayer]: MEDIA_PLAYER_LAYOUT,
|
|
102571
103708
|
[require_device_type.DeviceType.AlarmPanel]: ALARM_LAYOUT,
|
|
@@ -102991,12 +104128,12 @@ var LOCK_LOOK = {
|
|
|
102991
104128
|
standby: look("lock-open", "warning", "plain", "none"),
|
|
102992
104129
|
off: look("lock-open", "muted", "plain", "none")
|
|
102993
104130
|
};
|
|
102994
|
-
/** The shield glows while armed, blinks red in alarm and goes quiet when disarmed. */
|
|
104131
|
+
/** The shield glows red while armed, blinks red in alarm and goes quiet when disarmed. */
|
|
102995
104132
|
var ALARM_LOOK = {
|
|
102996
104133
|
...lookOf({
|
|
102997
104134
|
icon: "shield-check",
|
|
102998
104135
|
on: [
|
|
102999
|
-
"
|
|
104136
|
+
"danger",
|
|
103000
104137
|
"glow",
|
|
103001
104138
|
"halo"
|
|
103002
104139
|
],
|
|
@@ -103241,6 +104378,22 @@ var WATER_HEATER_LOOK = lookOf({
|
|
|
103241
104378
|
idle: INFO,
|
|
103242
104379
|
standby: MUTED
|
|
103243
104380
|
});
|
|
104381
|
+
var HEAT_PUMP_LOOK = lookOf({
|
|
104382
|
+
icon: "thermometer-sun",
|
|
104383
|
+
on: [
|
|
104384
|
+
"warning",
|
|
104385
|
+
"heat-rise",
|
|
104386
|
+
"rise"
|
|
104387
|
+
],
|
|
104388
|
+
off: MUTED,
|
|
104389
|
+
running: [
|
|
104390
|
+
"warning",
|
|
104391
|
+
"heat-rise",
|
|
104392
|
+
"rise"
|
|
104393
|
+
],
|
|
104394
|
+
idle: INFO,
|
|
104395
|
+
standby: MUTED
|
|
104396
|
+
});
|
|
103244
104397
|
/** What a climate device draws while it is on, by mode: warm air rises, cold falls, drops dry, the fan spins. */
|
|
103245
104398
|
var HERO_MODE_LOOK = {
|
|
103246
104399
|
heat: look("flame", "warning", "heat-rise", "rise"),
|
|
@@ -103275,6 +104428,7 @@ var HERO_LOOK_BY_TYPE = {
|
|
|
103275
104428
|
[require_device_type.DeviceType.Valve]: VALVE_LOOK,
|
|
103276
104429
|
[require_device_type.DeviceType.Humidifier]: HUMIDIFIER_LOOK,
|
|
103277
104430
|
[require_device_type.DeviceType.WaterHeater]: WATER_HEATER_LOOK,
|
|
104431
|
+
[require_device_type.DeviceType.HeatPump]: HEAT_PUMP_LOOK,
|
|
103278
104432
|
[require_device_type.DeviceType.Fan]: FAN_LOOK,
|
|
103279
104433
|
[require_device_type.DeviceType.MediaPlayer]: MEDIA_PLAYER_LOOK,
|
|
103280
104434
|
[require_device_type.DeviceType.AlarmPanel]: ALARM_LOOK,
|
|
@@ -103526,7 +104680,19 @@ function consumptionOf(fragments) {
|
|
|
103526
104680
|
return best === null ? null : best.slot;
|
|
103527
104681
|
}
|
|
103528
104682
|
function tilesOf(fragments, side) {
|
|
103529
|
-
|
|
104683
|
+
const own = fragments.filter((f) => f.tilesFallback !== true).flatMap((f) => f.tiles?.[side] ?? []);
|
|
104684
|
+
return (own.length > 0 ? own : fragments.filter((f) => f.tilesFallback === true).flatMap((f) => f.tiles?.[side] ?? [])).slice(0, 2);
|
|
104685
|
+
}
|
|
104686
|
+
/** The foot button that opens the history, named for what the device keeps. */
|
|
104687
|
+
function historyLabelOf(type) {
|
|
104688
|
+
switch (type) {
|
|
104689
|
+
case require_device_type.DeviceType.Washer:
|
|
104690
|
+
case require_device_type.DeviceType.Dryer:
|
|
104691
|
+
case require_device_type.DeviceType.Dishwasher: return require_sleep.t("Cycles", "Cicli");
|
|
104692
|
+
case require_device_type.DeviceType.PetFeeder: return require_sleep.t("Meals", "Pasti");
|
|
104693
|
+
case require_device_type.DeviceType.Lock: return require_sleep.t("Access", "Accessi");
|
|
104694
|
+
default: return require_sleep.t("History", "Storico");
|
|
104695
|
+
}
|
|
103530
104696
|
}
|
|
103531
104697
|
function sceneOf(role, type, fragments) {
|
|
103532
104698
|
const parts = fragments.flatMap((f) => f.scene === void 0 ? [] : [f.scene]);
|
|
@@ -103570,20 +104736,27 @@ function buildHeroModel(input) {
|
|
|
103570
104736
|
};
|
|
103571
104737
|
const allRows = fragments.flatMap((f) => f.rows ?? []);
|
|
103572
104738
|
const rows = resolveHeroLayout(device.type).rows.flatMap((id) => {
|
|
103573
|
-
|
|
103574
|
-
return row === void 0 ? [] : [row];
|
|
104739
|
+
return allRows.filter((r) => r.id === id);
|
|
103575
104740
|
});
|
|
103576
104741
|
const ownPower = resolveOwnPower(fragments.flatMap((f) => f.ownPower === void 0 ? [] : [f.ownPower]));
|
|
103577
104742
|
const timedRun = fragments.find((f) => f.timedRun !== void 0)?.timedRun ?? null;
|
|
103578
104743
|
const powerSupply = fragments.find((f) => f.powerSupply !== void 0)?.powerSupply ?? null;
|
|
103579
104744
|
const remote = fragments.find((f) => f.remote !== void 0)?.remote ?? null;
|
|
103580
|
-
const
|
|
104745
|
+
const integration = device.integration?.trim() ?? "";
|
|
104746
|
+
const badges = [...integration === "" ? [] : [{
|
|
104747
|
+
id: "integration",
|
|
104748
|
+
icon: "plug",
|
|
104749
|
+
tone: "muted",
|
|
104750
|
+
value: null,
|
|
104751
|
+
label: require_sleep.t(integration, integration)
|
|
104752
|
+
}], ...fragments.flatMap((f) => f.badges ?? [])];
|
|
103581
104753
|
const headline = state === "offline" || state === "unknown" ? void 0 : fragments.find((f) => f.title !== void 0)?.title;
|
|
103582
104754
|
const facts = fragments.flatMap((f) => f.facts ?? []).filter((f) => headline === void 0 || f.text.en !== headline.en);
|
|
103583
104755
|
const sideTiles = {
|
|
103584
104756
|
left: tilesOf(fragments, "left"),
|
|
103585
104757
|
right: tilesOf(fragments, "right")
|
|
103586
104758
|
};
|
|
104759
|
+
const caption = state === "offline" || state === "unknown" ? void 0 : fragments.find((f) => f.caption !== void 0)?.caption;
|
|
103587
104760
|
const gated = [];
|
|
103588
104761
|
if (!input.access.canActuate) {
|
|
103589
104762
|
if (ownPower !== null) gated.push("own-power");
|
|
@@ -103605,8 +104778,10 @@ function buildHeroModel(input) {
|
|
|
103605
104778
|
facts,
|
|
103606
104779
|
sideTiles,
|
|
103607
104780
|
title: headline ?? title,
|
|
104781
|
+
...caption === void 0 ? {} : { caption },
|
|
103608
104782
|
badges,
|
|
103609
104783
|
remote,
|
|
104784
|
+
historyLabel: historyLabelOf(device.type),
|
|
103610
104785
|
consumables: fragments.find((f) => f.consumables !== void 0)?.consumables ?? null,
|
|
103611
104786
|
consumption: consumptionOf(fragments),
|
|
103612
104787
|
ownPower,
|
|
@@ -103675,6 +104850,7 @@ var HERO_CAP_COVERAGE = {
|
|
|
103675
104850
|
"group-active": "contributes",
|
|
103676
104851
|
"group-commands": "contributes",
|
|
103677
104852
|
"group-status": "contributes",
|
|
104853
|
+
"heat-pump-status": "contributes",
|
|
103678
104854
|
"heating-valve": "contributes",
|
|
103679
104855
|
humidifier: "contributes",
|
|
103680
104856
|
"humidity-sensor": "contributes",
|
|
@@ -104117,13 +105293,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
104117
105293
|
access: "view",
|
|
104118
105294
|
role: "admin"
|
|
104119
105295
|
},
|
|
104120
|
-
"addonSettings.getIntegrationFormSchema": {
|
|
104121
|
-
capName: "addon-settings",
|
|
104122
|
-
capScope: "system",
|
|
104123
|
-
addonId: null,
|
|
104124
|
-
access: "view",
|
|
104125
|
-
role: "admin"
|
|
104126
|
-
},
|
|
104127
105296
|
"addonSettings.getScopedSettings": {
|
|
104128
105297
|
capName: "addon-settings",
|
|
104129
105298
|
capScope: "system",
|
|
@@ -107239,6 +108408,111 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
107239
108408
|
access: "view",
|
|
107240
108409
|
role: "viewer"
|
|
107241
108410
|
},
|
|
108411
|
+
"heatPumpControl.setAdditionalHeaterMode": {
|
|
108412
|
+
capName: "heat-pump-control",
|
|
108413
|
+
capScope: "device",
|
|
108414
|
+
addonId: null,
|
|
108415
|
+
access: "create",
|
|
108416
|
+
role: "viewer"
|
|
108417
|
+
},
|
|
108418
|
+
"heatPumpControl.setAwayMode": {
|
|
108419
|
+
capName: "heat-pump-control",
|
|
108420
|
+
capScope: "device",
|
|
108421
|
+
addonId: null,
|
|
108422
|
+
access: "create",
|
|
108423
|
+
role: "viewer"
|
|
108424
|
+
},
|
|
108425
|
+
"heatPumpControl.setCircuitComfortSetpoint": {
|
|
108426
|
+
capName: "heat-pump-control",
|
|
108427
|
+
capScope: "device",
|
|
108428
|
+
addonId: null,
|
|
108429
|
+
access: "create",
|
|
108430
|
+
role: "viewer"
|
|
108431
|
+
},
|
|
108432
|
+
"heatPumpControl.setCircuitEcoSetpoint": {
|
|
108433
|
+
capName: "heat-pump-control",
|
|
108434
|
+
capScope: "device",
|
|
108435
|
+
addonId: null,
|
|
108436
|
+
access: "create",
|
|
108437
|
+
role: "viewer"
|
|
108438
|
+
},
|
|
108439
|
+
"heatPumpControl.setCircuitHeatCoolMode": {
|
|
108440
|
+
capName: "heat-pump-control",
|
|
108441
|
+
capScope: "device",
|
|
108442
|
+
addonId: null,
|
|
108443
|
+
access: "create",
|
|
108444
|
+
role: "viewer"
|
|
108445
|
+
},
|
|
108446
|
+
"heatPumpControl.setCircuitMaxFlowTemp": {
|
|
108447
|
+
capName: "heat-pump-control",
|
|
108448
|
+
capScope: "device",
|
|
108449
|
+
addonId: null,
|
|
108450
|
+
access: "create",
|
|
108451
|
+
role: "viewer"
|
|
108452
|
+
},
|
|
108453
|
+
"heatPumpControl.setCircuitOperationMode": {
|
|
108454
|
+
capName: "heat-pump-control",
|
|
108455
|
+
capScope: "device",
|
|
108456
|
+
addonId: null,
|
|
108457
|
+
access: "create",
|
|
108458
|
+
role: "viewer"
|
|
108459
|
+
},
|
|
108460
|
+
"heatPumpControl.setCircuitSummerWinter": {
|
|
108461
|
+
capName: "heat-pump-control",
|
|
108462
|
+
capScope: "device",
|
|
108463
|
+
addonId: null,
|
|
108464
|
+
access: "create",
|
|
108465
|
+
role: "viewer"
|
|
108466
|
+
},
|
|
108467
|
+
"heatPumpControl.setDhwChargeDuration": {
|
|
108468
|
+
capName: "heat-pump-control",
|
|
108469
|
+
capScope: "device",
|
|
108470
|
+
addonId: null,
|
|
108471
|
+
access: "create",
|
|
108472
|
+
role: "viewer"
|
|
108473
|
+
},
|
|
108474
|
+
"heatPumpControl.setDhwOperationMode": {
|
|
108475
|
+
capName: "heat-pump-control",
|
|
108476
|
+
capScope: "device",
|
|
108477
|
+
addonId: null,
|
|
108478
|
+
access: "create",
|
|
108479
|
+
role: "viewer"
|
|
108480
|
+
},
|
|
108481
|
+
"heatPumpControl.setDhwTemperatureLevel": {
|
|
108482
|
+
capName: "heat-pump-control",
|
|
108483
|
+
capScope: "device",
|
|
108484
|
+
addonId: null,
|
|
108485
|
+
access: "create",
|
|
108486
|
+
role: "viewer"
|
|
108487
|
+
},
|
|
108488
|
+
"heatPumpControl.setHolidayMode": {
|
|
108489
|
+
capName: "heat-pump-control",
|
|
108490
|
+
capScope: "device",
|
|
108491
|
+
addonId: null,
|
|
108492
|
+
access: "create",
|
|
108493
|
+
role: "viewer"
|
|
108494
|
+
},
|
|
108495
|
+
"heatPumpControl.setSilentMode": {
|
|
108496
|
+
capName: "heat-pump-control",
|
|
108497
|
+
capScope: "device",
|
|
108498
|
+
addonId: null,
|
|
108499
|
+
access: "create",
|
|
108500
|
+
role: "viewer"
|
|
108501
|
+
},
|
|
108502
|
+
"heatPumpControl.startExtraHotWater": {
|
|
108503
|
+
capName: "heat-pump-control",
|
|
108504
|
+
capScope: "device",
|
|
108505
|
+
addonId: null,
|
|
108506
|
+
access: "create",
|
|
108507
|
+
role: "viewer"
|
|
108508
|
+
},
|
|
108509
|
+
"heatPumpStatus.getStatus": {
|
|
108510
|
+
capName: "heat-pump-status",
|
|
108511
|
+
capScope: "device",
|
|
108512
|
+
addonId: null,
|
|
108513
|
+
access: "view",
|
|
108514
|
+
role: "viewer"
|
|
108515
|
+
},
|
|
107242
108516
|
"heroLayout.getHeroModel": {
|
|
107243
108517
|
capName: "hero-layout",
|
|
107244
108518
|
capScope: "system",
|
|
@@ -112146,13 +113420,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
112146
113420
|
access: "create",
|
|
112147
113421
|
role: "admin"
|
|
112148
113422
|
},
|
|
112149
|
-
"smtpProvider.verify": {
|
|
112150
|
-
capName: "smtp-provider",
|
|
112151
|
-
capScope: "system",
|
|
112152
|
-
addonId: null,
|
|
112153
|
-
access: "view",
|
|
112154
|
-
role: "admin"
|
|
112155
|
-
},
|
|
112156
113423
|
"snapshot.applyDeviceSettingsPatch": {
|
|
112157
113424
|
capName: "snapshot",
|
|
112158
113425
|
capScope: "device",
|
|
@@ -114129,6 +115396,8 @@ var KNOWN_CAP_NAMES = [
|
|
|
114129
115396
|
"group-active",
|
|
114130
115397
|
"group-commands",
|
|
114131
115398
|
"group-status",
|
|
115399
|
+
"heat-pump-control",
|
|
115400
|
+
"heat-pump-status",
|
|
114132
115401
|
"heating-valve",
|
|
114133
115402
|
"hero-layout",
|
|
114134
115403
|
"humidifier",
|
|
@@ -114296,6 +115565,8 @@ var DEVICE_CAP_NAMES = [
|
|
|
114296
115565
|
"group-active",
|
|
114297
115566
|
"group-commands",
|
|
114298
115567
|
"group-status",
|
|
115568
|
+
"heat-pump-control",
|
|
115569
|
+
"heat-pump-status",
|
|
114299
115570
|
"heating-valve",
|
|
114300
115571
|
"humidifier",
|
|
114301
115572
|
"humidity-sensor",
|
|
@@ -114593,6 +115864,7 @@ var DEVICE_TYPE_DO_CAPS = {
|
|
|
114593
115864
|
[require_device_type.DeviceType.Valve]: ["valve"],
|
|
114594
115865
|
[require_device_type.DeviceType.Humidifier]: ["humidifier"],
|
|
114595
115866
|
[require_device_type.DeviceType.WaterHeater]: ["water-heater"],
|
|
115867
|
+
[require_device_type.DeviceType.HeatPump]: ["heat-pump-control"],
|
|
114596
115868
|
[require_device_type.DeviceType.Fan]: ["fan-control", "switch"],
|
|
114597
115869
|
[require_device_type.DeviceType.MediaPlayer]: ["media-player"],
|
|
114598
115870
|
[require_device_type.DeviceType.AlarmPanel]: ["alarm-panel"],
|
|
@@ -114632,7 +115904,8 @@ function deviceDoFamily(type) {
|
|
|
114632
115904
|
case require_device_type.DeviceType.Climate:
|
|
114633
115905
|
case require_device_type.DeviceType.Thermostat:
|
|
114634
115906
|
case require_device_type.DeviceType.Humidifier:
|
|
114635
|
-
case require_device_type.DeviceType.WaterHeater:
|
|
115907
|
+
case require_device_type.DeviceType.WaterHeater:
|
|
115908
|
+
case require_device_type.DeviceType.HeatPump: return "climate-family";
|
|
114636
115909
|
case require_device_type.DeviceType.Cover:
|
|
114637
115910
|
case require_device_type.DeviceType.Valve: return "cover-family";
|
|
114638
115911
|
case require_device_type.DeviceType.Switch:
|
|
@@ -116330,6 +117603,7 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
116330
117603
|
"group-active",
|
|
116331
117604
|
"group-commands",
|
|
116332
117605
|
"group-status",
|
|
117606
|
+
"heat-pump-status",
|
|
116333
117607
|
"heating-valve",
|
|
116334
117608
|
"humidifier",
|
|
116335
117609
|
"humidity-sensor",
|
|
@@ -117463,6 +118737,81 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
117463
118737
|
form: "single",
|
|
117464
118738
|
optional: false
|
|
117465
118739
|
}],
|
|
118740
|
+
"heatPumpControl.setAdditionalHeaterMode": [{
|
|
118741
|
+
name: "deviceId",
|
|
118742
|
+
form: "single",
|
|
118743
|
+
optional: false
|
|
118744
|
+
}],
|
|
118745
|
+
"heatPumpControl.setAwayMode": [{
|
|
118746
|
+
name: "deviceId",
|
|
118747
|
+
form: "single",
|
|
118748
|
+
optional: false
|
|
118749
|
+
}],
|
|
118750
|
+
"heatPumpControl.setCircuitComfortSetpoint": [{
|
|
118751
|
+
name: "deviceId",
|
|
118752
|
+
form: "single",
|
|
118753
|
+
optional: false
|
|
118754
|
+
}],
|
|
118755
|
+
"heatPumpControl.setCircuitEcoSetpoint": [{
|
|
118756
|
+
name: "deviceId",
|
|
118757
|
+
form: "single",
|
|
118758
|
+
optional: false
|
|
118759
|
+
}],
|
|
118760
|
+
"heatPumpControl.setCircuitHeatCoolMode": [{
|
|
118761
|
+
name: "deviceId",
|
|
118762
|
+
form: "single",
|
|
118763
|
+
optional: false
|
|
118764
|
+
}],
|
|
118765
|
+
"heatPumpControl.setCircuitMaxFlowTemp": [{
|
|
118766
|
+
name: "deviceId",
|
|
118767
|
+
form: "single",
|
|
118768
|
+
optional: false
|
|
118769
|
+
}],
|
|
118770
|
+
"heatPumpControl.setCircuitOperationMode": [{
|
|
118771
|
+
name: "deviceId",
|
|
118772
|
+
form: "single",
|
|
118773
|
+
optional: false
|
|
118774
|
+
}],
|
|
118775
|
+
"heatPumpControl.setCircuitSummerWinter": [{
|
|
118776
|
+
name: "deviceId",
|
|
118777
|
+
form: "single",
|
|
118778
|
+
optional: false
|
|
118779
|
+
}],
|
|
118780
|
+
"heatPumpControl.setDhwChargeDuration": [{
|
|
118781
|
+
name: "deviceId",
|
|
118782
|
+
form: "single",
|
|
118783
|
+
optional: false
|
|
118784
|
+
}],
|
|
118785
|
+
"heatPumpControl.setDhwOperationMode": [{
|
|
118786
|
+
name: "deviceId",
|
|
118787
|
+
form: "single",
|
|
118788
|
+
optional: false
|
|
118789
|
+
}],
|
|
118790
|
+
"heatPumpControl.setDhwTemperatureLevel": [{
|
|
118791
|
+
name: "deviceId",
|
|
118792
|
+
form: "single",
|
|
118793
|
+
optional: false
|
|
118794
|
+
}],
|
|
118795
|
+
"heatPumpControl.setHolidayMode": [{
|
|
118796
|
+
name: "deviceId",
|
|
118797
|
+
form: "single",
|
|
118798
|
+
optional: false
|
|
118799
|
+
}],
|
|
118800
|
+
"heatPumpControl.setSilentMode": [{
|
|
118801
|
+
name: "deviceId",
|
|
118802
|
+
form: "single",
|
|
118803
|
+
optional: false
|
|
118804
|
+
}],
|
|
118805
|
+
"heatPumpControl.startExtraHotWater": [{
|
|
118806
|
+
name: "deviceId",
|
|
118807
|
+
form: "single",
|
|
118808
|
+
optional: false
|
|
118809
|
+
}],
|
|
118810
|
+
"heatPumpStatus.getStatus": [{
|
|
118811
|
+
name: "deviceId",
|
|
118812
|
+
form: "single",
|
|
118813
|
+
optional: false
|
|
118814
|
+
}],
|
|
117466
118815
|
"heroLayout.getHeroModel": [{
|
|
117467
118816
|
name: "deviceId",
|
|
117468
118817
|
form: "single",
|
|
@@ -119654,7 +121003,7 @@ function getCapsByProviderKind(kind) {
|
|
|
119654
121003
|
//#region src/generated/runtime-state-durability.ts
|
|
119655
121004
|
/**
|
|
119656
121005
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
119657
|
-
* `runtimeState`.
|
|
121006
|
+
* `runtimeState`. 82 caps: 41 `restored`, 41 `session`.
|
|
119658
121007
|
*
|
|
119659
121008
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
119660
121009
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -119789,6 +121138,10 @@ var RUNTIME_STATE_POLICY = {
|
|
|
119789
121138
|
durability: "session",
|
|
119790
121139
|
volatileFields: []
|
|
119791
121140
|
},
|
|
121141
|
+
"heat-pump-status": {
|
|
121142
|
+
durability: "session",
|
|
121143
|
+
volatileFields: ["lastFetchedAt"]
|
|
121144
|
+
},
|
|
119792
121145
|
"heating-valve": {
|
|
119793
121146
|
durability: "session",
|
|
119794
121147
|
volatileFields: ["lastFetchedAt"]
|
|
@@ -120658,7 +122011,6 @@ function createSystemProxy(api) {
|
|
|
120658
122011
|
listScopedSettings: (input) => dispatch("addonSettings", "listScopedSettings", "query", input),
|
|
120659
122012
|
updateScopedSettings: (input) => dispatch("addonSettings", "updateScopedSettings", "mutation", input),
|
|
120660
122013
|
readScopedValues: (input) => dispatch("addonSettings", "readScopedValues", "query", input),
|
|
120661
|
-
getIntegrationFormSchema: (input) => dispatch("addonSettings", "getIntegrationFormSchema", "query", input),
|
|
120662
122014
|
getDeclaredSettingsKeys: (input) => dispatch("addonSettings", "getDeclaredSettingsKeys", "query", input),
|
|
120663
122015
|
unsetStoredSettingsKeys: (input) => dispatch("addonSettings", "unsetStoredSettingsKeys", "mutation", input)
|
|
120664
122016
|
},
|
|
@@ -133914,6 +135266,7 @@ exports.FEEDER_EXAMPLE_HA_DEVICE_ID = FEEDER_EXAMPLE_HA_DEVICE_ID;
|
|
|
133914
135266
|
exports.FEW_SHOT_COUNT = FEW_SHOT_COUNT;
|
|
133915
135267
|
exports.FFMPEG_PATH_ENV = require_composition.FFMPEG_PATH_ENV;
|
|
133916
135268
|
exports.FIRST_LEVEL_MACRO_CLASSES = FIRST_LEVEL_MACRO_CLASSES;
|
|
135269
|
+
exports.FORBIDDEN_MESSAGE_PREFIX = require_sleep.FORBIDDEN_MESSAGE_PREFIX;
|
|
133917
135270
|
exports.FORWARD_INPUT_KEY = require_composition.FORWARD_INPUT_KEY;
|
|
133918
135271
|
exports.FULL_IMAGE_BBOX = FULL_IMAGE_BBOX;
|
|
133919
135272
|
exports.FailureContributionSchema = FailureContributionSchema;
|
|
@@ -133963,6 +135316,7 @@ exports.HAP_AUDIO_BASE = HAP_AUDIO_BASE;
|
|
|
133963
135316
|
exports.HAP_AUDIO_BITRATE_KBPS = HAP_AUDIO_BITRATE_KBPS;
|
|
133964
135317
|
exports.HAP_AUDIO_VBV_KBITS = HAP_AUDIO_VBV_KBITS;
|
|
133965
135318
|
exports.HAP_KEYFRAME_INTERVAL_SEC = HAP_KEYFRAME_INTERVAL_SEC;
|
|
135319
|
+
exports.HEAT_PUMP_CIRCUIT_KINDS = HEAT_PUMP_CIRCUIT_KINDS;
|
|
133966
135320
|
exports.HERO_ANIMATIONS = HERO_ANIMATIONS;
|
|
133967
135321
|
exports.HERO_BACKGROUNDS = HERO_BACKGROUNDS;
|
|
133968
135322
|
exports.HERO_CAP_CONTRIBUTIONS = HERO_CAP_CONTRIBUTIONS;
|
|
@@ -133973,6 +135327,7 @@ exports.HERO_LOOK_BY_ROLE = HERO_LOOK_BY_ROLE;
|
|
|
133973
135327
|
exports.HERO_LOOK_BY_TYPE = HERO_LOOK_BY_TYPE;
|
|
133974
135328
|
exports.HERO_LOOK_DEFAULT = HERO_LOOK_DEFAULT;
|
|
133975
135329
|
exports.HERO_ROW_IDS = HERO_ROW_IDS;
|
|
135330
|
+
exports.HERO_ROW_LABELS = HERO_ROW_LABELS;
|
|
133976
135331
|
exports.HERO_ROW_MODELS_MAX = HERO_ROW_MODELS_MAX;
|
|
133977
135332
|
exports.HERO_SCENES = HERO_SCENES;
|
|
133978
135333
|
exports.HERO_SCENE_BY_ROLE = HERO_SCENE_BY_ROLE;
|
|
@@ -134002,6 +135357,15 @@ exports.HUB_VIEWER_MOUNT = HUB_VIEWER_MOUNT;
|
|
|
134002
135357
|
exports.HWACCEL_OPTIONS = HWACCEL_OPTIONS;
|
|
134003
135358
|
exports.HardwareClassIdSchema = HardwareClassIdSchema;
|
|
134004
135359
|
exports.HealthStatusSchema = HealthStatusSchema;
|
|
135360
|
+
exports.HeatPumpCircuitKindSchema = HeatPumpCircuitKindSchema;
|
|
135361
|
+
exports.HeatPumpCircuitSchema = HeatPumpCircuitSchema;
|
|
135362
|
+
exports.HeatPumpEnergySchema = HeatPumpEnergySchema;
|
|
135363
|
+
exports.HeatPumpOptionSettingSchema = HeatPumpOptionSettingSchema;
|
|
135364
|
+
exports.HeatPumpPowerSchema = HeatPumpPowerSchema;
|
|
135365
|
+
exports.HeatPumpRangeSettingSchema = HeatPumpRangeSettingSchema;
|
|
135366
|
+
exports.HeatPumpStatusSchema = HeatPumpStatusSchema;
|
|
135367
|
+
exports.HeatPumpSystemSchema = HeatPumpSystemSchema;
|
|
135368
|
+
exports.HeatPumpTemperaturesSchema = HeatPumpTemperaturesSchema;
|
|
134005
135369
|
exports.HeatingValveStatusSchema = HeatingValveStatusSchema;
|
|
134006
135370
|
exports.HelperMemberSchema = require_composition.HelperMemberSchema;
|
|
134007
135371
|
exports.HelperSpecSchema = require_composition.HelperSpecSchema;
|
|
@@ -134054,7 +135418,6 @@ exports.IntegrationInstanceKindSchema = IntegrationInstanceKindSchema;
|
|
|
134054
135418
|
exports.IntegrationInstanceLinkSchema = IntegrationInstanceLinkSchema;
|
|
134055
135419
|
exports.IntegrationInstanceModeSchema = IntegrationInstanceModeSchema;
|
|
134056
135420
|
exports.IntegrationInstancePatchSchema = IntegrationInstancePatchSchema;
|
|
134057
|
-
exports.IntegrationInstanceRefSchema = IntegrationInstanceRefSchema;
|
|
134058
135421
|
exports.IntegrationInstanceRoleSchema = IntegrationInstanceRoleSchema;
|
|
134059
135422
|
exports.IntegrationInstanceSchema = IntegrationInstanceSchema;
|
|
134060
135423
|
exports.IntegrationInstanceStatusSchema = IntegrationInstanceStatusSchema;
|
|
@@ -135313,6 +136676,7 @@ exports.SwitchStatusSchema = SwitchStatusSchema;
|
|
|
135313
136676
|
exports.SystemHeldSecretNameSchema = SystemHeldSecretNameSchema;
|
|
135314
136677
|
exports.SystemMetricsSchema = SystemMetricsSchema;
|
|
135315
136678
|
exports.SystemMirror = SystemMirror;
|
|
136679
|
+
exports.TARGET_OWNER_KEY = TARGET_OWNER_KEY;
|
|
135316
136680
|
exports.TEMPLATE_KINDS = TEMPLATE_KINDS;
|
|
135317
136681
|
exports.TEMPLATE_PAYLOAD_SCHEMAS = TEMPLATE_PAYLOAD_SCHEMAS;
|
|
135318
136682
|
exports.TEMPLATE_WRITE_REFUSALS = TEMPLATE_WRITE_REFUSALS;
|
|
@@ -135659,6 +137023,7 @@ exports.buildStepArgsTrace = buildStepArgsTrace;
|
|
|
135659
137023
|
exports.buildStreamParamsConfigSchema = buildStreamParamsConfigSchema;
|
|
135660
137024
|
exports.buildSubjectPath = buildSubjectPath;
|
|
135661
137025
|
exports.buildTriggerTrace = buildTriggerTrace;
|
|
137026
|
+
exports.buildUserScopedNotificationTargetInstances = buildUserScopedNotificationTargetInstances;
|
|
135662
137027
|
exports.buildVideoArgs = require_composition.buildVideoArgs;
|
|
135663
137028
|
exports.buildViewerLink = buildViewerLink;
|
|
135664
137029
|
exports.buildVocabularySlice = buildVocabularySlice;
|
|
@@ -136010,6 +137375,7 @@ exports.floodCapability = floodCapability;
|
|
|
136010
137375
|
exports.foldSnapshotByFunction = foldSnapshotByFunction;
|
|
136011
137376
|
exports.followSwitchRunningFeature = followSwitchRunningFeature;
|
|
136012
137377
|
exports.forEachLeaf = forEachLeaf;
|
|
137378
|
+
exports.forbiddenError = require_sleep.forbiddenError;
|
|
136013
137379
|
exports.foreignCapacityCells = foreignCapacityCells;
|
|
136014
137380
|
exports.forgetKnownSecret = require_sleep.forgetKnownSecret;
|
|
136015
137381
|
exports.formatDeviceRevoker = formatDeviceRevoker;
|
|
@@ -136052,9 +137418,13 @@ exports.hasModelBoundOverrides = hasModelBoundOverrides;
|
|
|
136052
137418
|
exports.hasMotionTrigger = hasMotionTrigger;
|
|
136053
137419
|
exports.hasOwnRunningPowerDefaults = hasOwnRunningPowerDefaults;
|
|
136054
137420
|
exports.hasUrlScheme = hasUrlScheme;
|
|
137421
|
+
exports.heatPumpControlCapability = heatPumpControlCapability;
|
|
137422
|
+
exports.heatPumpInstantCop = heatPumpInstantCop;
|
|
137423
|
+
exports.heatPumpStatusCapability = heatPumpStatusCapability;
|
|
136055
137424
|
exports.heatingValveCapability = heatingValveCapability;
|
|
136056
137425
|
exports.helperMembers = require_composition.helperMembers;
|
|
136057
137426
|
exports.helperSaveProblems = helperSaveProblems;
|
|
137427
|
+
exports.heroArgsWithValue = heroArgsWithValue;
|
|
136058
137428
|
exports.heroLayoutCapability = heroLayoutCapability;
|
|
136059
137429
|
exports.heroText = require_sleep.t;
|
|
136060
137430
|
exports.hfModelUrl = require_sleep.hfModelUrl;
|
|
@@ -136599,6 +137969,7 @@ exports.resolveViewableDeviceIds = resolveViewableDeviceIds;
|
|
|
136599
137969
|
exports.resolvedValues = require_sleep.resolvedValues;
|
|
136600
137970
|
exports.resultCellKey = resultCellKey;
|
|
136601
137971
|
exports.resultStandings = resultStandings;
|
|
137972
|
+
exports.retiredTargetsOver = retiredTargetsOver;
|
|
136602
137973
|
exports.retrainBoxIou = retrainBoxIou;
|
|
136603
137974
|
exports.retrainRevisionConflictMessage = retrainRevisionConflictMessage;
|
|
136604
137975
|
exports.rewriteLoginProxyBody = rewriteBody;
|
|
@@ -136651,6 +138022,7 @@ exports.scheduleForSendTimes = scheduleForSendTimes;
|
|
|
136651
138022
|
exports.schedulersCapability = schedulersCapability;
|
|
136652
138023
|
exports.schemaDeclaresAnyField = require_sleep.schemaDeclaresAnyField;
|
|
136653
138024
|
exports.scopeInherits = scopeInherits;
|
|
138025
|
+
exports.scopeInstancesToCaller = scopeInstancesToCaller;
|
|
136654
138026
|
exports.scopeKey = require_sleep.scopeKey;
|
|
136655
138027
|
exports.scopesAllowAddon = scopesAllowAddon;
|
|
136656
138028
|
exports.scopesAllowAddonRoutes = scopesAllowAddonRoutes;
|