@camstack/addon-export-alexa 1.2.170 → 1.2.172
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 +16 -9
- package/dist/export-alexa.addon.js +577 -46
- package/dist/export-alexa.addon.mjs +577 -46
- package/package.json +3 -3
|
@@ -5448,7 +5448,7 @@ var ZodIssueCode = {
|
|
|
5448
5448
|
var ZodFirstPartyTypeKind;
|
|
5449
5449
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5450
5450
|
//#endregion
|
|
5451
|
-
//#region ../types/dist/sleep
|
|
5451
|
+
//#region ../types/dist/sleep--jXS9hWo.mjs
|
|
5452
5452
|
/**
|
|
5453
5453
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5454
5454
|
* window to float samples (D455).
|
|
@@ -8592,6 +8592,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8592
8592
|
"filesystem-browse",
|
|
8593
8593
|
"flood",
|
|
8594
8594
|
"gas",
|
|
8595
|
+
"group-active",
|
|
8595
8596
|
"group-commands",
|
|
8596
8597
|
"group-status",
|
|
8597
8598
|
"heating-valve",
|
|
@@ -8614,6 +8615,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8614
8615
|
"login-method",
|
|
8615
8616
|
"media-player",
|
|
8616
8617
|
"mesh-network",
|
|
8618
|
+
"meter",
|
|
8617
8619
|
"metrics-provider",
|
|
8618
8620
|
"model-convert",
|
|
8619
8621
|
"model-distributor",
|
|
@@ -9412,6 +9414,10 @@ Object.freeze({
|
|
|
9412
9414
|
"path": "detected",
|
|
9413
9415
|
"valueType": "boolean"
|
|
9414
9416
|
}],
|
|
9417
|
+
"group-active": [{
|
|
9418
|
+
"path": "active",
|
|
9419
|
+
"valueType": "boolean"
|
|
9420
|
+
}],
|
|
9415
9421
|
"group-status": [
|
|
9416
9422
|
{
|
|
9417
9423
|
"path": "included",
|
|
@@ -9671,6 +9677,10 @@ Object.freeze({
|
|
|
9671
9677
|
]
|
|
9672
9678
|
}
|
|
9673
9679
|
],
|
|
9680
|
+
"meter": [{
|
|
9681
|
+
"path": "value",
|
|
9682
|
+
"valueType": "number"
|
|
9683
|
+
}],
|
|
9674
9684
|
"motion": [
|
|
9675
9685
|
{
|
|
9676
9686
|
"path": "detected",
|
|
@@ -10414,7 +10424,7 @@ object({
|
|
|
10414
10424
|
params: record(string(), union([string(), number()])).optional()
|
|
10415
10425
|
});
|
|
10416
10426
|
//#endregion
|
|
10417
|
-
//#region ../types/dist/err-msg-
|
|
10427
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10418
10428
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10419
10429
|
DeviceType["Camera"] = "camera";
|
|
10420
10430
|
DeviceType["Hub"] = "hub";
|
|
@@ -10508,8 +10518,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10508
10518
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10509
10519
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10510
10520
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10511
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10521
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10522
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10512
10523
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10524
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10525
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10526
|
+
DeviceType["Washer"] = "washer";
|
|
10527
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10528
|
+
DeviceType["Dryer"] = "dryer";
|
|
10513
10529
|
return DeviceType;
|
|
10514
10530
|
}({});
|
|
10515
10531
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -10767,7 +10783,7 @@ function errMsg(err) {
|
|
|
10767
10783
|
return String(err);
|
|
10768
10784
|
}
|
|
10769
10785
|
//#endregion
|
|
10770
|
-
//#region ../types/dist/composition-
|
|
10786
|
+
//#region ../types/dist/composition-Bb8iwHEJ.mjs
|
|
10771
10787
|
/**
|
|
10772
10788
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10773
10789
|
*
|
|
@@ -11082,6 +11098,13 @@ var table = {
|
|
|
11082
11098
|
apply: () => {
|
|
11083
11099
|
throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
|
|
11084
11100
|
}
|
|
11101
|
+
},
|
|
11102
|
+
schmitt: {
|
|
11103
|
+
minArgs: 3,
|
|
11104
|
+
maxArgs: 5,
|
|
11105
|
+
apply: () => {
|
|
11106
|
+
throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
|
|
11107
|
+
}
|
|
11085
11108
|
}
|
|
11086
11109
|
};
|
|
11087
11110
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -11523,6 +11546,99 @@ function validateExpressionSource(src) {
|
|
|
11523
11546
|
return null;
|
|
11524
11547
|
}
|
|
11525
11548
|
/**
|
|
11549
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
11550
|
+
*
|
|
11551
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
11552
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
11553
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
11554
|
+
*
|
|
11555
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
11556
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
11557
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
11558
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
11559
|
+
* can move later without moving the others.
|
|
11560
|
+
*/
|
|
11561
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
11562
|
+
var APPLIANCE_KINDS = [
|
|
11563
|
+
"washer",
|
|
11564
|
+
"dryer",
|
|
11565
|
+
"dishwasher"
|
|
11566
|
+
];
|
|
11567
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
11568
|
+
/**
|
|
11569
|
+
* Statistics and integrals over a history read (D944).
|
|
11570
|
+
*
|
|
11571
|
+
* Pure: the same points always give the same answer, so a restart recomputes
|
|
11572
|
+
* rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
|
|
11573
|
+
* never the mean of the samples. A hole with no held value is not integrated
|
|
11574
|
+
* as zero. A truncated read is not published.
|
|
11575
|
+
*/
|
|
11576
|
+
var STATISTIC_STATS = [
|
|
11577
|
+
"min",
|
|
11578
|
+
"max",
|
|
11579
|
+
"mean",
|
|
11580
|
+
"sum",
|
|
11581
|
+
"count",
|
|
11582
|
+
"change"
|
|
11583
|
+
];
|
|
11584
|
+
/**
|
|
11585
|
+
* The range a statistics or integral helper asks history for (D944).
|
|
11586
|
+
*
|
|
11587
|
+
* Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
|
|
11588
|
+
* or 25 hours across a DST change. A tier is eligible only when its retention
|
|
11589
|
+
* is strictly longer than the longest that range can be. Forever qualifies.
|
|
11590
|
+
* Equal to a tier's retention is a refusal, not a short answer.
|
|
11591
|
+
*/
|
|
11592
|
+
var MINUTE_MS = 6e4;
|
|
11593
|
+
var HOUR_MS = 60 * MINUTE_MS;
|
|
11594
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
11595
|
+
var ROLLING_SPANS = [
|
|
11596
|
+
"1h",
|
|
11597
|
+
"24h",
|
|
11598
|
+
"2d",
|
|
11599
|
+
"7d",
|
|
11600
|
+
"30d",
|
|
11601
|
+
"custom"
|
|
11602
|
+
];
|
|
11603
|
+
var CALENDAR_PERIODS = [
|
|
11604
|
+
"today",
|
|
11605
|
+
"yesterday",
|
|
11606
|
+
"this-week",
|
|
11607
|
+
"this-month"
|
|
11608
|
+
];
|
|
11609
|
+
var RESET_PERIODS = [
|
|
11610
|
+
"never",
|
|
11611
|
+
"daily",
|
|
11612
|
+
"weekly",
|
|
11613
|
+
"monthly"
|
|
11614
|
+
];
|
|
11615
|
+
5 * MINUTE_MS;
|
|
11616
|
+
24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
|
|
11617
|
+
7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
|
|
11618
|
+
var rollingWindowObject = object({
|
|
11619
|
+
kind: literal("rolling"),
|
|
11620
|
+
span: _enum(ROLLING_SPANS),
|
|
11621
|
+
customMinutes: number().int().min(5).optional()
|
|
11622
|
+
}).check((payload) => {
|
|
11623
|
+
if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
|
|
11624
|
+
code: "custom",
|
|
11625
|
+
message: "a custom range needs a duration in minutes",
|
|
11626
|
+
path: ["customMinutes"],
|
|
11627
|
+
input: payload.value
|
|
11628
|
+
});
|
|
11629
|
+
if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
|
|
11630
|
+
code: "custom",
|
|
11631
|
+
message: "only a custom range carries a duration",
|
|
11632
|
+
path: ["customMinutes"],
|
|
11633
|
+
input: payload.value
|
|
11634
|
+
});
|
|
11635
|
+
});
|
|
11636
|
+
var RollingWindowSchema = rollingWindowObject;
|
|
11637
|
+
var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
|
|
11638
|
+
kind: literal("calendar"),
|
|
11639
|
+
period: _enum(CALENDAR_PERIODS)
|
|
11640
|
+
})]);
|
|
11641
|
+
/**
|
|
11526
11642
|
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11527
11643
|
* id. Split out so helper schemas can name it without a cycle through
|
|
11528
11644
|
* `composition.ts` (D659).
|
|
@@ -11548,7 +11664,13 @@ var GROUP_TEMPLATE_IDS = [
|
|
|
11548
11664
|
"occupancy",
|
|
11549
11665
|
"binary",
|
|
11550
11666
|
"switch",
|
|
11551
|
-
"light"
|
|
11667
|
+
"light",
|
|
11668
|
+
"fan",
|
|
11669
|
+
"cover",
|
|
11670
|
+
"valve",
|
|
11671
|
+
"lock",
|
|
11672
|
+
"media-player",
|
|
11673
|
+
"climate"
|
|
11552
11674
|
];
|
|
11553
11675
|
var NUMERIC_AGGREGATES = [
|
|
11554
11676
|
"mean",
|
|
@@ -11578,14 +11700,73 @@ var HelperMemberSchema = object({
|
|
|
11578
11700
|
cap: string().min(1),
|
|
11579
11701
|
fieldPath: string().min(1)
|
|
11580
11702
|
});
|
|
11581
|
-
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11703
|
+
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
11704
|
+
object({
|
|
11705
|
+
kind: literal("group"),
|
|
11706
|
+
templateId: GroupTemplateIdSchema,
|
|
11707
|
+
aggregate: AggregateReducerSchema,
|
|
11708
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
11709
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
11710
|
+
active: ActiveCriterionSchema.optional()
|
|
11711
|
+
}),
|
|
11712
|
+
object({
|
|
11713
|
+
kind: literal("appliance"),
|
|
11714
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
11715
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
11716
|
+
thresholdWatts: number().positive(),
|
|
11717
|
+
startDwellMs: number().int().nonnegative(),
|
|
11718
|
+
stopDwellMs: number().int().nonnegative(),
|
|
11719
|
+
member: HelperMemberSchema
|
|
11720
|
+
}),
|
|
11721
|
+
object({
|
|
11722
|
+
kind: literal("statistic"),
|
|
11723
|
+
stat: _enum(STATISTIC_STATS),
|
|
11724
|
+
window: StatisticWindowSchema,
|
|
11725
|
+
source: HelperMemberSchema
|
|
11726
|
+
}),
|
|
11727
|
+
object({
|
|
11728
|
+
kind: literal("integral"),
|
|
11729
|
+
reset: _enum(RESET_PERIODS),
|
|
11730
|
+
output: _enum(["energy", "meter"]),
|
|
11731
|
+
source: HelperMemberSchema
|
|
11732
|
+
}),
|
|
11733
|
+
object({
|
|
11734
|
+
kind: literal("threshold"),
|
|
11735
|
+
source: HelperMemberSchema,
|
|
11736
|
+
high: number(),
|
|
11737
|
+
low: number(),
|
|
11738
|
+
onForMs: number().int().nonnegative(),
|
|
11739
|
+
offForMs: number().int().nonnegative()
|
|
11740
|
+
}),
|
|
11741
|
+
object({
|
|
11742
|
+
kind: literal("arithmetic"),
|
|
11743
|
+
op: _enum([
|
|
11744
|
+
"sum",
|
|
11745
|
+
"difference",
|
|
11746
|
+
"ratio"
|
|
11747
|
+
]),
|
|
11748
|
+
inputs: array(HelperMemberSchema).min(2).max(64)
|
|
11749
|
+
}),
|
|
11750
|
+
object({
|
|
11751
|
+
kind: literal("expression"),
|
|
11752
|
+
expr: string().min(1),
|
|
11753
|
+
inputs: array(object({
|
|
11754
|
+
name: string().min(1),
|
|
11755
|
+
member: HelperMemberSchema
|
|
11756
|
+
})).min(1).max(64),
|
|
11757
|
+
output: _enum(["number", "boolean"])
|
|
11758
|
+
}),
|
|
11759
|
+
object({
|
|
11760
|
+
kind: literal("derivative"),
|
|
11761
|
+
window: RollingWindowSchema,
|
|
11762
|
+
per: _enum([
|
|
11763
|
+
"second",
|
|
11764
|
+
"minute",
|
|
11765
|
+
"hour"
|
|
11766
|
+
]),
|
|
11767
|
+
source: HelperMemberSchema
|
|
11768
|
+
})
|
|
11769
|
+
]);
|
|
11589
11770
|
/** A composed device's stableId is this prefix plus the block id. */
|
|
11590
11771
|
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
11591
11772
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
@@ -11646,6 +11827,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11646
11827
|
"all"
|
|
11647
11828
|
]),
|
|
11648
11829
|
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
11830
|
+
/**
|
|
11831
|
+
* Set when the reads are an enum state, not a yes/no: the listed states
|
|
11832
|
+
* count as active (a cover is `open`). A state outside the list is inactive;
|
|
11833
|
+
* a read that is not a state at all is left out. Only `any` / `all` use it.
|
|
11834
|
+
*/
|
|
11835
|
+
activeWhen: array(string().min(1)).min(1).optional(),
|
|
11649
11836
|
/** `value` is the reading; the others are the member counts. */
|
|
11650
11837
|
publish: _enum([
|
|
11651
11838
|
"value",
|
|
@@ -11659,6 +11846,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11659
11846
|
"omit",
|
|
11660
11847
|
"offline"
|
|
11661
11848
|
])
|
|
11849
|
+
}),
|
|
11850
|
+
object({
|
|
11851
|
+
kind: literal("series"),
|
|
11852
|
+
read: CompositionFieldReadSchema,
|
|
11853
|
+
/** `value` is the statistic or the integral. The others are the gap counts. */
|
|
11854
|
+
publish: _enum([
|
|
11855
|
+
"value",
|
|
11856
|
+
"included",
|
|
11857
|
+
"excluded",
|
|
11858
|
+
"total"
|
|
11859
|
+
]),
|
|
11860
|
+
/**
|
|
11861
|
+
* What an unanswered `value` does. Counts ignore this. `offline` leaves the
|
|
11862
|
+
* device unseeded until history answers, so a restart cannot publish 0.
|
|
11863
|
+
*/
|
|
11864
|
+
empty: _enum([
|
|
11865
|
+
"null",
|
|
11866
|
+
"omit",
|
|
11867
|
+
"offline"
|
|
11868
|
+
])
|
|
11662
11869
|
})
|
|
11663
11870
|
]);
|
|
11664
11871
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
@@ -17124,7 +17331,22 @@ var BrokerProviderInfoSchema = object({
|
|
|
17124
17331
|
*/
|
|
17125
17332
|
interactiveConnectPath: string().min(1).optional(),
|
|
17126
17333
|
/** Relative hub path to disconnect the linked account (same popup pattern). */
|
|
17127
|
-
interactiveDisconnectPath: string().min(1).optional()
|
|
17334
|
+
interactiveDisconnectPath: string().min(1).optional(),
|
|
17335
|
+
/**
|
|
17336
|
+
* The kind signs in through a server-held interactive session instead of
|
|
17337
|
+
* (or before) typed credentials. `basePath` is a hub-relative route set
|
|
17338
|
+
* served by the owning addon (`/addon/<id>/...`) speaking the sign-in
|
|
17339
|
+
* contract: `POST {basePath}/start` (body: the form's settings) answers
|
|
17340
|
+
* `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
|
|
17341
|
+
* `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
|
|
17342
|
+
* 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
|
|
17343
|
+
* (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
|
|
17344
|
+
* existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
|
|
17345
|
+
* (`{ sessionId }`) drops the session. The dialog that edits a broker
|
|
17346
|
+
* offers it as the default path; the fields the session fills are
|
|
17347
|
+
* marked `filledBySignIn` in the kind's settings schema.
|
|
17348
|
+
*/
|
|
17349
|
+
signIn: object({ basePath: string().min(1) }).optional()
|
|
17128
17350
|
}))
|
|
17129
17351
|
});
|
|
17130
17352
|
var ListInputSchema = object({
|
|
@@ -18123,7 +18345,8 @@ var CompositionProblemSchema = object({
|
|
|
18123
18345
|
"native-capability-replace",
|
|
18124
18346
|
"mixed-quantity",
|
|
18125
18347
|
"helper-mismatch",
|
|
18126
|
-
"member-constraint"
|
|
18348
|
+
"member-constraint",
|
|
18349
|
+
"retention"
|
|
18127
18350
|
]),
|
|
18128
18351
|
path: string(),
|
|
18129
18352
|
message: string()
|
|
@@ -18357,13 +18580,17 @@ Object.freeze({
|
|
|
18357
18580
|
latchedAt: {
|
|
18358
18581
|
kind: "fixed",
|
|
18359
18582
|
result: ["number", "null"]
|
|
18583
|
+
},
|
|
18584
|
+
schmitt: {
|
|
18585
|
+
kind: "fixed",
|
|
18586
|
+
result: ["boolean", "null"]
|
|
18360
18587
|
}
|
|
18361
18588
|
});
|
|
18362
18589
|
/**
|
|
18363
18590
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18364
18591
|
* Data, not a form default written into the block.
|
|
18365
18592
|
*/
|
|
18366
|
-
var NOW = {
|
|
18593
|
+
var NOW$2 = {
|
|
18367
18594
|
fieldPath: "lastFetchedAt",
|
|
18368
18595
|
expr: "now"
|
|
18369
18596
|
};
|
|
@@ -18377,6 +18604,8 @@ function numeric(input) {
|
|
|
18377
18604
|
family: "numeric",
|
|
18378
18605
|
deviceType: DeviceType.Sensor,
|
|
18379
18606
|
memberDeviceType: DeviceType.Sensor,
|
|
18607
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
18608
|
+
activeWhen: void 0,
|
|
18380
18609
|
commandCaps: [],
|
|
18381
18610
|
baseUnit: baseUnitOf(input.quantity),
|
|
18382
18611
|
aggregates: NUMERIC_AGGREGATES,
|
|
@@ -18392,6 +18621,8 @@ function binary(input) {
|
|
|
18392
18621
|
family: "binary",
|
|
18393
18622
|
deviceType: DeviceType.Sensor,
|
|
18394
18623
|
memberDeviceType: DeviceType.Sensor,
|
|
18624
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
18625
|
+
activeWhen: void 0,
|
|
18395
18626
|
commandCaps: [],
|
|
18396
18627
|
quantity: "none",
|
|
18397
18628
|
baseUnit: void 0,
|
|
@@ -18409,7 +18640,7 @@ var GROUP_TEMPLATES = [
|
|
|
18409
18640
|
quantity: "temperature",
|
|
18410
18641
|
defaultAggregate: "mean",
|
|
18411
18642
|
empty: "null",
|
|
18412
|
-
companions: [NOW]
|
|
18643
|
+
companions: [NOW$2]
|
|
18413
18644
|
}),
|
|
18414
18645
|
numeric({
|
|
18415
18646
|
id: "humidity",
|
|
@@ -18420,7 +18651,7 @@ var GROUP_TEMPLATES = [
|
|
|
18420
18651
|
quantity: "humidity",
|
|
18421
18652
|
defaultAggregate: "mean",
|
|
18422
18653
|
empty: "null",
|
|
18423
|
-
companions: [NOW]
|
|
18654
|
+
companions: [NOW$2]
|
|
18424
18655
|
}),
|
|
18425
18656
|
numeric({
|
|
18426
18657
|
id: "pressure",
|
|
@@ -18431,7 +18662,7 @@ var GROUP_TEMPLATES = [
|
|
|
18431
18662
|
quantity: "pressure",
|
|
18432
18663
|
defaultAggregate: "mean",
|
|
18433
18664
|
empty: "null",
|
|
18434
|
-
companions: [NOW]
|
|
18665
|
+
companions: [NOW$2]
|
|
18435
18666
|
}),
|
|
18436
18667
|
numeric({
|
|
18437
18668
|
id: "illuminance",
|
|
@@ -18442,7 +18673,7 @@ var GROUP_TEMPLATES = [
|
|
|
18442
18673
|
quantity: "illuminance",
|
|
18443
18674
|
defaultAggregate: "mean",
|
|
18444
18675
|
empty: "null",
|
|
18445
|
-
companions: [NOW]
|
|
18676
|
+
companions: [NOW$2]
|
|
18446
18677
|
}),
|
|
18447
18678
|
numeric({
|
|
18448
18679
|
id: "power",
|
|
@@ -18453,7 +18684,7 @@ var GROUP_TEMPLATES = [
|
|
|
18453
18684
|
quantity: "power",
|
|
18454
18685
|
defaultAggregate: "sum",
|
|
18455
18686
|
empty: "omit",
|
|
18456
|
-
companions: [NOW]
|
|
18687
|
+
companions: [NOW$2]
|
|
18457
18688
|
}),
|
|
18458
18689
|
numeric({
|
|
18459
18690
|
id: "energy",
|
|
@@ -18464,7 +18695,7 @@ var GROUP_TEMPLATES = [
|
|
|
18464
18695
|
quantity: "energy",
|
|
18465
18696
|
defaultAggregate: "sum",
|
|
18466
18697
|
empty: "omit",
|
|
18467
|
-
companions: [NOW]
|
|
18698
|
+
companions: [NOW$2]
|
|
18468
18699
|
}),
|
|
18469
18700
|
numeric({
|
|
18470
18701
|
id: "battery",
|
|
@@ -18499,7 +18730,7 @@ var GROUP_TEMPLATES = [
|
|
|
18499
18730
|
quantity: "device",
|
|
18500
18731
|
defaultAggregate: "mean",
|
|
18501
18732
|
empty: "null",
|
|
18502
|
-
companions: [NOW]
|
|
18733
|
+
companions: [NOW$2]
|
|
18503
18734
|
}),
|
|
18504
18735
|
binary({
|
|
18505
18736
|
id: "motion",
|
|
@@ -18593,6 +18824,11 @@ var GROUP_TEMPLATES = [
|
|
|
18593
18824
|
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.",
|
|
18594
18825
|
deviceType: DeviceType.Switch,
|
|
18595
18826
|
outputCap: "switch",
|
|
18827
|
+
outputField: "on",
|
|
18828
|
+
member: {
|
|
18829
|
+
cap: "switch",
|
|
18830
|
+
fieldPath: "on"
|
|
18831
|
+
},
|
|
18596
18832
|
commandCaps: ["switch"]
|
|
18597
18833
|
}),
|
|
18598
18834
|
actuator({
|
|
@@ -18600,34 +18836,136 @@ var GROUP_TEMPLATES = [
|
|
|
18600
18836
|
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.",
|
|
18601
18837
|
deviceType: DeviceType.Light,
|
|
18602
18838
|
outputCap: "switch",
|
|
18839
|
+
outputField: "on",
|
|
18840
|
+
member: {
|
|
18841
|
+
cap: "switch",
|
|
18842
|
+
fieldPath: "on"
|
|
18843
|
+
},
|
|
18603
18844
|
commandCaps: [
|
|
18604
18845
|
"switch",
|
|
18605
18846
|
"brightness",
|
|
18606
18847
|
"color"
|
|
18607
18848
|
]
|
|
18849
|
+
}),
|
|
18850
|
+
actuator({
|
|
18851
|
+
id: "fan",
|
|
18852
|
+
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.",
|
|
18853
|
+
deviceType: DeviceType.Fan,
|
|
18854
|
+
outputCap: "switch",
|
|
18855
|
+
outputField: "on",
|
|
18856
|
+
member: {
|
|
18857
|
+
cap: "switch",
|
|
18858
|
+
fieldPath: "on"
|
|
18859
|
+
},
|
|
18860
|
+
commandCaps: ["switch", "fan-control"]
|
|
18861
|
+
}),
|
|
18862
|
+
actuator({
|
|
18863
|
+
id: "cover",
|
|
18864
|
+
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.",
|
|
18865
|
+
deviceType: DeviceType.Cover,
|
|
18866
|
+
outputCap: "group-active",
|
|
18867
|
+
outputField: "active",
|
|
18868
|
+
member: {
|
|
18869
|
+
cap: "cover",
|
|
18870
|
+
fieldPath: "state"
|
|
18871
|
+
},
|
|
18872
|
+
activeWhen: [
|
|
18873
|
+
"open",
|
|
18874
|
+
"opening",
|
|
18875
|
+
"stopped"
|
|
18876
|
+
],
|
|
18877
|
+
commandCaps: ["cover"]
|
|
18878
|
+
}),
|
|
18879
|
+
actuator({
|
|
18880
|
+
id: "valve",
|
|
18881
|
+
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.",
|
|
18882
|
+
deviceType: DeviceType.Valve,
|
|
18883
|
+
outputCap: "group-active",
|
|
18884
|
+
outputField: "active",
|
|
18885
|
+
member: {
|
|
18886
|
+
cap: "valve",
|
|
18887
|
+
fieldPath: "state"
|
|
18888
|
+
},
|
|
18889
|
+
activeWhen: [
|
|
18890
|
+
"open",
|
|
18891
|
+
"opening",
|
|
18892
|
+
"stopped"
|
|
18893
|
+
],
|
|
18894
|
+
commandCaps: ["valve"]
|
|
18895
|
+
}),
|
|
18896
|
+
actuator({
|
|
18897
|
+
id: "lock",
|
|
18898
|
+
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.",
|
|
18899
|
+
deviceType: DeviceType.Lock,
|
|
18900
|
+
outputCap: "group-active",
|
|
18901
|
+
outputField: "active",
|
|
18902
|
+
member: {
|
|
18903
|
+
cap: "lock-control",
|
|
18904
|
+
fieldPath: "state"
|
|
18905
|
+
},
|
|
18906
|
+
activeWhen: ["locked"],
|
|
18907
|
+
commandCaps: ["lock-control"]
|
|
18908
|
+
}),
|
|
18909
|
+
actuator({
|
|
18910
|
+
id: "media-player",
|
|
18911
|
+
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.",
|
|
18912
|
+
deviceType: DeviceType.MediaPlayer,
|
|
18913
|
+
outputCap: "group-active",
|
|
18914
|
+
outputField: "active",
|
|
18915
|
+
member: {
|
|
18916
|
+
cap: "media-player",
|
|
18917
|
+
fieldPath: "state"
|
|
18918
|
+
},
|
|
18919
|
+
activeWhen: ["playing", "buffering"],
|
|
18920
|
+
commandCaps: ["media-player"]
|
|
18921
|
+
}),
|
|
18922
|
+
actuator({
|
|
18923
|
+
id: "climate",
|
|
18924
|
+
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.",
|
|
18925
|
+
deviceType: DeviceType.Thermostat,
|
|
18926
|
+
memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
|
|
18927
|
+
outputCap: "group-active",
|
|
18928
|
+
outputField: "active",
|
|
18929
|
+
member: {
|
|
18930
|
+
cap: "climate-control",
|
|
18931
|
+
fieldPath: "mode"
|
|
18932
|
+
},
|
|
18933
|
+
activeWhen: [
|
|
18934
|
+
"heat",
|
|
18935
|
+
"cool",
|
|
18936
|
+
"auto",
|
|
18937
|
+
"heat_cool",
|
|
18938
|
+
"fan_only",
|
|
18939
|
+
"dry"
|
|
18940
|
+
],
|
|
18941
|
+
commandCaps: ["climate-control"]
|
|
18608
18942
|
})
|
|
18609
18943
|
];
|
|
18610
18944
|
function actuator(input) {
|
|
18611
18945
|
return {
|
|
18612
|
-
|
|
18946
|
+
id: input.id,
|
|
18947
|
+
summary: input.summary,
|
|
18948
|
+
deviceType: input.deviceType,
|
|
18949
|
+
outputCap: input.outputCap,
|
|
18950
|
+
outputField: input.outputField,
|
|
18951
|
+
commandCaps: input.commandCaps,
|
|
18613
18952
|
family: "actuator",
|
|
18614
18953
|
role: void 0,
|
|
18615
18954
|
memberDeviceType: input.deviceType,
|
|
18616
|
-
|
|
18955
|
+
memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
|
|
18956
|
+
activeWhen: input.activeWhen,
|
|
18617
18957
|
quantity: "none",
|
|
18618
18958
|
baseUnit: void 0,
|
|
18619
18959
|
aggregates: BINARY_AGGREGATES,
|
|
18620
18960
|
defaultAggregate: "any",
|
|
18621
18961
|
empty: "offline",
|
|
18622
|
-
accept: [
|
|
18623
|
-
cap: "switch",
|
|
18624
|
-
fieldPath: "on"
|
|
18625
|
-
}],
|
|
18962
|
+
accept: [input.member],
|
|
18626
18963
|
companions: [CHANGED]
|
|
18627
18964
|
};
|
|
18628
18965
|
}
|
|
18629
18966
|
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
18630
18967
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18968
|
+
DeviceType.Camera;
|
|
18631
18969
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18632
18970
|
/**
|
|
18633
18971
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -43667,7 +44005,7 @@ var NetworkAccessStatusSchema = object({
|
|
|
43667
44005
|
});
|
|
43668
44006
|
/**
|
|
43669
44007
|
* Optional, richer endpoint shape returned by providers that expose
|
|
43670
|
-
* MORE than one ingress concurrently (Tailscale
|
|
44008
|
+
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
43671
44009
|
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
43672
44010
|
* the originating provider config (mode + sourcePort) so the
|
|
43673
44011
|
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
@@ -46310,7 +46648,20 @@ var NcRuleInputSchema = object({
|
|
|
46310
46648
|
* save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
|
|
46311
46649
|
* path does not run Zod defaults.
|
|
46312
46650
|
*/
|
|
46313
|
-
groupingSec: number().int().min(5).max(60).optional()
|
|
46651
|
+
groupingSec: number().int().min(5).max(60).optional(),
|
|
46652
|
+
/**
|
|
46653
|
+
* ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
|
|
46654
|
+
* carries "Correct" / "Wrong" buttons (and, where the channel has room, a
|
|
46655
|
+
* "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
|
|
46656
|
+
* same mark the Library writes, and records whose notification it was and
|
|
46657
|
+
* when. A channel with no buttons gets the same two choices as links.
|
|
46658
|
+
*
|
|
46659
|
+
* `.optional()`, never `.default()` (a Zod default does not run on the addon
|
|
46660
|
+
* cap path): absent and `false` both mean off, which is what every rule
|
|
46661
|
+
* authored before this field meant. An editor turns it off by writing
|
|
46662
|
+
* `false`, so it needs no `clear` key.
|
|
46663
|
+
*/
|
|
46664
|
+
askVerdict: boolean().optional()
|
|
46314
46665
|
});
|
|
46315
46666
|
/**
|
|
46316
46667
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -56783,7 +57134,7 @@ var BatteryStatusSchema = object({
|
|
|
56783
57134
|
*/
|
|
56784
57135
|
binary: boolean().optional().meta({ label: "Binary indicator" })
|
|
56785
57136
|
});
|
|
56786
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
|
|
57137
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
|
|
56787
57138
|
method(object({
|
|
56788
57139
|
deviceId: number(),
|
|
56789
57140
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
@@ -58551,7 +58902,13 @@ results: array(object({
|
|
|
58551
58902
|
/** Ms epoch of the attempt. */
|
|
58552
58903
|
at: number()
|
|
58553
58904
|
})) });
|
|
58554
|
-
DeviceType.Switch, DeviceType.Light;
|
|
58905
|
+
DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
58906
|
+
object({
|
|
58907
|
+
active: boolean().meta({ label: "Active" }),
|
|
58908
|
+
/** Ms epoch when the slice was last updated. */
|
|
58909
|
+
lastChangedAt: number()
|
|
58910
|
+
});
|
|
58911
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
|
|
58555
58912
|
object({
|
|
58556
58913
|
/** Members whose current value entered the aggregate. */
|
|
58557
58914
|
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
@@ -58569,7 +58926,7 @@ object({
|
|
|
58569
58926
|
label: "Members"
|
|
58570
58927
|
}))
|
|
58571
58928
|
});
|
|
58572
|
-
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58929
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
58573
58930
|
object({
|
|
58574
58931
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58575
58932
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -59484,7 +59841,14 @@ DeviceType.Lock, method(object({
|
|
|
59484
59841
|
auth: "protected"
|
|
59485
59842
|
}), method(object({
|
|
59486
59843
|
deviceId: number().int().nonnegative(),
|
|
59487
|
-
code: string().min(1).optional()
|
|
59844
|
+
code: string().min(1).optional(),
|
|
59845
|
+
/**
|
|
59846
|
+
* Honoured by a helper lock GROUP only (D944): unlocking several doors
|
|
59847
|
+
* with one call is refused unless the caller says it was confirmed. A
|
|
59848
|
+
* single lock ignores it. The refusal lives in the callee, so no
|
|
59849
|
+
* automation or API caller reaches the doors by skipping a dialog.
|
|
59850
|
+
*/
|
|
59851
|
+
confirm: boolean().optional()
|
|
59488
59852
|
}), _void(), {
|
|
59489
59853
|
kind: "mutation",
|
|
59490
59854
|
auth: "protected"
|
|
@@ -59492,6 +59856,11 @@ DeviceType.Lock, method(object({
|
|
|
59492
59856
|
kind: "mutation",
|
|
59493
59857
|
auth: "protected"
|
|
59494
59858
|
});
|
|
59859
|
+
object({
|
|
59860
|
+
value: number().nullable().meta(readingMeta("device", { label: "Total" })),
|
|
59861
|
+
lastFetchedAt: number()
|
|
59862
|
+
});
|
|
59863
|
+
DeviceType.Sensor;
|
|
59495
59864
|
/**
|
|
59496
59865
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
59497
59866
|
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
@@ -61399,9 +61768,9 @@ object({
|
|
|
61399
61768
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61400
61769
|
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
61401
61770
|
/** Voltage in volts. */
|
|
61402
|
-
volts: number().optional().meta(readingMeta("voltage")),
|
|
61771
|
+
volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61403
61772
|
/** Current in amperes. */
|
|
61404
|
-
amps: number().optional().meta(readingMeta("current")),
|
|
61773
|
+
amps: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61405
61774
|
/** Apparent power in volt-amperes. */
|
|
61406
61775
|
va: number().optional().meta(readingMeta("apparent-power")),
|
|
61407
61776
|
/** Power factor (0..1) if reported. */
|
|
@@ -61409,7 +61778,23 @@ object({
|
|
|
61409
61778
|
/** Ms epoch when the slice was last updated. */
|
|
61410
61779
|
lastFetchedAt: number()
|
|
61411
61780
|
});
|
|
61412
|
-
|
|
61781
|
+
[
|
|
61782
|
+
DeviceType.Sensor,
|
|
61783
|
+
DeviceType.Switch,
|
|
61784
|
+
DeviceType.Light,
|
|
61785
|
+
DeviceType.Fan,
|
|
61786
|
+
DeviceType.Climate,
|
|
61787
|
+
DeviceType.Thermostat,
|
|
61788
|
+
DeviceType.Humidifier,
|
|
61789
|
+
DeviceType.WaterHeater,
|
|
61790
|
+
DeviceType.MediaPlayer,
|
|
61791
|
+
DeviceType.Washer,
|
|
61792
|
+
DeviceType.Dryer,
|
|
61793
|
+
DeviceType.Dishwasher,
|
|
61794
|
+
DeviceType.Vacuum,
|
|
61795
|
+
DeviceType.LawnMower,
|
|
61796
|
+
DeviceType.PetFeeder
|
|
61797
|
+
].filter((type) => type !== DeviceType.Sensor);
|
|
61413
61798
|
/**
|
|
61414
61799
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
61415
61800
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -61856,7 +62241,7 @@ object({
|
|
|
61856
62241
|
phase: string().nullable()
|
|
61857
62242
|
});
|
|
61858
62243
|
Object.values(DeviceType);
|
|
61859
|
-
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
62244
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
61860
62245
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
61861
62246
|
kind: "mutation",
|
|
61862
62247
|
auth: "admin"
|
|
@@ -63902,7 +64287,7 @@ var SwitchStatusSchema = object({
|
|
|
63902
64287
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
63903
64288
|
lastChangedAt: number()
|
|
63904
64289
|
});
|
|
63905
|
-
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
|
|
64290
|
+
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
|
|
63906
64291
|
deviceId: number(),
|
|
63907
64292
|
on: boolean()
|
|
63908
64293
|
}), _void(), {
|
|
@@ -65606,8 +65991,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65606
65991
|
kind: "mutation",
|
|
65607
65992
|
auth: "admin"
|
|
65608
65993
|
});
|
|
65994
|
+
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
65609
65995
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65610
|
-
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;
|
|
65996
|
+
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;
|
|
65611
65997
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65612
65998
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65613
65999
|
new Set(CAP_NAMES);
|
|
@@ -65660,7 +66046,7 @@ var AccessoryKind = {
|
|
|
65660
66046
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
65661
66047
|
};
|
|
65662
66048
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
65663
|
-
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;
|
|
66049
|
+
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;
|
|
65664
66050
|
new Set(Object.values(DeviceType));
|
|
65665
66051
|
Object.freeze({
|
|
65666
66052
|
"accessories.getStatus": {
|
|
@@ -68883,6 +69269,13 @@ Object.freeze({
|
|
|
68883
69269
|
access: "view",
|
|
68884
69270
|
role: "viewer"
|
|
68885
69271
|
},
|
|
69272
|
+
"groupActive.getStatus": {
|
|
69273
|
+
capName: "group-active",
|
|
69274
|
+
capScope: "device",
|
|
69275
|
+
addonId: null,
|
|
69276
|
+
access: "view",
|
|
69277
|
+
role: "viewer"
|
|
69278
|
+
},
|
|
68886
69279
|
"groupCommands.getStatus": {
|
|
68887
69280
|
capName: "group-commands",
|
|
68888
69281
|
capScope: "device",
|
|
@@ -69849,6 +70242,13 @@ Object.freeze({
|
|
|
69849
70242
|
access: "create",
|
|
69850
70243
|
role: "admin"
|
|
69851
70244
|
},
|
|
70245
|
+
"meter.getStatus": {
|
|
70246
|
+
capName: "meter",
|
|
70247
|
+
capScope: "device",
|
|
70248
|
+
addonId: null,
|
|
70249
|
+
access: "view",
|
|
70250
|
+
role: "viewer"
|
|
70251
|
+
},
|
|
69852
70252
|
"metricsProvider.collectSnapshot": {
|
|
69853
70253
|
capName: "metrics-provider",
|
|
69854
70254
|
capScope: "system",
|
|
@@ -77947,7 +78347,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77947
78347
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
77948
78348
|
icon: "square"
|
|
77949
78349
|
}
|
|
77950
|
-
}
|
|
78350
|
+
},
|
|
78351
|
+
overrides: { byType: {
|
|
78352
|
+
[DeviceType.Washer]: {
|
|
78353
|
+
state: { running: {
|
|
78354
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
78355
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
78356
|
+
} },
|
|
78357
|
+
events: {
|
|
78358
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
78359
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
78360
|
+
}
|
|
78361
|
+
},
|
|
78362
|
+
[DeviceType.Dryer]: {
|
|
78363
|
+
state: { running: {
|
|
78364
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
78365
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
78366
|
+
} },
|
|
78367
|
+
events: {
|
|
78368
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
78369
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
78370
|
+
}
|
|
78371
|
+
},
|
|
78372
|
+
[DeviceType.Dishwasher]: {
|
|
78373
|
+
state: { running: {
|
|
78374
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
78375
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
78376
|
+
} },
|
|
78377
|
+
events: {
|
|
78378
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
78379
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
78380
|
+
}
|
|
78381
|
+
}
|
|
78382
|
+
} }
|
|
77951
78383
|
},
|
|
77952
78384
|
update: {
|
|
77953
78385
|
scope: "device",
|
|
@@ -78719,6 +79151,10 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78719
79151
|
icon: "flame"
|
|
78720
79152
|
}]
|
|
78721
79153
|
},
|
|
79154
|
+
"group-active": {
|
|
79155
|
+
scope: "device",
|
|
79156
|
+
noun: t("Group state", "Stato del gruppo")
|
|
79157
|
+
},
|
|
78722
79158
|
"group-commands": {
|
|
78723
79159
|
scope: "device",
|
|
78724
79160
|
noun: t("Group command", "Comando di gruppo")
|
|
@@ -78775,6 +79211,17 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78775
79211
|
}],
|
|
78776
79212
|
events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
|
|
78777
79213
|
},
|
|
79214
|
+
meter: {
|
|
79215
|
+
scope: "device",
|
|
79216
|
+
noun: t("Meter", "Contatore"),
|
|
79217
|
+
state: [{
|
|
79218
|
+
kind: "numeric",
|
|
79219
|
+
field: "value",
|
|
79220
|
+
quantity: t("the total", "il totale"),
|
|
79221
|
+
label: t("Total", "Totale"),
|
|
79222
|
+
icon: "gauge"
|
|
79223
|
+
}]
|
|
79224
|
+
},
|
|
78778
79225
|
"numeric-sensor": {
|
|
78779
79226
|
scope: "device",
|
|
78780
79227
|
noun: t("Sensor", "Sensore"),
|
|
@@ -79247,8 +79694,72 @@ function projectAction(cap, action) {
|
|
|
79247
79694
|
};
|
|
79248
79695
|
}
|
|
79249
79696
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
79250
|
-
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;
|
|
79697
|
+
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;
|
|
79251
79698
|
DeviceFeature.BatteryOperated;
|
|
79699
|
+
/**
|
|
79700
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
79701
|
+
*
|
|
79702
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
79703
|
+
* travels is its power reading. The others have a laundry type that this
|
|
79704
|
+
* export cannot honour yet, so they are named and withheld.
|
|
79705
|
+
*/
|
|
79706
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
79707
|
+
DeviceType.Washer,
|
|
79708
|
+
DeviceType.Dryer,
|
|
79709
|
+
DeviceType.Dishwasher
|
|
79710
|
+
];
|
|
79711
|
+
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.";
|
|
79712
|
+
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.";
|
|
79713
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
79714
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
79715
|
+
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.";
|
|
79716
|
+
function withheld(reason) {
|
|
79717
|
+
return {
|
|
79718
|
+
[DeviceType.Washer]: {
|
|
79719
|
+
exported: false,
|
|
79720
|
+
reason
|
|
79721
|
+
},
|
|
79722
|
+
[DeviceType.Dryer]: {
|
|
79723
|
+
exported: false,
|
|
79724
|
+
reason
|
|
79725
|
+
},
|
|
79726
|
+
[DeviceType.Dishwasher]: {
|
|
79727
|
+
exported: false,
|
|
79728
|
+
reason
|
|
79729
|
+
}
|
|
79730
|
+
};
|
|
79731
|
+
}
|
|
79732
|
+
function offered(received) {
|
|
79733
|
+
return {
|
|
79734
|
+
[DeviceType.Washer]: {
|
|
79735
|
+
exported: true,
|
|
79736
|
+
as: received
|
|
79737
|
+
},
|
|
79738
|
+
[DeviceType.Dryer]: {
|
|
79739
|
+
exported: true,
|
|
79740
|
+
as: received
|
|
79741
|
+
},
|
|
79742
|
+
[DeviceType.Dishwasher]: {
|
|
79743
|
+
exported: true,
|
|
79744
|
+
as: received
|
|
79745
|
+
}
|
|
79746
|
+
};
|
|
79747
|
+
}
|
|
79748
|
+
var APPLIANCE_EXPORT = {
|
|
79749
|
+
ha: offered(HA_AS),
|
|
79750
|
+
homekit: withheld(HOMEKIT_REASON),
|
|
79751
|
+
alexa: withheld(ALEXA_REASON),
|
|
79752
|
+
google: withheld(GOOGLE_REASON),
|
|
79753
|
+
matter: withheld(MATTER_REASON)
|
|
79754
|
+
};
|
|
79755
|
+
function isPlugApplianceType(deviceType) {
|
|
79756
|
+
return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
|
|
79757
|
+
}
|
|
79758
|
+
/** The decision for this ecosystem, or null when the type is not an appliance. */
|
|
79759
|
+
function applianceExport(ecosystem, deviceType) {
|
|
79760
|
+
if (!isPlugApplianceType(deviceType)) return null;
|
|
79761
|
+
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
79762
|
+
}
|
|
79252
79763
|
Object.freeze({
|
|
79253
79764
|
"accessories.getStatus": [{
|
|
79254
79765
|
name: "deviceId",
|
|
@@ -80215,6 +80726,11 @@ Object.freeze({
|
|
|
80215
80726
|
form: "single",
|
|
80216
80727
|
optional: false
|
|
80217
80728
|
}],
|
|
80729
|
+
"groupActive.getStatus": [{
|
|
80730
|
+
name: "deviceId",
|
|
80731
|
+
form: "single",
|
|
80732
|
+
optional: false
|
|
80733
|
+
}],
|
|
80218
80734
|
"groupCommands.getStatus": [{
|
|
80219
80735
|
name: "deviceId",
|
|
80220
80736
|
form: "single",
|
|
@@ -80425,6 +80941,11 @@ Object.freeze({
|
|
|
80425
80941
|
form: "single",
|
|
80426
80942
|
optional: false
|
|
80427
80943
|
}],
|
|
80944
|
+
"meter.getStatus": [{
|
|
80945
|
+
name: "deviceId",
|
|
80946
|
+
form: "single",
|
|
80947
|
+
optional: false
|
|
80948
|
+
}],
|
|
80428
80949
|
"motion.getStatus": [{
|
|
80429
80950
|
name: "deviceId",
|
|
80430
80951
|
form: "single",
|
|
@@ -82032,7 +82553,6 @@ Object.freeze({
|
|
|
82032
82553
|
"network-access": "ingress",
|
|
82033
82554
|
"smtp-provider": "email"
|
|
82034
82555
|
});
|
|
82035
|
-
DeviceType.Camera;
|
|
82036
82556
|
/**
|
|
82037
82557
|
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
82038
82558
|
* `z.infer`, they do not restate the shape.
|
|
@@ -83442,7 +83962,7 @@ var MB = 1024 * 1024;
|
|
|
83442
83962
|
//#endregion
|
|
83443
83963
|
//#region src/custom-actions.ts
|
|
83444
83964
|
/**
|
|
83445
|
-
* Alexa
|
|
83965
|
+
* Alexa Export — customActions catalog.
|
|
83446
83966
|
*
|
|
83447
83967
|
* The settings page drives these through
|
|
83448
83968
|
* `api.addons.custom.{query,mutate}({ addonId, action, input })`: every action
|
|
@@ -86204,6 +86724,12 @@ function switchCategory(device) {
|
|
|
86204
86724
|
}
|
|
86205
86725
|
//#endregion
|
|
86206
86726
|
//#region src/endpoints/adapters/index.ts
|
|
86727
|
+
/**
|
|
86728
|
+
* The adapter registry (D869): the ONE list Discovery, ReportState,
|
|
86729
|
+
* ChangeReport, the reconcile, the directive router and the validator read.
|
|
86730
|
+
* Adding a cap to Alexa is adding its adapter here — in order: the first
|
|
86731
|
+
* adapter with a category decides the endpoint's display category.
|
|
86732
|
+
*/
|
|
86207
86733
|
var GENERIC_ADAPTERS = [
|
|
86208
86734
|
lockAdapter,
|
|
86209
86735
|
contactAdapter,
|
|
@@ -86290,6 +86816,11 @@ function capabilityKey$2(c) {
|
|
|
86290
86816
|
}
|
|
86291
86817
|
/** What a device becomes, folding every applicable adapter in registry order. */
|
|
86292
86818
|
function planGenericDevice(device) {
|
|
86819
|
+
const withheld = applianceExport("alexa", device.type);
|
|
86820
|
+
if (withheld !== null && !withheld.exported) return {
|
|
86821
|
+
kind: "skip",
|
|
86822
|
+
reasons: [withheld.reason]
|
|
86823
|
+
};
|
|
86293
86824
|
const capabilities = [BASE];
|
|
86294
86825
|
const seen = /* @__PURE__ */ new Set();
|
|
86295
86826
|
const reasons = [];
|