@camstack/addon-provider-homeassistant 1.2.628 → 1.2.630
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/dist/addon.js +3 -1
- package/dist/addon.mjs +3 -1
- package/dist/{dist-BNRaAIW1.mjs → dist-CT3sP-p0.mjs} +325 -28
- package/dist/{dist-CAyJy-Ek.js → dist-Dcmr-Isu.js} +330 -27
- package/dist/ha-export/ha-export.addon.js +45 -31
- package/dist/ha-export/ha-export.addon.mjs +45 -31
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-Dcmr-Isu.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-admin-link.ts
|
|
@@ -6487,6 +6487,8 @@ var PARENT_TYPE_PRIORITY = [
|
|
|
6487
6487
|
require_dist.DeviceType.Fan,
|
|
6488
6488
|
require_dist.DeviceType.Vacuum,
|
|
6489
6489
|
require_dist.DeviceType.LawnMower,
|
|
6490
|
+
require_dist.DeviceType.Washer,
|
|
6491
|
+
require_dist.DeviceType.Dryer,
|
|
6490
6492
|
require_dist.DeviceType.Dishwasher,
|
|
6491
6493
|
require_dist.DeviceType.Light,
|
|
6492
6494
|
require_dist.DeviceType.Switch,
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as lawnMowerControlCapability, $t as union, A as buttonCapability, At as weatherCapability, B as coverCapability, Bt as defineRecordKinds, C as batteryCapability, Ct as tryConvertDelta, D as brokerCapability, Dt as valveCapability, E as brightnessCapability, Et as vacuumControlCapability, F as connectivityCapability, G as eventEmitterCapability, Gt as array, H as deviceAdoptionCapability, It as RecordSecretUnavailableError, J as gasCapability, Jt as literal, K as fanControlCapability, Kt as boolean, Lt as baseUnitOf, M as carbonMonoxideCapability, Mt as DeviceRole, N as climateControlCapability, Nt as DeviceType, O as buildAddonRouteProvider, Ot as vibrationCapability, P as colorCapability, Pt as errMsg, Q as ingestReading, Qt as string, R as contactCapability, Rt as createEvent, S as automationControlCapability, St as temperatureSensorCapability, T as binaryCapability, Tt as updateCapability, V as deviceAdminLinkCapability, Vt as entryBody, W as enumSensorCapability, Wt as _enum, X as humiditySensorCapability, Xt as object, Y as humidifierCapability, Yt as number, Z as imageCapability, Zt as record, _ as accessoriesCapability, _t as runningStateCapability, at as notifierCapability, b as alarmPanelCapability, bt as switchCapability, ct as parseAdminBase, dt as presenceCapability, en as unknown, et as lockControlCapability, ft as pressureSensorCapability, g as TargetSchema, gt as runningFromVacuumState, h as RUNNING_STATE_COLD, ht as runningFromMediaPlayer, it as notificationOutputCapability, j as calendarSourceCapability, jt as DeviceFeature, k as buildDeviceAdminUrl, kt as waterHeaterCapability, lt as powerMeterCapability, mt as runningFromLawnMower, n as BaseDevice, nn as EventCategory, nt as motionCapability, ot as numericSensorCapability, pt as quantityFromUnit, q as floodCapability, qt as discriminatedUnion, r as BaseDeviceProvider, rt as normalizeUnit, tn as url, tt as mediaPlayerCapability, u as EnumSensorDateTimeFormatSchema, ut as prepareNotification, v as addonRoutesCapability, vt as scriptRunnerCapability, w as bestLocationMatch, wt as tryConvertUnit, x as ambientLightSensorCapability, xt as tamperCapability, y as airQualitySensorCapability, yt as smokeCapability, z as controlCapability, zt as defineEntryKind } from "./dist-CT3sP-p0.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-admin-link.ts
|
|
@@ -6486,6 +6486,8 @@ var PARENT_TYPE_PRIORITY = [
|
|
|
6486
6486
|
DeviceType.Fan,
|
|
6487
6487
|
DeviceType.Vacuum,
|
|
6488
6488
|
DeviceType.LawnMower,
|
|
6489
|
+
DeviceType.Washer,
|
|
6490
|
+
DeviceType.Dryer,
|
|
6489
6491
|
DeviceType.Dishwasher,
|
|
6490
6492
|
DeviceType.Light,
|
|
6491
6493
|
DeviceType.Switch,
|
|
@@ -5574,7 +5574,7 @@ var ZodIssueCode = {
|
|
|
5574
5574
|
var ZodFirstPartyTypeKind;
|
|
5575
5575
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5576
5576
|
//#endregion
|
|
5577
|
-
//#region ../types/dist/sleep-
|
|
5577
|
+
//#region ../types/dist/sleep-0sD_LHLI.mjs
|
|
5578
5578
|
/**
|
|
5579
5579
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5580
5580
|
* window to float samples (D455).
|
|
@@ -9039,6 +9039,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
9039
9039
|
"login-method",
|
|
9040
9040
|
"media-player",
|
|
9041
9041
|
"mesh-network",
|
|
9042
|
+
"meter",
|
|
9042
9043
|
"metrics-provider",
|
|
9043
9044
|
"model-convert",
|
|
9044
9045
|
"model-distributor",
|
|
@@ -10096,6 +10097,10 @@ Object.freeze({
|
|
|
10096
10097
|
]
|
|
10097
10098
|
}
|
|
10098
10099
|
],
|
|
10100
|
+
"meter": [{
|
|
10101
|
+
"path": "value",
|
|
10102
|
+
"valueType": "number"
|
|
10103
|
+
}],
|
|
10099
10104
|
"motion": [
|
|
10100
10105
|
{
|
|
10101
10106
|
"path": "detected",
|
|
@@ -10839,7 +10844,7 @@ object({
|
|
|
10839
10844
|
params: record(string(), union([string(), number()])).optional()
|
|
10840
10845
|
});
|
|
10841
10846
|
//#endregion
|
|
10842
|
-
//#region ../types/dist/err-msg-
|
|
10847
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10843
10848
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10844
10849
|
DeviceType["Camera"] = "camera";
|
|
10845
10850
|
DeviceType["Hub"] = "hub";
|
|
@@ -10933,8 +10938,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10933
10938
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10934
10939
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10935
10940
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10936
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10941
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10942
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10937
10943
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10944
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10945
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10946
|
+
DeviceType["Washer"] = "washer";
|
|
10947
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10948
|
+
DeviceType["Dryer"] = "dryer";
|
|
10938
10949
|
return DeviceType;
|
|
10939
10950
|
}({});
|
|
10940
10951
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -11192,7 +11203,7 @@ function errMsg(err) {
|
|
|
11192
11203
|
return String(err);
|
|
11193
11204
|
}
|
|
11194
11205
|
//#endregion
|
|
11195
|
-
//#region ../types/dist/composition-
|
|
11206
|
+
//#region ../types/dist/composition-CpETZ4HL.mjs
|
|
11196
11207
|
/**
|
|
11197
11208
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
11198
11209
|
*
|
|
@@ -11948,6 +11959,97 @@ function validateExpressionSource(src) {
|
|
|
11948
11959
|
return null;
|
|
11949
11960
|
}
|
|
11950
11961
|
/**
|
|
11962
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
11963
|
+
*
|
|
11964
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
11965
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
11966
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
11967
|
+
*
|
|
11968
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
11969
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
11970
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
11971
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
11972
|
+
* can move later without moving the others.
|
|
11973
|
+
*/
|
|
11974
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
11975
|
+
var APPLIANCE_KINDS = [
|
|
11976
|
+
"washer",
|
|
11977
|
+
"dryer",
|
|
11978
|
+
"dishwasher"
|
|
11979
|
+
];
|
|
11980
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
11981
|
+
/**
|
|
11982
|
+
* Statistics and integrals over a history read (D944).
|
|
11983
|
+
*
|
|
11984
|
+
* Pure: the same points always give the same answer, so a restart recomputes
|
|
11985
|
+
* rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
|
|
11986
|
+
* never the mean of the samples. A hole with no held value is not integrated
|
|
11987
|
+
* as zero. A truncated read is not published.
|
|
11988
|
+
*/
|
|
11989
|
+
var STATISTIC_STATS = [
|
|
11990
|
+
"min",
|
|
11991
|
+
"max",
|
|
11992
|
+
"mean",
|
|
11993
|
+
"sum",
|
|
11994
|
+
"count",
|
|
11995
|
+
"change"
|
|
11996
|
+
];
|
|
11997
|
+
/**
|
|
11998
|
+
* The range a statistics or integral helper asks history for (D944).
|
|
11999
|
+
*
|
|
12000
|
+
* Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
|
|
12001
|
+
* or 25 hours across a DST change. A tier is eligible only when its retention
|
|
12002
|
+
* is strictly longer than the longest that range can be. Forever qualifies.
|
|
12003
|
+
* Equal to a tier's retention is a refusal, not a short answer.
|
|
12004
|
+
*/
|
|
12005
|
+
var MINUTE_MS = 6e4;
|
|
12006
|
+
var HOUR_MS = 60 * MINUTE_MS;
|
|
12007
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
12008
|
+
var ROLLING_SPANS = [
|
|
12009
|
+
"1h",
|
|
12010
|
+
"24h",
|
|
12011
|
+
"2d",
|
|
12012
|
+
"7d",
|
|
12013
|
+
"30d",
|
|
12014
|
+
"custom"
|
|
12015
|
+
];
|
|
12016
|
+
var CALENDAR_PERIODS = [
|
|
12017
|
+
"today",
|
|
12018
|
+
"yesterday",
|
|
12019
|
+
"this-week",
|
|
12020
|
+
"this-month"
|
|
12021
|
+
];
|
|
12022
|
+
var RESET_PERIODS = [
|
|
12023
|
+
"never",
|
|
12024
|
+
"daily",
|
|
12025
|
+
"weekly",
|
|
12026
|
+
"monthly"
|
|
12027
|
+
];
|
|
12028
|
+
5 * MINUTE_MS;
|
|
12029
|
+
24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
|
|
12030
|
+
7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
|
|
12031
|
+
var StatisticWindowSchema = discriminatedUnion("kind", [object({
|
|
12032
|
+
kind: literal("rolling"),
|
|
12033
|
+
span: _enum(ROLLING_SPANS),
|
|
12034
|
+
customMinutes: number().int().min(5).optional()
|
|
12035
|
+
}).check((payload) => {
|
|
12036
|
+
if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
|
|
12037
|
+
code: "custom",
|
|
12038
|
+
message: "a custom range needs a duration in minutes",
|
|
12039
|
+
path: ["customMinutes"],
|
|
12040
|
+
input: payload.value
|
|
12041
|
+
});
|
|
12042
|
+
if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
|
|
12043
|
+
code: "custom",
|
|
12044
|
+
message: "only a custom range carries a duration",
|
|
12045
|
+
path: ["customMinutes"],
|
|
12046
|
+
input: payload.value
|
|
12047
|
+
});
|
|
12048
|
+
}), object({
|
|
12049
|
+
kind: literal("calendar"),
|
|
12050
|
+
period: _enum(CALENDAR_PERIODS)
|
|
12051
|
+
})]);
|
|
12052
|
+
/**
|
|
11951
12053
|
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11952
12054
|
* id. Split out so helper schemas can name it without a cycle through
|
|
11953
12055
|
* `composition.ts` (D659).
|
|
@@ -12003,14 +12105,37 @@ var HelperMemberSchema = object({
|
|
|
12003
12105
|
cap: string().min(1),
|
|
12004
12106
|
fieldPath: string().min(1)
|
|
12005
12107
|
});
|
|
12006
|
-
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12108
|
+
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
12109
|
+
object({
|
|
12110
|
+
kind: literal("group"),
|
|
12111
|
+
templateId: GroupTemplateIdSchema,
|
|
12112
|
+
aggregate: AggregateReducerSchema,
|
|
12113
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
12114
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
12115
|
+
active: ActiveCriterionSchema.optional()
|
|
12116
|
+
}),
|
|
12117
|
+
object({
|
|
12118
|
+
kind: literal("appliance"),
|
|
12119
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
12120
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
12121
|
+
thresholdWatts: number().positive(),
|
|
12122
|
+
startDwellMs: number().int().nonnegative(),
|
|
12123
|
+
stopDwellMs: number().int().nonnegative(),
|
|
12124
|
+
member: HelperMemberSchema
|
|
12125
|
+
}),
|
|
12126
|
+
object({
|
|
12127
|
+
kind: literal("statistic"),
|
|
12128
|
+
stat: _enum(STATISTIC_STATS),
|
|
12129
|
+
window: StatisticWindowSchema,
|
|
12130
|
+
source: HelperMemberSchema
|
|
12131
|
+
}),
|
|
12132
|
+
object({
|
|
12133
|
+
kind: literal("integral"),
|
|
12134
|
+
reset: _enum(RESET_PERIODS),
|
|
12135
|
+
output: _enum(["energy", "meter"]),
|
|
12136
|
+
source: HelperMemberSchema
|
|
12137
|
+
})
|
|
12138
|
+
]);
|
|
12014
12139
|
/** A composed device's stableId is this prefix plus the block id. */
|
|
12015
12140
|
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
12016
12141
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
@@ -12084,6 +12209,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
12084
12209
|
"omit",
|
|
12085
12210
|
"offline"
|
|
12086
12211
|
])
|
|
12212
|
+
}),
|
|
12213
|
+
object({
|
|
12214
|
+
kind: literal("series"),
|
|
12215
|
+
read: CompositionFieldReadSchema,
|
|
12216
|
+
/** `value` is the statistic or the integral. The others are the gap counts. */
|
|
12217
|
+
publish: _enum([
|
|
12218
|
+
"value",
|
|
12219
|
+
"included",
|
|
12220
|
+
"excluded",
|
|
12221
|
+
"total"
|
|
12222
|
+
]),
|
|
12223
|
+
/**
|
|
12224
|
+
* What an unanswered `value` does. Counts ignore this. `offline` leaves the
|
|
12225
|
+
* device unseeded until history answers, so a restart cannot publish 0.
|
|
12226
|
+
*/
|
|
12227
|
+
empty: _enum([
|
|
12228
|
+
"null",
|
|
12229
|
+
"omit",
|
|
12230
|
+
"offline"
|
|
12231
|
+
])
|
|
12087
12232
|
})
|
|
12088
12233
|
]);
|
|
12089
12234
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
@@ -18560,7 +18705,8 @@ var CompositionProblemSchema = object({
|
|
|
18560
18705
|
"native-capability-replace",
|
|
18561
18706
|
"mixed-quantity",
|
|
18562
18707
|
"helper-mismatch",
|
|
18563
|
-
"member-constraint"
|
|
18708
|
+
"member-constraint",
|
|
18709
|
+
"retention"
|
|
18564
18710
|
]),
|
|
18565
18711
|
path: string(),
|
|
18566
18712
|
message: string()
|
|
@@ -18800,7 +18946,7 @@ Object.freeze({
|
|
|
18800
18946
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18801
18947
|
* Data, not a form default written into the block.
|
|
18802
18948
|
*/
|
|
18803
|
-
var NOW = {
|
|
18949
|
+
var NOW$1 = {
|
|
18804
18950
|
fieldPath: "lastFetchedAt",
|
|
18805
18951
|
expr: "now"
|
|
18806
18952
|
};
|
|
@@ -18846,7 +18992,7 @@ var GROUP_TEMPLATES = [
|
|
|
18846
18992
|
quantity: "temperature",
|
|
18847
18993
|
defaultAggregate: "mean",
|
|
18848
18994
|
empty: "null",
|
|
18849
|
-
companions: [NOW]
|
|
18995
|
+
companions: [NOW$1]
|
|
18850
18996
|
}),
|
|
18851
18997
|
numeric({
|
|
18852
18998
|
id: "humidity",
|
|
@@ -18857,7 +19003,7 @@ var GROUP_TEMPLATES = [
|
|
|
18857
19003
|
quantity: "humidity",
|
|
18858
19004
|
defaultAggregate: "mean",
|
|
18859
19005
|
empty: "null",
|
|
18860
|
-
companions: [NOW]
|
|
19006
|
+
companions: [NOW$1]
|
|
18861
19007
|
}),
|
|
18862
19008
|
numeric({
|
|
18863
19009
|
id: "pressure",
|
|
@@ -18868,7 +19014,7 @@ var GROUP_TEMPLATES = [
|
|
|
18868
19014
|
quantity: "pressure",
|
|
18869
19015
|
defaultAggregate: "mean",
|
|
18870
19016
|
empty: "null",
|
|
18871
|
-
companions: [NOW]
|
|
19017
|
+
companions: [NOW$1]
|
|
18872
19018
|
}),
|
|
18873
19019
|
numeric({
|
|
18874
19020
|
id: "illuminance",
|
|
@@ -18879,7 +19025,7 @@ var GROUP_TEMPLATES = [
|
|
|
18879
19025
|
quantity: "illuminance",
|
|
18880
19026
|
defaultAggregate: "mean",
|
|
18881
19027
|
empty: "null",
|
|
18882
|
-
companions: [NOW]
|
|
19028
|
+
companions: [NOW$1]
|
|
18883
19029
|
}),
|
|
18884
19030
|
numeric({
|
|
18885
19031
|
id: "power",
|
|
@@ -18890,7 +19036,7 @@ var GROUP_TEMPLATES = [
|
|
|
18890
19036
|
quantity: "power",
|
|
18891
19037
|
defaultAggregate: "sum",
|
|
18892
19038
|
empty: "omit",
|
|
18893
|
-
companions: [NOW]
|
|
19039
|
+
companions: [NOW$1]
|
|
18894
19040
|
}),
|
|
18895
19041
|
numeric({
|
|
18896
19042
|
id: "energy",
|
|
@@ -18901,7 +19047,7 @@ var GROUP_TEMPLATES = [
|
|
|
18901
19047
|
quantity: "energy",
|
|
18902
19048
|
defaultAggregate: "sum",
|
|
18903
19049
|
empty: "omit",
|
|
18904
|
-
companions: [NOW]
|
|
19050
|
+
companions: [NOW$1]
|
|
18905
19051
|
}),
|
|
18906
19052
|
numeric({
|
|
18907
19053
|
id: "battery",
|
|
@@ -18936,7 +19082,7 @@ var GROUP_TEMPLATES = [
|
|
|
18936
19082
|
quantity: "device",
|
|
18937
19083
|
defaultAggregate: "mean",
|
|
18938
19084
|
empty: "null",
|
|
18939
|
-
companions: [NOW]
|
|
19085
|
+
companions: [NOW$1]
|
|
18940
19086
|
}),
|
|
18941
19087
|
binary({
|
|
18942
19088
|
id: "motion",
|
|
@@ -19065,6 +19211,7 @@ function actuator(input) {
|
|
|
19065
19211
|
}
|
|
19066
19212
|
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
19067
19213
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
19214
|
+
DeviceType.Camera;
|
|
19068
19215
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
19069
19216
|
/**
|
|
19070
19217
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -62320,6 +62467,44 @@ var lockControlCapability = {
|
|
|
62320
62467
|
volatileStateFields: ["lastChangedAt"]
|
|
62321
62468
|
};
|
|
62322
62469
|
/**
|
|
62470
|
+
* A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
|
|
62471
|
+
* so dashboards keep one series; every other instantaneous reading lands here.
|
|
62472
|
+
* `value` is the time integral in the source quantity's accumulated base
|
|
62473
|
+
* (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
|
|
62474
|
+
*/
|
|
62475
|
+
var MeterStatusSchema = object({
|
|
62476
|
+
value: number().nullable().meta(readingMeta("device", { label: "Total" })),
|
|
62477
|
+
lastFetchedAt: number()
|
|
62478
|
+
});
|
|
62479
|
+
var meterCapability = {
|
|
62480
|
+
name: "meter",
|
|
62481
|
+
scope: "device",
|
|
62482
|
+
deviceNative: true,
|
|
62483
|
+
mode: "singleton",
|
|
62484
|
+
deviceTypes: [DeviceType.Sensor],
|
|
62485
|
+
methods: {},
|
|
62486
|
+
status: {
|
|
62487
|
+
schema: MeterStatusSchema,
|
|
62488
|
+
kind: "push"
|
|
62489
|
+
},
|
|
62490
|
+
runtimeState: MeterStatusSchema,
|
|
62491
|
+
/**
|
|
62492
|
+
* Runtime-state durability: **restored** — the total is a cache of the
|
|
62493
|
+
* history integral. A restart shows it only until the history pass
|
|
62494
|
+
* recomputes the open period; it is not an in-memory buffer.
|
|
62495
|
+
*
|
|
62496
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
62497
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
62498
|
+
*/
|
|
62499
|
+
durability: "restored",
|
|
62500
|
+
history: { fields: { value: {
|
|
62501
|
+
kind: "counter",
|
|
62502
|
+
deadband: .001,
|
|
62503
|
+
minIntervalMs: 6e4
|
|
62504
|
+
} } },
|
|
62505
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
62506
|
+
};
|
|
62507
|
+
/**
|
|
62323
62508
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
62324
62509
|
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
62325
62510
|
* `DeviceType.MediaPlayer`. Disjoint from the camera streaming
|
|
@@ -64846,7 +65031,12 @@ var powerMeterCapability = {
|
|
|
64846
65031
|
scope: "device",
|
|
64847
65032
|
deviceNative: true,
|
|
64848
65033
|
mode: "singleton",
|
|
64849
|
-
deviceTypes: [
|
|
65034
|
+
deviceTypes: [
|
|
65035
|
+
DeviceType.Sensor,
|
|
65036
|
+
DeviceType.Washer,
|
|
65037
|
+
DeviceType.Dryer,
|
|
65038
|
+
DeviceType.Dishwasher
|
|
65039
|
+
],
|
|
64850
65040
|
methods: {},
|
|
64851
65041
|
status: {
|
|
64852
65042
|
schema: PowerMeterStatusSchema,
|
|
@@ -65592,6 +65782,8 @@ var runningCustomize = {
|
|
|
65592
65782
|
stateField: "running"
|
|
65593
65783
|
},
|
|
65594
65784
|
deviceTypes: [
|
|
65785
|
+
DeviceType.Washer,
|
|
65786
|
+
DeviceType.Dryer,
|
|
65595
65787
|
DeviceType.Dishwasher,
|
|
65596
65788
|
DeviceType.Vacuum,
|
|
65597
65789
|
DeviceType.LawnMower,
|
|
@@ -70730,7 +70922,7 @@ function tryConvertDelta(value, from, to) {
|
|
|
70730
70922
|
return shifted - origin;
|
|
70731
70923
|
}
|
|
70732
70924
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
70733
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
70925
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
70734
70926
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
70735
70927
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
70736
70928
|
new Set(CAP_NAMES);
|
|
@@ -71070,6 +71262,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
71070
71262
|
lawnMowerControl: lawnMowerControlCapability,
|
|
71071
71263
|
lockControl: lockControlCapability,
|
|
71072
71264
|
mediaPlayer: mediaPlayerCapability,
|
|
71265
|
+
meter: meterCapability,
|
|
71073
71266
|
motion: motionCapability,
|
|
71074
71267
|
motionTrigger: motionTriggerCapability,
|
|
71075
71268
|
motionZones: motionZonesCapability,
|
|
@@ -72329,7 +72522,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
72329
72522
|
return toDeviceSummary(device, this.addonId);
|
|
72330
72523
|
}
|
|
72331
72524
|
};
|
|
72332
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
72525
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
72333
72526
|
new Set(Object.values(DeviceType));
|
|
72334
72527
|
Object.freeze({
|
|
72335
72528
|
"accessories.getStatus": {
|
|
@@ -76518,6 +76711,13 @@ Object.freeze({
|
|
|
76518
76711
|
access: "create",
|
|
76519
76712
|
role: "admin"
|
|
76520
76713
|
},
|
|
76714
|
+
"meter.getStatus": {
|
|
76715
|
+
capName: "meter",
|
|
76716
|
+
capScope: "device",
|
|
76717
|
+
addonId: null,
|
|
76718
|
+
access: "view",
|
|
76719
|
+
role: "viewer"
|
|
76720
|
+
},
|
|
76521
76721
|
"metricsProvider.collectSnapshot": {
|
|
76522
76722
|
capName: "metrics-provider",
|
|
76523
76723
|
capScope: "system",
|
|
@@ -84616,7 +84816,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
84616
84816
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
84617
84817
|
icon: "square"
|
|
84618
84818
|
}
|
|
84619
|
-
}
|
|
84819
|
+
},
|
|
84820
|
+
overrides: { byType: {
|
|
84821
|
+
[DeviceType.Washer]: {
|
|
84822
|
+
state: { running: {
|
|
84823
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
84824
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
84825
|
+
} },
|
|
84826
|
+
events: {
|
|
84827
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
84828
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
84829
|
+
}
|
|
84830
|
+
},
|
|
84831
|
+
[DeviceType.Dryer]: {
|
|
84832
|
+
state: { running: {
|
|
84833
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
84834
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
84835
|
+
} },
|
|
84836
|
+
events: {
|
|
84837
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
84838
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
84839
|
+
}
|
|
84840
|
+
},
|
|
84841
|
+
[DeviceType.Dishwasher]: {
|
|
84842
|
+
state: { running: {
|
|
84843
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
84844
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
84845
|
+
} },
|
|
84846
|
+
events: {
|
|
84847
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
84848
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
84849
|
+
}
|
|
84850
|
+
}
|
|
84851
|
+
} }
|
|
84620
84852
|
},
|
|
84621
84853
|
update: {
|
|
84622
84854
|
scope: "device",
|
|
@@ -85444,6 +85676,17 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
85444
85676
|
}],
|
|
85445
85677
|
events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
|
|
85446
85678
|
},
|
|
85679
|
+
meter: {
|
|
85680
|
+
scope: "device",
|
|
85681
|
+
noun: t("Meter", "Contatore"),
|
|
85682
|
+
state: [{
|
|
85683
|
+
kind: "numeric",
|
|
85684
|
+
field: "value",
|
|
85685
|
+
quantity: t("the total", "il totale"),
|
|
85686
|
+
label: t("Total", "Totale"),
|
|
85687
|
+
icon: "gauge"
|
|
85688
|
+
}]
|
|
85689
|
+
},
|
|
85447
85690
|
"numeric-sensor": {
|
|
85448
85691
|
scope: "device",
|
|
85449
85692
|
noun: t("Sensor", "Sensore"),
|
|
@@ -85916,8 +86159,58 @@ function projectAction(cap, action) {
|
|
|
85916
86159
|
};
|
|
85917
86160
|
}
|
|
85918
86161
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
85919
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
86162
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
85920
86163
|
DeviceFeature.BatteryOperated;
|
|
86164
|
+
/**
|
|
86165
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
86166
|
+
*
|
|
86167
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
86168
|
+
* travels is its power reading. The others have a laundry type that this
|
|
86169
|
+
* export cannot honour yet, so they are named and withheld.
|
|
86170
|
+
*/
|
|
86171
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
86172
|
+
DeviceType.Washer,
|
|
86173
|
+
DeviceType.Dryer,
|
|
86174
|
+
DeviceType.Dishwasher
|
|
86175
|
+
];
|
|
86176
|
+
var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
|
|
86177
|
+
var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
|
|
86178
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
86179
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
86180
|
+
var MATTER_REASON = "No Matter export is built. The closest device types are Laundry Washer (0x0073) and Laundry Dryer (0x0074); a power threshold is not the Laundry Washer Mode cluster.";
|
|
86181
|
+
function withheld(reason) {
|
|
86182
|
+
return {
|
|
86183
|
+
[DeviceType.Washer]: {
|
|
86184
|
+
exported: false,
|
|
86185
|
+
reason
|
|
86186
|
+
},
|
|
86187
|
+
[DeviceType.Dryer]: {
|
|
86188
|
+
exported: false,
|
|
86189
|
+
reason
|
|
86190
|
+
},
|
|
86191
|
+
[DeviceType.Dishwasher]: {
|
|
86192
|
+
exported: false,
|
|
86193
|
+
reason
|
|
86194
|
+
}
|
|
86195
|
+
};
|
|
86196
|
+
}
|
|
86197
|
+
function offered(received) {
|
|
86198
|
+
return {
|
|
86199
|
+
[DeviceType.Washer]: {
|
|
86200
|
+
exported: true,
|
|
86201
|
+
as: received
|
|
86202
|
+
},
|
|
86203
|
+
[DeviceType.Dryer]: {
|
|
86204
|
+
exported: true,
|
|
86205
|
+
as: received
|
|
86206
|
+
},
|
|
86207
|
+
[DeviceType.Dishwasher]: {
|
|
86208
|
+
exported: true,
|
|
86209
|
+
as: received
|
|
86210
|
+
}
|
|
86211
|
+
};
|
|
86212
|
+
}
|
|
86213
|
+
offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
|
|
85921
86214
|
Object.freeze({
|
|
85922
86215
|
"accessories.getStatus": [{
|
|
85923
86216
|
name: "deviceId",
|
|
@@ -87094,6 +87387,11 @@ Object.freeze({
|
|
|
87094
87387
|
form: "single",
|
|
87095
87388
|
optional: false
|
|
87096
87389
|
}],
|
|
87390
|
+
"meter.getStatus": [{
|
|
87391
|
+
name: "deviceId",
|
|
87392
|
+
form: "single",
|
|
87393
|
+
optional: false
|
|
87394
|
+
}],
|
|
87097
87395
|
"motion.getStatus": [{
|
|
87098
87396
|
name: "deviceId",
|
|
87099
87397
|
form: "single",
|
|
@@ -88701,7 +88999,6 @@ Object.freeze({
|
|
|
88701
88999
|
"network-access": "ingress",
|
|
88702
89000
|
"smtp-provider": "email"
|
|
88703
89001
|
});
|
|
88704
|
-
DeviceType.Camera;
|
|
88705
89002
|
/**
|
|
88706
89003
|
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
88707
89004
|
* `z.infer`, they do not restate the shape.
|
|
@@ -90357,4 +90654,4 @@ function bestLocationMatch(externalName, existing, threshold = .8) {
|
|
|
90357
90654
|
var MB = 1024 * 1024;
|
|
90358
90655
|
1024 * MB, 3072 * MB;
|
|
90359
90656
|
//#endregion
|
|
90360
|
-
export {
|
|
90657
|
+
export { lawnMowerControlCapability as $, union as $t, buttonCapability as A, weatherCapability as At, coverCapability as B, defineRecordKinds as Bt, batteryCapability as C, tryConvertDelta as Ct, brokerCapability as D, valveCapability as Dt, brightnessCapability as E, vacuumControlCapability as Et, connectivityCapability as F, BaseAddon as Ft, eventEmitterCapability as G, array as Gt, deviceAdoptionCapability as H, isReadingQuantity as Ht, consumableFormOf as I, RecordSecretUnavailableError as It, gasCapability as J, literal as Jt, fanControlCapability as K, boolean as Kt, consumableKindOf as L, baseUnitOf as Lt, carbonMonoxideCapability as M, DeviceRole as Mt, climateControlCapability as N, DeviceType as Nt, buildAddonRouteProvider as O, vibrationCapability as Ot, colorCapability as P, errMsg as Pt, ingestReading as Q, string as Qt, contactCapability as R, createEvent as Rt, automationControlCapability as S, temperatureSensorCapability as St, binaryCapability as T, updateCapability as Tt, deviceExportCapability as U, nodePin as Ut, deviceAdminLinkCapability as V, entryBody as Vt, enumSensorCapability as W, _enum as Wt, humiditySensorCapability as X, object as Xt, humidifierCapability as Y, number as Yt, imageCapability as Z, record as Zt, accessoriesCapability as _, runningStateCapability as _t, COCO_TO_MACRO as a, notifierCapability as at, alarmPanelCapability as b, switchCapability as bt, ConsumableItemSchema as c, parseAdminBase as ct, FanDirectionSchema as d, presenceCapability as dt, unknown as en, lockControlCapability as et, HvacModeSchema as f, pressureSensorCapability as ft, TargetSchema as g, runningFromVacuumState as gt, RUNNING_STATE_COLD as h, runningFromMediaPlayer as ht, CAMERA_SWITCH_ORDER as i, notificationOutputCapability as it, calendarSourceCapability as j, DeviceFeature as jt, buildDeviceAdminUrl as k, waterHeaterCapability as kt, ConsumableStatusSchema as l, powerMeterCapability as lt, PLUG_APPLIANCE_TYPES as m, runningFromLawnMower as mt, BaseDevice as n, EventCategory as nn, motionCapability as nt, CameraSwitchIdSchema as o, numericSensorCapability as ot, MediaPlayerRepeatSchema as p, quantityFromUnit as pt, floodCapability as q, discriminatedUnion as qt, BaseDeviceProvider as r, normalizeUnit as rt, ConsumableFormSchema as s, oauthIntegrationCapability as st, AlarmArmModeSchema as t, url as tn, mediaPlayerCapability as tt, EnumSensorDateTimeFormatSchema as u, prepareNotification as ut, addonRoutesCapability as v, scriptRunnerCapability as vt, bestLocationMatch as w, tryConvertUnit as wt, ambientLightSensorCapability as x, tamperCapability as xt, airQualitySensorCapability as y, smokeCapability as yt, controlCapability as z, defineEntryKind as zt };
|