@camstack/addon-export-hap 1.2.182 → 1.2.184
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 +10 -1
- package/README.md +11 -9
- package/dist/hap-export.addon.js +567 -45
- package/dist/hap-export.addon.mjs +567 -45
- package/package.json +1 -1
|
@@ -5482,7 +5482,7 @@ var ZodIssueCode = {
|
|
|
5482
5482
|
var ZodFirstPartyTypeKind;
|
|
5483
5483
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5484
5484
|
//#endregion
|
|
5485
|
-
//#region ../types/dist/sleep
|
|
5485
|
+
//#region ../types/dist/sleep--jXS9hWo.mjs
|
|
5486
5486
|
/**
|
|
5487
5487
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5488
5488
|
* window to float samples (D455).
|
|
@@ -8663,6 +8663,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8663
8663
|
"filesystem-browse",
|
|
8664
8664
|
"flood",
|
|
8665
8665
|
"gas",
|
|
8666
|
+
"group-active",
|
|
8666
8667
|
"group-commands",
|
|
8667
8668
|
"group-status",
|
|
8668
8669
|
"heating-valve",
|
|
@@ -8685,6 +8686,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8685
8686
|
"login-method",
|
|
8686
8687
|
"media-player",
|
|
8687
8688
|
"mesh-network",
|
|
8689
|
+
"meter",
|
|
8688
8690
|
"metrics-provider",
|
|
8689
8691
|
"model-convert",
|
|
8690
8692
|
"model-distributor",
|
|
@@ -9483,6 +9485,10 @@ Object.freeze({
|
|
|
9483
9485
|
"path": "detected",
|
|
9484
9486
|
"valueType": "boolean"
|
|
9485
9487
|
}],
|
|
9488
|
+
"group-active": [{
|
|
9489
|
+
"path": "active",
|
|
9490
|
+
"valueType": "boolean"
|
|
9491
|
+
}],
|
|
9486
9492
|
"group-status": [
|
|
9487
9493
|
{
|
|
9488
9494
|
"path": "included",
|
|
@@ -9742,6 +9748,10 @@ Object.freeze({
|
|
|
9742
9748
|
]
|
|
9743
9749
|
}
|
|
9744
9750
|
],
|
|
9751
|
+
"meter": [{
|
|
9752
|
+
"path": "value",
|
|
9753
|
+
"valueType": "number"
|
|
9754
|
+
}],
|
|
9745
9755
|
"motion": [
|
|
9746
9756
|
{
|
|
9747
9757
|
"path": "detected",
|
|
@@ -10485,7 +10495,7 @@ object({
|
|
|
10485
10495
|
params: record(string(), union([string(), number()])).optional()
|
|
10486
10496
|
});
|
|
10487
10497
|
//#endregion
|
|
10488
|
-
//#region ../types/dist/err-msg-
|
|
10498
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10489
10499
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10490
10500
|
DeviceType["Camera"] = "camera";
|
|
10491
10501
|
DeviceType["Hub"] = "hub";
|
|
@@ -10579,8 +10589,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10579
10589
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10580
10590
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10581
10591
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10582
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10592
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10593
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10583
10594
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10595
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10596
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10597
|
+
DeviceType["Washer"] = "washer";
|
|
10598
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10599
|
+
DeviceType["Dryer"] = "dryer";
|
|
10584
10600
|
return DeviceType;
|
|
10585
10601
|
}({});
|
|
10586
10602
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -10838,7 +10854,7 @@ function errMsg$16(err) {
|
|
|
10838
10854
|
return String(err);
|
|
10839
10855
|
}
|
|
10840
10856
|
//#endregion
|
|
10841
|
-
//#region ../types/dist/composition-
|
|
10857
|
+
//#region ../types/dist/composition-Bb8iwHEJ.mjs
|
|
10842
10858
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
10843
10859
|
opus: "libopus",
|
|
10844
10860
|
aac: "aac",
|
|
@@ -11748,6 +11764,13 @@ var table = {
|
|
|
11748
11764
|
apply: () => {
|
|
11749
11765
|
throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
|
|
11750
11766
|
}
|
|
11767
|
+
},
|
|
11768
|
+
schmitt: {
|
|
11769
|
+
minArgs: 3,
|
|
11770
|
+
maxArgs: 5,
|
|
11771
|
+
apply: () => {
|
|
11772
|
+
throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
|
|
11773
|
+
}
|
|
11751
11774
|
}
|
|
11752
11775
|
};
|
|
11753
11776
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -12189,6 +12212,99 @@ function validateExpressionSource(src) {
|
|
|
12189
12212
|
return null;
|
|
12190
12213
|
}
|
|
12191
12214
|
/**
|
|
12215
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
12216
|
+
*
|
|
12217
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
12218
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
12219
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
12220
|
+
*
|
|
12221
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
12222
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
12223
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
12224
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
12225
|
+
* can move later without moving the others.
|
|
12226
|
+
*/
|
|
12227
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
12228
|
+
var APPLIANCE_KINDS = [
|
|
12229
|
+
"washer",
|
|
12230
|
+
"dryer",
|
|
12231
|
+
"dishwasher"
|
|
12232
|
+
];
|
|
12233
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
12234
|
+
/**
|
|
12235
|
+
* Statistics and integrals over a history read (D944).
|
|
12236
|
+
*
|
|
12237
|
+
* Pure: the same points always give the same answer, so a restart recomputes
|
|
12238
|
+
* rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
|
|
12239
|
+
* never the mean of the samples. A hole with no held value is not integrated
|
|
12240
|
+
* as zero. A truncated read is not published.
|
|
12241
|
+
*/
|
|
12242
|
+
var STATISTIC_STATS = [
|
|
12243
|
+
"min",
|
|
12244
|
+
"max",
|
|
12245
|
+
"mean",
|
|
12246
|
+
"sum",
|
|
12247
|
+
"count",
|
|
12248
|
+
"change"
|
|
12249
|
+
];
|
|
12250
|
+
/**
|
|
12251
|
+
* The range a statistics or integral helper asks history for (D944).
|
|
12252
|
+
*
|
|
12253
|
+
* Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
|
|
12254
|
+
* or 25 hours across a DST change. A tier is eligible only when its retention
|
|
12255
|
+
* is strictly longer than the longest that range can be. Forever qualifies.
|
|
12256
|
+
* Equal to a tier's retention is a refusal, not a short answer.
|
|
12257
|
+
*/
|
|
12258
|
+
var MINUTE_MS = 6e4;
|
|
12259
|
+
var HOUR_MS = 60 * MINUTE_MS;
|
|
12260
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
12261
|
+
var ROLLING_SPANS = [
|
|
12262
|
+
"1h",
|
|
12263
|
+
"24h",
|
|
12264
|
+
"2d",
|
|
12265
|
+
"7d",
|
|
12266
|
+
"30d",
|
|
12267
|
+
"custom"
|
|
12268
|
+
];
|
|
12269
|
+
var CALENDAR_PERIODS = [
|
|
12270
|
+
"today",
|
|
12271
|
+
"yesterday",
|
|
12272
|
+
"this-week",
|
|
12273
|
+
"this-month"
|
|
12274
|
+
];
|
|
12275
|
+
var RESET_PERIODS = [
|
|
12276
|
+
"never",
|
|
12277
|
+
"daily",
|
|
12278
|
+
"weekly",
|
|
12279
|
+
"monthly"
|
|
12280
|
+
];
|
|
12281
|
+
5 * MINUTE_MS;
|
|
12282
|
+
24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
|
|
12283
|
+
7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
|
|
12284
|
+
var rollingWindowObject = object({
|
|
12285
|
+
kind: literal("rolling"),
|
|
12286
|
+
span: _enum(ROLLING_SPANS),
|
|
12287
|
+
customMinutes: number().int().min(5).optional()
|
|
12288
|
+
}).check((payload) => {
|
|
12289
|
+
if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
|
|
12290
|
+
code: "custom",
|
|
12291
|
+
message: "a custom range needs a duration in minutes",
|
|
12292
|
+
path: ["customMinutes"],
|
|
12293
|
+
input: payload.value
|
|
12294
|
+
});
|
|
12295
|
+
if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
|
|
12296
|
+
code: "custom",
|
|
12297
|
+
message: "only a custom range carries a duration",
|
|
12298
|
+
path: ["customMinutes"],
|
|
12299
|
+
input: payload.value
|
|
12300
|
+
});
|
|
12301
|
+
});
|
|
12302
|
+
var RollingWindowSchema = rollingWindowObject;
|
|
12303
|
+
var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
|
|
12304
|
+
kind: literal("calendar"),
|
|
12305
|
+
period: _enum(CALENDAR_PERIODS)
|
|
12306
|
+
})]);
|
|
12307
|
+
/**
|
|
12192
12308
|
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
12193
12309
|
* id. Split out so helper schemas can name it without a cycle through
|
|
12194
12310
|
* `composition.ts` (D659).
|
|
@@ -12214,7 +12330,13 @@ var GROUP_TEMPLATE_IDS = [
|
|
|
12214
12330
|
"occupancy",
|
|
12215
12331
|
"binary",
|
|
12216
12332
|
"switch",
|
|
12217
|
-
"light"
|
|
12333
|
+
"light",
|
|
12334
|
+
"fan",
|
|
12335
|
+
"cover",
|
|
12336
|
+
"valve",
|
|
12337
|
+
"lock",
|
|
12338
|
+
"media-player",
|
|
12339
|
+
"climate"
|
|
12218
12340
|
];
|
|
12219
12341
|
var NUMERIC_AGGREGATES = [
|
|
12220
12342
|
"mean",
|
|
@@ -12244,14 +12366,73 @@ var HelperMemberSchema = object({
|
|
|
12244
12366
|
cap: string().min(1),
|
|
12245
12367
|
fieldPath: string().min(1)
|
|
12246
12368
|
});
|
|
12247
|
-
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12369
|
+
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
12370
|
+
object({
|
|
12371
|
+
kind: literal("group"),
|
|
12372
|
+
templateId: GroupTemplateIdSchema,
|
|
12373
|
+
aggregate: AggregateReducerSchema,
|
|
12374
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
12375
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
12376
|
+
active: ActiveCriterionSchema.optional()
|
|
12377
|
+
}),
|
|
12378
|
+
object({
|
|
12379
|
+
kind: literal("appliance"),
|
|
12380
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
12381
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
12382
|
+
thresholdWatts: number().positive(),
|
|
12383
|
+
startDwellMs: number().int().nonnegative(),
|
|
12384
|
+
stopDwellMs: number().int().nonnegative(),
|
|
12385
|
+
member: HelperMemberSchema
|
|
12386
|
+
}),
|
|
12387
|
+
object({
|
|
12388
|
+
kind: literal("statistic"),
|
|
12389
|
+
stat: _enum(STATISTIC_STATS),
|
|
12390
|
+
window: StatisticWindowSchema,
|
|
12391
|
+
source: HelperMemberSchema
|
|
12392
|
+
}),
|
|
12393
|
+
object({
|
|
12394
|
+
kind: literal("integral"),
|
|
12395
|
+
reset: _enum(RESET_PERIODS),
|
|
12396
|
+
output: _enum(["energy", "meter"]),
|
|
12397
|
+
source: HelperMemberSchema
|
|
12398
|
+
}),
|
|
12399
|
+
object({
|
|
12400
|
+
kind: literal("threshold"),
|
|
12401
|
+
source: HelperMemberSchema,
|
|
12402
|
+
high: number(),
|
|
12403
|
+
low: number(),
|
|
12404
|
+
onForMs: number().int().nonnegative(),
|
|
12405
|
+
offForMs: number().int().nonnegative()
|
|
12406
|
+
}),
|
|
12407
|
+
object({
|
|
12408
|
+
kind: literal("arithmetic"),
|
|
12409
|
+
op: _enum([
|
|
12410
|
+
"sum",
|
|
12411
|
+
"difference",
|
|
12412
|
+
"ratio"
|
|
12413
|
+
]),
|
|
12414
|
+
inputs: array(HelperMemberSchema).min(2).max(64)
|
|
12415
|
+
}),
|
|
12416
|
+
object({
|
|
12417
|
+
kind: literal("expression"),
|
|
12418
|
+
expr: string().min(1),
|
|
12419
|
+
inputs: array(object({
|
|
12420
|
+
name: string().min(1),
|
|
12421
|
+
member: HelperMemberSchema
|
|
12422
|
+
})).min(1).max(64),
|
|
12423
|
+
output: _enum(["number", "boolean"])
|
|
12424
|
+
}),
|
|
12425
|
+
object({
|
|
12426
|
+
kind: literal("derivative"),
|
|
12427
|
+
window: RollingWindowSchema,
|
|
12428
|
+
per: _enum([
|
|
12429
|
+
"second",
|
|
12430
|
+
"minute",
|
|
12431
|
+
"hour"
|
|
12432
|
+
]),
|
|
12433
|
+
source: HelperMemberSchema
|
|
12434
|
+
})
|
|
12435
|
+
]);
|
|
12255
12436
|
/** A composed device's stableId is this prefix plus the block id. */
|
|
12256
12437
|
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
12257
12438
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
@@ -12312,6 +12493,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
12312
12493
|
"all"
|
|
12313
12494
|
]),
|
|
12314
12495
|
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
12496
|
+
/**
|
|
12497
|
+
* Set when the reads are an enum state, not a yes/no: the listed states
|
|
12498
|
+
* count as active (a cover is `open`). A state outside the list is inactive;
|
|
12499
|
+
* a read that is not a state at all is left out. Only `any` / `all` use it.
|
|
12500
|
+
*/
|
|
12501
|
+
activeWhen: array(string().min(1)).min(1).optional(),
|
|
12315
12502
|
/** `value` is the reading; the others are the member counts. */
|
|
12316
12503
|
publish: _enum([
|
|
12317
12504
|
"value",
|
|
@@ -12325,6 +12512,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
12325
12512
|
"omit",
|
|
12326
12513
|
"offline"
|
|
12327
12514
|
])
|
|
12515
|
+
}),
|
|
12516
|
+
object({
|
|
12517
|
+
kind: literal("series"),
|
|
12518
|
+
read: CompositionFieldReadSchema,
|
|
12519
|
+
/** `value` is the statistic or the integral. The others are the gap counts. */
|
|
12520
|
+
publish: _enum([
|
|
12521
|
+
"value",
|
|
12522
|
+
"included",
|
|
12523
|
+
"excluded",
|
|
12524
|
+
"total"
|
|
12525
|
+
]),
|
|
12526
|
+
/**
|
|
12527
|
+
* What an unanswered `value` does. Counts ignore this. `offline` leaves the
|
|
12528
|
+
* device unseeded until history answers, so a restart cannot publish 0.
|
|
12529
|
+
*/
|
|
12530
|
+
empty: _enum([
|
|
12531
|
+
"null",
|
|
12532
|
+
"omit",
|
|
12533
|
+
"offline"
|
|
12534
|
+
])
|
|
12328
12535
|
})
|
|
12329
12536
|
]);
|
|
12330
12537
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
@@ -17708,7 +17915,22 @@ var BrokerProviderInfoSchema = object({
|
|
|
17708
17915
|
*/
|
|
17709
17916
|
interactiveConnectPath: string().min(1).optional(),
|
|
17710
17917
|
/** Relative hub path to disconnect the linked account (same popup pattern). */
|
|
17711
|
-
interactiveDisconnectPath: string().min(1).optional()
|
|
17918
|
+
interactiveDisconnectPath: string().min(1).optional(),
|
|
17919
|
+
/**
|
|
17920
|
+
* The kind signs in through a server-held interactive session instead of
|
|
17921
|
+
* (or before) typed credentials. `basePath` is a hub-relative route set
|
|
17922
|
+
* served by the owning addon (`/addon/<id>/...`) speaking the sign-in
|
|
17923
|
+
* contract: `POST {basePath}/start` (body: the form's settings) answers
|
|
17924
|
+
* `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
|
|
17925
|
+
* `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
|
|
17926
|
+
* 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
|
|
17927
|
+
* (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
|
|
17928
|
+
* existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
|
|
17929
|
+
* (`{ sessionId }`) drops the session. The dialog that edits a broker
|
|
17930
|
+
* offers it as the default path; the fields the session fills are
|
|
17931
|
+
* marked `filledBySignIn` in the kind's settings schema.
|
|
17932
|
+
*/
|
|
17933
|
+
signIn: object({ basePath: string().min(1) }).optional()
|
|
17712
17934
|
}))
|
|
17713
17935
|
});
|
|
17714
17936
|
var ListInputSchema = object({
|
|
@@ -18707,7 +18929,8 @@ var CompositionProblemSchema = object({
|
|
|
18707
18929
|
"native-capability-replace",
|
|
18708
18930
|
"mixed-quantity",
|
|
18709
18931
|
"helper-mismatch",
|
|
18710
|
-
"member-constraint"
|
|
18932
|
+
"member-constraint",
|
|
18933
|
+
"retention"
|
|
18711
18934
|
]),
|
|
18712
18935
|
path: string(),
|
|
18713
18936
|
message: string()
|
|
@@ -18941,13 +19164,17 @@ Object.freeze({
|
|
|
18941
19164
|
latchedAt: {
|
|
18942
19165
|
kind: "fixed",
|
|
18943
19166
|
result: ["number", "null"]
|
|
19167
|
+
},
|
|
19168
|
+
schmitt: {
|
|
19169
|
+
kind: "fixed",
|
|
19170
|
+
result: ["boolean", "null"]
|
|
18944
19171
|
}
|
|
18945
19172
|
});
|
|
18946
19173
|
/**
|
|
18947
19174
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18948
19175
|
* Data, not a form default written into the block.
|
|
18949
19176
|
*/
|
|
18950
|
-
var NOW = {
|
|
19177
|
+
var NOW$2 = {
|
|
18951
19178
|
fieldPath: "lastFetchedAt",
|
|
18952
19179
|
expr: "now"
|
|
18953
19180
|
};
|
|
@@ -18961,6 +19188,8 @@ function numeric(input) {
|
|
|
18961
19188
|
family: "numeric",
|
|
18962
19189
|
deviceType: DeviceType.Sensor,
|
|
18963
19190
|
memberDeviceType: DeviceType.Sensor,
|
|
19191
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
19192
|
+
activeWhen: void 0,
|
|
18964
19193
|
commandCaps: [],
|
|
18965
19194
|
baseUnit: baseUnitOf(input.quantity),
|
|
18966
19195
|
aggregates: NUMERIC_AGGREGATES,
|
|
@@ -18976,6 +19205,8 @@ function binary(input) {
|
|
|
18976
19205
|
family: "binary",
|
|
18977
19206
|
deviceType: DeviceType.Sensor,
|
|
18978
19207
|
memberDeviceType: DeviceType.Sensor,
|
|
19208
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
19209
|
+
activeWhen: void 0,
|
|
18979
19210
|
commandCaps: [],
|
|
18980
19211
|
quantity: "none",
|
|
18981
19212
|
baseUnit: void 0,
|
|
@@ -18993,7 +19224,7 @@ var GROUP_TEMPLATES = [
|
|
|
18993
19224
|
quantity: "temperature",
|
|
18994
19225
|
defaultAggregate: "mean",
|
|
18995
19226
|
empty: "null",
|
|
18996
|
-
companions: [NOW]
|
|
19227
|
+
companions: [NOW$2]
|
|
18997
19228
|
}),
|
|
18998
19229
|
numeric({
|
|
18999
19230
|
id: "humidity",
|
|
@@ -19004,7 +19235,7 @@ var GROUP_TEMPLATES = [
|
|
|
19004
19235
|
quantity: "humidity",
|
|
19005
19236
|
defaultAggregate: "mean",
|
|
19006
19237
|
empty: "null",
|
|
19007
|
-
companions: [NOW]
|
|
19238
|
+
companions: [NOW$2]
|
|
19008
19239
|
}),
|
|
19009
19240
|
numeric({
|
|
19010
19241
|
id: "pressure",
|
|
@@ -19015,7 +19246,7 @@ var GROUP_TEMPLATES = [
|
|
|
19015
19246
|
quantity: "pressure",
|
|
19016
19247
|
defaultAggregate: "mean",
|
|
19017
19248
|
empty: "null",
|
|
19018
|
-
companions: [NOW]
|
|
19249
|
+
companions: [NOW$2]
|
|
19019
19250
|
}),
|
|
19020
19251
|
numeric({
|
|
19021
19252
|
id: "illuminance",
|
|
@@ -19026,7 +19257,7 @@ var GROUP_TEMPLATES = [
|
|
|
19026
19257
|
quantity: "illuminance",
|
|
19027
19258
|
defaultAggregate: "mean",
|
|
19028
19259
|
empty: "null",
|
|
19029
|
-
companions: [NOW]
|
|
19260
|
+
companions: [NOW$2]
|
|
19030
19261
|
}),
|
|
19031
19262
|
numeric({
|
|
19032
19263
|
id: "power",
|
|
@@ -19037,7 +19268,7 @@ var GROUP_TEMPLATES = [
|
|
|
19037
19268
|
quantity: "power",
|
|
19038
19269
|
defaultAggregate: "sum",
|
|
19039
19270
|
empty: "omit",
|
|
19040
|
-
companions: [NOW]
|
|
19271
|
+
companions: [NOW$2]
|
|
19041
19272
|
}),
|
|
19042
19273
|
numeric({
|
|
19043
19274
|
id: "energy",
|
|
@@ -19048,7 +19279,7 @@ var GROUP_TEMPLATES = [
|
|
|
19048
19279
|
quantity: "energy",
|
|
19049
19280
|
defaultAggregate: "sum",
|
|
19050
19281
|
empty: "omit",
|
|
19051
|
-
companions: [NOW]
|
|
19282
|
+
companions: [NOW$2]
|
|
19052
19283
|
}),
|
|
19053
19284
|
numeric({
|
|
19054
19285
|
id: "battery",
|
|
@@ -19083,7 +19314,7 @@ var GROUP_TEMPLATES = [
|
|
|
19083
19314
|
quantity: "device",
|
|
19084
19315
|
defaultAggregate: "mean",
|
|
19085
19316
|
empty: "null",
|
|
19086
|
-
companions: [NOW]
|
|
19317
|
+
companions: [NOW$2]
|
|
19087
19318
|
}),
|
|
19088
19319
|
binary({
|
|
19089
19320
|
id: "motion",
|
|
@@ -19177,6 +19408,11 @@ var GROUP_TEMPLATES = [
|
|
|
19177
19408
|
summary: "On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.",
|
|
19178
19409
|
deviceType: DeviceType.Switch,
|
|
19179
19410
|
outputCap: "switch",
|
|
19411
|
+
outputField: "on",
|
|
19412
|
+
member: {
|
|
19413
|
+
cap: "switch",
|
|
19414
|
+
fieldPath: "on"
|
|
19415
|
+
},
|
|
19180
19416
|
commandCaps: ["switch"]
|
|
19181
19417
|
}),
|
|
19182
19418
|
actuator({
|
|
@@ -19184,34 +19420,136 @@ var GROUP_TEMPLATES = [
|
|
|
19184
19420
|
summary: "On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.",
|
|
19185
19421
|
deviceType: DeviceType.Light,
|
|
19186
19422
|
outputCap: "switch",
|
|
19423
|
+
outputField: "on",
|
|
19424
|
+
member: {
|
|
19425
|
+
cap: "switch",
|
|
19426
|
+
fieldPath: "on"
|
|
19427
|
+
},
|
|
19187
19428
|
commandCaps: [
|
|
19188
19429
|
"switch",
|
|
19189
19430
|
"brightness",
|
|
19190
19431
|
"color"
|
|
19191
19432
|
]
|
|
19433
|
+
}),
|
|
19434
|
+
actuator({
|
|
19435
|
+
id: "fan",
|
|
19436
|
+
summary: "On when at least one fan is on, or when all of them are. Speed, preset, direction and oscillation are offered only when every fan has them. A command is not sent to a fan that lacks it.",
|
|
19437
|
+
deviceType: DeviceType.Fan,
|
|
19438
|
+
outputCap: "switch",
|
|
19439
|
+
outputField: "on",
|
|
19440
|
+
member: {
|
|
19441
|
+
cap: "switch",
|
|
19442
|
+
fieldPath: "on"
|
|
19443
|
+
},
|
|
19444
|
+
commandCaps: ["switch", "fan-control"]
|
|
19445
|
+
}),
|
|
19446
|
+
actuator({
|
|
19447
|
+
id: "cover",
|
|
19448
|
+
summary: "Open when at least one cover is open or part-open, or only when all of them are. Position and tilt are offered only when every cover has them. A cover that reports nothing is left out, never read as closed.",
|
|
19449
|
+
deviceType: DeviceType.Cover,
|
|
19450
|
+
outputCap: "group-active",
|
|
19451
|
+
outputField: "active",
|
|
19452
|
+
member: {
|
|
19453
|
+
cap: "cover",
|
|
19454
|
+
fieldPath: "state"
|
|
19455
|
+
},
|
|
19456
|
+
activeWhen: [
|
|
19457
|
+
"open",
|
|
19458
|
+
"opening",
|
|
19459
|
+
"stopped"
|
|
19460
|
+
],
|
|
19461
|
+
commandCaps: ["cover"]
|
|
19462
|
+
}),
|
|
19463
|
+
actuator({
|
|
19464
|
+
id: "valve",
|
|
19465
|
+
summary: "Open when at least one valve is open or part-open, or only when all of them are. Position is offered only when every valve has it. A valve that reports nothing is left out, never read as closed.",
|
|
19466
|
+
deviceType: DeviceType.Valve,
|
|
19467
|
+
outputCap: "group-active",
|
|
19468
|
+
outputField: "active",
|
|
19469
|
+
member: {
|
|
19470
|
+
cap: "valve",
|
|
19471
|
+
fieldPath: "state"
|
|
19472
|
+
},
|
|
19473
|
+
activeWhen: [
|
|
19474
|
+
"open",
|
|
19475
|
+
"opening",
|
|
19476
|
+
"stopped"
|
|
19477
|
+
],
|
|
19478
|
+
commandCaps: ["valve"]
|
|
19479
|
+
}),
|
|
19480
|
+
actuator({
|
|
19481
|
+
id: "lock",
|
|
19482
|
+
summary: "Locked when at least one lock is locked, or only when all of them are. A jammed or moving lock is not locked. Locking is one tap; unlocking the group needs a confirmation every time, and nothing is sent without it.",
|
|
19483
|
+
deviceType: DeviceType.Lock,
|
|
19484
|
+
outputCap: "group-active",
|
|
19485
|
+
outputField: "active",
|
|
19486
|
+
member: {
|
|
19487
|
+
cap: "lock-control",
|
|
19488
|
+
fieldPath: "state"
|
|
19489
|
+
},
|
|
19490
|
+
activeWhen: ["locked"],
|
|
19491
|
+
commandCaps: ["lock-control"]
|
|
19492
|
+
}),
|
|
19493
|
+
actuator({
|
|
19494
|
+
id: "media-player",
|
|
19495
|
+
summary: "Playing when at least one player is playing, or only when all of them are. Volume is offered only when every player has it. A player that reports nothing is left out, never read as stopped.",
|
|
19496
|
+
deviceType: DeviceType.MediaPlayer,
|
|
19497
|
+
outputCap: "group-active",
|
|
19498
|
+
outputField: "active",
|
|
19499
|
+
member: {
|
|
19500
|
+
cap: "media-player",
|
|
19501
|
+
fieldPath: "state"
|
|
19502
|
+
},
|
|
19503
|
+
activeWhen: ["playing", "buffering"],
|
|
19504
|
+
commandCaps: ["media-player"]
|
|
19505
|
+
}),
|
|
19506
|
+
actuator({
|
|
19507
|
+
id: "climate",
|
|
19508
|
+
summary: "Running when at least one thermostat or air conditioner is not off, or only when all of them are. Target temperature and fan are offered only when every device has them. A device that reports nothing is left out, never read as off.",
|
|
19509
|
+
deviceType: DeviceType.Thermostat,
|
|
19510
|
+
memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
|
|
19511
|
+
outputCap: "group-active",
|
|
19512
|
+
outputField: "active",
|
|
19513
|
+
member: {
|
|
19514
|
+
cap: "climate-control",
|
|
19515
|
+
fieldPath: "mode"
|
|
19516
|
+
},
|
|
19517
|
+
activeWhen: [
|
|
19518
|
+
"heat",
|
|
19519
|
+
"cool",
|
|
19520
|
+
"auto",
|
|
19521
|
+
"heat_cool",
|
|
19522
|
+
"fan_only",
|
|
19523
|
+
"dry"
|
|
19524
|
+
],
|
|
19525
|
+
commandCaps: ["climate-control"]
|
|
19192
19526
|
})
|
|
19193
19527
|
];
|
|
19194
19528
|
function actuator(input) {
|
|
19195
19529
|
return {
|
|
19196
|
-
|
|
19530
|
+
id: input.id,
|
|
19531
|
+
summary: input.summary,
|
|
19532
|
+
deviceType: input.deviceType,
|
|
19533
|
+
outputCap: input.outputCap,
|
|
19534
|
+
outputField: input.outputField,
|
|
19535
|
+
commandCaps: input.commandCaps,
|
|
19197
19536
|
family: "actuator",
|
|
19198
19537
|
role: void 0,
|
|
19199
19538
|
memberDeviceType: input.deviceType,
|
|
19200
|
-
|
|
19539
|
+
memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
|
|
19540
|
+
activeWhen: input.activeWhen,
|
|
19201
19541
|
quantity: "none",
|
|
19202
19542
|
baseUnit: void 0,
|
|
19203
19543
|
aggregates: BINARY_AGGREGATES,
|
|
19204
19544
|
defaultAggregate: "any",
|
|
19205
19545
|
empty: "offline",
|
|
19206
|
-
accept: [
|
|
19207
|
-
cap: "switch",
|
|
19208
|
-
fieldPath: "on"
|
|
19209
|
-
}],
|
|
19546
|
+
accept: [input.member],
|
|
19210
19547
|
companions: [CHANGED]
|
|
19211
19548
|
};
|
|
19212
19549
|
}
|
|
19213
19550
|
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
19214
19551
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
19552
|
+
DeviceType.Camera;
|
|
19215
19553
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
19216
19554
|
/**
|
|
19217
19555
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -44307,7 +44645,7 @@ var NetworkAccessStatusSchema = object({
|
|
|
44307
44645
|
});
|
|
44308
44646
|
/**
|
|
44309
44647
|
* Optional, richer endpoint shape returned by providers that expose
|
|
44310
|
-
* MORE than one ingress concurrently (Tailscale
|
|
44648
|
+
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
44311
44649
|
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
44312
44650
|
* the originating provider config (mode + sourcePort) so the
|
|
44313
44651
|
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
@@ -46950,7 +47288,20 @@ var NcRuleInputSchema = object({
|
|
|
46950
47288
|
* save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
|
|
46951
47289
|
* path does not run Zod defaults.
|
|
46952
47290
|
*/
|
|
46953
|
-
groupingSec: number().int().min(5).max(60).optional()
|
|
47291
|
+
groupingSec: number().int().min(5).max(60).optional(),
|
|
47292
|
+
/**
|
|
47293
|
+
* ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
|
|
47294
|
+
* carries "Correct" / "Wrong" buttons (and, where the channel has room, a
|
|
47295
|
+
* "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
|
|
47296
|
+
* same mark the Library writes, and records whose notification it was and
|
|
47297
|
+
* when. A channel with no buttons gets the same two choices as links.
|
|
47298
|
+
*
|
|
47299
|
+
* `.optional()`, never `.default()` (a Zod default does not run on the addon
|
|
47300
|
+
* cap path): absent and `false` both mean off, which is what every rule
|
|
47301
|
+
* authored before this field meant. An editor turns it off by writing
|
|
47302
|
+
* `false`, so it needs no `clear` key.
|
|
47303
|
+
*/
|
|
47304
|
+
askVerdict: boolean().optional()
|
|
46954
47305
|
});
|
|
46955
47306
|
/**
|
|
46956
47307
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -57604,7 +57955,7 @@ var BatteryStatusSchema = object({
|
|
|
57604
57955
|
*/
|
|
57605
57956
|
binary: boolean().optional().meta({ label: "Binary indicator" })
|
|
57606
57957
|
});
|
|
57607
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
|
|
57958
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
|
|
57608
57959
|
method(object({
|
|
57609
57960
|
deviceId: number(),
|
|
57610
57961
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
@@ -59372,7 +59723,13 @@ results: array(object({
|
|
|
59372
59723
|
/** Ms epoch of the attempt. */
|
|
59373
59724
|
at: number()
|
|
59374
59725
|
})) });
|
|
59375
|
-
DeviceType.Switch, DeviceType.Light;
|
|
59726
|
+
DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
59727
|
+
object({
|
|
59728
|
+
active: boolean().meta({ label: "Active" }),
|
|
59729
|
+
/** Ms epoch when the slice was last updated. */
|
|
59730
|
+
lastChangedAt: number()
|
|
59731
|
+
});
|
|
59732
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
|
|
59376
59733
|
object({
|
|
59377
59734
|
/** Members whose current value entered the aggregate. */
|
|
59378
59735
|
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
@@ -59390,7 +59747,7 @@ object({
|
|
|
59390
59747
|
label: "Members"
|
|
59391
59748
|
}))
|
|
59392
59749
|
});
|
|
59393
|
-
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
59750
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
59394
59751
|
object({
|
|
59395
59752
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
59396
59753
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -60305,7 +60662,14 @@ DeviceType.Lock, method(object({
|
|
|
60305
60662
|
auth: "protected"
|
|
60306
60663
|
}), method(object({
|
|
60307
60664
|
deviceId: number().int().nonnegative(),
|
|
60308
|
-
code: string().min(1).optional()
|
|
60665
|
+
code: string().min(1).optional(),
|
|
60666
|
+
/**
|
|
60667
|
+
* Honoured by a helper lock GROUP only (D944): unlocking several doors
|
|
60668
|
+
* with one call is refused unless the caller says it was confirmed. A
|
|
60669
|
+
* single lock ignores it. The refusal lives in the callee, so no
|
|
60670
|
+
* automation or API caller reaches the doors by skipping a dialog.
|
|
60671
|
+
*/
|
|
60672
|
+
confirm: boolean().optional()
|
|
60309
60673
|
}), _void(), {
|
|
60310
60674
|
kind: "mutation",
|
|
60311
60675
|
auth: "protected"
|
|
@@ -60313,6 +60677,11 @@ DeviceType.Lock, method(object({
|
|
|
60313
60677
|
kind: "mutation",
|
|
60314
60678
|
auth: "protected"
|
|
60315
60679
|
});
|
|
60680
|
+
object({
|
|
60681
|
+
value: number().nullable().meta(readingMeta("device", { label: "Total" })),
|
|
60682
|
+
lastFetchedAt: number()
|
|
60683
|
+
});
|
|
60684
|
+
DeviceType.Sensor;
|
|
60316
60685
|
/**
|
|
60317
60686
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
60318
60687
|
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
@@ -62220,9 +62589,9 @@ object({
|
|
|
62220
62589
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
62221
62590
|
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62222
62591
|
/** Voltage in volts. */
|
|
62223
|
-
volts: number().optional().meta(readingMeta("voltage")),
|
|
62592
|
+
volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
62224
62593
|
/** Current in amperes. */
|
|
62225
|
-
amps: number().optional().meta(readingMeta("current")),
|
|
62594
|
+
amps: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
62226
62595
|
/** Apparent power in volt-amperes. */
|
|
62227
62596
|
va: number().optional().meta(readingMeta("apparent-power")),
|
|
62228
62597
|
/** Power factor (0..1) if reported. */
|
|
@@ -62230,7 +62599,23 @@ object({
|
|
|
62230
62599
|
/** Ms epoch when the slice was last updated. */
|
|
62231
62600
|
lastFetchedAt: number()
|
|
62232
62601
|
});
|
|
62233
|
-
|
|
62602
|
+
[
|
|
62603
|
+
DeviceType.Sensor,
|
|
62604
|
+
DeviceType.Switch,
|
|
62605
|
+
DeviceType.Light,
|
|
62606
|
+
DeviceType.Fan,
|
|
62607
|
+
DeviceType.Climate,
|
|
62608
|
+
DeviceType.Thermostat,
|
|
62609
|
+
DeviceType.Humidifier,
|
|
62610
|
+
DeviceType.WaterHeater,
|
|
62611
|
+
DeviceType.MediaPlayer,
|
|
62612
|
+
DeviceType.Washer,
|
|
62613
|
+
DeviceType.Dryer,
|
|
62614
|
+
DeviceType.Dishwasher,
|
|
62615
|
+
DeviceType.Vacuum,
|
|
62616
|
+
DeviceType.LawnMower,
|
|
62617
|
+
DeviceType.PetFeeder
|
|
62618
|
+
].filter((type) => type !== DeviceType.Sensor);
|
|
62234
62619
|
/**
|
|
62235
62620
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
62236
62621
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -62677,7 +63062,7 @@ object({
|
|
|
62677
63062
|
phase: string().nullable()
|
|
62678
63063
|
});
|
|
62679
63064
|
Object.values(DeviceType);
|
|
62680
|
-
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
63065
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
62681
63066
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
62682
63067
|
kind: "mutation",
|
|
62683
63068
|
auth: "admin"
|
|
@@ -64725,7 +65110,7 @@ object({
|
|
|
64725
65110
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
64726
65111
|
lastChangedAt: number()
|
|
64727
65112
|
});
|
|
64728
|
-
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
|
|
65113
|
+
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
|
|
64729
65114
|
deviceId: number(),
|
|
64730
65115
|
on: boolean()
|
|
64731
65116
|
}), _void(), {
|
|
@@ -66429,8 +66814,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
66429
66814
|
kind: "mutation",
|
|
66430
66815
|
auth: "admin"
|
|
66431
66816
|
});
|
|
66817
|
+
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
66432
66818
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
66433
|
-
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;
|
|
66819
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
66434
66820
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
66435
66821
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
66436
66822
|
new Set(CAP_NAMES);
|
|
@@ -66483,7 +66869,7 @@ var AccessoryKind = {
|
|
|
66483
66869
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
66484
66870
|
};
|
|
66485
66871
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
66486
|
-
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;
|
|
66872
|
+
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;
|
|
66487
66873
|
new Set(Object.values(DeviceType));
|
|
66488
66874
|
Object.freeze({
|
|
66489
66875
|
"accessories.getStatus": {
|
|
@@ -69706,6 +70092,13 @@ Object.freeze({
|
|
|
69706
70092
|
access: "view",
|
|
69707
70093
|
role: "viewer"
|
|
69708
70094
|
},
|
|
70095
|
+
"groupActive.getStatus": {
|
|
70096
|
+
capName: "group-active",
|
|
70097
|
+
capScope: "device",
|
|
70098
|
+
addonId: null,
|
|
70099
|
+
access: "view",
|
|
70100
|
+
role: "viewer"
|
|
70101
|
+
},
|
|
69709
70102
|
"groupCommands.getStatus": {
|
|
69710
70103
|
capName: "group-commands",
|
|
69711
70104
|
capScope: "device",
|
|
@@ -70672,6 +71065,13 @@ Object.freeze({
|
|
|
70672
71065
|
access: "create",
|
|
70673
71066
|
role: "admin"
|
|
70674
71067
|
},
|
|
71068
|
+
"meter.getStatus": {
|
|
71069
|
+
capName: "meter",
|
|
71070
|
+
capScope: "device",
|
|
71071
|
+
addonId: null,
|
|
71072
|
+
access: "view",
|
|
71073
|
+
role: "viewer"
|
|
71074
|
+
},
|
|
70675
71075
|
"metricsProvider.collectSnapshot": {
|
|
70676
71076
|
capName: "metrics-provider",
|
|
70677
71077
|
capScope: "system",
|
|
@@ -78770,7 +79170,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
78770
79170
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
78771
79171
|
icon: "square"
|
|
78772
79172
|
}
|
|
78773
|
-
}
|
|
79173
|
+
},
|
|
79174
|
+
overrides: { byType: {
|
|
79175
|
+
[DeviceType.Washer]: {
|
|
79176
|
+
state: { running: {
|
|
79177
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
79178
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
79179
|
+
} },
|
|
79180
|
+
events: {
|
|
79181
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
79182
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
79183
|
+
}
|
|
79184
|
+
},
|
|
79185
|
+
[DeviceType.Dryer]: {
|
|
79186
|
+
state: { running: {
|
|
79187
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
79188
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
79189
|
+
} },
|
|
79190
|
+
events: {
|
|
79191
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
79192
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
79193
|
+
}
|
|
79194
|
+
},
|
|
79195
|
+
[DeviceType.Dishwasher]: {
|
|
79196
|
+
state: { running: {
|
|
79197
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
79198
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
79199
|
+
} },
|
|
79200
|
+
events: {
|
|
79201
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
79202
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
79203
|
+
}
|
|
79204
|
+
}
|
|
79205
|
+
} }
|
|
78774
79206
|
},
|
|
78775
79207
|
update: {
|
|
78776
79208
|
scope: "device",
|
|
@@ -79542,6 +79974,10 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79542
79974
|
icon: "flame"
|
|
79543
79975
|
}]
|
|
79544
79976
|
},
|
|
79977
|
+
"group-active": {
|
|
79978
|
+
scope: "device",
|
|
79979
|
+
noun: t("Group state", "Stato del gruppo")
|
|
79980
|
+
},
|
|
79545
79981
|
"group-commands": {
|
|
79546
79982
|
scope: "device",
|
|
79547
79983
|
noun: t("Group command", "Comando di gruppo")
|
|
@@ -79598,6 +80034,17 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79598
80034
|
}],
|
|
79599
80035
|
events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
|
|
79600
80036
|
},
|
|
80037
|
+
meter: {
|
|
80038
|
+
scope: "device",
|
|
80039
|
+
noun: t("Meter", "Contatore"),
|
|
80040
|
+
state: [{
|
|
80041
|
+
kind: "numeric",
|
|
80042
|
+
field: "value",
|
|
80043
|
+
quantity: t("the total", "il totale"),
|
|
80044
|
+
label: t("Total", "Totale"),
|
|
80045
|
+
icon: "gauge"
|
|
80046
|
+
}]
|
|
80047
|
+
},
|
|
79601
80048
|
"numeric-sensor": {
|
|
79602
80049
|
scope: "device",
|
|
79603
80050
|
noun: t("Sensor", "Sensore"),
|
|
@@ -80070,8 +80517,72 @@ function projectAction(cap, action) {
|
|
|
80070
80517
|
};
|
|
80071
80518
|
}
|
|
80072
80519
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
80073
|
-
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;
|
|
80520
|
+
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;
|
|
80074
80521
|
DeviceFeature.BatteryOperated;
|
|
80522
|
+
/**
|
|
80523
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
80524
|
+
*
|
|
80525
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
80526
|
+
* travels is its power reading. The others have a laundry type that this
|
|
80527
|
+
* export cannot honour yet, so they are named and withheld.
|
|
80528
|
+
*/
|
|
80529
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
80530
|
+
DeviceType.Washer,
|
|
80531
|
+
DeviceType.Dryer,
|
|
80532
|
+
DeviceType.Dishwasher
|
|
80533
|
+
];
|
|
80534
|
+
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.";
|
|
80535
|
+
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.";
|
|
80536
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
80537
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
80538
|
+
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.";
|
|
80539
|
+
function withheld(reason) {
|
|
80540
|
+
return {
|
|
80541
|
+
[DeviceType.Washer]: {
|
|
80542
|
+
exported: false,
|
|
80543
|
+
reason
|
|
80544
|
+
},
|
|
80545
|
+
[DeviceType.Dryer]: {
|
|
80546
|
+
exported: false,
|
|
80547
|
+
reason
|
|
80548
|
+
},
|
|
80549
|
+
[DeviceType.Dishwasher]: {
|
|
80550
|
+
exported: false,
|
|
80551
|
+
reason
|
|
80552
|
+
}
|
|
80553
|
+
};
|
|
80554
|
+
}
|
|
80555
|
+
function offered(received) {
|
|
80556
|
+
return {
|
|
80557
|
+
[DeviceType.Washer]: {
|
|
80558
|
+
exported: true,
|
|
80559
|
+
as: received
|
|
80560
|
+
},
|
|
80561
|
+
[DeviceType.Dryer]: {
|
|
80562
|
+
exported: true,
|
|
80563
|
+
as: received
|
|
80564
|
+
},
|
|
80565
|
+
[DeviceType.Dishwasher]: {
|
|
80566
|
+
exported: true,
|
|
80567
|
+
as: received
|
|
80568
|
+
}
|
|
80569
|
+
};
|
|
80570
|
+
}
|
|
80571
|
+
var APPLIANCE_EXPORT = {
|
|
80572
|
+
ha: offered(HA_AS),
|
|
80573
|
+
homekit: withheld(HOMEKIT_REASON),
|
|
80574
|
+
alexa: withheld(ALEXA_REASON),
|
|
80575
|
+
google: withheld(GOOGLE_REASON),
|
|
80576
|
+
matter: withheld(MATTER_REASON)
|
|
80577
|
+
};
|
|
80578
|
+
function isPlugApplianceType(deviceType) {
|
|
80579
|
+
return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
|
|
80580
|
+
}
|
|
80581
|
+
/** The decision for this ecosystem, or null when the type is not an appliance. */
|
|
80582
|
+
function applianceExport(ecosystem, deviceType) {
|
|
80583
|
+
if (!isPlugApplianceType(deviceType)) return null;
|
|
80584
|
+
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
80585
|
+
}
|
|
80075
80586
|
Object.freeze({
|
|
80076
80587
|
"accessories.getStatus": [{
|
|
80077
80588
|
name: "deviceId",
|
|
@@ -81038,6 +81549,11 @@ Object.freeze({
|
|
|
81038
81549
|
form: "single",
|
|
81039
81550
|
optional: false
|
|
81040
81551
|
}],
|
|
81552
|
+
"groupActive.getStatus": [{
|
|
81553
|
+
name: "deviceId",
|
|
81554
|
+
form: "single",
|
|
81555
|
+
optional: false
|
|
81556
|
+
}],
|
|
81041
81557
|
"groupCommands.getStatus": [{
|
|
81042
81558
|
name: "deviceId",
|
|
81043
81559
|
form: "single",
|
|
@@ -81248,6 +81764,11 @@ Object.freeze({
|
|
|
81248
81764
|
form: "single",
|
|
81249
81765
|
optional: false
|
|
81250
81766
|
}],
|
|
81767
|
+
"meter.getStatus": [{
|
|
81768
|
+
name: "deviceId",
|
|
81769
|
+
form: "single",
|
|
81770
|
+
optional: false
|
|
81771
|
+
}],
|
|
81251
81772
|
"motion.getStatus": [{
|
|
81252
81773
|
name: "deviceId",
|
|
81253
81774
|
form: "single",
|
|
@@ -82855,7 +83376,6 @@ Object.freeze({
|
|
|
82855
83376
|
"network-access": "ingress",
|
|
82856
83377
|
"smtp-provider": "email"
|
|
82857
83378
|
});
|
|
82858
|
-
DeviceType.Camera;
|
|
82859
83379
|
/**
|
|
82860
83380
|
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
82861
83381
|
* `z.infer`, they do not restate the shape.
|
|
@@ -149357,6 +149877,8 @@ var HAP_EXPORTABLE_DEVICE_TYPES = [
|
|
|
149357
149877
|
function pickMapperKind(deviceType) {
|
|
149358
149878
|
if (deviceType === null || deviceType === void 0 || deviceType.length === 0) return "camera";
|
|
149359
149879
|
if (deviceType === DeviceType.Camera) return "camera";
|
|
149880
|
+
const withheld = applianceExport("homekit", deviceType);
|
|
149881
|
+
if (withheld !== null && !withheld.exported) return null;
|
|
149360
149882
|
return HAP_EXPORTABLE_DEVICE_TYPES.find((type) => type === deviceType) === void 0 ? null : "generic";
|
|
149361
149883
|
}
|
|
149362
149884
|
/**
|