@camstack/addon-export-google 0.1.115 → 0.1.117
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 +16 -1
- package/README.md +17 -10
- package/dist/export-google.addon.js +1237 -239
- package/dist/export-google.addon.mjs +1237 -239
- package/package.json +4 -4
|
@@ -14,7 +14,7 @@ async function dispatchCapCall(api, call) {
|
|
|
14
14
|
case "brightness.setBrightness":
|
|
15
15
|
await api.brightness.setBrightness.mutate({
|
|
16
16
|
deviceId: call.deviceId,
|
|
17
|
-
|
|
17
|
+
level: call.percentage
|
|
18
18
|
});
|
|
19
19
|
return;
|
|
20
20
|
case "lockControl.lock":
|
|
@@ -77,7 +77,7 @@ function createApiDeviceGateway(deps) {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region ../types/dist/event-category-
|
|
80
|
+
//#region ../types/dist/event-category-DmZDPDf_.mjs
|
|
81
81
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
82
82
|
EventCategory["SystemBoot"] = "system.boot";
|
|
83
83
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -704,7 +704,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
704
704
|
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
705
705
|
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
706
706
|
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
707
|
-
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
707
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
|
|
708
708
|
*/
|
|
709
709
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
710
710
|
/**
|
|
@@ -842,6 +842,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
842
842
|
*/
|
|
843
843
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
844
844
|
/**
|
|
845
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
846
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
847
|
+
*/
|
|
848
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
849
|
+
/**
|
|
845
850
|
* Progress update from a running model conversion job.
|
|
846
851
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
847
852
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5520,7 +5525,7 @@ var ZodIssueCode = {
|
|
|
5520
5525
|
var ZodFirstPartyTypeKind;
|
|
5521
5526
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5522
5527
|
//#endregion
|
|
5523
|
-
//#region ../types/dist/sleep-
|
|
5528
|
+
//#region ../types/dist/sleep-Crlmu_tO.mjs
|
|
5524
5529
|
/**
|
|
5525
5530
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5526
5531
|
* window to float samples (D455).
|
|
@@ -8591,6 +8596,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8591
8596
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8592
8597
|
var CAP_NAMES = Object.freeze([
|
|
8593
8598
|
"accessories",
|
|
8599
|
+
"action-source",
|
|
8600
|
+
"actions",
|
|
8594
8601
|
"addon-pages",
|
|
8595
8602
|
"addon-pages-source",
|
|
8596
8603
|
"addon-routes",
|
|
@@ -8664,6 +8671,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8664
8671
|
"filesystem-browse",
|
|
8665
8672
|
"flood",
|
|
8666
8673
|
"gas",
|
|
8674
|
+
"group-active",
|
|
8667
8675
|
"group-commands",
|
|
8668
8676
|
"group-status",
|
|
8669
8677
|
"heating-valve",
|
|
@@ -8686,6 +8694,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
8686
8694
|
"login-method",
|
|
8687
8695
|
"media-player",
|
|
8688
8696
|
"mesh-network",
|
|
8697
|
+
"meter",
|
|
8689
8698
|
"metrics-provider",
|
|
8690
8699
|
"model-convert",
|
|
8691
8700
|
"model-distributor",
|
|
@@ -8777,11 +8786,11 @@ var CAP_NAMES = Object.freeze([
|
|
|
8777
8786
|
Object.freeze({
|
|
8778
8787
|
"air-quality-sensor": [
|
|
8779
8788
|
{
|
|
8780
|
-
"path": "
|
|
8789
|
+
"path": "co2",
|
|
8781
8790
|
"valueType": "number"
|
|
8782
8791
|
},
|
|
8783
8792
|
{
|
|
8784
|
-
"path": "
|
|
8793
|
+
"path": "voc",
|
|
8785
8794
|
"valueType": "number"
|
|
8786
8795
|
},
|
|
8787
8796
|
{
|
|
@@ -8831,7 +8840,7 @@ Object.freeze({
|
|
|
8831
8840
|
}
|
|
8832
8841
|
],
|
|
8833
8842
|
"ambient-light-sensor": [{
|
|
8834
|
-
"path": "
|
|
8843
|
+
"path": "illuminance",
|
|
8835
8844
|
"valueType": "number"
|
|
8836
8845
|
}],
|
|
8837
8846
|
"audio-metrics": [
|
|
@@ -8892,7 +8901,7 @@ Object.freeze({
|
|
|
8892
8901
|
],
|
|
8893
8902
|
"battery": [
|
|
8894
8903
|
{
|
|
8895
|
-
"path": "
|
|
8904
|
+
"path": "level",
|
|
8896
8905
|
"valueType": "number"
|
|
8897
8906
|
},
|
|
8898
8907
|
{
|
|
@@ -8914,7 +8923,7 @@ Object.freeze({
|
|
|
8914
8923
|
"valueType": "number"
|
|
8915
8924
|
},
|
|
8916
8925
|
{
|
|
8917
|
-
"path": "
|
|
8926
|
+
"path": "voltage",
|
|
8918
8927
|
"valueType": "number"
|
|
8919
8928
|
},
|
|
8920
8929
|
{
|
|
@@ -8935,7 +8944,7 @@ Object.freeze({
|
|
|
8935
8944
|
"valueType": "boolean"
|
|
8936
8945
|
}],
|
|
8937
8946
|
"brightness": [{
|
|
8938
|
-
"path": "
|
|
8947
|
+
"path": "level",
|
|
8939
8948
|
"valueType": "number"
|
|
8940
8949
|
}],
|
|
8941
8950
|
"broker": [{
|
|
@@ -9136,7 +9145,7 @@ Object.freeze({
|
|
|
9136
9145
|
"valueType": "number"
|
|
9137
9146
|
},
|
|
9138
9147
|
{
|
|
9139
|
-
"path": "
|
|
9148
|
+
"path": "colorTemperature",
|
|
9140
9149
|
"valueType": "number"
|
|
9141
9150
|
}
|
|
9142
9151
|
],
|
|
@@ -9315,15 +9324,15 @@ Object.freeze({
|
|
|
9315
9324
|
"valueType": "string"
|
|
9316
9325
|
},
|
|
9317
9326
|
{
|
|
9318
|
-
"path": "
|
|
9327
|
+
"path": "remaining",
|
|
9319
9328
|
"valueType": "number"
|
|
9320
9329
|
},
|
|
9321
9330
|
{
|
|
9322
|
-
"path": "
|
|
9331
|
+
"path": "delayedStart",
|
|
9323
9332
|
"valueType": "number"
|
|
9324
9333
|
},
|
|
9325
9334
|
{
|
|
9326
|
-
"path": "
|
|
9335
|
+
"path": "progress",
|
|
9327
9336
|
"valueType": "number"
|
|
9328
9337
|
},
|
|
9329
9338
|
{
|
|
@@ -9437,7 +9446,7 @@ Object.freeze({
|
|
|
9437
9446
|
],
|
|
9438
9447
|
"fan-control": [
|
|
9439
9448
|
{
|
|
9440
|
-
"path": "
|
|
9449
|
+
"path": "speed",
|
|
9441
9450
|
"valueType": "number"
|
|
9442
9451
|
},
|
|
9443
9452
|
{
|
|
@@ -9484,6 +9493,10 @@ Object.freeze({
|
|
|
9484
9493
|
"path": "detected",
|
|
9485
9494
|
"valueType": "boolean"
|
|
9486
9495
|
}],
|
|
9496
|
+
"group-active": [{
|
|
9497
|
+
"path": "active",
|
|
9498
|
+
"valueType": "boolean"
|
|
9499
|
+
}],
|
|
9487
9500
|
"group-status": [
|
|
9488
9501
|
{
|
|
9489
9502
|
"path": "included",
|
|
@@ -9533,7 +9546,7 @@ Object.freeze({
|
|
|
9533
9546
|
}
|
|
9534
9547
|
],
|
|
9535
9548
|
"humidity-sensor": [{
|
|
9536
|
-
"path": "
|
|
9549
|
+
"path": "humidity",
|
|
9537
9550
|
"valueType": "number"
|
|
9538
9551
|
}],
|
|
9539
9552
|
"image": [{
|
|
@@ -9643,7 +9656,7 @@ Object.freeze({
|
|
|
9643
9656
|
"valueType": "number"
|
|
9644
9657
|
},
|
|
9645
9658
|
{
|
|
9646
|
-
"path": "
|
|
9659
|
+
"path": "progress",
|
|
9647
9660
|
"valueType": "number"
|
|
9648
9661
|
},
|
|
9649
9662
|
{
|
|
@@ -9722,11 +9735,11 @@ Object.freeze({
|
|
|
9722
9735
|
"valueType": "string"
|
|
9723
9736
|
},
|
|
9724
9737
|
{
|
|
9725
|
-
"path": "
|
|
9738
|
+
"path": "position",
|
|
9726
9739
|
"valueType": "number"
|
|
9727
9740
|
},
|
|
9728
9741
|
{
|
|
9729
|
-
"path": "
|
|
9742
|
+
"path": "duration",
|
|
9730
9743
|
"valueType": "number"
|
|
9731
9744
|
},
|
|
9732
9745
|
{
|
|
@@ -9743,6 +9756,10 @@ Object.freeze({
|
|
|
9743
9756
|
]
|
|
9744
9757
|
}
|
|
9745
9758
|
],
|
|
9759
|
+
"meter": [{
|
|
9760
|
+
"path": "value",
|
|
9761
|
+
"valueType": "number"
|
|
9762
|
+
}],
|
|
9746
9763
|
"motion": [
|
|
9747
9764
|
{
|
|
9748
9765
|
"path": "detected",
|
|
@@ -9824,11 +9841,11 @@ Object.freeze({
|
|
|
9824
9841
|
]
|
|
9825
9842
|
},
|
|
9826
9843
|
{
|
|
9827
|
-
"path": "
|
|
9844
|
+
"path": "signal",
|
|
9828
9845
|
"valueType": "number"
|
|
9829
9846
|
},
|
|
9830
9847
|
{
|
|
9831
|
-
"path": "
|
|
9848
|
+
"path": "rssi",
|
|
9832
9849
|
"valueType": "number"
|
|
9833
9850
|
},
|
|
9834
9851
|
{
|
|
@@ -9883,6 +9900,18 @@ Object.freeze({
|
|
|
9883
9900
|
"path": "foodLevel",
|
|
9884
9901
|
"valueType": "number"
|
|
9885
9902
|
},
|
|
9903
|
+
{
|
|
9904
|
+
"path": "bowlFood",
|
|
9905
|
+
"valueType": "number"
|
|
9906
|
+
},
|
|
9907
|
+
{
|
|
9908
|
+
"path": "eating",
|
|
9909
|
+
"valueType": "boolean"
|
|
9910
|
+
},
|
|
9911
|
+
{
|
|
9912
|
+
"path": "supportsMarkRefilled",
|
|
9913
|
+
"valueType": "boolean"
|
|
9914
|
+
},
|
|
9886
9915
|
{
|
|
9887
9916
|
"path": "food1",
|
|
9888
9917
|
"valueType": "number"
|
|
@@ -9947,23 +9976,23 @@ Object.freeze({
|
|
|
9947
9976
|
],
|
|
9948
9977
|
"power-meter": [
|
|
9949
9978
|
{
|
|
9950
|
-
"path": "
|
|
9979
|
+
"path": "power",
|
|
9951
9980
|
"valueType": "number"
|
|
9952
9981
|
},
|
|
9953
9982
|
{
|
|
9954
|
-
"path": "
|
|
9983
|
+
"path": "energy",
|
|
9955
9984
|
"valueType": "number"
|
|
9956
9985
|
},
|
|
9957
9986
|
{
|
|
9958
|
-
"path": "
|
|
9987
|
+
"path": "voltage",
|
|
9959
9988
|
"valueType": "number"
|
|
9960
9989
|
},
|
|
9961
9990
|
{
|
|
9962
|
-
"path": "
|
|
9991
|
+
"path": "current",
|
|
9963
9992
|
"valueType": "number"
|
|
9964
9993
|
},
|
|
9965
9994
|
{
|
|
9966
|
-
"path": "
|
|
9995
|
+
"path": "apparentPower",
|
|
9967
9996
|
"valueType": "number"
|
|
9968
9997
|
},
|
|
9969
9998
|
{
|
|
@@ -9991,14 +10020,10 @@ Object.freeze({
|
|
|
9991
10020
|
{
|
|
9992
10021
|
"path": "gps.accuracyMeters",
|
|
9993
10022
|
"valueType": "number"
|
|
9994
|
-
},
|
|
9995
|
-
{
|
|
9996
|
-
"path": "batteryPercent",
|
|
9997
|
-
"valueType": "number"
|
|
9998
10023
|
}
|
|
9999
10024
|
],
|
|
10000
10025
|
"pressure-sensor": [{
|
|
10001
|
-
"path": "
|
|
10026
|
+
"path": "pressure",
|
|
10002
10027
|
"valueType": "number"
|
|
10003
10028
|
}],
|
|
10004
10029
|
"privacy-mask": [{
|
|
@@ -10312,7 +10337,7 @@ Object.freeze({
|
|
|
10312
10337
|
"valueType": "boolean"
|
|
10313
10338
|
}],
|
|
10314
10339
|
"temperature-sensor": [{
|
|
10315
|
-
"path": "
|
|
10340
|
+
"path": "temperature",
|
|
10316
10341
|
"valueType": "number"
|
|
10317
10342
|
}],
|
|
10318
10343
|
"update": [
|
|
@@ -10360,7 +10385,7 @@ Object.freeze({
|
|
|
10360
10385
|
"valueType": "string"
|
|
10361
10386
|
},
|
|
10362
10387
|
{
|
|
10363
|
-
"path": "
|
|
10388
|
+
"path": "progress",
|
|
10364
10389
|
"valueType": "number"
|
|
10365
10390
|
},
|
|
10366
10391
|
{
|
|
@@ -10845,7 +10870,7 @@ function errMsg(err) {
|
|
|
10845
10870
|
return String(err);
|
|
10846
10871
|
}
|
|
10847
10872
|
//#endregion
|
|
10848
|
-
//#region ../types/dist/composition-
|
|
10873
|
+
//#region ../types/dist/composition-CZImLpOI.mjs
|
|
10849
10874
|
/**
|
|
10850
10875
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10851
10876
|
*
|
|
@@ -11160,6 +11185,13 @@ var table = {
|
|
|
11160
11185
|
apply: () => {
|
|
11161
11186
|
throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
|
|
11162
11187
|
}
|
|
11188
|
+
},
|
|
11189
|
+
schmitt: {
|
|
11190
|
+
minArgs: 3,
|
|
11191
|
+
maxArgs: 5,
|
|
11192
|
+
apply: () => {
|
|
11193
|
+
throw new ExpressionEvalError("schmitt: stateful evaluation context is required");
|
|
11194
|
+
}
|
|
11163
11195
|
}
|
|
11164
11196
|
};
|
|
11165
11197
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -11621,6 +11653,79 @@ var APPLIANCE_KINDS = [
|
|
|
11621
11653
|
];
|
|
11622
11654
|
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
11623
11655
|
/**
|
|
11656
|
+
* Statistics and integrals over a history read (D944).
|
|
11657
|
+
*
|
|
11658
|
+
* Pure: the same points always give the same answer, so a restart recomputes
|
|
11659
|
+
* rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
|
|
11660
|
+
* never the mean of the samples. A hole with no held value is not integrated
|
|
11661
|
+
* as zero. A truncated read is not published.
|
|
11662
|
+
*/
|
|
11663
|
+
var STATISTIC_STATS = [
|
|
11664
|
+
"min",
|
|
11665
|
+
"max",
|
|
11666
|
+
"mean",
|
|
11667
|
+
"sum",
|
|
11668
|
+
"count",
|
|
11669
|
+
"change"
|
|
11670
|
+
];
|
|
11671
|
+
/**
|
|
11672
|
+
* The range a statistics or integral helper asks history for (D944).
|
|
11673
|
+
*
|
|
11674
|
+
* Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
|
|
11675
|
+
* or 25 hours across a DST change. A tier is eligible only when its retention
|
|
11676
|
+
* is strictly longer than the longest that range can be. Forever qualifies.
|
|
11677
|
+
* Equal to a tier's retention is a refusal, not a short answer.
|
|
11678
|
+
*/
|
|
11679
|
+
var MINUTE_MS = 6e4;
|
|
11680
|
+
var HOUR_MS = 60 * MINUTE_MS;
|
|
11681
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
11682
|
+
var ROLLING_SPANS = [
|
|
11683
|
+
"1h",
|
|
11684
|
+
"24h",
|
|
11685
|
+
"2d",
|
|
11686
|
+
"7d",
|
|
11687
|
+
"30d",
|
|
11688
|
+
"custom"
|
|
11689
|
+
];
|
|
11690
|
+
var CALENDAR_PERIODS = [
|
|
11691
|
+
"today",
|
|
11692
|
+
"yesterday",
|
|
11693
|
+
"this-week",
|
|
11694
|
+
"this-month"
|
|
11695
|
+
];
|
|
11696
|
+
var RESET_PERIODS = [
|
|
11697
|
+
"never",
|
|
11698
|
+
"daily",
|
|
11699
|
+
"weekly",
|
|
11700
|
+
"monthly"
|
|
11701
|
+
];
|
|
11702
|
+
5 * MINUTE_MS;
|
|
11703
|
+
24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
|
|
11704
|
+
7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
|
|
11705
|
+
var rollingWindowObject = object({
|
|
11706
|
+
kind: literal("rolling"),
|
|
11707
|
+
span: _enum(ROLLING_SPANS),
|
|
11708
|
+
customMinutes: number().int().min(5).optional()
|
|
11709
|
+
}).check((payload) => {
|
|
11710
|
+
if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
|
|
11711
|
+
code: "custom",
|
|
11712
|
+
message: "a custom range needs a duration in minutes",
|
|
11713
|
+
path: ["customMinutes"],
|
|
11714
|
+
input: payload.value
|
|
11715
|
+
});
|
|
11716
|
+
if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
|
|
11717
|
+
code: "custom",
|
|
11718
|
+
message: "only a custom range carries a duration",
|
|
11719
|
+
path: ["customMinutes"],
|
|
11720
|
+
input: payload.value
|
|
11721
|
+
});
|
|
11722
|
+
});
|
|
11723
|
+
var RollingWindowSchema = rollingWindowObject;
|
|
11724
|
+
var StatisticWindowSchema = discriminatedUnion("kind", [rollingWindowObject, object({
|
|
11725
|
+
kind: literal("calendar"),
|
|
11726
|
+
period: _enum(CALENDAR_PERIODS)
|
|
11727
|
+
})]);
|
|
11728
|
+
/**
|
|
11624
11729
|
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11625
11730
|
* id. Split out so helper schemas can name it without a cycle through
|
|
11626
11731
|
* `composition.ts` (D659).
|
|
@@ -11646,7 +11751,13 @@ var GROUP_TEMPLATE_IDS = [
|
|
|
11646
11751
|
"occupancy",
|
|
11647
11752
|
"binary",
|
|
11648
11753
|
"switch",
|
|
11649
|
-
"light"
|
|
11754
|
+
"light",
|
|
11755
|
+
"fan",
|
|
11756
|
+
"cover",
|
|
11757
|
+
"valve",
|
|
11758
|
+
"lock",
|
|
11759
|
+
"media-player",
|
|
11760
|
+
"climate"
|
|
11650
11761
|
];
|
|
11651
11762
|
var NUMERIC_AGGREGATES = [
|
|
11652
11763
|
"mean",
|
|
@@ -11676,22 +11787,73 @@ var HelperMemberSchema = object({
|
|
|
11676
11787
|
cap: string().min(1),
|
|
11677
11788
|
fieldPath: string().min(1)
|
|
11678
11789
|
});
|
|
11679
|
-
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11790
|
+
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
11791
|
+
object({
|
|
11792
|
+
kind: literal("group"),
|
|
11793
|
+
templateId: GroupTemplateIdSchema,
|
|
11794
|
+
aggregate: AggregateReducerSchema,
|
|
11795
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
11796
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
11797
|
+
active: ActiveCriterionSchema.optional()
|
|
11798
|
+
}),
|
|
11799
|
+
object({
|
|
11800
|
+
kind: literal("appliance"),
|
|
11801
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
11802
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
11803
|
+
thresholdWatts: number().positive(),
|
|
11804
|
+
startDwellMs: number().int().nonnegative(),
|
|
11805
|
+
stopDwellMs: number().int().nonnegative(),
|
|
11806
|
+
member: HelperMemberSchema
|
|
11807
|
+
}),
|
|
11808
|
+
object({
|
|
11809
|
+
kind: literal("statistic"),
|
|
11810
|
+
stat: _enum(STATISTIC_STATS),
|
|
11811
|
+
window: StatisticWindowSchema,
|
|
11812
|
+
source: HelperMemberSchema
|
|
11813
|
+
}),
|
|
11814
|
+
object({
|
|
11815
|
+
kind: literal("integral"),
|
|
11816
|
+
reset: _enum(RESET_PERIODS),
|
|
11817
|
+
output: _enum(["energy", "meter"]),
|
|
11818
|
+
source: HelperMemberSchema
|
|
11819
|
+
}),
|
|
11820
|
+
object({
|
|
11821
|
+
kind: literal("threshold"),
|
|
11822
|
+
source: HelperMemberSchema,
|
|
11823
|
+
high: number(),
|
|
11824
|
+
low: number(),
|
|
11825
|
+
onForMs: number().int().nonnegative(),
|
|
11826
|
+
offForMs: number().int().nonnegative()
|
|
11827
|
+
}),
|
|
11828
|
+
object({
|
|
11829
|
+
kind: literal("arithmetic"),
|
|
11830
|
+
op: _enum([
|
|
11831
|
+
"sum",
|
|
11832
|
+
"difference",
|
|
11833
|
+
"ratio"
|
|
11834
|
+
]),
|
|
11835
|
+
inputs: array(HelperMemberSchema).min(2).max(64)
|
|
11836
|
+
}),
|
|
11837
|
+
object({
|
|
11838
|
+
kind: literal("expression"),
|
|
11839
|
+
expr: string().min(1),
|
|
11840
|
+
inputs: array(object({
|
|
11841
|
+
name: string().min(1),
|
|
11842
|
+
member: HelperMemberSchema
|
|
11843
|
+
})).min(1).max(64),
|
|
11844
|
+
output: _enum(["number", "boolean"])
|
|
11845
|
+
}),
|
|
11846
|
+
object({
|
|
11847
|
+
kind: literal("derivative"),
|
|
11848
|
+
window: RollingWindowSchema,
|
|
11849
|
+
per: _enum([
|
|
11850
|
+
"second",
|
|
11851
|
+
"minute",
|
|
11852
|
+
"hour"
|
|
11853
|
+
]),
|
|
11854
|
+
source: HelperMemberSchema
|
|
11855
|
+
})
|
|
11856
|
+
]);
|
|
11695
11857
|
/** A composed device's stableId is this prefix plus the block id. */
|
|
11696
11858
|
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
11697
11859
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
@@ -11752,6 +11914,12 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11752
11914
|
"all"
|
|
11753
11915
|
]),
|
|
11754
11916
|
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
11917
|
+
/**
|
|
11918
|
+
* Set when the reads are an enum state, not a yes/no: the listed states
|
|
11919
|
+
* count as active (a cover is `open`). A state outside the list is inactive;
|
|
11920
|
+
* a read that is not a state at all is left out. Only `any` / `all` use it.
|
|
11921
|
+
*/
|
|
11922
|
+
activeWhen: array(string().min(1)).min(1).optional(),
|
|
11755
11923
|
/** `value` is the reading; the others are the member counts. */
|
|
11756
11924
|
publish: _enum([
|
|
11757
11925
|
"value",
|
|
@@ -11765,6 +11933,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
|
11765
11933
|
"omit",
|
|
11766
11934
|
"offline"
|
|
11767
11935
|
])
|
|
11936
|
+
}),
|
|
11937
|
+
object({
|
|
11938
|
+
kind: literal("series"),
|
|
11939
|
+
read: CompositionFieldReadSchema,
|
|
11940
|
+
/** `value` is the statistic or the integral. The others are the gap counts. */
|
|
11941
|
+
publish: _enum([
|
|
11942
|
+
"value",
|
|
11943
|
+
"included",
|
|
11944
|
+
"excluded",
|
|
11945
|
+
"total"
|
|
11946
|
+
]),
|
|
11947
|
+
/**
|
|
11948
|
+
* What an unanswered `value` does. Counts ignore this. `offline` leaves the
|
|
11949
|
+
* device unseeded until history answers, so a restart cannot publish 0.
|
|
11950
|
+
*/
|
|
11951
|
+
empty: _enum([
|
|
11952
|
+
"null",
|
|
11953
|
+
"omit",
|
|
11954
|
+
"offline"
|
|
11955
|
+
])
|
|
11768
11956
|
})
|
|
11769
11957
|
]);
|
|
11770
11958
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
@@ -15326,6 +15514,14 @@ var AutomationConditionLeafSchema = object({
|
|
|
15326
15514
|
array(union([string(), number()]))
|
|
15327
15515
|
])
|
|
15328
15516
|
});
|
|
15517
|
+
var AutomationConditionStationaryPresentSchema = object({
|
|
15518
|
+
kind: literal("stationary-present"),
|
|
15519
|
+
deviceId: number().int().nonnegative(),
|
|
15520
|
+
/** Class names; a macro class matches every raw class that maps to it. */
|
|
15521
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15522
|
+
/** The parked object must be in at least one of these zones. */
|
|
15523
|
+
zones: array(string().min(1)).min(1).optional()
|
|
15524
|
+
});
|
|
15329
15525
|
/**
|
|
15330
15526
|
* The expression leaf, declared as a plain object rather than an intersection
|
|
15331
15527
|
* with {@link ExpressionSourceSchema}: a discriminated union has to be able to
|
|
@@ -15359,7 +15555,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
|
|
|
15359
15555
|
child: AutomationConditionSchema
|
|
15360
15556
|
}),
|
|
15361
15557
|
AutomationConditionLeafSchema,
|
|
15362
|
-
AutomationConditionExpressionSchema
|
|
15558
|
+
AutomationConditionExpressionSchema,
|
|
15559
|
+
AutomationConditionStationaryPresentSchema
|
|
15363
15560
|
]));
|
|
15364
15561
|
/**
|
|
15365
15562
|
* What starts a run.
|
|
@@ -15400,7 +15597,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15400
15597
|
kind: literal("schedule"),
|
|
15401
15598
|
cron: string().min(1).max(120)
|
|
15402
15599
|
}),
|
|
15403
|
-
object({ kind: literal("manual") })
|
|
15600
|
+
object({ kind: literal("manual") }),
|
|
15601
|
+
object({
|
|
15602
|
+
kind: literal("detection"),
|
|
15603
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15604
|
+
* matches every raw class that maps to it; any other name matches
|
|
15605
|
+
* exactly. */
|
|
15606
|
+
classes: array(string().min(1)).min(1),
|
|
15607
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15608
|
+
/** The track must have visited at least one of these zones. */
|
|
15609
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15610
|
+
/** Best-so-far confidence the track must reach. */
|
|
15611
|
+
minScore: number().min(0).max(1).optional()
|
|
15612
|
+
}),
|
|
15613
|
+
object({
|
|
15614
|
+
kind: literal("stationary"),
|
|
15615
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15616
|
+
/** Class names; a macro class matches like the detection trigger. */
|
|
15617
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15618
|
+
/** The parked object must be in at least one of these zones. */
|
|
15619
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15620
|
+
/** `appeared`: it became parked. `departed`: the registry retired it.
|
|
15621
|
+
* The vocabulary of `PipelineAnalyticsStationaryChanged`. */
|
|
15622
|
+
phase: _enum(["appeared", "departed"])
|
|
15623
|
+
}),
|
|
15624
|
+
object({
|
|
15625
|
+
kind: literal("interval"),
|
|
15626
|
+
minutes: number().int().min(1).max(1440)
|
|
15627
|
+
})
|
|
15404
15628
|
]);
|
|
15405
15629
|
/**
|
|
15406
15630
|
* One action step.
|
|
@@ -15420,28 +15644,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15420
15644
|
* is called. The runner still receives a number and is untouched; the
|
|
15421
15645
|
* resolution is the recipe's job, not the runner's.
|
|
15422
15646
|
*/
|
|
15647
|
+
var AutomationWaitStepSchema = object({
|
|
15648
|
+
kind: literal("wait"),
|
|
15649
|
+
seconds: number().min(0).max(300)
|
|
15650
|
+
});
|
|
15651
|
+
var AutomationCapStepSchema = object({
|
|
15652
|
+
kind: literal("cap"),
|
|
15653
|
+
/**
|
|
15654
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15655
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15656
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15657
|
+
*/
|
|
15658
|
+
deviceId: union([
|
|
15659
|
+
number().int(),
|
|
15660
|
+
array(number().int()).min(1),
|
|
15661
|
+
object({ $var: string().min(1) })
|
|
15662
|
+
]),
|
|
15663
|
+
cap: string().min(1),
|
|
15664
|
+
method: string().min(1),
|
|
15665
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15666
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15667
|
+
* the expression leaf. */
|
|
15668
|
+
args: record(string(), unknown()).optional()
|
|
15669
|
+
});
|
|
15670
|
+
/**
|
|
15671
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15672
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15673
|
+
*/
|
|
15674
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15423
15675
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15676
|
+
AutomationWaitStepSchema,
|
|
15677
|
+
AutomationCapStepSchema,
|
|
15424
15678
|
object({
|
|
15425
|
-
kind: literal("
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
*/
|
|
15435
|
-
deviceId: union([
|
|
15436
|
-
number().int(),
|
|
15437
|
-
array(number().int()).min(1),
|
|
15438
|
-
object({ $var: string().min(1) })
|
|
15439
|
-
]),
|
|
15440
|
-
cap: string().min(1),
|
|
15441
|
-
method: string().min(1),
|
|
15442
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15443
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15444
|
-
args: record(string(), unknown()).optional()
|
|
15679
|
+
kind: literal("action"),
|
|
15680
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15681
|
+
actionId: string().min(1),
|
|
15682
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15683
|
+
variables: record(string(), union([
|
|
15684
|
+
string(),
|
|
15685
|
+
number(),
|
|
15686
|
+
boolean()
|
|
15687
|
+
])).optional()
|
|
15445
15688
|
}),
|
|
15446
15689
|
object({
|
|
15447
15690
|
kind: literal("code"),
|
|
@@ -15450,10 +15693,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15450
15693
|
code: string().min(1).max(2e4)
|
|
15451
15694
|
})
|
|
15452
15695
|
]);
|
|
15696
|
+
/**
|
|
15697
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15698
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15699
|
+
* actions. Absent means `single`.
|
|
15700
|
+
*
|
|
15701
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15702
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15703
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15704
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15705
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15706
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15707
|
+
* wait, never the single/queued limits.
|
|
15708
|
+
*/
|
|
15709
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15710
|
+
object({ mode: literal("single") }),
|
|
15711
|
+
object({ mode: literal("restart") }),
|
|
15712
|
+
object({
|
|
15713
|
+
mode: literal("queued"),
|
|
15714
|
+
max: number().int().min(1).max(10)
|
|
15715
|
+
}),
|
|
15716
|
+
object({
|
|
15717
|
+
mode: literal("parallel"),
|
|
15718
|
+
max: number().int().min(1).max(10)
|
|
15719
|
+
}),
|
|
15720
|
+
object({
|
|
15721
|
+
mode: literal("cooldown"),
|
|
15722
|
+
minutes: number().int().min(1).max(1440)
|
|
15723
|
+
})
|
|
15724
|
+
]);
|
|
15453
15725
|
var AutomationRecipeSchema = object({
|
|
15454
15726
|
triggers: array(AutomationTriggerSchema),
|
|
15455
15727
|
conditions: AutomationConditionSchema.optional(),
|
|
15456
|
-
actions: array(AutomationActionSchema)
|
|
15728
|
+
actions: array(AutomationActionSchema),
|
|
15729
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15730
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15731
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15732
|
+
});
|
|
15733
|
+
new Set([
|
|
15734
|
+
{
|
|
15735
|
+
id: "person",
|
|
15736
|
+
name: "Person"
|
|
15737
|
+
},
|
|
15738
|
+
{
|
|
15739
|
+
id: "vehicle",
|
|
15740
|
+
name: "Vehicle"
|
|
15741
|
+
},
|
|
15742
|
+
{
|
|
15743
|
+
id: "animal",
|
|
15744
|
+
name: "Animal"
|
|
15745
|
+
},
|
|
15746
|
+
{
|
|
15747
|
+
id: "package",
|
|
15748
|
+
name: "Package"
|
|
15749
|
+
}
|
|
15750
|
+
].map((l) => l.id));
|
|
15751
|
+
var COCO_TO_MACRO = {
|
|
15752
|
+
mapping: {
|
|
15753
|
+
person: "person",
|
|
15754
|
+
bicycle: "vehicle",
|
|
15755
|
+
car: "vehicle",
|
|
15756
|
+
motorcycle: "vehicle",
|
|
15757
|
+
airplane: "vehicle",
|
|
15758
|
+
bus: "vehicle",
|
|
15759
|
+
train: "vehicle",
|
|
15760
|
+
truck: "vehicle",
|
|
15761
|
+
boat: "vehicle",
|
|
15762
|
+
bird: "animal",
|
|
15763
|
+
cat: "animal",
|
|
15764
|
+
dog: "animal",
|
|
15765
|
+
horse: "animal",
|
|
15766
|
+
sheep: "animal",
|
|
15767
|
+
cow: "animal",
|
|
15768
|
+
elephant: "animal",
|
|
15769
|
+
bear: "animal",
|
|
15770
|
+
zebra: "animal",
|
|
15771
|
+
giraffe: "animal",
|
|
15772
|
+
suitcase: "package",
|
|
15773
|
+
backpack: "package",
|
|
15774
|
+
handbag: "package"
|
|
15775
|
+
},
|
|
15776
|
+
preserveOriginal: false
|
|
15777
|
+
};
|
|
15778
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15779
|
+
/**
|
|
15780
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15781
|
+
* so the editor can paint every block green or red with its reason.
|
|
15782
|
+
*
|
|
15783
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15784
|
+
* every condition node (containers and leaves, including the ones a
|
|
15785
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15786
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15787
|
+
* for an Action run). Skipped
|
|
15788
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15789
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15790
|
+
*
|
|
15791
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15792
|
+
* vocabulary so an Action run records the same step shape.
|
|
15793
|
+
*/
|
|
15794
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15795
|
+
var TraceValueSchema = union([
|
|
15796
|
+
string(),
|
|
15797
|
+
number(),
|
|
15798
|
+
boolean(),
|
|
15799
|
+
_null(),
|
|
15800
|
+
array(union([string(), number()]))
|
|
15801
|
+
]);
|
|
15802
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15803
|
+
"ran",
|
|
15804
|
+
"skipped-trigger",
|
|
15805
|
+
"skipped-conditions",
|
|
15806
|
+
"skipped-cooldown",
|
|
15807
|
+
"skipped-overlap",
|
|
15808
|
+
"failed",
|
|
15809
|
+
"aborted"
|
|
15810
|
+
]);
|
|
15811
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15812
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15813
|
+
"pass",
|
|
15814
|
+
"fail",
|
|
15815
|
+
"not-evaluated"
|
|
15816
|
+
]);
|
|
15817
|
+
var AutomationTriggerTraceSchema = object({
|
|
15818
|
+
kind: string().min(1),
|
|
15819
|
+
outcome: _enum(["pass", "fail"]),
|
|
15820
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
15821
|
+
reason: string(),
|
|
15822
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
15823
|
+
vars: record(string(), TraceValueSchema)
|
|
15824
|
+
});
|
|
15825
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
15826
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
15827
|
+
path: string().min(1),
|
|
15828
|
+
kind: _enum([
|
|
15829
|
+
"all",
|
|
15830
|
+
"any",
|
|
15831
|
+
"not",
|
|
15832
|
+
"condition",
|
|
15833
|
+
"expression",
|
|
15834
|
+
"stationary-present"
|
|
15835
|
+
]),
|
|
15836
|
+
outcome: TraceNodeOutcomeSchema,
|
|
15837
|
+
reason: string(),
|
|
15838
|
+
deviceId: number().int().optional(),
|
|
15839
|
+
cap: string().optional(),
|
|
15840
|
+
fieldPath: string().optional(),
|
|
15841
|
+
operator: string().optional(),
|
|
15842
|
+
expected: TraceValueSchema.optional(),
|
|
15843
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
15844
|
+
observed: TraceValueSchema.optional()
|
|
15845
|
+
});
|
|
15846
|
+
var AutomationRunVerdictSchema = object({
|
|
15847
|
+
mode: AutomationRunModeSchema,
|
|
15848
|
+
decision: _enum([
|
|
15849
|
+
"run",
|
|
15850
|
+
"queued",
|
|
15851
|
+
"restart",
|
|
15852
|
+
"drop",
|
|
15853
|
+
"cooldown",
|
|
15854
|
+
"bypass"
|
|
15855
|
+
]),
|
|
15856
|
+
reason: string()
|
|
15857
|
+
});
|
|
15858
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
15859
|
+
var AutomationStepTraceSchema = object({
|
|
15860
|
+
/** `actions.<i>` */
|
|
15861
|
+
path: string().min(1),
|
|
15862
|
+
kind: string().min(1),
|
|
15863
|
+
cap: string().optional(),
|
|
15864
|
+
method: string().optional(),
|
|
15865
|
+
deviceId: number().int().optional(),
|
|
15866
|
+
startedAt: number().optional(),
|
|
15867
|
+
endedAt: number().optional(),
|
|
15868
|
+
outcome: _enum([
|
|
15869
|
+
"ok",
|
|
15870
|
+
"error",
|
|
15871
|
+
"not-run"
|
|
15872
|
+
]),
|
|
15873
|
+
message: string().optional()
|
|
15874
|
+
});
|
|
15875
|
+
var AutomationRunTraceSchema = object({
|
|
15876
|
+
runId: string().min(1),
|
|
15877
|
+
startedAt: number(),
|
|
15878
|
+
endedAt: number(),
|
|
15879
|
+
trigger: AutomationTriggerTraceSchema,
|
|
15880
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
15881
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
15882
|
+
steps: array(AutomationStepTraceSchema),
|
|
15883
|
+
outcome: AutomationRunOutcomeSchema,
|
|
15884
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
15885
|
+
repeat: number().int().min(1),
|
|
15886
|
+
/** When the latest of those repeats happened. */
|
|
15887
|
+
lastAt: number()
|
|
15888
|
+
});
|
|
15889
|
+
/**
|
|
15890
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
15891
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
15892
|
+
*/
|
|
15893
|
+
var AutomationStateDocSchema = object({
|
|
15894
|
+
version: literal(1),
|
|
15895
|
+
lastRunStartedAt: number().nullable(),
|
|
15896
|
+
traces: array(AutomationRunTraceSchema)
|
|
15897
|
+
});
|
|
15898
|
+
/**
|
|
15899
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
15900
|
+
* declared as LIST ENTRIES, never as devices.
|
|
15901
|
+
*
|
|
15902
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
15903
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
15904
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
15905
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
15906
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
15907
|
+
*
|
|
15908
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
15909
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
15910
|
+
* runtime.
|
|
15911
|
+
*/
|
|
15912
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
15913
|
+
var ActionVariableTypeSchema = _enum([
|
|
15914
|
+
"string",
|
|
15915
|
+
"number",
|
|
15916
|
+
"boolean",
|
|
15917
|
+
"select"
|
|
15918
|
+
]);
|
|
15919
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
15920
|
+
var ActionVariableValueSchema = union([
|
|
15921
|
+
string(),
|
|
15922
|
+
number(),
|
|
15923
|
+
boolean()
|
|
15924
|
+
]);
|
|
15925
|
+
/**
|
|
15926
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
15927
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
15928
|
+
*/
|
|
15929
|
+
var ActionVariableSchema = object({
|
|
15930
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
15931
|
+
label: string().min(1).max(120).optional(),
|
|
15932
|
+
type: ActionVariableTypeSchema,
|
|
15933
|
+
required: boolean().optional(),
|
|
15934
|
+
default: ActionVariableValueSchema.optional(),
|
|
15935
|
+
/** The allowed values of a `select`. */
|
|
15936
|
+
options: array(string().min(1)).min(1).optional()
|
|
15937
|
+
}).superRefine((v, ctx) => {
|
|
15938
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
15939
|
+
code: "custom",
|
|
15940
|
+
message: "a select variable needs options",
|
|
15941
|
+
path: ["options"]
|
|
15942
|
+
});
|
|
15943
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
15944
|
+
code: "custom",
|
|
15945
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
15946
|
+
path: ["default"]
|
|
15947
|
+
});
|
|
15948
|
+
});
|
|
15949
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
15950
|
+
function variableValueError(variable, value) {
|
|
15951
|
+
switch (variable.type) {
|
|
15952
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
15953
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
15954
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
15955
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
15956
|
+
}
|
|
15957
|
+
}
|
|
15958
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
15959
|
+
function isInternalActionId(actionId) {
|
|
15960
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
15961
|
+
}
|
|
15962
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
15963
|
+
function addonIdOfActionId(actionId) {
|
|
15964
|
+
if (isInternalActionId(actionId)) return null;
|
|
15965
|
+
const at = actionId.indexOf(":");
|
|
15966
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
15967
|
+
}
|
|
15968
|
+
var ActionStatusSchema = object({
|
|
15969
|
+
isRunning: boolean(),
|
|
15970
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
15971
|
+
lastRunAt: number().nullable(),
|
|
15972
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
15973
|
+
lastError: string().nullable()
|
|
15974
|
+
});
|
|
15975
|
+
var ActionEntrySchema = object({
|
|
15976
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
15977
|
+
id: string().min(3),
|
|
15978
|
+
name: string().min(1).max(120),
|
|
15979
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
15980
|
+
addonId: string().min(1),
|
|
15981
|
+
source: ActionSourceKindSchema,
|
|
15982
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
15983
|
+
readOnly: boolean(),
|
|
15984
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
15985
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
15986
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
15987
|
+
status: ActionStatusSchema
|
|
15988
|
+
}).superRefine((entry, ctx) => {
|
|
15989
|
+
if (entry.source === "internal") {
|
|
15990
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
15991
|
+
code: "custom",
|
|
15992
|
+
message: "an internal action id is internal:<uuid>",
|
|
15993
|
+
path: ["id"]
|
|
15994
|
+
});
|
|
15995
|
+
return;
|
|
15996
|
+
}
|
|
15997
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
15998
|
+
code: "custom",
|
|
15999
|
+
message: "only an internal action carries steps",
|
|
16000
|
+
path: ["steps"]
|
|
16001
|
+
});
|
|
16002
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
16003
|
+
code: "custom",
|
|
16004
|
+
message: "an addon action is read-only here",
|
|
16005
|
+
path: ["readOnly"]
|
|
16006
|
+
});
|
|
16007
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
16008
|
+
code: "custom",
|
|
16009
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
16010
|
+
path: ["id"]
|
|
16011
|
+
});
|
|
16012
|
+
});
|
|
16013
|
+
/** What an operator writes for an internal action. */
|
|
16014
|
+
var ActionInputSchema = object({
|
|
16015
|
+
name: string().min(1).max(120),
|
|
16016
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
16017
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
16018
|
+
});
|
|
16019
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
16020
|
+
var ActionRunOriginSchema = object({
|
|
16021
|
+
/** The automation block whose step started it. */
|
|
16022
|
+
blockId: string().min(1).optional() });
|
|
16023
|
+
/** `started` = the caller did not ask to wait. */
|
|
16024
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
16025
|
+
var ActionRunResultSchema = object({
|
|
16026
|
+
runId: string().min(1),
|
|
16027
|
+
outcome: ActionRunOutcomeSchema,
|
|
16028
|
+
/** Why it did not run, or what failed. */
|
|
16029
|
+
message: string().optional()
|
|
16030
|
+
});
|
|
16031
|
+
_enum([
|
|
16032
|
+
"not-found",
|
|
16033
|
+
"read-only",
|
|
16034
|
+
"invalid-variables",
|
|
16035
|
+
"invalid-steps",
|
|
16036
|
+
"not-linked",
|
|
16037
|
+
"busy"
|
|
16038
|
+
]);
|
|
16039
|
+
object({
|
|
16040
|
+
actionId: string(),
|
|
16041
|
+
runId: string(),
|
|
16042
|
+
isRunning: boolean(),
|
|
16043
|
+
/** Set when the run ended. */
|
|
16044
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
16045
|
+
lastRunAt: number().nullable(),
|
|
16046
|
+
lastError: string().nullable()
|
|
15457
16047
|
});
|
|
15458
16048
|
/**
|
|
15459
16049
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -17067,7 +17657,22 @@ var BrokerProviderInfoSchema = object({
|
|
|
17067
17657
|
*/
|
|
17068
17658
|
interactiveConnectPath: string().min(1).optional(),
|
|
17069
17659
|
/** Relative hub path to disconnect the linked account (same popup pattern). */
|
|
17070
|
-
interactiveDisconnectPath: string().min(1).optional()
|
|
17660
|
+
interactiveDisconnectPath: string().min(1).optional(),
|
|
17661
|
+
/**
|
|
17662
|
+
* The kind signs in through a server-held interactive session instead of
|
|
17663
|
+
* (or before) typed credentials. `basePath` is a hub-relative route set
|
|
17664
|
+
* served by the owning addon (`/addon/<id>/...`) speaking the sign-in
|
|
17665
|
+
* contract: `POST {basePath}/start` (body: the form's settings) answers
|
|
17666
|
+
* `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
|
|
17667
|
+
* `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
|
|
17668
|
+
* 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
|
|
17669
|
+
* (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
|
|
17670
|
+
* existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
|
|
17671
|
+
* (`{ sessionId }`) drops the session. The dialog that edits a broker
|
|
17672
|
+
* offers it as the default path; the fields the session fills are
|
|
17673
|
+
* marked `filledBySignIn` in the kind's settings schema.
|
|
17674
|
+
*/
|
|
17675
|
+
signIn: object({ basePath: string().min(1) }).optional()
|
|
17071
17676
|
}))
|
|
17072
17677
|
});
|
|
17073
17678
|
var ListInputSchema = object({
|
|
@@ -18038,7 +18643,7 @@ var CompositionEventPlanSchema = object({
|
|
|
18038
18643
|
stateField: string(),
|
|
18039
18644
|
fieldKey: string()
|
|
18040
18645
|
});
|
|
18041
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
18646
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
18042
18647
|
var CompositionProblemSchema = object({
|
|
18043
18648
|
code: _enum([
|
|
18044
18649
|
"reserved-variant",
|
|
@@ -18066,7 +18671,8 @@ var CompositionProblemSchema = object({
|
|
|
18066
18671
|
"native-capability-replace",
|
|
18067
18672
|
"mixed-quantity",
|
|
18068
18673
|
"helper-mismatch",
|
|
18069
|
-
"member-constraint"
|
|
18674
|
+
"member-constraint",
|
|
18675
|
+
"retention"
|
|
18070
18676
|
]),
|
|
18071
18677
|
path: string(),
|
|
18072
18678
|
message: string()
|
|
@@ -18300,13 +18906,17 @@ Object.freeze({
|
|
|
18300
18906
|
latchedAt: {
|
|
18301
18907
|
kind: "fixed",
|
|
18302
18908
|
result: ["number", "null"]
|
|
18909
|
+
},
|
|
18910
|
+
schmitt: {
|
|
18911
|
+
kind: "fixed",
|
|
18912
|
+
result: ["boolean", "null"]
|
|
18303
18913
|
}
|
|
18304
18914
|
});
|
|
18305
18915
|
/**
|
|
18306
18916
|
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18307
18917
|
* Data, not a form default written into the block.
|
|
18308
18918
|
*/
|
|
18309
|
-
var NOW = {
|
|
18919
|
+
var NOW$2 = {
|
|
18310
18920
|
fieldPath: "lastFetchedAt",
|
|
18311
18921
|
expr: "now"
|
|
18312
18922
|
};
|
|
@@ -18320,6 +18930,8 @@ function numeric(input) {
|
|
|
18320
18930
|
family: "numeric",
|
|
18321
18931
|
deviceType: DeviceType.Sensor,
|
|
18322
18932
|
memberDeviceType: DeviceType.Sensor,
|
|
18933
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
18934
|
+
activeWhen: void 0,
|
|
18323
18935
|
commandCaps: [],
|
|
18324
18936
|
baseUnit: baseUnitOf(input.quantity),
|
|
18325
18937
|
aggregates: NUMERIC_AGGREGATES,
|
|
@@ -18335,6 +18947,8 @@ function binary(input) {
|
|
|
18335
18947
|
family: "binary",
|
|
18336
18948
|
deviceType: DeviceType.Sensor,
|
|
18337
18949
|
memberDeviceType: DeviceType.Sensor,
|
|
18950
|
+
memberDeviceTypes: [DeviceType.Sensor],
|
|
18951
|
+
activeWhen: void 0,
|
|
18338
18952
|
commandCaps: [],
|
|
18339
18953
|
quantity: "none",
|
|
18340
18954
|
baseUnit: void 0,
|
|
@@ -18348,73 +18962,73 @@ var GROUP_TEMPLATES = [
|
|
|
18348
18962
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18349
18963
|
role: DeviceRole.TemperatureSensor,
|
|
18350
18964
|
outputCap: "temperature-sensor",
|
|
18351
|
-
outputField: "
|
|
18965
|
+
outputField: "temperature",
|
|
18352
18966
|
quantity: "temperature",
|
|
18353
18967
|
defaultAggregate: "mean",
|
|
18354
18968
|
empty: "null",
|
|
18355
|
-
companions: [NOW]
|
|
18969
|
+
companions: [NOW$2]
|
|
18356
18970
|
}),
|
|
18357
18971
|
numeric({
|
|
18358
18972
|
id: "humidity",
|
|
18359
18973
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18360
18974
|
role: DeviceRole.HumiditySensor,
|
|
18361
18975
|
outputCap: "humidity-sensor",
|
|
18362
|
-
outputField: "
|
|
18976
|
+
outputField: "humidity",
|
|
18363
18977
|
quantity: "humidity",
|
|
18364
18978
|
defaultAggregate: "mean",
|
|
18365
18979
|
empty: "null",
|
|
18366
|
-
companions: [NOW]
|
|
18980
|
+
companions: [NOW$2]
|
|
18367
18981
|
}),
|
|
18368
18982
|
numeric({
|
|
18369
18983
|
id: "pressure",
|
|
18370
18984
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18371
18985
|
role: DeviceRole.PressureSensor,
|
|
18372
18986
|
outputCap: "pressure-sensor",
|
|
18373
|
-
outputField: "
|
|
18987
|
+
outputField: "pressure",
|
|
18374
18988
|
quantity: "pressure",
|
|
18375
18989
|
defaultAggregate: "mean",
|
|
18376
18990
|
empty: "null",
|
|
18377
|
-
companions: [NOW]
|
|
18991
|
+
companions: [NOW$2]
|
|
18378
18992
|
}),
|
|
18379
18993
|
numeric({
|
|
18380
18994
|
id: "illuminance",
|
|
18381
18995
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18382
18996
|
role: DeviceRole.AmbientLightSensor,
|
|
18383
18997
|
outputCap: "ambient-light-sensor",
|
|
18384
|
-
outputField: "
|
|
18998
|
+
outputField: "illuminance",
|
|
18385
18999
|
quantity: "illuminance",
|
|
18386
19000
|
defaultAggregate: "mean",
|
|
18387
19001
|
empty: "null",
|
|
18388
|
-
companions: [NOW]
|
|
19002
|
+
companions: [NOW$2]
|
|
18389
19003
|
}),
|
|
18390
19004
|
numeric({
|
|
18391
19005
|
id: "power",
|
|
18392
19006
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18393
19007
|
role: DeviceRole.PowerSensor,
|
|
18394
19008
|
outputCap: "power-meter",
|
|
18395
|
-
outputField: "
|
|
19009
|
+
outputField: "power",
|
|
18396
19010
|
quantity: "power",
|
|
18397
19011
|
defaultAggregate: "sum",
|
|
18398
19012
|
empty: "omit",
|
|
18399
|
-
companions: [NOW]
|
|
19013
|
+
companions: [NOW$2]
|
|
18400
19014
|
}),
|
|
18401
19015
|
numeric({
|
|
18402
19016
|
id: "energy",
|
|
18403
19017
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18404
19018
|
role: DeviceRole.EnergySensor,
|
|
18405
19019
|
outputCap: "power-meter",
|
|
18406
|
-
outputField: "
|
|
19020
|
+
outputField: "energy",
|
|
18407
19021
|
quantity: "energy",
|
|
18408
19022
|
defaultAggregate: "sum",
|
|
18409
19023
|
empty: "omit",
|
|
18410
|
-
companions: [NOW]
|
|
19024
|
+
companions: [NOW$2]
|
|
18411
19025
|
}),
|
|
18412
19026
|
numeric({
|
|
18413
19027
|
id: "battery",
|
|
18414
19028
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18415
19029
|
role: DeviceRole.BatterySensor,
|
|
18416
19030
|
outputCap: "battery",
|
|
18417
|
-
outputField: "
|
|
19031
|
+
outputField: "level",
|
|
18418
19032
|
quantity: "percentage",
|
|
18419
19033
|
defaultAggregate: "mean",
|
|
18420
19034
|
empty: "null",
|
|
@@ -18442,7 +19056,7 @@ var GROUP_TEMPLATES = [
|
|
|
18442
19056
|
quantity: "device",
|
|
18443
19057
|
defaultAggregate: "mean",
|
|
18444
19058
|
empty: "null",
|
|
18445
|
-
companions: [NOW]
|
|
19059
|
+
companions: [NOW$2]
|
|
18446
19060
|
}),
|
|
18447
19061
|
binary({
|
|
18448
19062
|
id: "motion",
|
|
@@ -18536,6 +19150,11 @@ var GROUP_TEMPLATES = [
|
|
|
18536
19150
|
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.",
|
|
18537
19151
|
deviceType: DeviceType.Switch,
|
|
18538
19152
|
outputCap: "switch",
|
|
19153
|
+
outputField: "on",
|
|
19154
|
+
member: {
|
|
19155
|
+
cap: "switch",
|
|
19156
|
+
fieldPath: "on"
|
|
19157
|
+
},
|
|
18539
19158
|
commandCaps: ["switch"]
|
|
18540
19159
|
}),
|
|
18541
19160
|
actuator({
|
|
@@ -18543,34 +19162,136 @@ var GROUP_TEMPLATES = [
|
|
|
18543
19162
|
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.",
|
|
18544
19163
|
deviceType: DeviceType.Light,
|
|
18545
19164
|
outputCap: "switch",
|
|
19165
|
+
outputField: "on",
|
|
19166
|
+
member: {
|
|
19167
|
+
cap: "switch",
|
|
19168
|
+
fieldPath: "on"
|
|
19169
|
+
},
|
|
18546
19170
|
commandCaps: [
|
|
18547
19171
|
"switch",
|
|
18548
19172
|
"brightness",
|
|
18549
19173
|
"color"
|
|
18550
19174
|
]
|
|
19175
|
+
}),
|
|
19176
|
+
actuator({
|
|
19177
|
+
id: "fan",
|
|
19178
|
+
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.",
|
|
19179
|
+
deviceType: DeviceType.Fan,
|
|
19180
|
+
outputCap: "switch",
|
|
19181
|
+
outputField: "on",
|
|
19182
|
+
member: {
|
|
19183
|
+
cap: "switch",
|
|
19184
|
+
fieldPath: "on"
|
|
19185
|
+
},
|
|
19186
|
+
commandCaps: ["switch", "fan-control"]
|
|
19187
|
+
}),
|
|
19188
|
+
actuator({
|
|
19189
|
+
id: "cover",
|
|
19190
|
+
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.",
|
|
19191
|
+
deviceType: DeviceType.Cover,
|
|
19192
|
+
outputCap: "group-active",
|
|
19193
|
+
outputField: "active",
|
|
19194
|
+
member: {
|
|
19195
|
+
cap: "cover",
|
|
19196
|
+
fieldPath: "state"
|
|
19197
|
+
},
|
|
19198
|
+
activeWhen: [
|
|
19199
|
+
"open",
|
|
19200
|
+
"opening",
|
|
19201
|
+
"stopped"
|
|
19202
|
+
],
|
|
19203
|
+
commandCaps: ["cover"]
|
|
19204
|
+
}),
|
|
19205
|
+
actuator({
|
|
19206
|
+
id: "valve",
|
|
19207
|
+
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.",
|
|
19208
|
+
deviceType: DeviceType.Valve,
|
|
19209
|
+
outputCap: "group-active",
|
|
19210
|
+
outputField: "active",
|
|
19211
|
+
member: {
|
|
19212
|
+
cap: "valve",
|
|
19213
|
+
fieldPath: "state"
|
|
19214
|
+
},
|
|
19215
|
+
activeWhen: [
|
|
19216
|
+
"open",
|
|
19217
|
+
"opening",
|
|
19218
|
+
"stopped"
|
|
19219
|
+
],
|
|
19220
|
+
commandCaps: ["valve"]
|
|
19221
|
+
}),
|
|
19222
|
+
actuator({
|
|
19223
|
+
id: "lock",
|
|
19224
|
+
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.",
|
|
19225
|
+
deviceType: DeviceType.Lock,
|
|
19226
|
+
outputCap: "group-active",
|
|
19227
|
+
outputField: "active",
|
|
19228
|
+
member: {
|
|
19229
|
+
cap: "lock-control",
|
|
19230
|
+
fieldPath: "state"
|
|
19231
|
+
},
|
|
19232
|
+
activeWhen: ["locked"],
|
|
19233
|
+
commandCaps: ["lock-control"]
|
|
19234
|
+
}),
|
|
19235
|
+
actuator({
|
|
19236
|
+
id: "media-player",
|
|
19237
|
+
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.",
|
|
19238
|
+
deviceType: DeviceType.MediaPlayer,
|
|
19239
|
+
outputCap: "group-active",
|
|
19240
|
+
outputField: "active",
|
|
19241
|
+
member: {
|
|
19242
|
+
cap: "media-player",
|
|
19243
|
+
fieldPath: "state"
|
|
19244
|
+
},
|
|
19245
|
+
activeWhen: ["playing", "buffering"],
|
|
19246
|
+
commandCaps: ["media-player"]
|
|
19247
|
+
}),
|
|
19248
|
+
actuator({
|
|
19249
|
+
id: "climate",
|
|
19250
|
+
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.",
|
|
19251
|
+
deviceType: DeviceType.Thermostat,
|
|
19252
|
+
memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
|
|
19253
|
+
outputCap: "group-active",
|
|
19254
|
+
outputField: "active",
|
|
19255
|
+
member: {
|
|
19256
|
+
cap: "climate-control",
|
|
19257
|
+
fieldPath: "mode"
|
|
19258
|
+
},
|
|
19259
|
+
activeWhen: [
|
|
19260
|
+
"heat",
|
|
19261
|
+
"cool",
|
|
19262
|
+
"auto",
|
|
19263
|
+
"heat_cool",
|
|
19264
|
+
"fan_only",
|
|
19265
|
+
"dry"
|
|
19266
|
+
],
|
|
19267
|
+
commandCaps: ["climate-control"]
|
|
18551
19268
|
})
|
|
18552
19269
|
];
|
|
18553
19270
|
function actuator(input) {
|
|
18554
19271
|
return {
|
|
18555
|
-
|
|
19272
|
+
id: input.id,
|
|
19273
|
+
summary: input.summary,
|
|
19274
|
+
deviceType: input.deviceType,
|
|
19275
|
+
outputCap: input.outputCap,
|
|
19276
|
+
outputField: input.outputField,
|
|
19277
|
+
commandCaps: input.commandCaps,
|
|
18556
19278
|
family: "actuator",
|
|
18557
19279
|
role: void 0,
|
|
18558
19280
|
memberDeviceType: input.deviceType,
|
|
18559
|
-
|
|
19281
|
+
memberDeviceTypes: input.memberDeviceTypes ?? [input.deviceType],
|
|
19282
|
+
activeWhen: input.activeWhen,
|
|
18560
19283
|
quantity: "none",
|
|
18561
19284
|
baseUnit: void 0,
|
|
18562
19285
|
aggregates: BINARY_AGGREGATES,
|
|
18563
19286
|
defaultAggregate: "any",
|
|
18564
19287
|
empty: "offline",
|
|
18565
|
-
accept: [
|
|
18566
|
-
cap: "switch",
|
|
18567
|
-
fieldPath: "on"
|
|
18568
|
-
}],
|
|
19288
|
+
accept: [input.member],
|
|
18569
19289
|
companions: [CHANGED]
|
|
18570
19290
|
};
|
|
18571
19291
|
}
|
|
18572
19292
|
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
18573
19293
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
19294
|
+
DeviceType.Camera;
|
|
18574
19295
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18575
19296
|
/**
|
|
18576
19297
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -18885,7 +19606,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
18885
19606
|
kind: "mutation",
|
|
18886
19607
|
auth: "admin",
|
|
18887
19608
|
access: "view"
|
|
18888
|
-
})
|
|
19609
|
+
}), method(object({
|
|
19610
|
+
blockId: string().min(1),
|
|
19611
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
19612
|
+
runStartedAt: number().optional(),
|
|
19613
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
19614
|
+
}), _void(), {
|
|
19615
|
+
kind: "mutation",
|
|
19616
|
+
auth: "admin"
|
|
19617
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
19618
|
+
traces: array(AutomationRunTraceSchema),
|
|
19619
|
+
lastError: string().nullable()
|
|
19620
|
+
}), { auth: "admin" });
|
|
18889
19621
|
/**
|
|
18890
19622
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
18891
19623
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -43610,7 +44342,7 @@ var NetworkAccessStatusSchema = object({
|
|
|
43610
44342
|
});
|
|
43611
44343
|
/**
|
|
43612
44344
|
* Optional, richer endpoint shape returned by providers that expose
|
|
43613
|
-
* MORE than one ingress concurrently (Tailscale
|
|
44345
|
+
* MORE than one ingress concurrently (Tailscale Funnel with mixed
|
|
43614
44346
|
* serve+funnel rules, future ngrok multi-tunnel, …). Each entry carries
|
|
43615
44347
|
* the originating provider config (mode + sourcePort) so the
|
|
43616
44348
|
* orchestrator UI can label rows distinctly. Providers that expose only
|
|
@@ -44003,51 +44735,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
44003
44735
|
kind: "mutation",
|
|
44004
44736
|
auth: "admin"
|
|
44005
44737
|
});
|
|
44006
|
-
new Set([
|
|
44007
|
-
{
|
|
44008
|
-
id: "person",
|
|
44009
|
-
name: "Person"
|
|
44010
|
-
},
|
|
44011
|
-
{
|
|
44012
|
-
id: "vehicle",
|
|
44013
|
-
name: "Vehicle"
|
|
44014
|
-
},
|
|
44015
|
-
{
|
|
44016
|
-
id: "animal",
|
|
44017
|
-
name: "Animal"
|
|
44018
|
-
},
|
|
44019
|
-
{
|
|
44020
|
-
id: "package",
|
|
44021
|
-
name: "Package"
|
|
44022
|
-
}
|
|
44023
|
-
].map((l) => l.id));
|
|
44024
|
-
var COCO_TO_MACRO = {
|
|
44025
|
-
mapping: {
|
|
44026
|
-
person: "person",
|
|
44027
|
-
bicycle: "vehicle",
|
|
44028
|
-
car: "vehicle",
|
|
44029
|
-
motorcycle: "vehicle",
|
|
44030
|
-
airplane: "vehicle",
|
|
44031
|
-
bus: "vehicle",
|
|
44032
|
-
train: "vehicle",
|
|
44033
|
-
truck: "vehicle",
|
|
44034
|
-
boat: "vehicle",
|
|
44035
|
-
bird: "animal",
|
|
44036
|
-
cat: "animal",
|
|
44037
|
-
dog: "animal",
|
|
44038
|
-
horse: "animal",
|
|
44039
|
-
sheep: "animal",
|
|
44040
|
-
cow: "animal",
|
|
44041
|
-
elephant: "animal",
|
|
44042
|
-
bear: "animal",
|
|
44043
|
-
zebra: "animal",
|
|
44044
|
-
giraffe: "animal",
|
|
44045
|
-
suitcase: "package",
|
|
44046
|
-
backpack: "package",
|
|
44047
|
-
handbag: "package"
|
|
44048
|
-
},
|
|
44049
|
-
preserveOriginal: false
|
|
44050
|
-
};
|
|
44051
44738
|
var AUDIO_MACRO_LABELS = [
|
|
44052
44739
|
{
|
|
44053
44740
|
id: "speech",
|
|
@@ -46253,7 +46940,20 @@ var NcRuleInputSchema = object({
|
|
|
46253
46940
|
* save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
|
|
46254
46941
|
* path does not run Zod defaults.
|
|
46255
46942
|
*/
|
|
46256
|
-
groupingSec: number().int().min(5).max(60).optional()
|
|
46943
|
+
groupingSec: number().int().min(5).max(60).optional(),
|
|
46944
|
+
/**
|
|
46945
|
+
* ASK ME TO CONFIRM DETECTIONS (#243): a DETECTION notification of this rule
|
|
46946
|
+
* carries "Correct" / "Wrong" buttons (and, where the channel has room, a
|
|
46947
|
+
* "Wrong, it is a <class>" choice). A tap marks the track for retraining, the
|
|
46948
|
+
* same mark the Library writes, and records whose notification it was and
|
|
46949
|
+
* when. A channel with no buttons gets the same two choices as links.
|
|
46950
|
+
*
|
|
46951
|
+
* `.optional()`, never `.default()` (a Zod default does not run on the addon
|
|
46952
|
+
* cap path): absent and `false` both mean off, which is what every rule
|
|
46953
|
+
* authored before this field meant. An editor turns it off by writing
|
|
46954
|
+
* `false`, so it needs no `clear` key.
|
|
46955
|
+
*/
|
|
46956
|
+
askVerdict: boolean().optional()
|
|
46257
46957
|
});
|
|
46258
46958
|
/**
|
|
46259
46959
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -56487,9 +57187,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56487
57187
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56488
57188
|
object({
|
|
56489
57189
|
/** Carbon dioxide concentration in ppm. */
|
|
56490
|
-
|
|
57190
|
+
co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56491
57191
|
/** Total volatile organic compounds in ppb. */
|
|
56492
|
-
|
|
57192
|
+
voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56493
57193
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56494
57194
|
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56495
57195
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
@@ -56502,7 +57202,7 @@ object({
|
|
|
56502
57202
|
DeviceType.Sensor;
|
|
56503
57203
|
object({
|
|
56504
57204
|
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56505
|
-
|
|
57205
|
+
illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56506
57206
|
precision: 0,
|
|
56507
57207
|
label: "Illuminance"
|
|
56508
57208
|
})),
|
|
@@ -56599,6 +57299,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
56599
57299
|
* would produce more than `maxPoints` samples. */
|
|
56600
57300
|
sampleEveryMs: number().int().positive().optional()
|
|
56601
57301
|
}), AudioMetricsHistorySchema);
|
|
57302
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57303
|
+
actionId: string().min(1),
|
|
57304
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57305
|
+
}), _void(), {
|
|
57306
|
+
kind: "mutation",
|
|
57307
|
+
auth: "admin"
|
|
57308
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57309
|
+
kind: "mutation",
|
|
57310
|
+
auth: "admin"
|
|
57311
|
+
});
|
|
57312
|
+
/**
|
|
57313
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57314
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57315
|
+
*
|
|
57316
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57317
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57318
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57319
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57320
|
+
* drift (D3).
|
|
57321
|
+
*
|
|
57322
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57323
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57324
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57325
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57326
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57327
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57328
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57329
|
+
*
|
|
57330
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57331
|
+
* logged — never queued.
|
|
57332
|
+
*/
|
|
57333
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57334
|
+
var ActionLinksSchema = object({
|
|
57335
|
+
deviceId: number().int().nonnegative(),
|
|
57336
|
+
actionIds: array(string().min(1)).max(100)
|
|
57337
|
+
});
|
|
57338
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57339
|
+
actionId: string().min(1),
|
|
57340
|
+
deviceId: number().int().nonnegative().optional()
|
|
57341
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57342
|
+
role: "viewer",
|
|
57343
|
+
auth: "protected",
|
|
57344
|
+
kind: "query",
|
|
57345
|
+
caller: "required"
|
|
57346
|
+
}), method(object({
|
|
57347
|
+
actionId: string().min(1),
|
|
57348
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57349
|
+
wait: boolean().optional(),
|
|
57350
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57351
|
+
deviceId: number().int().nonnegative().optional()
|
|
57352
|
+
}), ActionRunResultSchema, {
|
|
57353
|
+
role: "viewer",
|
|
57354
|
+
auth: "protected",
|
|
57355
|
+
kind: "mutation",
|
|
57356
|
+
caller: "required"
|
|
57357
|
+
}), method(ActionIdInput, _void(), {
|
|
57358
|
+
kind: "mutation",
|
|
57359
|
+
auth: "admin"
|
|
57360
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57361
|
+
kind: "mutation",
|
|
57362
|
+
auth: "admin"
|
|
57363
|
+
}), method(object({
|
|
57364
|
+
actionId: string().min(1),
|
|
57365
|
+
action: ActionInputSchema.partial()
|
|
57366
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57367
|
+
kind: "mutation",
|
|
57368
|
+
auth: "admin"
|
|
57369
|
+
}), method(ActionIdInput, _void(), {
|
|
57370
|
+
kind: "mutation",
|
|
57371
|
+
auth: "admin"
|
|
57372
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57373
|
+
role: "viewer",
|
|
57374
|
+
auth: "protected",
|
|
57375
|
+
kind: "query"
|
|
57376
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57377
|
+
kind: "mutation",
|
|
57378
|
+
auth: "admin"
|
|
57379
|
+
});
|
|
56602
57380
|
object({
|
|
56603
57381
|
/** Whether the automation is currently enabled. Disabled automations
|
|
56604
57382
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -56652,7 +57430,7 @@ var BatteryStatusSchema = object({
|
|
|
56652
57430
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
56653
57431
|
* declines to band a non-finite reading, which is the correct shape.
|
|
56654
57432
|
*/
|
|
56655
|
-
|
|
57433
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
56656
57434
|
/**
|
|
56657
57435
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
56658
57436
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -56662,7 +57440,7 @@ var BatteryStatusSchema = object({
|
|
|
56662
57440
|
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
56663
57441
|
* power fields yet, or the firmware reported neither. Before it existed,
|
|
56664
57442
|
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
56665
|
-
* was drawn "on battery alone" — the same D315 defect `
|
|
57443
|
+
* was drawn "on battery alone" — the same D315 defect `level` closed
|
|
56666
57444
|
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
56667
57445
|
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
56668
57446
|
*/
|
|
@@ -56686,7 +57464,7 @@ var BatteryStatusSchema = object({
|
|
|
56686
57464
|
* that only report charge. A second reading on this cap, not a second
|
|
56687
57465
|
* `numeric-sensor` on the same device.
|
|
56688
57466
|
*/
|
|
56689
|
-
|
|
57467
|
+
voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
56690
57468
|
/**
|
|
56691
57469
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
56692
57470
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -56720,13 +57498,13 @@ var BatteryStatusSchema = object({
|
|
|
56720
57498
|
/**
|
|
56721
57499
|
* True when the source is a BINARY low-battery indicator (HA
|
|
56722
57500
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
56723
|
-
* charge level — `
|
|
57501
|
+
* charge level — `level` is then a coarse stand-in (100 = normal,
|
|
56724
57502
|
* sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
|
|
56725
57503
|
* misleading exact percentage. Absent/false → genuine 0–100 % reading.
|
|
56726
57504
|
*/
|
|
56727
57505
|
binary: boolean().optional().meta({ label: "Binary indicator" })
|
|
56728
57506
|
});
|
|
56729
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
|
|
57507
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
|
|
56730
57508
|
method(object({
|
|
56731
57509
|
deviceId: number(),
|
|
56732
57510
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
@@ -56751,26 +57529,26 @@ DeviceType.Sensor;
|
|
|
56751
57529
|
* controls to this single-method surface.
|
|
56752
57530
|
*
|
|
56753
57531
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
56754
|
-
*
|
|
57532
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
56755
57533
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
56756
57534
|
* should surface those via the device's `getSettingsUISchema()`
|
|
56757
57535
|
* instead of bloating this cap.
|
|
56758
57536
|
*/
|
|
56759
57537
|
var BrightnessStatusSchema = object({
|
|
56760
57538
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
56761
|
-
|
|
57539
|
+
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
56762
57540
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
56763
57541
|
lastChangedAt: number()
|
|
56764
57542
|
});
|
|
56765
57543
|
DeviceType.Light, method(object({
|
|
56766
57544
|
deviceId: number().int().nonnegative(),
|
|
56767
|
-
|
|
57545
|
+
level: number().min(0).max(100)
|
|
56768
57546
|
}), _void(), {
|
|
56769
57547
|
kind: "mutation",
|
|
56770
57548
|
auth: "protected"
|
|
56771
57549
|
}), object({
|
|
56772
57550
|
deviceId: number(),
|
|
56773
|
-
|
|
57551
|
+
level: number().min(0).max(100),
|
|
56774
57552
|
lastChangedAt: number()
|
|
56775
57553
|
});
|
|
56776
57554
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
@@ -57271,11 +58049,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
|
|
|
57271
58049
|
}),
|
|
57272
58050
|
object({
|
|
57273
58051
|
mode: literal("mired"),
|
|
57274
|
-
|
|
58052
|
+
colorTemperature: number().int().min(50).max(1e3)
|
|
57275
58053
|
})
|
|
57276
58054
|
]);
|
|
57277
58055
|
object({
|
|
57278
|
-
/** Active color mode — which of `rgb` / `hsv` / `
|
|
58056
|
+
/** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
|
|
57279
58057
|
* the bulb's current state. */
|
|
57280
58058
|
mode: _enum([
|
|
57281
58059
|
"rgb",
|
|
@@ -57287,7 +58065,7 @@ object({
|
|
|
57287
58065
|
/** Populated when `mode === 'hsv'`. */
|
|
57288
58066
|
hsv: HsvTripletSchema.optional(),
|
|
57289
58067
|
/** Populated when `mode === 'mired'`. */
|
|
57290
|
-
|
|
58068
|
+
colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57291
58069
|
/** Ms epoch of the last operator-driven change. */
|
|
57292
58070
|
lastChangedAt: number()
|
|
57293
58071
|
});
|
|
@@ -57306,7 +58084,7 @@ DeviceType.Light, method(object({
|
|
|
57306
58084
|
]),
|
|
57307
58085
|
rgb: RgbTripletSchema.optional(),
|
|
57308
58086
|
hsv: HsvTripletSchema.optional(),
|
|
57309
|
-
|
|
58087
|
+
colorTemperature: number().int().optional(),
|
|
57310
58088
|
lastChangedAt: number()
|
|
57311
58089
|
});
|
|
57312
58090
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
@@ -57732,11 +58510,11 @@ object({
|
|
|
57732
58510
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
57733
58511
|
availablePrograms: array(string()),
|
|
57734
58512
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
57735
|
-
|
|
58513
|
+
remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
57736
58514
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
57737
|
-
|
|
58515
|
+
delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
57738
58516
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
57739
|
-
|
|
58517
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
57740
58518
|
/** True when the door is reported open; null when the door state is not known. */
|
|
57741
58519
|
doorOpen: boolean().nullable(),
|
|
57742
58520
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58354,7 +59132,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58354
59132
|
object({
|
|
58355
59133
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58356
59134
|
* speed surface (single-speed fan). */
|
|
58357
|
-
|
|
59135
|
+
speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58358
59136
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58359
59137
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58360
59138
|
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
@@ -58374,7 +59152,7 @@ object({
|
|
|
58374
59152
|
});
|
|
58375
59153
|
DeviceType.Fan, method(object({
|
|
58376
59154
|
deviceId: number().int().nonnegative(),
|
|
58377
|
-
|
|
59155
|
+
speed: number().min(0).max(100)
|
|
58378
59156
|
}), _void(), {
|
|
58379
59157
|
kind: "mutation",
|
|
58380
59158
|
auth: "protected"
|
|
@@ -58482,7 +59260,13 @@ results: array(object({
|
|
|
58482
59260
|
/** Ms epoch of the attempt. */
|
|
58483
59261
|
at: number()
|
|
58484
59262
|
})) });
|
|
58485
|
-
DeviceType.Switch, DeviceType.Light;
|
|
59263
|
+
DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
59264
|
+
object({
|
|
59265
|
+
active: boolean().meta({ label: "Active" }),
|
|
59266
|
+
/** Ms epoch when the slice was last updated. */
|
|
59267
|
+
lastChangedAt: number()
|
|
59268
|
+
});
|
|
59269
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
|
|
58486
59270
|
object({
|
|
58487
59271
|
/** Members whose current value entered the aggregate. */
|
|
58488
59272
|
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
@@ -58500,7 +59284,7 @@ object({
|
|
|
58500
59284
|
label: "Members"
|
|
58501
59285
|
}))
|
|
58502
59286
|
});
|
|
58503
|
-
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
59287
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
|
|
58504
59288
|
object({
|
|
58505
59289
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58506
59290
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -58551,7 +59335,7 @@ DeviceType.Humidifier, method(object({
|
|
|
58551
59335
|
});
|
|
58552
59336
|
object({
|
|
58553
59337
|
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58554
|
-
|
|
59338
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58555
59339
|
precision: 0,
|
|
58556
59340
|
label: "Humidity"
|
|
58557
59341
|
})),
|
|
@@ -58994,7 +59778,7 @@ object({
|
|
|
58994
59778
|
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58995
59779
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
58996
59780
|
* task is active / progress is unavailable. */
|
|
58997
|
-
|
|
59781
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58998
59782
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
58999
59783
|
* or null when unknown. */
|
|
59000
59784
|
currentCode: number().nullable().meta(readingMeta("none")),
|
|
@@ -59407,7 +60191,14 @@ DeviceType.Lock, method(object({
|
|
|
59407
60191
|
auth: "protected"
|
|
59408
60192
|
}), method(object({
|
|
59409
60193
|
deviceId: number().int().nonnegative(),
|
|
59410
|
-
code: string().min(1).optional()
|
|
60194
|
+
code: string().min(1).optional(),
|
|
60195
|
+
/**
|
|
60196
|
+
* Honoured by a helper lock GROUP only (D944): unlocking several doors
|
|
60197
|
+
* with one call is refused unless the caller says it was confirmed. A
|
|
60198
|
+
* single lock ignores it. The refusal lives in the callee, so no
|
|
60199
|
+
* automation or API caller reaches the doors by skipping a dialog.
|
|
60200
|
+
*/
|
|
60201
|
+
confirm: boolean().optional()
|
|
59411
60202
|
}), _void(), {
|
|
59412
60203
|
kind: "mutation",
|
|
59413
60204
|
auth: "protected"
|
|
@@ -59415,6 +60206,11 @@ DeviceType.Lock, method(object({
|
|
|
59415
60206
|
kind: "mutation",
|
|
59416
60207
|
auth: "protected"
|
|
59417
60208
|
});
|
|
60209
|
+
object({
|
|
60210
|
+
value: number().nullable().meta(readingMeta("device", { label: "Total" })),
|
|
60211
|
+
lastFetchedAt: number()
|
|
60212
|
+
});
|
|
60213
|
+
DeviceType.Sensor;
|
|
59418
60214
|
/**
|
|
59419
60215
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
59420
60216
|
* Apple TV, Spotify, Roku, generic OTT receivers, …) on
|
|
@@ -59472,10 +60268,10 @@ object({
|
|
|
59472
60268
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59473
60269
|
/** Current playback position in ms. Null when not seekable or
|
|
59474
60270
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59475
|
-
|
|
60271
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59476
60272
|
/** Total duration of the current media in ms. Null when unknown
|
|
59477
60273
|
* (live stream) or nothing is playing. */
|
|
59478
|
-
|
|
60274
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59479
60275
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59480
60276
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59481
60277
|
shuffle: boolean().nullable(),
|
|
@@ -59502,7 +60298,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
|
|
|
59502
60298
|
auth: "protected"
|
|
59503
60299
|
}), method(object({
|
|
59504
60300
|
deviceId: number().int().nonnegative(),
|
|
59505
|
-
|
|
60301
|
+
position: number().int().nonnegative()
|
|
59506
60302
|
}), _void(), {
|
|
59507
60303
|
kind: "mutation",
|
|
59508
60304
|
auth: "protected"
|
|
@@ -60175,9 +60971,9 @@ var NetworkLinkStatusSchema = object({
|
|
|
60175
60971
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60176
60972
|
* SKIP a null rather than coerce it.
|
|
60177
60973
|
*/
|
|
60178
|
-
|
|
60974
|
+
signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60179
60975
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60180
|
-
|
|
60976
|
+
rssi: number().optional().meta(readingMeta("signal-level")),
|
|
60181
60977
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60182
60978
|
ssid: string().optional(),
|
|
60183
60979
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
@@ -60838,10 +61634,20 @@ var PetFeederDeviceStatusSchema = _enum([
|
|
|
60838
61634
|
]);
|
|
60839
61635
|
var gramsPortion = number().int().min(4).max(200);
|
|
60840
61636
|
object({
|
|
60841
|
-
/** Food
|
|
60842
|
-
*
|
|
60843
|
-
* bowl
|
|
61637
|
+
/** Food in the TANK (hopper), as the feeder's own sensor reports it
|
|
61638
|
+
* (`state.food`). A coarse level code, not grams — `0` is empty. The
|
|
61639
|
+
* amount in the bowl is `bowlFood`. On dual-hopper models this is the
|
|
61640
|
+
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
61641
|
+
* the device has not reported yet. */
|
|
60844
61642
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
61643
|
+
/** Food in the BOWL as the feeder reports it (`state.bowl`), in the
|
|
61644
|
+
* feeder's own units. Null when the model reports none. */
|
|
61645
|
+
bowlFood: number().nullable().meta(readingMeta("none")),
|
|
61646
|
+
/** True while the pet is eating (`state.eating`). */
|
|
61647
|
+
eating: boolean(),
|
|
61648
|
+
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
61649
|
+
* the client must not offer it. */
|
|
61650
|
+
supportsMarkRefilled: boolean(),
|
|
60845
61651
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
60846
61652
|
* single-hopper models. */
|
|
60847
61653
|
food1: number().nullable().meta(readingMeta("none")),
|
|
@@ -60849,8 +61655,8 @@ object({
|
|
|
60849
61655
|
* single-hopper models. */
|
|
60850
61656
|
food2: number().nullable().meta(readingMeta("none")),
|
|
60851
61657
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
60852
|
-
* (`device_class: problem`, on = low). True when the
|
|
60853
|
-
*
|
|
61658
|
+
* (`device_class: problem`, on = low). True when the tank reports empty,
|
|
61659
|
+
* or, on a dual-hopper model, when EITHER hopper is empty. */
|
|
60854
61660
|
lowFood: boolean(),
|
|
60855
61661
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
60856
61662
|
* device has no battery reading. */
|
|
@@ -61317,22 +62123,38 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61317
62123
|
auth: "admin"
|
|
61318
62124
|
});
|
|
61319
62125
|
object({
|
|
61320
|
-
/** Instantaneous power draw
|
|
61321
|
-
|
|
62126
|
+
/** Instantaneous power draw (watts). */
|
|
62127
|
+
power: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61322
62128
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61323
|
-
|
|
61324
|
-
/** Voltage
|
|
61325
|
-
|
|
62129
|
+
energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62130
|
+
/** Voltage (volts). */
|
|
62131
|
+
voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61326
62132
|
/** Current in amperes. */
|
|
61327
|
-
|
|
62133
|
+
current: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61328
62134
|
/** Apparent power in volt-amperes. */
|
|
61329
|
-
|
|
62135
|
+
apparentPower: number().optional().meta(readingMeta("apparent-power")),
|
|
61330
62136
|
/** Power factor (0..1) if reported. */
|
|
61331
62137
|
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61332
62138
|
/** Ms epoch when the slice was last updated. */
|
|
61333
62139
|
lastFetchedAt: number()
|
|
61334
62140
|
});
|
|
61335
|
-
|
|
62141
|
+
[
|
|
62142
|
+
DeviceType.Sensor,
|
|
62143
|
+
DeviceType.Switch,
|
|
62144
|
+
DeviceType.Light,
|
|
62145
|
+
DeviceType.Fan,
|
|
62146
|
+
DeviceType.Climate,
|
|
62147
|
+
DeviceType.Thermostat,
|
|
62148
|
+
DeviceType.Humidifier,
|
|
62149
|
+
DeviceType.WaterHeater,
|
|
62150
|
+
DeviceType.MediaPlayer,
|
|
62151
|
+
DeviceType.Washer,
|
|
62152
|
+
DeviceType.Dryer,
|
|
62153
|
+
DeviceType.Dishwasher,
|
|
62154
|
+
DeviceType.Vacuum,
|
|
62155
|
+
DeviceType.LawnMower,
|
|
62156
|
+
DeviceType.PetFeeder
|
|
62157
|
+
].filter((type) => type !== DeviceType.Sensor);
|
|
61336
62158
|
/**
|
|
61337
62159
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
61338
62160
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -61365,16 +62187,13 @@ object({
|
|
|
61365
62187
|
location: string().nullable(),
|
|
61366
62188
|
/** GPS coordinates when available. Null otherwise. */
|
|
61367
62189
|
gps: GpsLocationSchema.nullable(),
|
|
61368
|
-
/** Optional battery level of the tracking device (0..100). Null
|
|
61369
|
-
* when not reported. */
|
|
61370
|
-
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61371
62190
|
/** Ms epoch when the slice was last updated. */
|
|
61372
62191
|
lastChangedAt: number()
|
|
61373
62192
|
});
|
|
61374
62193
|
DeviceType.Presence;
|
|
61375
62194
|
object({
|
|
61376
62195
|
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61377
|
-
|
|
62196
|
+
pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61378
62197
|
/** Ms epoch when the slice was last updated. */
|
|
61379
62198
|
lastFetchedAt: number()
|
|
61380
62199
|
});
|
|
@@ -63825,7 +64644,7 @@ var SwitchStatusSchema = object({
|
|
|
63825
64644
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
63826
64645
|
lastChangedAt: number()
|
|
63827
64646
|
});
|
|
63828
|
-
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, method(object({
|
|
64647
|
+
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
|
|
63829
64648
|
deviceId: number(),
|
|
63830
64649
|
on: boolean()
|
|
63831
64650
|
}), _void(), {
|
|
@@ -64384,7 +65203,7 @@ object({
|
|
|
64384
65203
|
DeviceType.Sensor;
|
|
64385
65204
|
object({
|
|
64386
65205
|
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64387
|
-
|
|
65206
|
+
temperature: number().nullable().meta(readingMeta("temperature", {
|
|
64388
65207
|
precision: 1,
|
|
64389
65208
|
label: "Temperature"
|
|
64390
65209
|
})),
|
|
@@ -64648,7 +65467,7 @@ object({
|
|
|
64648
65467
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
64649
65468
|
availableFanSpeeds: array(string()),
|
|
64650
65469
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
64651
|
-
|
|
65470
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64652
65471
|
/** Current error code (0 / null = no error). */
|
|
64653
65472
|
errorCode: number().nullable().meta(readingMeta("none")),
|
|
64654
65473
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
@@ -65517,8 +66336,9 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65517
66336
|
kind: "mutation",
|
|
65518
66337
|
auth: "admin"
|
|
65519
66338
|
});
|
|
66339
|
+
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
65520
66340
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65521
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
66341
|
+
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;
|
|
65522
66342
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65523
66343
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65524
66344
|
new Set(CAP_NAMES);
|
|
@@ -65588,6 +66408,104 @@ Object.freeze({
|
|
|
65588
66408
|
access: "create",
|
|
65589
66409
|
role: "admin"
|
|
65590
66410
|
},
|
|
66411
|
+
"actions.create": {
|
|
66412
|
+
capName: "actions",
|
|
66413
|
+
capScope: "system",
|
|
66414
|
+
addonId: null,
|
|
66415
|
+
access: "create",
|
|
66416
|
+
role: "admin"
|
|
66417
|
+
},
|
|
66418
|
+
"actions.delete": {
|
|
66419
|
+
capName: "actions",
|
|
66420
|
+
capScope: "system",
|
|
66421
|
+
addonId: null,
|
|
66422
|
+
access: "delete",
|
|
66423
|
+
role: "admin"
|
|
66424
|
+
},
|
|
66425
|
+
"actions.get": {
|
|
66426
|
+
capName: "actions",
|
|
66427
|
+
capScope: "system",
|
|
66428
|
+
addonId: null,
|
|
66429
|
+
access: "view",
|
|
66430
|
+
role: "viewer"
|
|
66431
|
+
},
|
|
66432
|
+
"actions.getLinks": {
|
|
66433
|
+
capName: "actions",
|
|
66434
|
+
capScope: "system",
|
|
66435
|
+
addonId: null,
|
|
66436
|
+
access: "view",
|
|
66437
|
+
role: "admin"
|
|
66438
|
+
},
|
|
66439
|
+
"actions.getTraces": {
|
|
66440
|
+
capName: "actions",
|
|
66441
|
+
capScope: "system",
|
|
66442
|
+
addonId: null,
|
|
66443
|
+
access: "view",
|
|
66444
|
+
role: "admin"
|
|
66445
|
+
},
|
|
66446
|
+
"actions.list": {
|
|
66447
|
+
capName: "actions",
|
|
66448
|
+
capScope: "system",
|
|
66449
|
+
addonId: null,
|
|
66450
|
+
access: "view",
|
|
66451
|
+
role: "admin"
|
|
66452
|
+
},
|
|
66453
|
+
"actions.listForCamera": {
|
|
66454
|
+
capName: "actions",
|
|
66455
|
+
capScope: "system",
|
|
66456
|
+
addonId: null,
|
|
66457
|
+
access: "view",
|
|
66458
|
+
role: "viewer"
|
|
66459
|
+
},
|
|
66460
|
+
"actions.run": {
|
|
66461
|
+
capName: "actions",
|
|
66462
|
+
capScope: "system",
|
|
66463
|
+
addonId: null,
|
|
66464
|
+
access: "create",
|
|
66465
|
+
role: "viewer"
|
|
66466
|
+
},
|
|
66467
|
+
"actions.setLinks": {
|
|
66468
|
+
capName: "actions",
|
|
66469
|
+
capScope: "system",
|
|
66470
|
+
addonId: null,
|
|
66471
|
+
access: "create",
|
|
66472
|
+
role: "admin"
|
|
66473
|
+
},
|
|
66474
|
+
"actions.stop": {
|
|
66475
|
+
capName: "actions",
|
|
66476
|
+
capScope: "system",
|
|
66477
|
+
addonId: null,
|
|
66478
|
+
access: "create",
|
|
66479
|
+
role: "admin"
|
|
66480
|
+
},
|
|
66481
|
+
"actions.update": {
|
|
66482
|
+
capName: "actions",
|
|
66483
|
+
capScope: "system",
|
|
66484
|
+
addonId: null,
|
|
66485
|
+
access: "create",
|
|
66486
|
+
role: "admin"
|
|
66487
|
+
},
|
|
66488
|
+
"actionSource.listActions": {
|
|
66489
|
+
capName: "action-source",
|
|
66490
|
+
capScope: "system",
|
|
66491
|
+
addonId: null,
|
|
66492
|
+
access: "view",
|
|
66493
|
+
role: "admin"
|
|
66494
|
+
},
|
|
66495
|
+
"actionSource.runAction": {
|
|
66496
|
+
capName: "action-source",
|
|
66497
|
+
capScope: "system",
|
|
66498
|
+
addonId: null,
|
|
66499
|
+
access: "create",
|
|
66500
|
+
role: "admin"
|
|
66501
|
+
},
|
|
66502
|
+
"actionSource.stopAction": {
|
|
66503
|
+
capName: "action-source",
|
|
66504
|
+
capScope: "system",
|
|
66505
|
+
addonId: null,
|
|
66506
|
+
access: "create",
|
|
66507
|
+
role: "admin"
|
|
66508
|
+
},
|
|
65591
66509
|
"addonPages.listPages": {
|
|
65592
66510
|
capName: "addon-pages",
|
|
65593
66511
|
capScope: "system",
|
|
@@ -66869,6 +67787,13 @@ Object.freeze({
|
|
|
66869
67787
|
access: "view",
|
|
66870
67788
|
role: "admin"
|
|
66871
67789
|
},
|
|
67790
|
+
"coreBlocks.getAutomationRunState": {
|
|
67791
|
+
capName: "core-blocks",
|
|
67792
|
+
capScope: "system",
|
|
67793
|
+
addonId: null,
|
|
67794
|
+
access: "view",
|
|
67795
|
+
role: "admin"
|
|
67796
|
+
},
|
|
66872
67797
|
"coreBlocks.getBlockSettings": {
|
|
66873
67798
|
capName: "core-blocks",
|
|
66874
67799
|
capScope: "system",
|
|
@@ -66890,6 +67815,13 @@ Object.freeze({
|
|
|
66890
67815
|
access: "view",
|
|
66891
67816
|
role: "admin"
|
|
66892
67817
|
},
|
|
67818
|
+
"coreBlocks.getTraces": {
|
|
67819
|
+
capName: "core-blocks",
|
|
67820
|
+
capScope: "system",
|
|
67821
|
+
addonId: null,
|
|
67822
|
+
access: "view",
|
|
67823
|
+
role: "admin"
|
|
67824
|
+
},
|
|
66893
67825
|
"coreBlocks.getTypeDefs": {
|
|
66894
67826
|
capName: "core-blocks",
|
|
66895
67827
|
capScope: "system",
|
|
@@ -66925,6 +67857,13 @@ Object.freeze({
|
|
|
66925
67857
|
access: "create",
|
|
66926
67858
|
role: "admin"
|
|
66927
67859
|
},
|
|
67860
|
+
"coreBlocks.reportAutomationRun": {
|
|
67861
|
+
capName: "core-blocks",
|
|
67862
|
+
capScope: "system",
|
|
67863
|
+
addonId: null,
|
|
67864
|
+
access: "create",
|
|
67865
|
+
role: "admin"
|
|
67866
|
+
},
|
|
66928
67867
|
"coreBlocks.restart": {
|
|
66929
67868
|
capName: "core-blocks",
|
|
66930
67869
|
capScope: "system",
|
|
@@ -68794,6 +69733,13 @@ Object.freeze({
|
|
|
68794
69733
|
access: "view",
|
|
68795
69734
|
role: "viewer"
|
|
68796
69735
|
},
|
|
69736
|
+
"groupActive.getStatus": {
|
|
69737
|
+
capName: "group-active",
|
|
69738
|
+
capScope: "device",
|
|
69739
|
+
addonId: null,
|
|
69740
|
+
access: "view",
|
|
69741
|
+
role: "viewer"
|
|
69742
|
+
},
|
|
68797
69743
|
"groupCommands.getStatus": {
|
|
68798
69744
|
capName: "group-commands",
|
|
68799
69745
|
capScope: "device",
|
|
@@ -69760,6 +70706,13 @@ Object.freeze({
|
|
|
69760
70706
|
access: "create",
|
|
69761
70707
|
role: "admin"
|
|
69762
70708
|
},
|
|
70709
|
+
"meter.getStatus": {
|
|
70710
|
+
capName: "meter",
|
|
70711
|
+
capScope: "device",
|
|
70712
|
+
addonId: null,
|
|
70713
|
+
access: "view",
|
|
70714
|
+
role: "viewer"
|
|
70715
|
+
},
|
|
69763
70716
|
"metricsProvider.collectSnapshot": {
|
|
69764
70717
|
capName: "metrics-provider",
|
|
69765
70718
|
capScope: "system",
|
|
@@ -75484,7 +76437,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75484
76437
|
label: t("Full brightness", "Luminosità massima"),
|
|
75485
76438
|
phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
|
|
75486
76439
|
icon: "sun",
|
|
75487
|
-
args: {
|
|
76440
|
+
args: { level: 100 }
|
|
75488
76441
|
},
|
|
75489
76442
|
{
|
|
75490
76443
|
id: "brightness.half",
|
|
@@ -75492,7 +76445,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75492
76445
|
label: t("Half brightness", "Luminosità a metà"),
|
|
75493
76446
|
phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
|
|
75494
76447
|
icon: "sun-dim",
|
|
75495
|
-
args: {
|
|
76448
|
+
args: { level: 50 }
|
|
75496
76449
|
},
|
|
75497
76450
|
{
|
|
75498
76451
|
id: "brightness.off",
|
|
@@ -75500,16 +76453,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75500
76453
|
label: t("Brightness off", "Luminosità a zero"),
|
|
75501
76454
|
phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
|
|
75502
76455
|
icon: "lightbulb-off",
|
|
75503
|
-
args: {
|
|
76456
|
+
args: { level: 0 }
|
|
75504
76457
|
},
|
|
75505
76458
|
{
|
|
75506
76459
|
id: "brightness.set",
|
|
75507
76460
|
method: "setBrightness",
|
|
75508
76461
|
label: t("Set brightness", "Imposta la luminosità"),
|
|
75509
|
-
phrase: t("Set the brightness of {device} to {
|
|
76462
|
+
phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
|
|
75510
76463
|
icon: "sun-medium",
|
|
75511
76464
|
openArgs: [{
|
|
75512
|
-
key: "
|
|
76465
|
+
key: "level",
|
|
75513
76466
|
label: PERCENT,
|
|
75514
76467
|
offer: {
|
|
75515
76468
|
kind: "number",
|
|
@@ -75523,13 +76476,13 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75523
76476
|
],
|
|
75524
76477
|
state: [{
|
|
75525
76478
|
kind: "numeric",
|
|
75526
|
-
field: "
|
|
76479
|
+
field: "level",
|
|
75527
76480
|
quantity: t("the brightness", "la luminosità"),
|
|
75528
76481
|
label: t("Brightness", "Luminosità"),
|
|
75529
76482
|
unit: "%",
|
|
75530
76483
|
icon: "sun"
|
|
75531
76484
|
}],
|
|
75532
|
-
events: { onBrightnessChanged: { notOperatorFacing: "the `
|
|
76485
|
+
events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
|
|
75533
76486
|
},
|
|
75534
76487
|
color: {
|
|
75535
76488
|
scope: "device",
|
|
@@ -75543,7 +76496,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75543
76496
|
icon: "sun",
|
|
75544
76497
|
args: { color: {
|
|
75545
76498
|
mode: "mired",
|
|
75546
|
-
|
|
76499
|
+
colorTemperature: 370
|
|
75547
76500
|
} }
|
|
75548
76501
|
},
|
|
75549
76502
|
{
|
|
@@ -75554,7 +76507,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75554
76507
|
icon: "snowflake",
|
|
75555
76508
|
args: { color: {
|
|
75556
76509
|
mode: "mired",
|
|
75557
|
-
|
|
76510
|
+
colorTemperature: 200
|
|
75558
76511
|
} }
|
|
75559
76512
|
},
|
|
75560
76513
|
{
|
|
@@ -76168,7 +77121,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76168
77121
|
label: t("Fan off", "Ventilatore spento"),
|
|
76169
77122
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
76170
77123
|
icon: "power-off",
|
|
76171
|
-
args: {
|
|
77124
|
+
args: { speed: 0 }
|
|
76172
77125
|
},
|
|
76173
77126
|
{
|
|
76174
77127
|
id: "fan.full",
|
|
@@ -76176,16 +77129,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76176
77129
|
label: t("Fan full", "Ventilatore al massimo"),
|
|
76177
77130
|
phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
|
|
76178
77131
|
icon: "fan",
|
|
76179
|
-
args: {
|
|
77132
|
+
args: { speed: 100 }
|
|
76180
77133
|
},
|
|
76181
77134
|
{
|
|
76182
77135
|
id: "fan.speed",
|
|
76183
77136
|
method: "setPercentage",
|
|
76184
77137
|
label: t("Set speed", "Imposta la velocità"),
|
|
76185
|
-
phrase: t("Set the speed of {device} to {
|
|
77138
|
+
phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
|
|
76186
77139
|
icon: "fan",
|
|
76187
77140
|
openArgs: [{
|
|
76188
|
-
key: "
|
|
77141
|
+
key: "speed",
|
|
76189
77142
|
label: t("Speed", "Velocità"),
|
|
76190
77143
|
offer: {
|
|
76191
77144
|
kind: "number",
|
|
@@ -76247,7 +77200,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76247
77200
|
],
|
|
76248
77201
|
state: [{
|
|
76249
77202
|
kind: "numeric",
|
|
76250
|
-
field: "
|
|
77203
|
+
field: "speed",
|
|
76251
77204
|
quantity: t("the speed", "la velocità"),
|
|
76252
77205
|
label: t("Speed", "Velocità"),
|
|
76253
77206
|
unit: "%",
|
|
@@ -77045,7 +77998,7 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77045
77998
|
},
|
|
77046
77999
|
{
|
|
77047
78000
|
kind: "numeric",
|
|
77048
|
-
field: "
|
|
78001
|
+
field: "progress",
|
|
77049
78002
|
quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
|
|
77050
78003
|
label: t("Progress", "Avanzamento"),
|
|
77051
78004
|
unit: "%",
|
|
@@ -77403,10 +78356,10 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77403
78356
|
id: "media.seek",
|
|
77404
78357
|
method: "seek",
|
|
77405
78358
|
label: t("Seek", "Vai al punto"),
|
|
77406
|
-
phrase: t("Move {device} to {
|
|
78359
|
+
phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
|
|
77407
78360
|
icon: "fast-forward",
|
|
77408
78361
|
openArgs: [{
|
|
77409
|
-
key: "
|
|
78362
|
+
key: "position",
|
|
77410
78363
|
label: t("Position", "Posizione"),
|
|
77411
78364
|
offer: {
|
|
77412
78365
|
kind: "number",
|
|
@@ -78455,7 +79408,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78455
79408
|
state: [
|
|
78456
79409
|
{
|
|
78457
79410
|
kind: "numeric",
|
|
78458
|
-
field: "
|
|
79411
|
+
field: "co2",
|
|
78459
79412
|
quantity: t("the CO₂", "la CO₂"),
|
|
78460
79413
|
label: t("CO₂", "CO₂"),
|
|
78461
79414
|
unit: "ppm",
|
|
@@ -78463,7 +79416,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78463
79416
|
},
|
|
78464
79417
|
{
|
|
78465
79418
|
kind: "numeric",
|
|
78466
|
-
field: "
|
|
79419
|
+
field: "voc",
|
|
78467
79420
|
quantity: t("the VOC level", "il livello di COV"),
|
|
78468
79421
|
label: t("VOC", "COV"),
|
|
78469
79422
|
unit: "ppb",
|
|
@@ -78499,7 +79452,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78499
79452
|
noun: t("Light level", "Luminosità ambiente"),
|
|
78500
79453
|
state: [{
|
|
78501
79454
|
kind: "numeric",
|
|
78502
|
-
field: "
|
|
79455
|
+
field: "illuminance",
|
|
78503
79456
|
quantity: t("the light level", "la luminosità"),
|
|
78504
79457
|
label: t("Illuminance", "Illuminamento"),
|
|
78505
79458
|
unit: "lx",
|
|
@@ -78662,6 +79615,10 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78662
79615
|
icon: "flame"
|
|
78663
79616
|
}]
|
|
78664
79617
|
},
|
|
79618
|
+
"group-active": {
|
|
79619
|
+
scope: "device",
|
|
79620
|
+
noun: t("Group state", "Stato del gruppo")
|
|
79621
|
+
},
|
|
78665
79622
|
"group-commands": {
|
|
78666
79623
|
scope: "device",
|
|
78667
79624
|
noun: t("Group command", "Comando di gruppo")
|
|
@@ -78698,7 +79655,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78698
79655
|
noun: t("Humidity", "Umidità"),
|
|
78699
79656
|
state: [{
|
|
78700
79657
|
kind: "numeric",
|
|
78701
|
-
field: "
|
|
79658
|
+
field: "humidity",
|
|
78702
79659
|
quantity: t("the humidity", "l’umidità"),
|
|
78703
79660
|
label: t("Humidity", "Umidità"),
|
|
78704
79661
|
unit: "%",
|
|
@@ -78718,6 +79675,17 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78718
79675
|
}],
|
|
78719
79676
|
events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
|
|
78720
79677
|
},
|
|
79678
|
+
meter: {
|
|
79679
|
+
scope: "device",
|
|
79680
|
+
noun: t("Meter", "Contatore"),
|
|
79681
|
+
state: [{
|
|
79682
|
+
kind: "numeric",
|
|
79683
|
+
field: "value",
|
|
79684
|
+
quantity: t("the total", "il totale"),
|
|
79685
|
+
label: t("Total", "Totale"),
|
|
79686
|
+
icon: "gauge"
|
|
79687
|
+
}]
|
|
79688
|
+
},
|
|
78721
79689
|
"numeric-sensor": {
|
|
78722
79690
|
scope: "device",
|
|
78723
79691
|
noun: t("Sensor", "Sensore"),
|
|
@@ -78735,7 +79703,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78735
79703
|
state: [
|
|
78736
79704
|
{
|
|
78737
79705
|
kind: "numeric",
|
|
78738
|
-
field: "
|
|
79706
|
+
field: "power",
|
|
78739
79707
|
quantity: t("the power draw", "il consumo"),
|
|
78740
79708
|
label: t("Power", "Potenza"),
|
|
78741
79709
|
unit: "W",
|
|
@@ -78743,7 +79711,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78743
79711
|
},
|
|
78744
79712
|
{
|
|
78745
79713
|
kind: "numeric",
|
|
78746
|
-
field: "
|
|
79714
|
+
field: "energy",
|
|
78747
79715
|
quantity: t("the energy used", "l’energia consumata"),
|
|
78748
79716
|
label: t("Energy", "Energia"),
|
|
78749
79717
|
unit: "kWh",
|
|
@@ -78751,7 +79719,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78751
79719
|
},
|
|
78752
79720
|
{
|
|
78753
79721
|
kind: "numeric",
|
|
78754
|
-
field: "
|
|
79722
|
+
field: "voltage",
|
|
78755
79723
|
quantity: t("the voltage", "la tensione"),
|
|
78756
79724
|
label: t("Voltage", "Tensione"),
|
|
78757
79725
|
unit: "V",
|
|
@@ -78759,7 +79727,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78759
79727
|
},
|
|
78760
79728
|
{
|
|
78761
79729
|
kind: "numeric",
|
|
78762
|
-
field: "
|
|
79730
|
+
field: "current",
|
|
78763
79731
|
quantity: t("the current", "la corrente"),
|
|
78764
79732
|
label: t("Current", "Corrente"),
|
|
78765
79733
|
unit: "A",
|
|
@@ -78776,13 +79744,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78776
79744
|
label: t("Where", "Posizione"),
|
|
78777
79745
|
phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
|
|
78778
79746
|
icon: "map-pin"
|
|
78779
|
-
}, {
|
|
78780
|
-
kind: "numeric",
|
|
78781
|
-
field: "batteryPercent",
|
|
78782
|
-
quantity: t("the phone battery", "la batteria del telefono"),
|
|
78783
|
-
label: t("Battery", "Batteria"),
|
|
78784
|
-
unit: "%",
|
|
78785
|
-
icon: "battery"
|
|
78786
79747
|
}]
|
|
78787
79748
|
},
|
|
78788
79749
|
"pressure-sensor": {
|
|
@@ -78790,7 +79751,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78790
79751
|
noun: t("Pressure", "Pressione"),
|
|
78791
79752
|
state: [{
|
|
78792
79753
|
kind: "numeric",
|
|
78793
|
-
field: "
|
|
79754
|
+
field: "pressure",
|
|
78794
79755
|
quantity: t("the pressure", "la pressione"),
|
|
78795
79756
|
label: t("Pressure", "Pressione"),
|
|
78796
79757
|
unit: "hPa",
|
|
@@ -78826,7 +79787,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78826
79787
|
noun: t("Temperature", "Temperatura"),
|
|
78827
79788
|
state: [{
|
|
78828
79789
|
kind: "numeric",
|
|
78829
|
-
field: "
|
|
79790
|
+
field: "temperature",
|
|
78830
79791
|
quantity: t("the temperature", "la temperatura"),
|
|
78831
79792
|
label: t("Temperature", "Temperatura"),
|
|
78832
79793
|
unit: "°C",
|
|
@@ -78897,7 +79858,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78897
79858
|
state: [
|
|
78898
79859
|
{
|
|
78899
79860
|
kind: "numeric",
|
|
78900
|
-
field: "
|
|
79861
|
+
field: "level",
|
|
78901
79862
|
quantity: t("the battery level", "il livello della batteria"),
|
|
78902
79863
|
label: t("Battery", "Batteria"),
|
|
78903
79864
|
unit: "%",
|
|
@@ -78939,7 +79900,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78939
79900
|
icon: "battery-charging"
|
|
78940
79901
|
}
|
|
78941
79902
|
],
|
|
78942
|
-
events: { onStatusChanged: { notOperatorFacing: "the
|
|
79903
|
+
events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
|
|
78943
79904
|
extraEvents: [{
|
|
78944
79905
|
category: EventCategory.DeviceAwake,
|
|
78945
79906
|
label: t("Woke up", "Risvegliato"),
|
|
@@ -78957,7 +79918,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78957
79918
|
noun: t("Network link", "Collegamento di rete"),
|
|
78958
79919
|
state: [{
|
|
78959
79920
|
kind: "numeric",
|
|
78960
|
-
field: "
|
|
79921
|
+
field: "signal",
|
|
78961
79922
|
quantity: t("the signal strength", "l’intensità del segnale"),
|
|
78962
79923
|
label: t("Signal", "Segnale"),
|
|
78963
79924
|
unit: "%",
|
|
@@ -79050,6 +80011,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79050
80011
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79051
80012
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79052
80013
|
var SYSTEM_CAP_VOCABULARY = {
|
|
80014
|
+
"action-source": system(INTERNAL),
|
|
80015
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79053
80016
|
"addon-pages": system(UI_PLUMBING),
|
|
79054
80017
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79055
80018
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79271,6 +80234,31 @@ Object.freeze({
|
|
|
79271
80234
|
form: "single",
|
|
79272
80235
|
optional: false
|
|
79273
80236
|
}],
|
|
80237
|
+
"actions.get": [{
|
|
80238
|
+
name: "deviceId",
|
|
80239
|
+
form: "single",
|
|
80240
|
+
optional: true
|
|
80241
|
+
}],
|
|
80242
|
+
"actions.getLinks": [{
|
|
80243
|
+
name: "deviceId",
|
|
80244
|
+
form: "single",
|
|
80245
|
+
optional: false
|
|
80246
|
+
}],
|
|
80247
|
+
"actions.listForCamera": [{
|
|
80248
|
+
name: "deviceId",
|
|
80249
|
+
form: "single",
|
|
80250
|
+
optional: false
|
|
80251
|
+
}],
|
|
80252
|
+
"actions.run": [{
|
|
80253
|
+
name: "deviceId",
|
|
80254
|
+
form: "single",
|
|
80255
|
+
optional: true
|
|
80256
|
+
}],
|
|
80257
|
+
"actions.setLinks": [{
|
|
80258
|
+
name: "deviceId",
|
|
80259
|
+
form: "single",
|
|
80260
|
+
optional: false
|
|
80261
|
+
}],
|
|
79274
80262
|
"addonSettings.getDeviceSettings": [{
|
|
79275
80263
|
name: "deviceId",
|
|
79276
80264
|
form: "single",
|
|
@@ -80222,6 +81210,11 @@ Object.freeze({
|
|
|
80222
81210
|
form: "single",
|
|
80223
81211
|
optional: false
|
|
80224
81212
|
}],
|
|
81213
|
+
"groupActive.getStatus": [{
|
|
81214
|
+
name: "deviceId",
|
|
81215
|
+
form: "single",
|
|
81216
|
+
optional: false
|
|
81217
|
+
}],
|
|
80225
81218
|
"groupCommands.getStatus": [{
|
|
80226
81219
|
name: "deviceId",
|
|
80227
81220
|
form: "single",
|
|
@@ -80432,6 +81425,11 @@ Object.freeze({
|
|
|
80432
81425
|
form: "single",
|
|
80433
81426
|
optional: false
|
|
80434
81427
|
}],
|
|
81428
|
+
"meter.getStatus": [{
|
|
81429
|
+
name: "deviceId",
|
|
81430
|
+
form: "single",
|
|
81431
|
+
optional: false
|
|
81432
|
+
}],
|
|
80435
81433
|
"motion.getStatus": [{
|
|
80436
81434
|
name: "deviceId",
|
|
80437
81435
|
form: "single",
|
|
@@ -82039,7 +83037,6 @@ Object.freeze({
|
|
|
82039
83037
|
"network-access": "ingress",
|
|
82040
83038
|
"smtp-provider": "email"
|
|
82041
83039
|
});
|
|
82042
|
-
DeviceType.Camera;
|
|
82043
83040
|
/**
|
|
82044
83041
|
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
82045
83042
|
* `z.infer`, they do not restate the shape.
|
|
@@ -83343,12 +84340,13 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
|
83343
84340
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
83344
84341
|
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
83345
84342
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
84343
|
+
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
83346
84344
|
var MB = 1024 * 1024;
|
|
83347
84345
|
1024 * MB, 3072 * MB;
|
|
83348
84346
|
//#endregion
|
|
83349
84347
|
//#region src/custom-actions.ts
|
|
83350
84348
|
/**
|
|
83351
|
-
* Google Home
|
|
84349
|
+
* Google Home Export — customActions catalog.
|
|
83352
84350
|
*
|
|
83353
84351
|
* One entry. The settings form's `addon-action-button` dispatches through the
|
|
83354
84352
|
* generic `api.addons.custom.mutate({ addonId, action, input })` channel and
|
|
@@ -83493,7 +84491,7 @@ var TRAIT_CATALOG = [
|
|
|
83493
84491
|
attributes: () => ({}),
|
|
83494
84492
|
projectState: (rawStatus) => {
|
|
83495
84493
|
const parsed = BrightnessStatusSchema.safeParse(rawStatus);
|
|
83496
|
-
return parsed.success ? { brightness: Math.round(parsed.data.
|
|
84494
|
+
return parsed.success ? { brightness: Math.round(parsed.data.level) } : null;
|
|
83497
84495
|
},
|
|
83498
84496
|
commands: ["action.devices.commands.BrightnessAbsolute"],
|
|
83499
84497
|
resolveCommand: ({ deviceId, command, params }) => {
|
|
@@ -84427,7 +85425,7 @@ var DEFAULT_SETTINGS = {
|
|
|
84427
85425
|
//#endregion
|
|
84428
85426
|
//#region src/export-google.addon.ts
|
|
84429
85427
|
/**
|
|
84430
|
-
* Google Home
|
|
85428
|
+
* Google Home Export addon — hub-side.
|
|
84431
85429
|
*
|
|
84432
85430
|
* Architecture:
|
|
84433
85431
|
*
|