@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
|
@@ -5477,7 +5477,7 @@ var ZodIssueCode = {
|
|
|
5477
5477
|
var ZodFirstPartyTypeKind;
|
|
5478
5478
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5479
5479
|
//#endregion
|
|
5480
|
-
//#region ../types/dist/sleep
|
|
5480
|
+
//#region ../types/dist/sleep--jXS9hWo.mjs
|
|
5481
5481
|
/**
|
|
5482
5482
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5483
5483
|
* window to float samples (D455).
|
|
@@ -8621,6 +8621,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8621
8621
|
"filesystem-browse",
|
|
8622
8622
|
"flood",
|
|
8623
8623
|
"gas",
|
|
8624
|
+
"group-active",
|
|
8624
8625
|
"group-commands",
|
|
8625
8626
|
"group-status",
|
|
8626
8627
|
"heating-valve",
|
|
@@ -8643,6 +8644,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8643
8644
|
"login-method",
|
|
8644
8645
|
"media-player",
|
|
8645
8646
|
"mesh-network",
|
|
8647
|
+
"meter",
|
|
8646
8648
|
"metrics-provider",
|
|
8647
8649
|
"model-convert",
|
|
8648
8650
|
"model-distributor",
|
|
@@ -9441,6 +9443,10 @@ Object.freeze({
|
|
|
9441
9443
|
"path": "detected",
|
|
9442
9444
|
"valueType": "boolean"
|
|
9443
9445
|
}],
|
|
9446
|
+
"group-active": [{
|
|
9447
|
+
"path": "active",
|
|
9448
|
+
"valueType": "boolean"
|
|
9449
|
+
}],
|
|
9444
9450
|
"group-status": [
|
|
9445
9451
|
{
|
|
9446
9452
|
"path": "included",
|
|
@@ -9700,6 +9706,10 @@ Object.freeze({
|
|
|
9700
9706
|
]
|
|
9701
9707
|
}
|
|
9702
9708
|
],
|
|
9709
|
+
"meter": [{
|
|
9710
|
+
"path": "value",
|
|
9711
|
+
"valueType": "number"
|
|
9712
|
+
}],
|
|
9703
9713
|
"motion": [
|
|
9704
9714
|
{
|
|
9705
9715
|
"path": "detected",
|
|
@@ -10443,7 +10453,7 @@ object({
|
|
|
10443
10453
|
params: record(string(), union([string(), number()])).optional()
|
|
10444
10454
|
});
|
|
10445
10455
|
//#endregion
|
|
10446
|
-
//#region ../types/dist/err-msg-
|
|
10456
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10447
10457
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10448
10458
|
DeviceType["Camera"] = "camera";
|
|
10449
10459
|
DeviceType["Hub"] = "hub";
|
|
@@ -10537,8 +10547,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10537
10547
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10538
10548
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10539
10549
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10540
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10550
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10551
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10541
10552
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10553
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10554
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10555
|
+
DeviceType["Washer"] = "washer";
|
|
10556
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10557
|
+
DeviceType["Dryer"] = "dryer";
|
|
10542
10558
|
return DeviceType;
|
|
10543
10559
|
}({});
|
|
10544
10560
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -10796,7 +10812,7 @@ function errMsg(err) {
|
|
|
10796
10812
|
return String(err);
|
|
10797
10813
|
}
|
|
10798
10814
|
//#endregion
|
|
10799
|
-
//#region ../types/dist/composition-
|
|
10815
|
+
//#region ../types/dist/composition-Bb8iwHEJ.mjs
|
|
10800
10816
|
/**
|
|
10801
10817
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10802
10818
|
*
|
|
@@ -11111,6 +11127,13 @@ var table = {
|
|
|
11111
11127
|
apply: () => {
|
|
11112
11128
|
throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
|
|
11113
11129
|
}
|
|
11130
|
+
},
|
|
11131
|
+
schmitt: {
|
|
11132
|
+
minArgs: 3,
|
|
11133
|
+
maxArgs: 5,
|
|
11134
|
+
apply: () => {
|
|
11135
|
+
throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
|
|
11136
|
+
}
|
|
11114
11137
|
}
|
|
11115
11138
|
};
|
|
11116
11139
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -11552,6 +11575,99 @@ function validateExpressionSource(src) {
|
|
|
11552
11575
|
return null;
|
|
11553
11576
|
}
|
|
11554
11577
|
/**
|
|
11578
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
11579
|
+
*
|
|
11580
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
11581
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
11582
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
11583
|
+
*
|
|
11584
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
11585
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
11586
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
11587
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
11588
|
+
* can move later without moving the others.
|
|
11589
|
+
*/
|
|
11590
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
11591
|
+
var APPLIANCE_KINDS = [
|
|
11592
|
+
"washer",
|
|
11593
|
+
"dryer",
|
|
11594
|
+
"dishwasher"
|
|
11595
|
+
];
|
|
11596
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
11597
|
+
/**
|
|
11598
|
+
* Statistics and integrals over a history read (D944).
|
|
11599
|
+
*
|
|
11600
|
+
* Pure: the same points always give the same answer, so a restart recomputes
|
|
11601
|
+
* rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
|
|
11602
|
+
* never the mean of the samples. A hole with no held value is not integrated
|
|
11603
|
+
* as zero. A truncated read is not published.
|
|
11604
|
+
*/
|
|
11605
|
+
var STATISTIC_STATS = [
|
|
11606
|
+
"min",
|
|
11607
|
+
"max",
|
|
11608
|
+
"mean",
|
|
11609
|
+
"sum",
|
|
11610
|
+
"count",
|
|
11611
|
+
"change"
|
|
11612
|
+
];
|
|
11613
|
+
/**
|
|
11614
|
+
* The range a statistics or integral helper asks history for (D944).
|
|
11615
|
+
*
|
|
11616
|
+
* Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
|
|
11617
|
+
* or 25 hours across a DST change. A tier is eligible only when its retention
|
|
11618
|
+
* is strictly longer than the longest that range can be. Forever qualifies.
|
|
11619
|
+
* Equal to a tier's retention is a refusal, not a short answer.
|
|
11620
|
+
*/
|
|
11621
|
+
var MINUTE_MS = 6e4;
|
|
11622
|
+
var HOUR_MS = 60 * MINUTE_MS;
|
|
11623
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
11624
|
+
var ROLLING_SPANS = [
|
|
11625
|
+
"1h",
|
|
11626
|
+
"24h",
|
|
11627
|
+
"2d",
|
|
11628
|
+
"7d",
|
|
11629
|
+
"30d",
|
|
11630
|
+
"custom"
|
|
11631
|
+
];
|
|
11632
|
+
var CALENDAR_PERIODS = [
|
|
11633
|
+
"today",
|
|
11634
|
+
"yesterday",
|
|
11635
|
+
"this-week",
|
|
11636
|
+
"this-month"
|
|
11637
|
+
];
|
|
11638
|
+
var RESET_PERIODS = [
|
|
11639
|
+
"never",
|
|
11640
|
+
"daily",
|
|
11641
|
+
"weekly",
|
|
11642
|
+
"monthly"
|
|
11643
|
+
];
|
|
11644
|
+
5 * MINUTE_MS;
|
|
11645
|
+
24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
|
|
11646
|
+
7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
|
|
11647
|
+
var rollingWindowObject = object({
|
|
11648
|
+
kind: literal("rolling"),
|
|
11649
|
+
span: _enum(ROLLING_SPANS),
|
|
11650
|
+
customMinutes: number().int().min(5).optional()
|
|
11651
|
+
}).check((payload) => {
|
|
11652
|
+
if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
|
|
11653
|
+
code: "custom",
|
|
11654
|
+
message: "a custom range needs a duration in minutes",
|
|
11655
|
+
path: ["customMinutes"],
|
|
11656
|
+
input: payload.value
|
|
11657
|
+
});
|
|
11658
|
+
if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
|
|
11659
|
+
code: "custom",
|
|
11660
|
+
message: "only a custom range carries a duration",
|
|
11661
|
+
path: ["customMinutes"],
|
|
11662
|
+
input: payload.value
|
|
11663
|
+
});
|
|
11664
|
+
});
|
|
11665
|
+
var RollingWindowSchema = rollingWindowObject;
|
|
11666
|
+
var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
|
|
11667
|
+
kind: literal("calendar"),
|
|
11668
|
+
period: _enum(CALENDAR_PERIODS)
|
|
11669
|
+
})]);
|
|
11670
|
+
/**
|
|
11555
11671
|
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11556
11672
|
* id. Split out so helper schemas can name it without a cycle through
|
|
11557
11673
|
* `composition.ts` (D659).
|
|
@@ -11577,7 +11693,13 @@ var GROUP_TEMPLATE_IDS = [
|
|
|
11577
11693
|
"occupancy",
|
|
11578
11694
|
"binary",
|
|
11579
11695
|
"switch",
|
|
11580
|
-
"light"
|
|
11696
|
+
"light",
|
|
11697
|
+
"fan",
|
|
11698
|
+
"cover",
|
|
11699
|
+
"valve",
|
|
11700
|
+
"lock",
|
|
11701
|
+
"media-player",
|
|
11702
|
+
"climate"
|
|
11581
11703
|
];
|
|
11582
11704
|
var NUMERIC_AGGREGATES = [
|
|
11583
11705
|
"mean",
|
|
@@ -11607,14 +11729,73 @@ var HelperMemberSchema = object({
|
|
|
11607
11729
|
cap: string().min(1),
|
|
11608
11730
|
fieldPath: string().min(1)
|
|
11609
11731
|
});
|
|
11610
|
-
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11732
|
+
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
11733
|
+
object({
|
|
11734
|
+
kind: literal("group"),
|
|
11735
|
+
templateId: GroupTemplateIdSchema,
|
|
11736
|
+
aggregate: AggregateReducerSchema,
|
|
11737
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
11738
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
11739
|
+
active: ActiveCriterionSchema.optional()
|
|
11740
|
+
}),
|
|
11741
|
+
object({
|
|
11742
|
+
kind: literal("appliance"),
|
|
11743
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
11744
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
11745
|
+
thresholdWatts: number().positive(),
|
|
11746
|
+
startDwellMs: number().int().nonnegative(),
|
|
11747
|
+
stopDwellMs: number().int().nonnegative(),
|
|
11748
|
+
member: HelperMemberSchema
|
|
11749
|
+
}),
|
|
11750
|
+
object({
|
|
11751
|
+
kind: literal("statistic"),
|
|
11752
|
+
stat: _enum(STATISTIC_STATS),
|
|
11753
|
+
window: StatisticWindowSchema,
|
|
11754
|
+
source: HelperMemberSchema
|
|
11755
|
+
}),
|
|
11756
|
+
object({
|
|
11757
|
+
kind: literal("integral"),
|
|
11758
|
+
reset: _enum(RESET_PERIODS),
|
|
11759
|
+
output: _enum(["energy", "meter"]),
|
|
11760
|
+
source: HelperMemberSchema
|
|
11761
|
+
}),
|
|
11762
|
+
object({
|
|
11763
|
+
kind: literal("threshold"),
|
|
11764
|
+
source: HelperMemberSchema,
|
|
11765
|
+
high: number(),
|
|
11766
|
+
low: number(),
|
|
11767
|
+
onForMs: number().int().nonnegative(),
|
|
11768
|
+
offForMs: number().int().nonnegative()
|
|
11769
|
+
}),
|
|
11770
|
+
object({
|
|
11771
|
+
kind: literal("arithmetic"),
|
|
11772
|
+
op: _enum([
|
|
11773
|
+
"sum",
|
|
11774
|
+
"difference",
|
|
11775
|
+
"ratio"
|
|
11776
|
+
]),
|
|
11777
|
+
inputs: array(HelperMemberSchema).min(2).max(64)
|
|
11778
|
+
}),
|
|
11779
|
+
object({
|
|
11780
|
+
kind: literal("expression"),
|
|
11781
|
+
expr: string().min(1),
|
|
11782
|
+
inputs: array(object({
|
|
11783
|
+
name: string().min(1),
|
|
11784
|
+
member: HelperMemberSchema
|
|
11785
|
+
})).min(1).max(64),
|
|
11786
|
+
output: _enum(["number", "boolean"])
|
|
11787
|
+
}),
|
|
11788
|
+
object({
|
|
11789
|
+
kind: literal("derivative"),
|
|
11790
|
+
window: RollingWindowSchema,
|
|
11791
|
+
per: _enum([
|
|
11792
|
+
"second",
|
|
11793
|
+
"minute",
|
|
11794
|
+
"hour"
|
|
11795
|
+
]),
|
|
11796
|
+
source: HelperMemberSchema
|
|
11797
|
+
})
|
|
11798
|
+
]);
|
|
11618
11799
|
/** A composed device's stableId is this prefix plus the block id. */
|
|
11619
11800
|
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
11620
11801
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
@@ -11675,6 +11856,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11675
11856
|
"all"
|
|
11676
11857
|
]),
|
|
11677
11858
|
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
11859
|
+
/**
|
|
11860
|
+
* Set when the reads are an enum state, not a yes/no: the listed states
|
|
11861
|
+
* count as active (a cover is `open`). A state outside the list is inactive;
|
|
11862
|
+
* a read that is not a state at all is left out. Only `any` / `all` use it.
|
|
11863
|
+
*/
|
|
11864
|
+
activeWhen: array(string().min(1)).min(1).optional(),
|
|
11678
11865
|
/** `value` is the reading; the others are the member counts. */
|
|
11679
11866
|
publish: _enum([
|
|
11680
11867
|
"value",
|
|
@@ -11688,6 +11875,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11688
11875
|
"omit",
|
|
11689
11876
|
"offline"
|
|
11690
11877
|
])
|
|
11878
|
+
}),
|
|
11879
|
+
object({
|
|
11880
|
+
kind: literal("series"),
|
|
11881
|
+
read: CompositionFieldReadSchema,
|
|
11882
|
+
/** `value` is the statistic or the integral. The others are the gap counts. */
|
|
11883
|
+
publish: _enum([
|
|
11884
|
+
"value",
|
|
11885
|
+
"included",
|
|
11886
|
+
"excluded",
|
|
11887
|
+
"total"
|
|
11888
|
+
]),
|
|
11889
|
+
/**
|
|
11890
|
+
* What an unanswered `value` does. Counts ignore this. `offline` leaves the
|
|
11891
|
+
* device unseeded until history answers, so a restart cannot publish 0.
|
|
11892
|
+
*/
|
|
11893
|
+
empty: _enum([
|
|
11894
|
+
"null",
|
|
11895
|
+
"omit",
|
|
11896
|
+
"offline"
|
|
11897
|
+
])
|
|
11691
11898
|
})
|
|
11692
11899
|
]);
|
|
11693
11900
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
@@ -17153,7 +17360,22 @@ var BrokerProviderInfoSchema = object({
|
|
|
17153
17360
|
*/
|
|
17154
17361
|
interactiveConnectPath: string().min(1).optional(),
|
|
17155
17362
|
/** Relative hub path to disconnect the linked account (same popup pattern). */
|
|
17156
|
-
interactiveDisconnectPath: string().min(1).optional()
|
|
17363
|
+
interactiveDisconnectPath: string().min(1).optional(),
|
|
17364
|
+
/**
|
|
17365
|
+
* The kind signs in through a server-held interactive session instead of
|
|
17366
|
+
* (or before) typed credentials. `basePath` is a hub-relative route set
|
|
17367
|
+
* served by the owning addon (`/addon/<id>/...`) speaking the sign-in
|
|
17368
|
+
* contract: `POST {basePath}/start` (body: the form's settings) answers
|
|
17369
|
+
* `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
|
|
17370
|
+
* `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
|
|
17371
|
+
* 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
|
|
17372
|
+
* (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
|
|
17373
|
+
* existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
|
|
17374
|
+
* (`{ sessionId }`) drops the session. The dialog that edits a broker
|
|
17375
|
+
* offers it as the default path; the fields the session fills are
|
|
17376
|
+
* marked `filledBySignIn` in the kind's settings schema.
|
|
17377
|
+
*/
|
|
17378
|
+
signIn: object({ basePath: string().min(1) }).optional()
|
|
17157
17379
|
}))
|
|
17158
17380
|
});
|
|
17159
17381
|
var ListInputSchema = object({
|
|
@@ -18152,7 +18374,8 @@ var CompositionProblemSchema = object({
|
|
|
18152
18374
|
"native-capability-replace",
|
|
18153
18375
|
"mixed-quantity",
|
|
18154
18376
|
"helper-mismatch",
|
|
18155
|
-
"member-constraint"
|
|
18377
|
+
"member-constraint",
|
|
18378
|
+
"retention"
|
|
18156
18379
|
]),
|
|
18157
18380
|
path: string(),
|
|
18158
18381
|
message: string()
|
|
@@ -18386,13 +18609,17 @@ Object.freeze({
|
|
|
18386
18609
|
latchedAt: {
|
|
18387
18610
|
kind: "fixed",
|
|
18388
18611
|
result: ["number", "null"]
|
|
18612
|
+
},
|
|
18613
|
+
schmitt: {
|
|
18614
|
+
kind: "fixed",
|
|
18615
|
+
result: ["boolean", "null"]
|
|
18389
18616
|
}
|
|
18390
18617
|
});
|
|
18391
18618
|
/**
|
|
18392
18619
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18393
18620
|
* Data, not a form default written into the block.
|
|
18394
18621
|
*/
|
|
18395
|
-
var NOW = {
|
|
18622
|
+
var NOW$2 = {
|
|
18396
18623
|
fieldPath: "lastFetchedAt",
|
|
18397
18624
|
expr: "now"
|
|
18398
18625
|
};
|
|
@@ -18406,6 +18633,8 @@ function numeric(input) {
|
|
|
18406
18633
|
family: "numeric",
|
|
18407
18634
|
deviceType: DeviceType.Sensor,
|
|
18408
18635
|
memberDeviceType: DeviceType.Sensor,
|
|
18636
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
18637
|
+
activeWhen: void 0,
|
|
18409
18638
|
commandCaps: [],
|
|
18410
18639
|
baseUnit: baseUnitOf(input.quantity),
|
|
18411
18640
|
aggregates: NUMERIC_AGGREGATES,
|
|
@@ -18421,6 +18650,8 @@ function binary(input) {
|
|
|
18421
18650
|
family: "binary",
|
|
18422
18651
|
deviceType: DeviceType.Sensor,
|
|
18423
18652
|
memberDeviceType: DeviceType.Sensor,
|
|
18653
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
18654
|
+
activeWhen: void 0,
|
|
18424
18655
|
commandCaps: [],
|
|
18425
18656
|
quantity: "none",
|
|
18426
18657
|
baseUnit: void 0,
|
|
@@ -18438,7 +18669,7 @@ var GROUP_TEMPLATES = [
|
|
|
18438
18669
|
quantity: "temperature",
|
|
18439
18670
|
defaultAggregate: "mean",
|
|
18440
18671
|
empty: "null",
|
|
18441
|
-
companions: [NOW]
|
|
18672
|
+
companions: [NOW$2]
|
|
18442
18673
|
}),
|
|
18443
18674
|
numeric({
|
|
18444
18675
|
id: "humidity",
|
|
@@ -18449,7 +18680,7 @@ var GROUP_TEMPLATES = [
|
|
|
18449
18680
|
quantity: "humidity",
|
|
18450
18681
|
defaultAggregate: "mean",
|
|
18451
18682
|
empty: "null",
|
|
18452
|
-
companions: [NOW]
|
|
18683
|
+
companions: [NOW$2]
|
|
18453
18684
|
}),
|
|
18454
18685
|
numeric({
|
|
18455
18686
|
id: "pressure",
|
|
@@ -18460,7 +18691,7 @@ var GROUP_TEMPLATES = [
|
|
|
18460
18691
|
quantity: "pressure",
|
|
18461
18692
|
defaultAggregate: "mean",
|
|
18462
18693
|
empty: "null",
|
|
18463
|
-
companions: [NOW]
|
|
18694
|
+
companions: [NOW$2]
|
|
18464
18695
|
}),
|
|
18465
18696
|
numeric({
|
|
18466
18697
|
id: "illuminance",
|
|
@@ -18471,7 +18702,7 @@ var GROUP_TEMPLATES = [
|
|
|
18471
18702
|
quantity: "illuminance",
|
|
18472
18703
|
defaultAggregate: "mean",
|
|
18473
18704
|
empty: "null",
|
|
18474
|
-
companions: [NOW]
|
|
18705
|
+
companions: [NOW$2]
|
|
18475
18706
|
}),
|
|
18476
18707
|
numeric({
|
|
18477
18708
|
id: "power",
|
|
@@ -18482,7 +18713,7 @@ var GROUP_TEMPLATES = [
|
|
|
18482
18713
|
quantity: "power",
|
|
18483
18714
|
defaultAggregate: "sum",
|
|
18484
18715
|
empty: "omit",
|
|
18485
|
-
companions: [NOW]
|
|
18716
|
+
companions: [NOW$2]
|
|
18486
18717
|
}),
|
|
18487
18718
|
numeric({
|
|
18488
18719
|
id: "energy",
|
|
@@ -18493,7 +18724,7 @@ var GROUP_TEMPLATES = [
|
|
|
18493
18724
|
quantity: "energy",
|
|
18494
18725
|
defaultAggregate: "sum",
|
|
18495
18726
|
empty: "omit",
|
|
18496
|
-
companions: [NOW]
|
|
18727
|
+
companions: [NOW$2]
|
|
18497
18728
|
}),
|
|
18498
18729
|
numeric({
|
|
18499
18730
|
id: "battery",
|
|
@@ -18528,7 +18759,7 @@ var GROUP_TEMPLATES = [
|
|
|
18528
18759
|
quantity: "device",
|
|
18529
18760
|
defaultAggregate: "mean",
|
|
18530
18761
|
empty: "null",
|
|
18531
|
-
companions: [NOW]
|
|
18762
|
+
companions: [NOW$2]
|
|
18532
18763
|
}),
|
|
18533
18764
|
binary({
|
|
18534
18765
|
id: "motion",
|
|
@@ -18622,6 +18853,11 @@ var GROUP_TEMPLATES = [
|
|
|
18622
18853
|
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.",
|
|
18623
18854
|
deviceType: DeviceType.Switch,
|
|
18624
18855
|
outputCap: "switch",
|
|
18856
|
+
outputField: "on",
|
|
18857
|
+
member: {
|
|
18858
|
+
cap: "switch",
|
|
18859
|
+
fieldPath: "on"
|
|
18860
|
+
},
|
|
18625
18861
|
commandCaps: ["switch"]
|
|
18626
18862
|
}),
|
|
18627
18863
|
actuator({
|
|
@@ -18629,34 +18865,136 @@ var GROUP_TEMPLATES = [
|
|
|
18629
18865
|
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.",
|
|
18630
18866
|
deviceType: DeviceType.Light,
|
|
18631
18867
|
outputCap: "switch",
|
|
18868
|
+
outputField: "on",
|
|
18869
|
+
member: {
|
|
18870
|
+
cap: "switch",
|
|
18871
|
+
fieldPath: "on"
|
|
18872
|
+
},
|
|
18632
18873
|
commandCaps: [
|
|
18633
18874
|
"switch",
|
|
18634
18875
|
"brightness",
|
|
18635
18876
|
"color"
|
|
18636
18877
|
]
|
|
18878
|
+
}),
|
|
18879
|
+
actuator({
|
|
18880
|
+
id: "fan",
|
|
18881
|
+
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.",
|
|
18882
|
+
deviceType: DeviceType.Fan,
|
|
18883
|
+
outputCap: "switch",
|
|
18884
|
+
outputField: "on",
|
|
18885
|
+
member: {
|
|
18886
|
+
cap: "switch",
|
|
18887
|
+
fieldPath: "on"
|
|
18888
|
+
},
|
|
18889
|
+
commandCaps: ["switch", "fan-control"]
|
|
18890
|
+
}),
|
|
18891
|
+
actuator({
|
|
18892
|
+
id: "cover",
|
|
18893
|
+
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.",
|
|
18894
|
+
deviceType: DeviceType.Cover,
|
|
18895
|
+
outputCap: "group-active",
|
|
18896
|
+
outputField: "active",
|
|
18897
|
+
member: {
|
|
18898
|
+
cap: "cover",
|
|
18899
|
+
fieldPath: "state"
|
|
18900
|
+
},
|
|
18901
|
+
activeWhen: [
|
|
18902
|
+
"open",
|
|
18903
|
+
"opening",
|
|
18904
|
+
"stopped"
|
|
18905
|
+
],
|
|
18906
|
+
commandCaps: ["cover"]
|
|
18907
|
+
}),
|
|
18908
|
+
actuator({
|
|
18909
|
+
id: "valve",
|
|
18910
|
+
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.",
|
|
18911
|
+
deviceType: DeviceType.Valve,
|
|
18912
|
+
outputCap: "group-active",
|
|
18913
|
+
outputField: "active",
|
|
18914
|
+
member: {
|
|
18915
|
+
cap: "valve",
|
|
18916
|
+
fieldPath: "state"
|
|
18917
|
+
},
|
|
18918
|
+
activeWhen: [
|
|
18919
|
+
"open",
|
|
18920
|
+
"opening",
|
|
18921
|
+
"stopped"
|
|
18922
|
+
],
|
|
18923
|
+
commandCaps: ["valve"]
|
|
18924
|
+
}),
|
|
18925
|
+
actuator({
|
|
18926
|
+
id: "lock",
|
|
18927
|
+
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.",
|
|
18928
|
+
deviceType: DeviceType.Lock,
|
|
18929
|
+
outputCap: "group-active",
|
|
18930
|
+
outputField: "active",
|
|
18931
|
+
member: {
|
|
18932
|
+
cap: "lock-control",
|
|
18933
|
+
fieldPath: "state"
|
|
18934
|
+
},
|
|
18935
|
+
activeWhen: ["locked"],
|
|
18936
|
+
commandCaps: ["lock-control"]
|
|
18937
|
+
}),
|
|
18938
|
+
actuator({
|
|
18939
|
+
id: "media-player",
|
|
18940
|
+
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.",
|
|
18941
|
+
deviceType: DeviceType.MediaPlayer,
|
|
18942
|
+
outputCap: "group-active",
|
|
18943
|
+
outputField: "active",
|
|
18944
|
+
member: {
|
|
18945
|
+
cap: "media-player",
|
|
18946
|
+
fieldPath: "state"
|
|
18947
|
+
},
|
|
18948
|
+
activeWhen: ["playing", "buffering"],
|
|
18949
|
+
commandCaps: ["media-player"]
|
|
18950
|
+
}),
|
|
18951
|
+
actuator({
|
|
18952
|
+
id: "climate",
|
|
18953
|
+
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.",
|
|
18954
|
+
deviceType: DeviceType.Thermostat,
|
|
18955
|
+
memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
|
|
18956
|
+
outputCap: "group-active",
|
|
18957
|
+
outputField: "active",
|
|
18958
|
+
member: {
|
|
18959
|
+
cap: "climate-control",
|
|
18960
|
+
fieldPath: "mode"
|
|
18961
|
+
},
|
|
18962
|
+
activeWhen: [
|
|
18963
|
+
"heat",
|
|
18964
|
+
"cool",
|
|
18965
|
+
"auto",
|
|
18966
|
+
"heat_cool",
|
|
18967
|
+
"fan_only",
|
|
18968
|
+
"dry"
|
|
18969
|
+
],
|
|
18970
|
+
commandCaps: ["climate-control"]
|
|
18637
18971
|
})
|
|
18638
18972
|
];
|
|
18639
18973
|
function actuator(input) {
|
|
18640
18974
|
return {
|
|
18641
|
-
|
|
18975
|
+
id: input.id,
|
|
18976
|
+
summary: input.summary,
|
|
18977
|
+
deviceType: input.deviceType,
|
|
18978
|
+
outputCap: input.outputCap,
|
|
18979
|
+
outputField: input.outputField,
|
|
18980
|
+
commandCaps: input.commandCaps,
|
|
18642
18981
|
family: "actuator",
|
|
18643
18982
|
role: void 0,
|
|
18644
18983
|
memberDeviceType: input.deviceType,
|
|
18645
|
-
|
|
18984
|
+
memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
|
|
18985
|
+
activeWhen: input.activeWhen,
|
|
18646
18986
|
quantity: "none",
|
|
18647
18987
|
baseUnit: void 0,
|
|
18648
18988
|
aggregates: BINARY_AGGREGATES,
|
|
18649
18989
|
defaultAggregate: "any",
|
|
18650
18990
|
empty: "offline",
|
|
18651
|
-
accept: [
|
|
18652
|
-
cap: "switch",
|
|
18653
|
-
fieldPath: "on"
|
|
18654
|
-
}],
|
|
18991
|
+
accept: [input.member],
|
|
18655
18992
|
companions: [CHANGED]
|
|
18656
18993
|
};
|
|
18657
18994
|
}
|
|
18658
18995
|
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
18659
18996
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18997
|
+
DeviceType.Camera;
|
|
18660
18998
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18661
18999
|
/**
|
|
18662
19000
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -43696,7 +44034,7 @@ var NetworkAccessStatusSchema = object({
|
|
|
43696
44034
|
});
|
|
43697
44035
|
/**
|
|
43698
44036
|
* Optional, richer endpoint shape returned by providers that expose
|
|
43699
|
-
* MORE than one ingress concurrently (Tailscale
|
|
44037
|
+
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
43700
44038
|
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
43701
44039
|
* the originating provider config (mode + sourcePort) so the
|
|
43702
44040
|
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
@@ -46339,7 +46677,20 @@ var NcRuleInputSchema = object({
|
|
|
46339
46677
|
* save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
|
|
46340
46678
|
* path does not run Zod defaults.
|
|
46341
46679
|
*/
|
|
46342
|
-
groupingSec: number().int().min(5).max(60).optional()
|
|
46680
|
+
groupingSec: number().int().min(5).max(60).optional(),
|
|
46681
|
+
/**
|
|
46682
|
+
* ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
|
|
46683
|
+
* carries "Correct" / "Wrong" buttons (and, where the channel has room, a
|
|
46684
|
+
* "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
|
|
46685
|
+
* same mark the Library writes, and records whose notification it was and
|
|
46686
|
+
* when. A channel with no buttons gets the same two choices as links.
|
|
46687
|
+
*
|
|
46688
|
+
* `.optional()`, never `.default()` (a Zod default does not run on the addon
|
|
46689
|
+
* cap path): absent and `false` both mean off, which is what every rule
|
|
46690
|
+
* authored before this field meant. An editor turns it off by writing
|
|
46691
|
+
* `false`, so it needs no `clear` key.
|
|
46692
|
+
*/
|
|
46693
|
+
askVerdict: boolean().optional()
|
|
46343
46694
|
});
|
|
46344
46695
|
/**
|
|
46345
46696
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -56812,7 +57163,7 @@ var BatteryStatusSchema = object({
|
|
|
56812
57163
|
*/
|
|
56813
57164
|
binary: boolean().optional().meta({ label: "Binary indicator" })
|
|
56814
57165
|
});
|
|
56815
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
|
|
57166
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
|
|
56816
57167
|
method(object({
|
|
56817
57168
|
deviceId: number(),
|
|
56818
57169
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
@@ -58580,7 +58931,13 @@ results: array(object({
|
|
|
58580
58931
|
/** Ms epoch of the attempt. */
|
|
58581
58932
|
at: number()
|
|
58582
58933
|
})) });
|
|
58583
|
-
DeviceType.Switch, DeviceType.Light;
|
|
58934
|
+
DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
58935
|
+
object({
|
|
58936
|
+
active: boolean().meta({ label: "Active" }),
|
|
58937
|
+
/** Ms epoch when the slice was last updated. */
|
|
58938
|
+
lastChangedAt: number()
|
|
58939
|
+
});
|
|
58940
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
|
|
58584
58941
|
object({
|
|
58585
58942
|
/** Members whose current value entered the aggregate. */
|
|
58586
58943
|
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
@@ -58598,7 +58955,7 @@ object({
|
|
|
58598
58955
|
label: "Members"
|
|
58599
58956
|
}))
|
|
58600
58957
|
});
|
|
58601
|
-
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58958
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
58602
58959
|
object({
|
|
58603
58960
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58604
58961
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -59513,7 +59870,14 @@ DeviceType.Lock, method(object({
|
|
|
59513
59870
|
auth: "protected"
|
|
59514
59871
|
}), method(object({
|
|
59515
59872
|
deviceId: number().int().nonnegative(),
|
|
59516
|
-
code: string().min(1).optional()
|
|
59873
|
+
code: string().min(1).optional(),
|
|
59874
|
+
/**
|
|
59875
|
+
* Honoured by a helper lock GROUP only (D944): unlocking several doors
|
|
59876
|
+
* with one call is refused unless the caller says it was confirmed. A
|
|
59877
|
+
* single lock ignores it. The refusal lives in the callee, so no
|
|
59878
|
+
* automation or API caller reaches the doors by skipping a dialog.
|
|
59879
|
+
*/
|
|
59880
|
+
confirm: boolean().optional()
|
|
59517
59881
|
}), _void(), {
|
|
59518
59882
|
kind: "mutation",
|
|
59519
59883
|
auth: "protected"
|
|
@@ -59521,6 +59885,11 @@ DeviceType.Lock, method(object({
|
|
|
59521
59885
|
kind: "mutation",
|
|
59522
59886
|
auth: "protected"
|
|
59523
59887
|
});
|
|
59888
|
+
object({
|
|
59889
|
+
value: number().nullable().meta(readingMeta("device", { label: "Total" })),
|
|
59890
|
+
lastFetchedAt: number()
|
|
59891
|
+
});
|
|
59892
|
+
DeviceType.Sensor;
|
|
59524
59893
|
/**
|
|
59525
59894
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
59526
59895
|
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
@@ -61428,9 +61797,9 @@ object({
|
|
|
61428
61797
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61429
61798
|
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
61430
61799
|
/** Voltage in volts. */
|
|
61431
|
-
volts: number().optional().meta(readingMeta("voltage")),
|
|
61800
|
+
volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61432
61801
|
/** Current in amperes. */
|
|
61433
|
-
amps: number().optional().meta(readingMeta("current")),
|
|
61802
|
+
amps: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61434
61803
|
/** Apparent power in volt-amperes. */
|
|
61435
61804
|
va: number().optional().meta(readingMeta("apparent-power")),
|
|
61436
61805
|
/** Power factor (0..1) if reported. */
|
|
@@ -61438,7 +61807,23 @@ object({
|
|
|
61438
61807
|
/** Ms epoch when the slice was last updated. */
|
|
61439
61808
|
lastFetchedAt: number()
|
|
61440
61809
|
});
|
|
61441
|
-
|
|
61810
|
+
[
|
|
61811
|
+
DeviceType.Sensor,
|
|
61812
|
+
DeviceType.Switch,
|
|
61813
|
+
DeviceType.Light,
|
|
61814
|
+
DeviceType.Fan,
|
|
61815
|
+
DeviceType.Climate,
|
|
61816
|
+
DeviceType.Thermostat,
|
|
61817
|
+
DeviceType.Humidifier,
|
|
61818
|
+
DeviceType.WaterHeater,
|
|
61819
|
+
DeviceType.MediaPlayer,
|
|
61820
|
+
DeviceType.Washer,
|
|
61821
|
+
DeviceType.Dryer,
|
|
61822
|
+
DeviceType.Dishwasher,
|
|
61823
|
+
DeviceType.Vacuum,
|
|
61824
|
+
DeviceType.LawnMower,
|
|
61825
|
+
DeviceType.PetFeeder
|
|
61826
|
+
].filter((type) => type !== DeviceType.Sensor);
|
|
61442
61827
|
/**
|
|
61443
61828
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
61444
61829
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -61885,7 +62270,7 @@ object({
|
|
|
61885
62270
|
phase: string().nullable()
|
|
61886
62271
|
});
|
|
61887
62272
|
Object.values(DeviceType);
|
|
61888
|
-
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
62273
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
61889
62274
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
61890
62275
|
kind: "mutation",
|
|
61891
62276
|
auth: "admin"
|
|
@@ -63931,7 +64316,7 @@ var SwitchStatusSchema = object({
|
|
|
63931
64316
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
63932
64317
|
lastChangedAt: number()
|
|
63933
64318
|
});
|
|
63934
|
-
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
|
|
64319
|
+
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
|
|
63935
64320
|
deviceId: number(),
|
|
63936
64321
|
on: boolean()
|
|
63937
64322
|
}), _void(), {
|
|
@@ -65635,8 +66020,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65635
66020
|
kind: "mutation",
|
|
65636
66021
|
auth: "admin"
|
|
65637
66022
|
});
|
|
66023
|
+
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
65638
66024
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65639
|
-
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;
|
|
66025
|
+
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;
|
|
65640
66026
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65641
66027
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65642
66028
|
new Set(CAP_NAMES);
|
|
@@ -65689,7 +66075,7 @@ var AccessoryKind = {
|
|
|
65689
66075
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
65690
66076
|
};
|
|
65691
66077
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
65692
|
-
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;
|
|
66078
|
+
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;
|
|
65693
66079
|
new Set(Object.values(DeviceType));
|
|
65694
66080
|
Object.freeze({
|
|
65695
66081
|
"accessories.getStatus": {
|
|
@@ -68912,6 +69298,13 @@ Object.freeze({
|
|
|
68912
69298
|
access: "view",
|
|
68913
69299
|
role: "viewer"
|
|
68914
69300
|
},
|
|
69301
|
+
"groupActive.getStatus": {
|
|
69302
|
+
capName: "group-active",
|
|
69303
|
+
capScope: "device",
|
|
69304
|
+
addonId: null,
|
|
69305
|
+
access: "view",
|
|
69306
|
+
role: "viewer"
|
|
69307
|
+
},
|
|
68915
69308
|
"groupCommands.getStatus": {
|
|
68916
69309
|
capName: "group-commands",
|
|
68917
69310
|
capScope: "device",
|
|
@@ -69878,6 +70271,13 @@ Object.freeze({
|
|
|
69878
70271
|
access: "create",
|
|
69879
70272
|
role: "admin"
|
|
69880
70273
|
},
|
|
70274
|
+
"meter.getStatus": {
|
|
70275
|
+
capName: "meter",
|
|
70276
|
+
capScope: "device",
|
|
70277
|
+
addonId: null,
|
|
70278
|
+
access: "view",
|
|
70279
|
+
role: "viewer"
|
|
70280
|
+
},
|
|
69881
70281
|
"metricsProvider.collectSnapshot": {
|
|
69882
70282
|
capName: "metrics-provider",
|
|
69883
70283
|
capScope: "system",
|
|
@@ -77976,7 +78376,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77976
78376
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
77977
78377
|
icon: "square"
|
|
77978
78378
|
}
|
|
77979
|
-
}
|
|
78379
|
+
},
|
|
78380
|
+
overrides: { byType: {
|
|
78381
|
+
[DeviceType.Washer]: {
|
|
78382
|
+
state: { running: {
|
|
78383
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
78384
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
78385
|
+
} },
|
|
78386
|
+
events: {
|
|
78387
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
78388
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
78389
|
+
}
|
|
78390
|
+
},
|
|
78391
|
+
[DeviceType.Dryer]: {
|
|
78392
|
+
state: { running: {
|
|
78393
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
78394
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
78395
|
+
} },
|
|
78396
|
+
events: {
|
|
78397
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
78398
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
78399
|
+
}
|
|
78400
|
+
},
|
|
78401
|
+
[DeviceType.Dishwasher]: {
|
|
78402
|
+
state: { running: {
|
|
78403
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
78404
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
78405
|
+
} },
|
|
78406
|
+
events: {
|
|
78407
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
78408
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
78409
|
+
}
|
|
78410
|
+
}
|
|
78411
|
+
} }
|
|
77980
78412
|
},
|
|
77981
78413
|
update: {
|
|
77982
78414
|
scope: "device",
|
|
@@ -78748,6 +79180,10 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78748
79180
|
icon: "flame"
|
|
78749
79181
|
}]
|
|
78750
79182
|
},
|
|
79183
|
+
"group-active": {
|
|
79184
|
+
scope: "device",
|
|
79185
|
+
noun: t("Group state", "Stato del gruppo")
|
|
79186
|
+
},
|
|
78751
79187
|
"group-commands": {
|
|
78752
79188
|
scope: "device",
|
|
78753
79189
|
noun: t("Group command", "Comando di gruppo")
|
|
@@ -78804,6 +79240,17 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78804
79240
|
}],
|
|
78805
79241
|
events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
|
|
78806
79242
|
},
|
|
79243
|
+
meter: {
|
|
79244
|
+
scope: "device",
|
|
79245
|
+
noun: t("Meter", "Contatore"),
|
|
79246
|
+
state: [{
|
|
79247
|
+
kind: "numeric",
|
|
79248
|
+
field: "value",
|
|
79249
|
+
quantity: t("the total", "il totale"),
|
|
79250
|
+
label: t("Total", "Totale"),
|
|
79251
|
+
icon: "gauge"
|
|
79252
|
+
}]
|
|
79253
|
+
},
|
|
78807
79254
|
"numeric-sensor": {
|
|
78808
79255
|
scope: "device",
|
|
78809
79256
|
noun: t("Sensor", "Sensore"),
|
|
@@ -79276,8 +79723,72 @@ function projectAction(cap, action) {
|
|
|
79276
79723
|
};
|
|
79277
79724
|
}
|
|
79278
79725
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
79279
|
-
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;
|
|
79726
|
+
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;
|
|
79280
79727
|
DeviceFeature.BatteryOperated;
|
|
79728
|
+
/**
|
|
79729
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
79730
|
+
*
|
|
79731
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
79732
|
+
* travels is its power reading. The others have a laundry type that this
|
|
79733
|
+
* export cannot honour yet, so they are named and withheld.
|
|
79734
|
+
*/
|
|
79735
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
79736
|
+
DeviceType.Washer,
|
|
79737
|
+
DeviceType.Dryer,
|
|
79738
|
+
DeviceType.Dishwasher
|
|
79739
|
+
];
|
|
79740
|
+
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.";
|
|
79741
|
+
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.";
|
|
79742
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
79743
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
79744
|
+
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.";
|
|
79745
|
+
function withheld(reason) {
|
|
79746
|
+
return {
|
|
79747
|
+
[DeviceType.Washer]: {
|
|
79748
|
+
exported: false,
|
|
79749
|
+
reason
|
|
79750
|
+
},
|
|
79751
|
+
[DeviceType.Dryer]: {
|
|
79752
|
+
exported: false,
|
|
79753
|
+
reason
|
|
79754
|
+
},
|
|
79755
|
+
[DeviceType.Dishwasher]: {
|
|
79756
|
+
exported: false,
|
|
79757
|
+
reason
|
|
79758
|
+
}
|
|
79759
|
+
};
|
|
79760
|
+
}
|
|
79761
|
+
function offered(received) {
|
|
79762
|
+
return {
|
|
79763
|
+
[DeviceType.Washer]: {
|
|
79764
|
+
exported: true,
|
|
79765
|
+
as: received
|
|
79766
|
+
},
|
|
79767
|
+
[DeviceType.Dryer]: {
|
|
79768
|
+
exported: true,
|
|
79769
|
+
as: received
|
|
79770
|
+
},
|
|
79771
|
+
[DeviceType.Dishwasher]: {
|
|
79772
|
+
exported: true,
|
|
79773
|
+
as: received
|
|
79774
|
+
}
|
|
79775
|
+
};
|
|
79776
|
+
}
|
|
79777
|
+
var APPLIANCE_EXPORT = {
|
|
79778
|
+
ha: offered(HA_AS),
|
|
79779
|
+
homekit: withheld(HOMEKIT_REASON),
|
|
79780
|
+
alexa: withheld(ALEXA_REASON),
|
|
79781
|
+
google: withheld(GOOGLE_REASON),
|
|
79782
|
+
matter: withheld(MATTER_REASON)
|
|
79783
|
+
};
|
|
79784
|
+
function isPlugApplianceType(deviceType) {
|
|
79785
|
+
return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
|
|
79786
|
+
}
|
|
79787
|
+
/** The decision for this ecosystem, or null when the type is not an appliance. */
|
|
79788
|
+
function applianceExport(ecosystem, deviceType) {
|
|
79789
|
+
if (!isPlugApplianceType(deviceType)) return null;
|
|
79790
|
+
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
79791
|
+
}
|
|
79281
79792
|
Object.freeze({
|
|
79282
79793
|
"accessories.getStatus": [{
|
|
79283
79794
|
name: "deviceId",
|
|
@@ -80244,6 +80755,11 @@ Object.freeze({
|
|
|
80244
80755
|
form: "single",
|
|
80245
80756
|
optional: false
|
|
80246
80757
|
}],
|
|
80758
|
+
"groupActive.getStatus": [{
|
|
80759
|
+
name: "deviceId",
|
|
80760
|
+
form: "single",
|
|
80761
|
+
optional: false
|
|
80762
|
+
}],
|
|
80247
80763
|
"groupCommands.getStatus": [{
|
|
80248
80764
|
name: "deviceId",
|
|
80249
80765
|
form: "single",
|
|
@@ -80454,6 +80970,11 @@ Object.freeze({
|
|
|
80454
80970
|
form: "single",
|
|
80455
80971
|
optional: false
|
|
80456
80972
|
}],
|
|
80973
|
+
"meter.getStatus": [{
|
|
80974
|
+
name: "deviceId",
|
|
80975
|
+
form: "single",
|
|
80976
|
+
optional: false
|
|
80977
|
+
}],
|
|
80457
80978
|
"motion.getStatus": [{
|
|
80458
80979
|
name: "deviceId",
|
|
80459
80980
|
form: "single",
|
|
@@ -82061,7 +82582,6 @@ Object.freeze({
|
|
|
82061
82582
|
"network-access": "ingress",
|
|
82062
82583
|
"smtp-provider": "email"
|
|
82063
82584
|
});
|
|
82064
|
-
DeviceType.Camera;
|
|
82065
82585
|
/**
|
|
82066
82586
|
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
82067
82587
|
* `z.infer`, they do not restate the shape.
|
|
@@ -83471,7 +83991,7 @@ var MB = 1024 * 1024;
|
|
|
83471
83991
|
//#endregion
|
|
83472
83992
|
//#region src/custom-actions.ts
|
|
83473
83993
|
/**
|
|
83474
|
-
* Alexa
|
|
83994
|
+
* Alexa Export — customActions catalog.
|
|
83475
83995
|
*
|
|
83476
83996
|
* The settings page drives these through
|
|
83477
83997
|
* `api.addons.custom.{query,mutate}({ addonId, action, input })`: every action
|
|
@@ -86233,6 +86753,12 @@ function switchCategory(device) {
|
|
|
86233
86753
|
}
|
|
86234
86754
|
//#endregion
|
|
86235
86755
|
//#region src/endpoints/adapters/index.ts
|
|
86756
|
+
/**
|
|
86757
|
+
* The adapter registry (D869): the ONE list Discovery, ReportState,
|
|
86758
|
+
* ChangeReport, the reconcile, the directive router and the validator read.
|
|
86759
|
+
* Adding a cap to Alexa is adding its adapter here — in order: the first
|
|
86760
|
+
* adapter with a category decides the endpoint's display category.
|
|
86761
|
+
*/
|
|
86236
86762
|
var GENERIC_ADAPTERS = [
|
|
86237
86763
|
lockAdapter,
|
|
86238
86764
|
contactAdapter,
|
|
@@ -86319,6 +86845,11 @@ function capabilityKey$2(c) {
|
|
|
86319
86845
|
}
|
|
86320
86846
|
/** What a device becomes, folding every applicable adapter in registry order. */
|
|
86321
86847
|
function planGenericDevice(device) {
|
|
86848
|
+
const withheld = applianceExport("alexa", device.type);
|
|
86849
|
+
if (withheld !== null && !withheld.exported) return {
|
|
86850
|
+
kind: "skip",
|
|
86851
|
+
reasons: [withheld.reason]
|
|
86852
|
+
};
|
|
86322
86853
|
const capabilities = [BASE];
|
|
86323
86854
|
const seen = /* @__PURE__ */ new Set();
|
|
86324
86855
|
const reasons = [];
|