@camstack/addon-export-alexa 1.2.172 → 1.2.173
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 +6 -0
- package/dist/export-alexa.addon.js +812 -204
- package/dist/export-alexa.addon.mjs +812 -204
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ let node_path = require("node:path");
|
|
|
34
34
|
node_path = __toESM(node_path, 1);
|
|
35
35
|
require("node:child_process");
|
|
36
36
|
require("node:zlib");
|
|
37
|
-
//#region ../types/dist/event-category-
|
|
37
|
+
//#region ../types/dist/event-category-DmZDPDf_.mjs
|
|
38
38
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
39
39
|
EventCategory["SystemBoot"] = "system.boot";
|
|
40
40
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -661,7 +661,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
661
661
|
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
662
662
|
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
663
663
|
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
664
|
-
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
664
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
|
|
665
665
|
*/
|
|
666
666
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
667
667
|
/**
|
|
@@ -799,6 +799,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
799
799
|
*/
|
|
800
800
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
801
801
|
/**
|
|
802
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
803
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
804
|
+
*/
|
|
805
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
806
|
+
/**
|
|
802
807
|
* Progress update from a running model conversion job.
|
|
803
808
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
804
809
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5477,7 +5482,7 @@ var ZodIssueCode = {
|
|
|
5477
5482
|
var ZodFirstPartyTypeKind;
|
|
5478
5483
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5479
5484
|
//#endregion
|
|
5480
|
-
//#region ../types/dist/sleep
|
|
5485
|
+
//#region ../types/dist/sleep-Crlmu_tO.mjs
|
|
5481
5486
|
/**
|
|
5482
5487
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5483
5488
|
* window to float samples (D455).
|
|
@@ -8548,6 +8553,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8548
8553
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8549
8554
|
var CAP_NAMES = Object.freeze([
|
|
8550
8555
|
"accessories",
|
|
8556
|
+
"action-source",
|
|
8557
|
+
"actions",
|
|
8551
8558
|
"addon-pages",
|
|
8552
8559
|
"addon-pages-source",
|
|
8553
8560
|
"addon-routes",
|
|
@@ -8736,11 +8743,11 @@ var CAP_NAMES = Object.freeze([
|
|
|
8736
8743
|
Object.freeze({
|
|
8737
8744
|
"air-quality-sensor": [
|
|
8738
8745
|
{
|
|
8739
|
-
"path": "
|
|
8746
|
+
"path": "co2",
|
|
8740
8747
|
"valueType": "number"
|
|
8741
8748
|
},
|
|
8742
8749
|
{
|
|
8743
|
-
"path": "
|
|
8750
|
+
"path": "voc",
|
|
8744
8751
|
"valueType": "number"
|
|
8745
8752
|
},
|
|
8746
8753
|
{
|
|
@@ -8790,7 +8797,7 @@ Object.freeze({
|
|
|
8790
8797
|
}
|
|
8791
8798
|
],
|
|
8792
8799
|
"ambient-light-sensor": [{
|
|
8793
|
-
"path": "
|
|
8800
|
+
"path": "illuminance",
|
|
8794
8801
|
"valueType": "number"
|
|
8795
8802
|
}],
|
|
8796
8803
|
"audio-metrics": [
|
|
@@ -8851,7 +8858,7 @@ Object.freeze({
|
|
|
8851
8858
|
],
|
|
8852
8859
|
"battery": [
|
|
8853
8860
|
{
|
|
8854
|
-
"path": "
|
|
8861
|
+
"path": "level",
|
|
8855
8862
|
"valueType": "number"
|
|
8856
8863
|
},
|
|
8857
8864
|
{
|
|
@@ -8873,7 +8880,7 @@ Object.freeze({
|
|
|
8873
8880
|
"valueType": "number"
|
|
8874
8881
|
},
|
|
8875
8882
|
{
|
|
8876
|
-
"path": "
|
|
8883
|
+
"path": "voltage",
|
|
8877
8884
|
"valueType": "number"
|
|
8878
8885
|
},
|
|
8879
8886
|
{
|
|
@@ -8894,7 +8901,7 @@ Object.freeze({
|
|
|
8894
8901
|
"valueType": "boolean"
|
|
8895
8902
|
}],
|
|
8896
8903
|
"brightness": [{
|
|
8897
|
-
"path": "
|
|
8904
|
+
"path": "level",
|
|
8898
8905
|
"valueType": "number"
|
|
8899
8906
|
}],
|
|
8900
8907
|
"broker": [{
|
|
@@ -9095,7 +9102,7 @@ Object.freeze({
|
|
|
9095
9102
|
"valueType": "number"
|
|
9096
9103
|
},
|
|
9097
9104
|
{
|
|
9098
|
-
"path": "
|
|
9105
|
+
"path": "colorTemperature",
|
|
9099
9106
|
"valueType": "number"
|
|
9100
9107
|
}
|
|
9101
9108
|
],
|
|
@@ -9274,15 +9281,15 @@ Object.freeze({
|
|
|
9274
9281
|
"valueType": "string"
|
|
9275
9282
|
},
|
|
9276
9283
|
{
|
|
9277
|
-
"path": "
|
|
9284
|
+
"path": "remaining",
|
|
9278
9285
|
"valueType": "number"
|
|
9279
9286
|
},
|
|
9280
9287
|
{
|
|
9281
|
-
"path": "
|
|
9288
|
+
"path": "delayedStart",
|
|
9282
9289
|
"valueType": "number"
|
|
9283
9290
|
},
|
|
9284
9291
|
{
|
|
9285
|
-
"path": "
|
|
9292
|
+
"path": "progress",
|
|
9286
9293
|
"valueType": "number"
|
|
9287
9294
|
},
|
|
9288
9295
|
{
|
|
@@ -9396,7 +9403,7 @@ Object.freeze({
|
|
|
9396
9403
|
],
|
|
9397
9404
|
"fan-control": [
|
|
9398
9405
|
{
|
|
9399
|
-
"path": "
|
|
9406
|
+
"path": "speed",
|
|
9400
9407
|
"valueType": "number"
|
|
9401
9408
|
},
|
|
9402
9409
|
{
|
|
@@ -9496,7 +9503,7 @@ Object.freeze({
|
|
|
9496
9503
|
}
|
|
9497
9504
|
],
|
|
9498
9505
|
"humidity-sensor": [{
|
|
9499
|
-
"path": "
|
|
9506
|
+
"path": "humidity",
|
|
9500
9507
|
"valueType": "number"
|
|
9501
9508
|
}],
|
|
9502
9509
|
"image": [{
|
|
@@ -9606,7 +9613,7 @@ Object.freeze({
|
|
|
9606
9613
|
"valueType": "number"
|
|
9607
9614
|
},
|
|
9608
9615
|
{
|
|
9609
|
-
"path": "
|
|
9616
|
+
"path": "progress",
|
|
9610
9617
|
"valueType": "number"
|
|
9611
9618
|
},
|
|
9612
9619
|
{
|
|
@@ -9685,11 +9692,11 @@ Object.freeze({
|
|
|
9685
9692
|
"valueType": "string"
|
|
9686
9693
|
},
|
|
9687
9694
|
{
|
|
9688
|
-
"path": "
|
|
9695
|
+
"path": "position",
|
|
9689
9696
|
"valueType": "number"
|
|
9690
9697
|
},
|
|
9691
9698
|
{
|
|
9692
|
-
"path": "
|
|
9699
|
+
"path": "duration",
|
|
9693
9700
|
"valueType": "number"
|
|
9694
9701
|
},
|
|
9695
9702
|
{
|
|
@@ -9791,11 +9798,11 @@ Object.freeze({
|
|
|
9791
9798
|
]
|
|
9792
9799
|
},
|
|
9793
9800
|
{
|
|
9794
|
-
"path": "
|
|
9801
|
+
"path": "signal",
|
|
9795
9802
|
"valueType": "number"
|
|
9796
9803
|
},
|
|
9797
9804
|
{
|
|
9798
|
-
"path": "
|
|
9805
|
+
"path": "rssi",
|
|
9799
9806
|
"valueType": "number"
|
|
9800
9807
|
},
|
|
9801
9808
|
{
|
|
@@ -9850,6 +9857,18 @@ Object.freeze({
|
|
|
9850
9857
|
"path": "foodLevel",
|
|
9851
9858
|
"valueType": "number"
|
|
9852
9859
|
},
|
|
9860
|
+
{
|
|
9861
|
+
"path": "bowlFood",
|
|
9862
|
+
"valueType": "number"
|
|
9863
|
+
},
|
|
9864
|
+
{
|
|
9865
|
+
"path": "eating",
|
|
9866
|
+
"valueType": "boolean"
|
|
9867
|
+
},
|
|
9868
|
+
{
|
|
9869
|
+
"path": "supportsMarkRefilled",
|
|
9870
|
+
"valueType": "boolean"
|
|
9871
|
+
},
|
|
9853
9872
|
{
|
|
9854
9873
|
"path": "food1",
|
|
9855
9874
|
"valueType": "number"
|
|
@@ -9914,23 +9933,23 @@ Object.freeze({
|
|
|
9914
9933
|
],
|
|
9915
9934
|
"power-meter": [
|
|
9916
9935
|
{
|
|
9917
|
-
"path": "
|
|
9936
|
+
"path": "power",
|
|
9918
9937
|
"valueType": "number"
|
|
9919
9938
|
},
|
|
9920
9939
|
{
|
|
9921
|
-
"path": "
|
|
9940
|
+
"path": "energy",
|
|
9922
9941
|
"valueType": "number"
|
|
9923
9942
|
},
|
|
9924
9943
|
{
|
|
9925
|
-
"path": "
|
|
9944
|
+
"path": "voltage",
|
|
9926
9945
|
"valueType": "number"
|
|
9927
9946
|
},
|
|
9928
9947
|
{
|
|
9929
|
-
"path": "
|
|
9948
|
+
"path": "current",
|
|
9930
9949
|
"valueType": "number"
|
|
9931
9950
|
},
|
|
9932
9951
|
{
|
|
9933
|
-
"path": "
|
|
9952
|
+
"path": "apparentPower",
|
|
9934
9953
|
"valueType": "number"
|
|
9935
9954
|
},
|
|
9936
9955
|
{
|
|
@@ -9958,14 +9977,10 @@ Object.freeze({
|
|
|
9958
9977
|
{
|
|
9959
9978
|
"path": "gps.accuracyMeters",
|
|
9960
9979
|
"valueType": "number"
|
|
9961
|
-
},
|
|
9962
|
-
{
|
|
9963
|
-
"path": "batteryPercent",
|
|
9964
|
-
"valueType": "number"
|
|
9965
9980
|
}
|
|
9966
9981
|
],
|
|
9967
9982
|
"pressure-sensor": [{
|
|
9968
|
-
"path": "
|
|
9983
|
+
"path": "pressure",
|
|
9969
9984
|
"valueType": "number"
|
|
9970
9985
|
}],
|
|
9971
9986
|
"privacy-mask": [{
|
|
@@ -10279,7 +10294,7 @@ Object.freeze({
|
|
|
10279
10294
|
"valueType": "boolean"
|
|
10280
10295
|
}],
|
|
10281
10296
|
"temperature-sensor": [{
|
|
10282
|
-
"path": "
|
|
10297
|
+
"path": "temperature",
|
|
10283
10298
|
"valueType": "number"
|
|
10284
10299
|
}],
|
|
10285
10300
|
"update": [
|
|
@@ -10327,7 +10342,7 @@ Object.freeze({
|
|
|
10327
10342
|
"valueType": "string"
|
|
10328
10343
|
},
|
|
10329
10344
|
{
|
|
10330
|
-
"path": "
|
|
10345
|
+
"path": "progress",
|
|
10331
10346
|
"valueType": "number"
|
|
10332
10347
|
},
|
|
10333
10348
|
{
|
|
@@ -10812,7 +10827,7 @@ function errMsg(err) {
|
|
|
10812
10827
|
return String(err);
|
|
10813
10828
|
}
|
|
10814
10829
|
//#endregion
|
|
10815
|
-
//#region ../types/dist/composition-
|
|
10830
|
+
//#region ../types/dist/composition-CZImLpOI.mjs
|
|
10816
10831
|
/**
|
|
10817
10832
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10818
10833
|
*
|
|
@@ -15619,6 +15634,14 @@ var AutomationConditionLeafSchema = object({
|
|
|
15619
15634
|
array(union([string(), number()]))
|
|
15620
15635
|
])
|
|
15621
15636
|
});
|
|
15637
|
+
var AutomationConditionStationaryPresentSchema = object({
|
|
15638
|
+
kind: literal("stationary-present"),
|
|
15639
|
+
deviceId: number().int().nonnegative(),
|
|
15640
|
+
/** Class names; a macro class matches every raw class that maps to it. */
|
|
15641
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15642
|
+
/** The parked object must be in at least one of these zones. */
|
|
15643
|
+
zones: array(string().min(1)).min(1).optional()
|
|
15644
|
+
});
|
|
15622
15645
|
/**
|
|
15623
15646
|
* The expression leaf, declared as a plain object rather than an intersection
|
|
15624
15647
|
* with {@link ExpressionSourceSchema}: a discriminated union has to be able to
|
|
@@ -15652,7 +15675,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
|
|
|
15652
15675
|
child: AutomationConditionSchema
|
|
15653
15676
|
}),
|
|
15654
15677
|
AutomationConditionLeafSchema,
|
|
15655
|
-
AutomationConditionExpressionSchema
|
|
15678
|
+
AutomationConditionExpressionSchema,
|
|
15679
|
+
AutomationConditionStationaryPresentSchema
|
|
15656
15680
|
]));
|
|
15657
15681
|
/**
|
|
15658
15682
|
* What starts a run.
|
|
@@ -15693,7 +15717,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15693
15717
|
kind: literal("schedule"),
|
|
15694
15718
|
cron: string().min(1).max(120)
|
|
15695
15719
|
}),
|
|
15696
|
-
object({ kind: literal("manual") })
|
|
15720
|
+
object({ kind: literal("manual") }),
|
|
15721
|
+
object({
|
|
15722
|
+
kind: literal("detection"),
|
|
15723
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15724
|
+
* matches every raw class that maps to it; any other name matches
|
|
15725
|
+
* exactly. */
|
|
15726
|
+
classes: array(string().min(1)).min(1),
|
|
15727
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15728
|
+
/** The track must have visited at least one of these zones. */
|
|
15729
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15730
|
+
/** Best-so-far confidence the track must reach. */
|
|
15731
|
+
minScore: number().min(0).max(1).optional()
|
|
15732
|
+
}),
|
|
15733
|
+
object({
|
|
15734
|
+
kind: literal("stationary"),
|
|
15735
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15736
|
+
/** Class names; a macro class matches like the detection trigger. */
|
|
15737
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15738
|
+
/** The parked object must be in at least one of these zones. */
|
|
15739
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15740
|
+
/** `appeared`: it became parked. `departed`: the registry retired it.
|
|
15741
|
+
* The vocabulary of `PipelineAnalyticsStationaryChanged`. */
|
|
15742
|
+
phase: _enum(["appeared", "departed"])
|
|
15743
|
+
}),
|
|
15744
|
+
object({
|
|
15745
|
+
kind: literal("interval"),
|
|
15746
|
+
minutes: number().int().min(1).max(1440)
|
|
15747
|
+
})
|
|
15697
15748
|
]);
|
|
15698
15749
|
/**
|
|
15699
15750
|
* One action step.
|
|
@@ -15713,28 +15764,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15713
15764
|
* is called. The runner still receives a number and is untouched; the
|
|
15714
15765
|
* resolution is the recipe's job, not the runner's.
|
|
15715
15766
|
*/
|
|
15767
|
+
var AutomationWaitStepSchema = object({
|
|
15768
|
+
kind: literal("wait"),
|
|
15769
|
+
seconds: number().min(0).max(300)
|
|
15770
|
+
});
|
|
15771
|
+
var AutomationCapStepSchema = object({
|
|
15772
|
+
kind: literal("cap"),
|
|
15773
|
+
/**
|
|
15774
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15775
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15776
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15777
|
+
*/
|
|
15778
|
+
deviceId: union([
|
|
15779
|
+
number().int(),
|
|
15780
|
+
array(number().int()).min(1),
|
|
15781
|
+
object({ $var: string().min(1) })
|
|
15782
|
+
]),
|
|
15783
|
+
cap: string().min(1),
|
|
15784
|
+
method: string().min(1),
|
|
15785
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15786
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15787
|
+
* the expression leaf. */
|
|
15788
|
+
args: record(string(), unknown()).optional()
|
|
15789
|
+
});
|
|
15790
|
+
/**
|
|
15791
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15792
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15793
|
+
*/
|
|
15794
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15716
15795
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15796
|
+
AutomationWaitStepSchema,
|
|
15797
|
+
AutomationCapStepSchema,
|
|
15717
15798
|
object({
|
|
15718
|
-
kind: literal("
|
|
15719
|
-
|
|
15720
|
-
|
|
15721
|
-
|
|
15722
|
-
|
|
15723
|
-
|
|
15724
|
-
|
|
15725
|
-
|
|
15726
|
-
|
|
15727
|
-
*/
|
|
15728
|
-
deviceId: union([
|
|
15729
|
-
number().int(),
|
|
15730
|
-
array(number().int()).min(1),
|
|
15731
|
-
object({ $var: string().min(1) })
|
|
15732
|
-
]),
|
|
15733
|
-
cap: string().min(1),
|
|
15734
|
-
method: string().min(1),
|
|
15735
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15736
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15737
|
-
args: record(string(), unknown()).optional()
|
|
15799
|
+
kind: literal("action"),
|
|
15800
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15801
|
+
actionId: string().min(1),
|
|
15802
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15803
|
+
variables: record(string(), union([
|
|
15804
|
+
string(),
|
|
15805
|
+
number(),
|
|
15806
|
+
boolean()
|
|
15807
|
+
])).optional()
|
|
15738
15808
|
}),
|
|
15739
15809
|
object({
|
|
15740
15810
|
kind: literal("code"),
|
|
@@ -15743,10 +15813,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15743
15813
|
code: string().min(1).max(2e4)
|
|
15744
15814
|
})
|
|
15745
15815
|
]);
|
|
15816
|
+
/**
|
|
15817
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15818
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15819
|
+
* actions. Absent means `single`.
|
|
15820
|
+
*
|
|
15821
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15822
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15823
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15824
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15825
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15826
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15827
|
+
* wait, never the single/queued limits.
|
|
15828
|
+
*/
|
|
15829
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15830
|
+
object({ mode: literal("single") }),
|
|
15831
|
+
object({ mode: literal("restart") }),
|
|
15832
|
+
object({
|
|
15833
|
+
mode: literal("queued"),
|
|
15834
|
+
max: number().int().min(1).max(10)
|
|
15835
|
+
}),
|
|
15836
|
+
object({
|
|
15837
|
+
mode: literal("parallel"),
|
|
15838
|
+
max: number().int().min(1).max(10)
|
|
15839
|
+
}),
|
|
15840
|
+
object({
|
|
15841
|
+
mode: literal("cooldown"),
|
|
15842
|
+
minutes: number().int().min(1).max(1440)
|
|
15843
|
+
})
|
|
15844
|
+
]);
|
|
15746
15845
|
var AutomationRecipeSchema = object({
|
|
15747
15846
|
triggers: array(AutomationTriggerSchema),
|
|
15748
15847
|
conditions: AutomationConditionSchema.optional(),
|
|
15749
|
-
actions: array(AutomationActionSchema)
|
|
15848
|
+
actions: array(AutomationActionSchema),
|
|
15849
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15850
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15851
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15852
|
+
});
|
|
15853
|
+
new Set([
|
|
15854
|
+
{
|
|
15855
|
+
id: "person",
|
|
15856
|
+
name: "Person"
|
|
15857
|
+
},
|
|
15858
|
+
{
|
|
15859
|
+
id: "vehicle",
|
|
15860
|
+
name: "Vehicle"
|
|
15861
|
+
},
|
|
15862
|
+
{
|
|
15863
|
+
id: "animal",
|
|
15864
|
+
name: "Animal"
|
|
15865
|
+
},
|
|
15866
|
+
{
|
|
15867
|
+
id: "package",
|
|
15868
|
+
name: "Package"
|
|
15869
|
+
}
|
|
15870
|
+
].map((l) => l.id));
|
|
15871
|
+
var COCO_TO_MACRO = {
|
|
15872
|
+
mapping: {
|
|
15873
|
+
person: "person",
|
|
15874
|
+
bicycle: "vehicle",
|
|
15875
|
+
car: "vehicle",
|
|
15876
|
+
motorcycle: "vehicle",
|
|
15877
|
+
airplane: "vehicle",
|
|
15878
|
+
bus: "vehicle",
|
|
15879
|
+
train: "vehicle",
|
|
15880
|
+
truck: "vehicle",
|
|
15881
|
+
boat: "vehicle",
|
|
15882
|
+
bird: "animal",
|
|
15883
|
+
cat: "animal",
|
|
15884
|
+
dog: "animal",
|
|
15885
|
+
horse: "animal",
|
|
15886
|
+
sheep: "animal",
|
|
15887
|
+
cow: "animal",
|
|
15888
|
+
elephant: "animal",
|
|
15889
|
+
bear: "animal",
|
|
15890
|
+
zebra: "animal",
|
|
15891
|
+
giraffe: "animal",
|
|
15892
|
+
suitcase: "package",
|
|
15893
|
+
backpack: "package",
|
|
15894
|
+
handbag: "package"
|
|
15895
|
+
},
|
|
15896
|
+
preserveOriginal: false
|
|
15897
|
+
};
|
|
15898
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15899
|
+
/**
|
|
15900
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15901
|
+
* so the editor can paint every block green or red with its reason.
|
|
15902
|
+
*
|
|
15903
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15904
|
+
* every condition node (containers and leaves, including the ones a
|
|
15905
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15906
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15907
|
+
* for an Action run). Skipped
|
|
15908
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15909
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15910
|
+
*
|
|
15911
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15912
|
+
* vocabulary so an Action run records the same step shape.
|
|
15913
|
+
*/
|
|
15914
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15915
|
+
var TraceValueSchema = union([
|
|
15916
|
+
string(),
|
|
15917
|
+
number(),
|
|
15918
|
+
boolean(),
|
|
15919
|
+
_null(),
|
|
15920
|
+
array(union([string(), number()]))
|
|
15921
|
+
]);
|
|
15922
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15923
|
+
"ran",
|
|
15924
|
+
"skipped-trigger",
|
|
15925
|
+
"skipped-conditions",
|
|
15926
|
+
"skipped-cooldown",
|
|
15927
|
+
"skipped-overlap",
|
|
15928
|
+
"failed",
|
|
15929
|
+
"aborted"
|
|
15930
|
+
]);
|
|
15931
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15932
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15933
|
+
"pass",
|
|
15934
|
+
"fail",
|
|
15935
|
+
"not-evaluated"
|
|
15936
|
+
]);
|
|
15937
|
+
var AutomationTriggerTraceSchema = object({
|
|
15938
|
+
kind: string().min(1),
|
|
15939
|
+
outcome: _enum(["pass", "fail"]),
|
|
15940
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
15941
|
+
reason: string(),
|
|
15942
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
15943
|
+
vars: record(string(), TraceValueSchema)
|
|
15944
|
+
});
|
|
15945
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
15946
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
15947
|
+
path: string().min(1),
|
|
15948
|
+
kind: _enum([
|
|
15949
|
+
"all",
|
|
15950
|
+
"any",
|
|
15951
|
+
"not",
|
|
15952
|
+
"condition",
|
|
15953
|
+
"expression",
|
|
15954
|
+
"stationary-present"
|
|
15955
|
+
]),
|
|
15956
|
+
outcome: TraceNodeOutcomeSchema,
|
|
15957
|
+
reason: string(),
|
|
15958
|
+
deviceId: number().int().optional(),
|
|
15959
|
+
cap: string().optional(),
|
|
15960
|
+
fieldPath: string().optional(),
|
|
15961
|
+
operator: string().optional(),
|
|
15962
|
+
expected: TraceValueSchema.optional(),
|
|
15963
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
15964
|
+
observed: TraceValueSchema.optional()
|
|
15965
|
+
});
|
|
15966
|
+
var AutomationRunVerdictSchema = object({
|
|
15967
|
+
mode: AutomationRunModeSchema,
|
|
15968
|
+
decision: _enum([
|
|
15969
|
+
"run",
|
|
15970
|
+
"queued",
|
|
15971
|
+
"restart",
|
|
15972
|
+
"drop",
|
|
15973
|
+
"cooldown",
|
|
15974
|
+
"bypass"
|
|
15975
|
+
]),
|
|
15976
|
+
reason: string()
|
|
15977
|
+
});
|
|
15978
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
15979
|
+
var AutomationStepTraceSchema = object({
|
|
15980
|
+
/** `actions.<i>` */
|
|
15981
|
+
path: string().min(1),
|
|
15982
|
+
kind: string().min(1),
|
|
15983
|
+
cap: string().optional(),
|
|
15984
|
+
method: string().optional(),
|
|
15985
|
+
deviceId: number().int().optional(),
|
|
15986
|
+
startedAt: number().optional(),
|
|
15987
|
+
endedAt: number().optional(),
|
|
15988
|
+
outcome: _enum([
|
|
15989
|
+
"ok",
|
|
15990
|
+
"error",
|
|
15991
|
+
"not-run"
|
|
15992
|
+
]),
|
|
15993
|
+
message: string().optional()
|
|
15994
|
+
});
|
|
15995
|
+
var AutomationRunTraceSchema = object({
|
|
15996
|
+
runId: string().min(1),
|
|
15997
|
+
startedAt: number(),
|
|
15998
|
+
endedAt: number(),
|
|
15999
|
+
trigger: AutomationTriggerTraceSchema,
|
|
16000
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
16001
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
16002
|
+
steps: array(AutomationStepTraceSchema),
|
|
16003
|
+
outcome: AutomationRunOutcomeSchema,
|
|
16004
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
16005
|
+
repeat: number().int().min(1),
|
|
16006
|
+
/** When the latest of those repeats happened. */
|
|
16007
|
+
lastAt: number()
|
|
16008
|
+
});
|
|
16009
|
+
/**
|
|
16010
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
16011
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
16012
|
+
*/
|
|
16013
|
+
var AutomationStateDocSchema = object({
|
|
16014
|
+
version: literal(1),
|
|
16015
|
+
lastRunStartedAt: number().nullable(),
|
|
16016
|
+
traces: array(AutomationRunTraceSchema)
|
|
16017
|
+
});
|
|
16018
|
+
/**
|
|
16019
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
16020
|
+
* declared as LIST ENTRIES, never as devices.
|
|
16021
|
+
*
|
|
16022
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
16023
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
16024
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
16025
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
16026
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
16027
|
+
*
|
|
16028
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
16029
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
16030
|
+
* runtime.
|
|
16031
|
+
*/
|
|
16032
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
16033
|
+
var ActionVariableTypeSchema = _enum([
|
|
16034
|
+
"string",
|
|
16035
|
+
"number",
|
|
16036
|
+
"boolean",
|
|
16037
|
+
"select"
|
|
16038
|
+
]);
|
|
16039
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
16040
|
+
var ActionVariableValueSchema = union([
|
|
16041
|
+
string(),
|
|
16042
|
+
number(),
|
|
16043
|
+
boolean()
|
|
16044
|
+
]);
|
|
16045
|
+
/**
|
|
16046
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
16047
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
16048
|
+
*/
|
|
16049
|
+
var ActionVariableSchema = object({
|
|
16050
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
16051
|
+
label: string().min(1).max(120).optional(),
|
|
16052
|
+
type: ActionVariableTypeSchema,
|
|
16053
|
+
required: boolean().optional(),
|
|
16054
|
+
default: ActionVariableValueSchema.optional(),
|
|
16055
|
+
/** The allowed values of a `select`. */
|
|
16056
|
+
options: array(string().min(1)).min(1).optional()
|
|
16057
|
+
}).superRefine((v, ctx) => {
|
|
16058
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
16059
|
+
code: "custom",
|
|
16060
|
+
message: "a select variable needs options",
|
|
16061
|
+
path: ["options"]
|
|
16062
|
+
});
|
|
16063
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
16064
|
+
code: "custom",
|
|
16065
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
16066
|
+
path: ["default"]
|
|
16067
|
+
});
|
|
16068
|
+
});
|
|
16069
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
16070
|
+
function variableValueError(variable, value) {
|
|
16071
|
+
switch (variable.type) {
|
|
16072
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
16073
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
16074
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
16075
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
16076
|
+
}
|
|
16077
|
+
}
|
|
16078
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
16079
|
+
function isInternalActionId(actionId) {
|
|
16080
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
16081
|
+
}
|
|
16082
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
16083
|
+
function addonIdOfActionId(actionId) {
|
|
16084
|
+
if (isInternalActionId(actionId)) return null;
|
|
16085
|
+
const at = actionId.indexOf(":");
|
|
16086
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
16087
|
+
}
|
|
16088
|
+
var ActionStatusSchema = object({
|
|
16089
|
+
isRunning: boolean(),
|
|
16090
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
16091
|
+
lastRunAt: number().nullable(),
|
|
16092
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
16093
|
+
lastError: string().nullable()
|
|
16094
|
+
});
|
|
16095
|
+
var ActionEntrySchema = object({
|
|
16096
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
16097
|
+
id: string().min(3),
|
|
16098
|
+
name: string().min(1).max(120),
|
|
16099
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
16100
|
+
addonId: string().min(1),
|
|
16101
|
+
source: ActionSourceKindSchema,
|
|
16102
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
16103
|
+
readOnly: boolean(),
|
|
16104
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
16105
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
16106
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
16107
|
+
status: ActionStatusSchema
|
|
16108
|
+
}).superRefine((entry, ctx) => {
|
|
16109
|
+
if (entry.source === "internal") {
|
|
16110
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
16111
|
+
code: "custom",
|
|
16112
|
+
message: "an internal action id is internal:<uuid>",
|
|
16113
|
+
path: ["id"]
|
|
16114
|
+
});
|
|
16115
|
+
return;
|
|
16116
|
+
}
|
|
16117
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
16118
|
+
code: "custom",
|
|
16119
|
+
message: "only an internal action carries steps",
|
|
16120
|
+
path: ["steps"]
|
|
16121
|
+
});
|
|
16122
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
16123
|
+
code: "custom",
|
|
16124
|
+
message: "an addon action is read-only here",
|
|
16125
|
+
path: ["readOnly"]
|
|
16126
|
+
});
|
|
16127
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
16128
|
+
code: "custom",
|
|
16129
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
16130
|
+
path: ["id"]
|
|
16131
|
+
});
|
|
16132
|
+
});
|
|
16133
|
+
/** What an operator writes for an internal action. */
|
|
16134
|
+
var ActionInputSchema = object({
|
|
16135
|
+
name: string().min(1).max(120),
|
|
16136
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
16137
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
16138
|
+
});
|
|
16139
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
16140
|
+
var ActionRunOriginSchema = object({
|
|
16141
|
+
/** The automation block whose step started it. */
|
|
16142
|
+
blockId: string().min(1).optional() });
|
|
16143
|
+
/** `started` = the caller did not ask to wait. */
|
|
16144
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
16145
|
+
var ActionRunResultSchema = object({
|
|
16146
|
+
runId: string().min(1),
|
|
16147
|
+
outcome: ActionRunOutcomeSchema,
|
|
16148
|
+
/** Why it did not run, or what failed. */
|
|
16149
|
+
message: string().optional()
|
|
16150
|
+
});
|
|
16151
|
+
_enum([
|
|
16152
|
+
"not-found",
|
|
16153
|
+
"read-only",
|
|
16154
|
+
"invalid-variables",
|
|
16155
|
+
"invalid-steps",
|
|
16156
|
+
"not-linked",
|
|
16157
|
+
"busy"
|
|
16158
|
+
]);
|
|
16159
|
+
object({
|
|
16160
|
+
actionId: string(),
|
|
16161
|
+
runId: string(),
|
|
16162
|
+
isRunning: boolean(),
|
|
16163
|
+
/** Set when the run ended. */
|
|
16164
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
16165
|
+
lastRunAt: number().nullable(),
|
|
16166
|
+
lastError: string().nullable()
|
|
15750
16167
|
});
|
|
15751
16168
|
/**
|
|
15752
16169
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -18346,7 +18763,7 @@ var CompositionEventPlanSchema = object({
|
|
|
18346
18763
|
stateField: string(),
|
|
18347
18764
|
fieldKey: string()
|
|
18348
18765
|
});
|
|
18349
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
18766
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
18350
18767
|
var CompositionProblemSchema = object({
|
|
18351
18768
|
code: _enum([
|
|
18352
18769
|
"reserved-variant",
|
|
@@ -18665,7 +19082,7 @@ var GROUP_TEMPLATES = [
|
|
|
18665
19082
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18666
19083
|
role: DeviceRole.TemperatureSensor,
|
|
18667
19084
|
outputCap: "temperature-sensor",
|
|
18668
|
-
outputField: "
|
|
19085
|
+
outputField: "temperature",
|
|
18669
19086
|
quantity: "temperature",
|
|
18670
19087
|
defaultAggregate: "mean",
|
|
18671
19088
|
empty: "null",
|
|
@@ -18676,7 +19093,7 @@ var GROUP_TEMPLATES = [
|
|
|
18676
19093
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18677
19094
|
role: DeviceRole.HumiditySensor,
|
|
18678
19095
|
outputCap: "humidity-sensor",
|
|
18679
|
-
outputField: "
|
|
19096
|
+
outputField: "humidity",
|
|
18680
19097
|
quantity: "humidity",
|
|
18681
19098
|
defaultAggregate: "mean",
|
|
18682
19099
|
empty: "null",
|
|
@@ -18687,7 +19104,7 @@ var GROUP_TEMPLATES = [
|
|
|
18687
19104
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18688
19105
|
role: DeviceRole.PressureSensor,
|
|
18689
19106
|
outputCap: "pressure-sensor",
|
|
18690
|
-
outputField: "
|
|
19107
|
+
outputField: "pressure",
|
|
18691
19108
|
quantity: "pressure",
|
|
18692
19109
|
defaultAggregate: "mean",
|
|
18693
19110
|
empty: "null",
|
|
@@ -18698,7 +19115,7 @@ var GROUP_TEMPLATES = [
|
|
|
18698
19115
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18699
19116
|
role: DeviceRole.AmbientLightSensor,
|
|
18700
19117
|
outputCap: "ambient-light-sensor",
|
|
18701
|
-
outputField: "
|
|
19118
|
+
outputField: "illuminance",
|
|
18702
19119
|
quantity: "illuminance",
|
|
18703
19120
|
defaultAggregate: "mean",
|
|
18704
19121
|
empty: "null",
|
|
@@ -18709,7 +19126,7 @@ var GROUP_TEMPLATES = [
|
|
|
18709
19126
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18710
19127
|
role: DeviceRole.PowerSensor,
|
|
18711
19128
|
outputCap: "power-meter",
|
|
18712
|
-
outputField: "
|
|
19129
|
+
outputField: "power",
|
|
18713
19130
|
quantity: "power",
|
|
18714
19131
|
defaultAggregate: "sum",
|
|
18715
19132
|
empty: "omit",
|
|
@@ -18720,7 +19137,7 @@ var GROUP_TEMPLATES = [
|
|
|
18720
19137
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18721
19138
|
role: DeviceRole.EnergySensor,
|
|
18722
19139
|
outputCap: "power-meter",
|
|
18723
|
-
outputField: "
|
|
19140
|
+
outputField: "energy",
|
|
18724
19141
|
quantity: "energy",
|
|
18725
19142
|
defaultAggregate: "sum",
|
|
18726
19143
|
empty: "omit",
|
|
@@ -18731,7 +19148,7 @@ var GROUP_TEMPLATES = [
|
|
|
18731
19148
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18732
19149
|
role: DeviceRole.BatterySensor,
|
|
18733
19150
|
outputCap: "battery",
|
|
18734
|
-
outputField: "
|
|
19151
|
+
outputField: "level",
|
|
18735
19152
|
quantity: "percentage",
|
|
18736
19153
|
defaultAggregate: "mean",
|
|
18737
19154
|
empty: "null",
|
|
@@ -19309,7 +19726,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
19309
19726
|
kind: "mutation",
|
|
19310
19727
|
auth: "admin",
|
|
19311
19728
|
access: "view"
|
|
19312
|
-
})
|
|
19729
|
+
}), method(object({
|
|
19730
|
+
blockId: string().min(1),
|
|
19731
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
19732
|
+
runStartedAt: number().optional(),
|
|
19733
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
19734
|
+
}), _void(), {
|
|
19735
|
+
kind: "mutation",
|
|
19736
|
+
auth: "admin"
|
|
19737
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
19738
|
+
traces: array(AutomationRunTraceSchema),
|
|
19739
|
+
lastError: string().nullable()
|
|
19740
|
+
}), { auth: "admin" });
|
|
19313
19741
|
/**
|
|
19314
19742
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
19315
19743
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -44427,51 +44855,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
44427
44855
|
kind: "mutation",
|
|
44428
44856
|
auth: "admin"
|
|
44429
44857
|
});
|
|
44430
|
-
new Set([
|
|
44431
|
-
{
|
|
44432
|
-
id: "person",
|
|
44433
|
-
name: "Person"
|
|
44434
|
-
},
|
|
44435
|
-
{
|
|
44436
|
-
id: "vehicle",
|
|
44437
|
-
name: "Vehicle"
|
|
44438
|
-
},
|
|
44439
|
-
{
|
|
44440
|
-
id: "animal",
|
|
44441
|
-
name: "Animal"
|
|
44442
|
-
},
|
|
44443
|
-
{
|
|
44444
|
-
id: "package",
|
|
44445
|
-
name: "Package"
|
|
44446
|
-
}
|
|
44447
|
-
].map((l) => l.id));
|
|
44448
|
-
var COCO_TO_MACRO = {
|
|
44449
|
-
mapping: {
|
|
44450
|
-
person: "person",
|
|
44451
|
-
bicycle: "vehicle",
|
|
44452
|
-
car: "vehicle",
|
|
44453
|
-
motorcycle: "vehicle",
|
|
44454
|
-
airplane: "vehicle",
|
|
44455
|
-
bus: "vehicle",
|
|
44456
|
-
train: "vehicle",
|
|
44457
|
-
truck: "vehicle",
|
|
44458
|
-
boat: "vehicle",
|
|
44459
|
-
bird: "animal",
|
|
44460
|
-
cat: "animal",
|
|
44461
|
-
dog: "animal",
|
|
44462
|
-
horse: "animal",
|
|
44463
|
-
sheep: "animal",
|
|
44464
|
-
cow: "animal",
|
|
44465
|
-
elephant: "animal",
|
|
44466
|
-
bear: "animal",
|
|
44467
|
-
zebra: "animal",
|
|
44468
|
-
giraffe: "animal",
|
|
44469
|
-
suitcase: "package",
|
|
44470
|
-
backpack: "package",
|
|
44471
|
-
handbag: "package"
|
|
44472
|
-
},
|
|
44473
|
-
preserveOriginal: false
|
|
44474
|
-
};
|
|
44475
44858
|
var AUDIO_MACRO_LABELS = [
|
|
44476
44859
|
{
|
|
44477
44860
|
id: "speech",
|
|
@@ -56924,9 +57307,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56924
57307
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56925
57308
|
object({
|
|
56926
57309
|
/** Carbon dioxide concentration in ppm. */
|
|
56927
|
-
|
|
57310
|
+
co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56928
57311
|
/** Total volatile organic compounds in ppb. */
|
|
56929
|
-
|
|
57312
|
+
voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56930
57313
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56931
57314
|
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56932
57315
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
@@ -56939,7 +57322,7 @@ object({
|
|
|
56939
57322
|
DeviceType.Sensor;
|
|
56940
57323
|
object({
|
|
56941
57324
|
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56942
|
-
|
|
57325
|
+
illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56943
57326
|
precision: 0,
|
|
56944
57327
|
label: "Illuminance"
|
|
56945
57328
|
})),
|
|
@@ -57036,6 +57419,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
57036
57419
|
* would produce more than `maxPoints` samples. */
|
|
57037
57420
|
sampleEveryMs: number().int().positive().optional()
|
|
57038
57421
|
}), AudioMetricsHistorySchema);
|
|
57422
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57423
|
+
actionId: string().min(1),
|
|
57424
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57425
|
+
}), _void(), {
|
|
57426
|
+
kind: "mutation",
|
|
57427
|
+
auth: "admin"
|
|
57428
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57429
|
+
kind: "mutation",
|
|
57430
|
+
auth: "admin"
|
|
57431
|
+
});
|
|
57432
|
+
/**
|
|
57433
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57434
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57435
|
+
*
|
|
57436
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57437
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57438
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57439
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57440
|
+
* drift (D3).
|
|
57441
|
+
*
|
|
57442
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57443
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57444
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57445
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57446
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57447
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57448
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57449
|
+
*
|
|
57450
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57451
|
+
* logged — never queued.
|
|
57452
|
+
*/
|
|
57453
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57454
|
+
var ActionLinksSchema = object({
|
|
57455
|
+
deviceId: number().int().nonnegative(),
|
|
57456
|
+
actionIds: array(string().min(1)).max(100)
|
|
57457
|
+
});
|
|
57458
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57459
|
+
actionId: string().min(1),
|
|
57460
|
+
deviceId: number().int().nonnegative().optional()
|
|
57461
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57462
|
+
role: "viewer",
|
|
57463
|
+
auth: "protected",
|
|
57464
|
+
kind: "query",
|
|
57465
|
+
caller: "required"
|
|
57466
|
+
}), method(object({
|
|
57467
|
+
actionId: string().min(1),
|
|
57468
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57469
|
+
wait: boolean().optional(),
|
|
57470
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57471
|
+
deviceId: number().int().nonnegative().optional()
|
|
57472
|
+
}), ActionRunResultSchema, {
|
|
57473
|
+
role: "viewer",
|
|
57474
|
+
auth: "protected",
|
|
57475
|
+
kind: "mutation",
|
|
57476
|
+
caller: "required"
|
|
57477
|
+
}), method(ActionIdInput, _void(), {
|
|
57478
|
+
kind: "mutation",
|
|
57479
|
+
auth: "admin"
|
|
57480
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57481
|
+
kind: "mutation",
|
|
57482
|
+
auth: "admin"
|
|
57483
|
+
}), method(object({
|
|
57484
|
+
actionId: string().min(1),
|
|
57485
|
+
action: ActionInputSchema.partial()
|
|
57486
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57487
|
+
kind: "mutation",
|
|
57488
|
+
auth: "admin"
|
|
57489
|
+
}), method(ActionIdInput, _void(), {
|
|
57490
|
+
kind: "mutation",
|
|
57491
|
+
auth: "admin"
|
|
57492
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57493
|
+
role: "viewer",
|
|
57494
|
+
auth: "protected",
|
|
57495
|
+
kind: "query"
|
|
57496
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57497
|
+
kind: "mutation",
|
|
57498
|
+
auth: "admin"
|
|
57499
|
+
});
|
|
57039
57500
|
object({
|
|
57040
57501
|
/** Whether the automation is currently enabled. Disabled automations
|
|
57041
57502
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -57089,7 +57550,7 @@ var BatteryStatusSchema = object({
|
|
|
57089
57550
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
57090
57551
|
* declines to band a non-finite reading, which is the correct shape.
|
|
57091
57552
|
*/
|
|
57092
|
-
|
|
57553
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
57093
57554
|
/**
|
|
57094
57555
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
57095
57556
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -57099,7 +57560,7 @@ var BatteryStatusSchema = object({
|
|
|
57099
57560
|
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
57100
57561
|
* power fields yet, or the firmware reported neither. Before it existed,
|
|
57101
57562
|
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
57102
|
-
* was drawn "on battery alone" — the same D315 defect `
|
|
57563
|
+
* was drawn "on battery alone" — the same D315 defect `level` closed
|
|
57103
57564
|
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
57104
57565
|
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
57105
57566
|
*/
|
|
@@ -57123,7 +57584,7 @@ var BatteryStatusSchema = object({
|
|
|
57123
57584
|
* that only report charge. A second reading on this cap, not a second
|
|
57124
57585
|
* `numeric-sensor` on the same device.
|
|
57125
57586
|
*/
|
|
57126
|
-
|
|
57587
|
+
voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57127
57588
|
/**
|
|
57128
57589
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57129
57590
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57157,7 +57618,7 @@ var BatteryStatusSchema = object({
|
|
|
57157
57618
|
/**
|
|
57158
57619
|
* True when the source is a BINARY low-battery indicator (HA
|
|
57159
57620
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
57160
|
-
* charge level — `
|
|
57621
|
+
* charge level — `level` is then a coarse stand-in (100 = normal,
|
|
57161
57622
|
* sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
|
|
57162
57623
|
* misleading exact percentage. Absent/false → genuine 0–100 % reading.
|
|
57163
57624
|
*/
|
|
@@ -57188,26 +57649,26 @@ DeviceType.Sensor;
|
|
|
57188
57649
|
* controls to this single-method surface.
|
|
57189
57650
|
*
|
|
57190
57651
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
57191
|
-
*
|
|
57652
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
57192
57653
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
57193
57654
|
* should surface those via the device's `getSettingsUISchema()`
|
|
57194
57655
|
* instead of bloating this cap.
|
|
57195
57656
|
*/
|
|
57196
57657
|
var BrightnessStatusSchema = object({
|
|
57197
57658
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57198
|
-
|
|
57659
|
+
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57199
57660
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57200
57661
|
lastChangedAt: number()
|
|
57201
57662
|
});
|
|
57202
57663
|
DeviceType.Light, method(object({
|
|
57203
57664
|
deviceId: number().int().nonnegative(),
|
|
57204
|
-
|
|
57665
|
+
level: number().min(0).max(100)
|
|
57205
57666
|
}), _void(), {
|
|
57206
57667
|
kind: "mutation",
|
|
57207
57668
|
auth: "protected"
|
|
57208
57669
|
}), object({
|
|
57209
57670
|
deviceId: number(),
|
|
57210
|
-
|
|
57671
|
+
level: number().min(0).max(100),
|
|
57211
57672
|
lastChangedAt: number()
|
|
57212
57673
|
});
|
|
57213
57674
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
@@ -57708,11 +58169,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
|
|
|
57708
58169
|
}),
|
|
57709
58170
|
object({
|
|
57710
58171
|
mode: literal("mired"),
|
|
57711
|
-
|
|
58172
|
+
colorTemperature: number().int().min(50).max(1e3)
|
|
57712
58173
|
})
|
|
57713
58174
|
]);
|
|
57714
58175
|
object({
|
|
57715
|
-
/** Active color mode — which of `rgb` / `hsv` / `
|
|
58176
|
+
/** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
|
|
57716
58177
|
* the bulb's current state. */
|
|
57717
58178
|
mode: _enum([
|
|
57718
58179
|
"rgb",
|
|
@@ -57724,7 +58185,7 @@ object({
|
|
|
57724
58185
|
/** Populated when `mode === 'hsv'`. */
|
|
57725
58186
|
hsv: HsvTripletSchema.optional(),
|
|
57726
58187
|
/** Populated when `mode === 'mired'`. */
|
|
57727
|
-
|
|
58188
|
+
colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57728
58189
|
/** Ms epoch of the last operator-driven change. */
|
|
57729
58190
|
lastChangedAt: number()
|
|
57730
58191
|
});
|
|
@@ -57743,7 +58204,7 @@ DeviceType.Light, method(object({
|
|
|
57743
58204
|
]),
|
|
57744
58205
|
rgb: RgbTripletSchema.optional(),
|
|
57745
58206
|
hsv: HsvTripletSchema.optional(),
|
|
57746
|
-
|
|
58207
|
+
colorTemperature: number().int().optional(),
|
|
57747
58208
|
lastChangedAt: number()
|
|
57748
58209
|
});
|
|
57749
58210
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
@@ -58181,11 +58642,11 @@ object({
|
|
|
58181
58642
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58182
58643
|
availablePrograms: array(string()),
|
|
58183
58644
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58184
|
-
|
|
58645
|
+
remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58185
58646
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58186
|
-
|
|
58647
|
+
delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58187
58648
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58188
|
-
|
|
58649
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58189
58650
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58190
58651
|
doorOpen: boolean().nullable(),
|
|
58191
58652
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58803,7 +59264,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58803
59264
|
object({
|
|
58804
59265
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58805
59266
|
* speed surface (single-speed fan). */
|
|
58806
|
-
|
|
59267
|
+
speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58807
59268
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58808
59269
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58809
59270
|
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
@@ -58823,7 +59284,7 @@ object({
|
|
|
58823
59284
|
});
|
|
58824
59285
|
DeviceType.Fan, method(object({
|
|
58825
59286
|
deviceId: number().int().nonnegative(),
|
|
58826
|
-
|
|
59287
|
+
speed: number().min(0).max(100)
|
|
58827
59288
|
}), _void(), {
|
|
58828
59289
|
kind: "mutation",
|
|
58829
59290
|
auth: "protected"
|
|
@@ -59014,7 +59475,7 @@ DeviceType.Humidifier, method(object({
|
|
|
59014
59475
|
*/
|
|
59015
59476
|
var HumiditySensorStatusSchema = object({
|
|
59016
59477
|
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
59017
|
-
|
|
59478
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
59018
59479
|
precision: 0,
|
|
59019
59480
|
label: "Humidity"
|
|
59020
59481
|
})),
|
|
@@ -59457,7 +59918,7 @@ object({
|
|
|
59457
59918
|
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59458
59919
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59459
59920
|
* task is active / progress is unavailable. */
|
|
59460
|
-
|
|
59921
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59461
59922
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59462
59923
|
* or null when unknown. */
|
|
59463
59924
|
currentCode: number().nullable().meta(readingMeta("none")),
|
|
@@ -59947,10 +60408,10 @@ object({
|
|
|
59947
60408
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59948
60409
|
/** Current playback position in ms. Null when not seekable or
|
|
59949
60410
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59950
|
-
|
|
60411
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59951
60412
|
/** Total duration of the current media in ms. Null when unknown
|
|
59952
60413
|
* (live stream) or nothing is playing. */
|
|
59953
|
-
|
|
60414
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59954
60415
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59955
60416
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59956
60417
|
shuffle: boolean().nullable(),
|
|
@@ -59977,7 +60438,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
|
|
|
59977
60438
|
auth: "protected"
|
|
59978
60439
|
}), method(object({
|
|
59979
60440
|
deviceId: number().int().nonnegative(),
|
|
59980
|
-
|
|
60441
|
+
position: number().int().nonnegative()
|
|
59981
60442
|
}), _void(), {
|
|
59982
60443
|
kind: "mutation",
|
|
59983
60444
|
auth: "protected"
|
|
@@ -60650,9 +61111,9 @@ var NetworkLinkStatusSchema = object({
|
|
|
60650
61111
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60651
61112
|
* SKIP a null rather than coerce it.
|
|
60652
61113
|
*/
|
|
60653
|
-
|
|
61114
|
+
signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60654
61115
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60655
|
-
|
|
61116
|
+
rssi: number().optional().meta(readingMeta("signal-level")),
|
|
60656
61117
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60657
61118
|
ssid: string().optional(),
|
|
60658
61119
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
@@ -61313,10 +61774,20 @@ var PetFeederDeviceStatusSchema = _enum([
|
|
|
61313
61774
|
]);
|
|
61314
61775
|
var gramsPortion = number().int().min(4).max(200);
|
|
61315
61776
|
object({
|
|
61316
|
-
/** Food
|
|
61317
|
-
*
|
|
61318
|
-
* bowl
|
|
61777
|
+
/** Food in the TANK (hopper), as the feeder's own sensor reports it
|
|
61778
|
+
* (`state.food`). A coarse level code, not grams — `0` is empty. The
|
|
61779
|
+
* amount in the bowl is `bowlFood`. On dual-hopper models this is the
|
|
61780
|
+
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
61781
|
+
* the device has not reported yet. */
|
|
61319
61782
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
61783
|
+
/** Food in the BOWL as the feeder reports it (`state.bowl`), in the
|
|
61784
|
+
* feeder's own units. Null when the model reports none. */
|
|
61785
|
+
bowlFood: number().nullable().meta(readingMeta("none")),
|
|
61786
|
+
/** True while the pet is eating (`state.eating`). */
|
|
61787
|
+
eating: boolean(),
|
|
61788
|
+
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
61789
|
+
* the client must not offer it. */
|
|
61790
|
+
supportsMarkRefilled: boolean(),
|
|
61320
61791
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61321
61792
|
* single-hopper models. */
|
|
61322
61793
|
food1: number().nullable().meta(readingMeta("none")),
|
|
@@ -61324,8 +61795,8 @@ object({
|
|
|
61324
61795
|
* single-hopper models. */
|
|
61325
61796
|
food2: number().nullable().meta(readingMeta("none")),
|
|
61326
61797
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61327
|
-
* (`device_class: problem`, on = low). True when the
|
|
61328
|
-
*
|
|
61798
|
+
* (`device_class: problem`, on = low). True when the tank reports empty,
|
|
61799
|
+
* or, on a dual-hopper model, when EITHER hopper is empty. */
|
|
61329
61800
|
lowFood: boolean(),
|
|
61330
61801
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
61331
61802
|
* device has no battery reading. */
|
|
@@ -61792,16 +62263,16 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61792
62263
|
auth: "admin"
|
|
61793
62264
|
});
|
|
61794
62265
|
object({
|
|
61795
|
-
/** Instantaneous power draw
|
|
61796
|
-
|
|
62266
|
+
/** Instantaneous power draw (watts). */
|
|
62267
|
+
power: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61797
62268
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61798
|
-
|
|
61799
|
-
/** Voltage
|
|
61800
|
-
|
|
62269
|
+
energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62270
|
+
/** Voltage (volts). */
|
|
62271
|
+
voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61801
62272
|
/** Current in amperes. */
|
|
61802
|
-
|
|
62273
|
+
current: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61803
62274
|
/** Apparent power in volt-amperes. */
|
|
61804
|
-
|
|
62275
|
+
apparentPower: number().optional().meta(readingMeta("apparent-power")),
|
|
61805
62276
|
/** Power factor (0..1) if reported. */
|
|
61806
62277
|
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61807
62278
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -61856,16 +62327,13 @@ var PresenceStatusSchema = object({
|
|
|
61856
62327
|
location: string().nullable(),
|
|
61857
62328
|
/** GPS coordinates when available. Null otherwise. */
|
|
61858
62329
|
gps: GpsLocationSchema.nullable(),
|
|
61859
|
-
/** Optional battery level of the tracking device (0..100). Null
|
|
61860
|
-
* when not reported. */
|
|
61861
|
-
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61862
62330
|
/** Ms epoch when the slice was last updated. */
|
|
61863
62331
|
lastChangedAt: number()
|
|
61864
62332
|
});
|
|
61865
62333
|
DeviceType.Presence;
|
|
61866
62334
|
object({
|
|
61867
62335
|
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61868
|
-
|
|
62336
|
+
pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61869
62337
|
/** Ms epoch when the slice was last updated. */
|
|
61870
62338
|
lastFetchedAt: number()
|
|
61871
62339
|
});
|
|
@@ -64887,7 +65355,7 @@ DeviceType.Sensor;
|
|
|
64887
65355
|
*/
|
|
64888
65356
|
var TemperatureSensorStatusSchema = object({
|
|
64889
65357
|
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64890
|
-
|
|
65358
|
+
temperature: number().nullable().meta(readingMeta("temperature", {
|
|
64891
65359
|
precision: 1,
|
|
64892
65360
|
label: "Temperature"
|
|
64893
65361
|
})),
|
|
@@ -65151,7 +65619,7 @@ object({
|
|
|
65151
65619
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
65152
65620
|
availableFanSpeeds: array(string()),
|
|
65153
65621
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
65154
|
-
|
|
65622
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65155
65623
|
/** Current error code (0 / null = no error). */
|
|
65156
65624
|
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65157
65625
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
@@ -66092,6 +66560,104 @@ Object.freeze({
|
|
|
66092
66560
|
access: "create",
|
|
66093
66561
|
role: "admin"
|
|
66094
66562
|
},
|
|
66563
|
+
"actions.create": {
|
|
66564
|
+
capName: "actions",
|
|
66565
|
+
capScope: "system",
|
|
66566
|
+
addonId: null,
|
|
66567
|
+
access: "create",
|
|
66568
|
+
role: "admin"
|
|
66569
|
+
},
|
|
66570
|
+
"actions.delete": {
|
|
66571
|
+
capName: "actions",
|
|
66572
|
+
capScope: "system",
|
|
66573
|
+
addonId: null,
|
|
66574
|
+
access: "delete",
|
|
66575
|
+
role: "admin"
|
|
66576
|
+
},
|
|
66577
|
+
"actions.get": {
|
|
66578
|
+
capName: "actions",
|
|
66579
|
+
capScope: "system",
|
|
66580
|
+
addonId: null,
|
|
66581
|
+
access: "view",
|
|
66582
|
+
role: "viewer"
|
|
66583
|
+
},
|
|
66584
|
+
"actions.getLinks": {
|
|
66585
|
+
capName: "actions",
|
|
66586
|
+
capScope: "system",
|
|
66587
|
+
addonId: null,
|
|
66588
|
+
access: "view",
|
|
66589
|
+
role: "admin"
|
|
66590
|
+
},
|
|
66591
|
+
"actions.getTraces": {
|
|
66592
|
+
capName: "actions",
|
|
66593
|
+
capScope: "system",
|
|
66594
|
+
addonId: null,
|
|
66595
|
+
access: "view",
|
|
66596
|
+
role: "admin"
|
|
66597
|
+
},
|
|
66598
|
+
"actions.list": {
|
|
66599
|
+
capName: "actions",
|
|
66600
|
+
capScope: "system",
|
|
66601
|
+
addonId: null,
|
|
66602
|
+
access: "view",
|
|
66603
|
+
role: "admin"
|
|
66604
|
+
},
|
|
66605
|
+
"actions.listForCamera": {
|
|
66606
|
+
capName: "actions",
|
|
66607
|
+
capScope: "system",
|
|
66608
|
+
addonId: null,
|
|
66609
|
+
access: "view",
|
|
66610
|
+
role: "viewer"
|
|
66611
|
+
},
|
|
66612
|
+
"actions.run": {
|
|
66613
|
+
capName: "actions",
|
|
66614
|
+
capScope: "system",
|
|
66615
|
+
addonId: null,
|
|
66616
|
+
access: "create",
|
|
66617
|
+
role: "viewer"
|
|
66618
|
+
},
|
|
66619
|
+
"actions.setLinks": {
|
|
66620
|
+
capName: "actions",
|
|
66621
|
+
capScope: "system",
|
|
66622
|
+
addonId: null,
|
|
66623
|
+
access: "create",
|
|
66624
|
+
role: "admin"
|
|
66625
|
+
},
|
|
66626
|
+
"actions.stop": {
|
|
66627
|
+
capName: "actions",
|
|
66628
|
+
capScope: "system",
|
|
66629
|
+
addonId: null,
|
|
66630
|
+
access: "create",
|
|
66631
|
+
role: "admin"
|
|
66632
|
+
},
|
|
66633
|
+
"actions.update": {
|
|
66634
|
+
capName: "actions",
|
|
66635
|
+
capScope: "system",
|
|
66636
|
+
addonId: null,
|
|
66637
|
+
access: "create",
|
|
66638
|
+
role: "admin"
|
|
66639
|
+
},
|
|
66640
|
+
"actionSource.listActions": {
|
|
66641
|
+
capName: "action-source",
|
|
66642
|
+
capScope: "system",
|
|
66643
|
+
addonId: null,
|
|
66644
|
+
access: "view",
|
|
66645
|
+
role: "admin"
|
|
66646
|
+
},
|
|
66647
|
+
"actionSource.runAction": {
|
|
66648
|
+
capName: "action-source",
|
|
66649
|
+
capScope: "system",
|
|
66650
|
+
addonId: null,
|
|
66651
|
+
access: "create",
|
|
66652
|
+
role: "admin"
|
|
66653
|
+
},
|
|
66654
|
+
"actionSource.stopAction": {
|
|
66655
|
+
capName: "action-source",
|
|
66656
|
+
capScope: "system",
|
|
66657
|
+
addonId: null,
|
|
66658
|
+
access: "create",
|
|
66659
|
+
role: "admin"
|
|
66660
|
+
},
|
|
66095
66661
|
"addonPages.listPages": {
|
|
66096
66662
|
capName: "addon-pages",
|
|
66097
66663
|
capScope: "system",
|
|
@@ -67373,6 +67939,13 @@ Object.freeze({
|
|
|
67373
67939
|
access: "view",
|
|
67374
67940
|
role: "admin"
|
|
67375
67941
|
},
|
|
67942
|
+
"coreBlocks.getAutomationRunState": {
|
|
67943
|
+
capName: "core-blocks",
|
|
67944
|
+
capScope: "system",
|
|
67945
|
+
addonId: null,
|
|
67946
|
+
access: "view",
|
|
67947
|
+
role: "admin"
|
|
67948
|
+
},
|
|
67376
67949
|
"coreBlocks.getBlockSettings": {
|
|
67377
67950
|
capName: "core-blocks",
|
|
67378
67951
|
capScope: "system",
|
|
@@ -67394,6 +67967,13 @@ Object.freeze({
|
|
|
67394
67967
|
access: "view",
|
|
67395
67968
|
role: "admin"
|
|
67396
67969
|
},
|
|
67970
|
+
"coreBlocks.getTraces": {
|
|
67971
|
+
capName: "core-blocks",
|
|
67972
|
+
capScope: "system",
|
|
67973
|
+
addonId: null,
|
|
67974
|
+
access: "view",
|
|
67975
|
+
role: "admin"
|
|
67976
|
+
},
|
|
67397
67977
|
"coreBlocks.getTypeDefs": {
|
|
67398
67978
|
capName: "core-blocks",
|
|
67399
67979
|
capScope: "system",
|
|
@@ -67429,6 +68009,13 @@ Object.freeze({
|
|
|
67429
68009
|
access: "create",
|
|
67430
68010
|
role: "admin"
|
|
67431
68011
|
},
|
|
68012
|
+
"coreBlocks.reportAutomationRun": {
|
|
68013
|
+
capName: "core-blocks",
|
|
68014
|
+
capScope: "system",
|
|
68015
|
+
addonId: null,
|
|
68016
|
+
access: "create",
|
|
68017
|
+
role: "admin"
|
|
68018
|
+
},
|
|
67432
68019
|
"coreBlocks.restart": {
|
|
67433
68020
|
capName: "core-blocks",
|
|
67434
68021
|
capScope: "system",
|
|
@@ -76002,7 +76589,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76002
76589
|
label: t("Full brightness", "Luminosità massima"),
|
|
76003
76590
|
phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
|
|
76004
76591
|
icon: "sun",
|
|
76005
|
-
args: {
|
|
76592
|
+
args: { level: 100 }
|
|
76006
76593
|
},
|
|
76007
76594
|
{
|
|
76008
76595
|
id: "brightness.half",
|
|
@@ -76010,7 +76597,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76010
76597
|
label: t("Half brightness", "Luminosità a metà"),
|
|
76011
76598
|
phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
|
|
76012
76599
|
icon: "sun-dim",
|
|
76013
|
-
args: {
|
|
76600
|
+
args: { level: 50 }
|
|
76014
76601
|
},
|
|
76015
76602
|
{
|
|
76016
76603
|
id: "brightness.off",
|
|
@@ -76018,16 +76605,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76018
76605
|
label: t("Brightness off", "Luminosità a zero"),
|
|
76019
76606
|
phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
|
|
76020
76607
|
icon: "lightbulb-off",
|
|
76021
|
-
args: {
|
|
76608
|
+
args: { level: 0 }
|
|
76022
76609
|
},
|
|
76023
76610
|
{
|
|
76024
76611
|
id: "brightness.set",
|
|
76025
76612
|
method: "setBrightness",
|
|
76026
76613
|
label: t("Set brightness", "Imposta la luminosità"),
|
|
76027
|
-
phrase: t("Set the brightness of {device} to {
|
|
76614
|
+
phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
|
|
76028
76615
|
icon: "sun-medium",
|
|
76029
76616
|
openArgs: [{
|
|
76030
|
-
key: "
|
|
76617
|
+
key: "level",
|
|
76031
76618
|
label: PERCENT,
|
|
76032
76619
|
offer: {
|
|
76033
76620
|
kind: "number",
|
|
@@ -76041,13 +76628,13 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76041
76628
|
],
|
|
76042
76629
|
state: [{
|
|
76043
76630
|
kind: "numeric",
|
|
76044
|
-
field: "
|
|
76631
|
+
field: "level",
|
|
76045
76632
|
quantity: t("the brightness", "la luminosità"),
|
|
76046
76633
|
label: t("Brightness", "Luminosità"),
|
|
76047
76634
|
unit: "%",
|
|
76048
76635
|
icon: "sun"
|
|
76049
76636
|
}],
|
|
76050
|
-
events: { onBrightnessChanged: { notOperatorFacing: "the `
|
|
76637
|
+
events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
|
|
76051
76638
|
},
|
|
76052
76639
|
color: {
|
|
76053
76640
|
scope: "device",
|
|
@@ -76061,7 +76648,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76061
76648
|
icon: "sun",
|
|
76062
76649
|
args: { color: {
|
|
76063
76650
|
mode: "mired",
|
|
76064
|
-
|
|
76651
|
+
colorTemperature: 370
|
|
76065
76652
|
} }
|
|
76066
76653
|
},
|
|
76067
76654
|
{
|
|
@@ -76072,7 +76659,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76072
76659
|
icon: "snowflake",
|
|
76073
76660
|
args: { color: {
|
|
76074
76661
|
mode: "mired",
|
|
76075
|
-
|
|
76662
|
+
colorTemperature: 200
|
|
76076
76663
|
} }
|
|
76077
76664
|
},
|
|
76078
76665
|
{
|
|
@@ -76686,7 +77273,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76686
77273
|
label: t("Fan off", "Ventilatore spento"),
|
|
76687
77274
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
76688
77275
|
icon: "power-off",
|
|
76689
|
-
args: {
|
|
77276
|
+
args: { speed: 0 }
|
|
76690
77277
|
},
|
|
76691
77278
|
{
|
|
76692
77279
|
id: "fan.full",
|
|
@@ -76694,16 +77281,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76694
77281
|
label: t("Fan full", "Ventilatore al massimo"),
|
|
76695
77282
|
phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
|
|
76696
77283
|
icon: "fan",
|
|
76697
|
-
args: {
|
|
77284
|
+
args: { speed: 100 }
|
|
76698
77285
|
},
|
|
76699
77286
|
{
|
|
76700
77287
|
id: "fan.speed",
|
|
76701
77288
|
method: "setPercentage",
|
|
76702
77289
|
label: t("Set speed", "Imposta la velocità"),
|
|
76703
|
-
phrase: t("Set the speed of {device} to {
|
|
77290
|
+
phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
|
|
76704
77291
|
icon: "fan",
|
|
76705
77292
|
openArgs: [{
|
|
76706
|
-
key: "
|
|
77293
|
+
key: "speed",
|
|
76707
77294
|
label: t("Speed", "Velocità"),
|
|
76708
77295
|
offer: {
|
|
76709
77296
|
kind: "number",
|
|
@@ -76765,7 +77352,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76765
77352
|
],
|
|
76766
77353
|
state: [{
|
|
76767
77354
|
kind: "numeric",
|
|
76768
|
-
field: "
|
|
77355
|
+
field: "speed",
|
|
76769
77356
|
quantity: t("the speed", "la velocità"),
|
|
76770
77357
|
label: t("Speed", "Velocità"),
|
|
76771
77358
|
unit: "%",
|
|
@@ -77563,7 +78150,7 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77563
78150
|
},
|
|
77564
78151
|
{
|
|
77565
78152
|
kind: "numeric",
|
|
77566
|
-
field: "
|
|
78153
|
+
field: "progress",
|
|
77567
78154
|
quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
|
|
77568
78155
|
label: t("Progress", "Avanzamento"),
|
|
77569
78156
|
unit: "%",
|
|
@@ -77921,10 +78508,10 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77921
78508
|
id: "media.seek",
|
|
77922
78509
|
method: "seek",
|
|
77923
78510
|
label: t("Seek", "Vai al punto"),
|
|
77924
|
-
phrase: t("Move {device} to {
|
|
78511
|
+
phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
|
|
77925
78512
|
icon: "fast-forward",
|
|
77926
78513
|
openArgs: [{
|
|
77927
|
-
key: "
|
|
78514
|
+
key: "position",
|
|
77928
78515
|
label: t("Position", "Posizione"),
|
|
77929
78516
|
offer: {
|
|
77930
78517
|
kind: "number",
|
|
@@ -78973,7 +79560,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78973
79560
|
state: [
|
|
78974
79561
|
{
|
|
78975
79562
|
kind: "numeric",
|
|
78976
|
-
field: "
|
|
79563
|
+
field: "co2",
|
|
78977
79564
|
quantity: t("the CO₂", "la CO₂"),
|
|
78978
79565
|
label: t("CO₂", "CO₂"),
|
|
78979
79566
|
unit: "ppm",
|
|
@@ -78981,7 +79568,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78981
79568
|
},
|
|
78982
79569
|
{
|
|
78983
79570
|
kind: "numeric",
|
|
78984
|
-
field: "
|
|
79571
|
+
field: "voc",
|
|
78985
79572
|
quantity: t("the VOC level", "il livello di COV"),
|
|
78986
79573
|
label: t("VOC", "COV"),
|
|
78987
79574
|
unit: "ppb",
|
|
@@ -79017,7 +79604,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79017
79604
|
noun: t("Light level", "Luminosità ambiente"),
|
|
79018
79605
|
state: [{
|
|
79019
79606
|
kind: "numeric",
|
|
79020
|
-
field: "
|
|
79607
|
+
field: "illuminance",
|
|
79021
79608
|
quantity: t("the light level", "la luminosità"),
|
|
79022
79609
|
label: t("Illuminance", "Illuminamento"),
|
|
79023
79610
|
unit: "lx",
|
|
@@ -79220,7 +79807,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79220
79807
|
noun: t("Humidity", "Umidità"),
|
|
79221
79808
|
state: [{
|
|
79222
79809
|
kind: "numeric",
|
|
79223
|
-
field: "
|
|
79810
|
+
field: "humidity",
|
|
79224
79811
|
quantity: t("the humidity", "l’umidità"),
|
|
79225
79812
|
label: t("Humidity", "Umidità"),
|
|
79226
79813
|
unit: "%",
|
|
@@ -79268,7 +79855,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79268
79855
|
state: [
|
|
79269
79856
|
{
|
|
79270
79857
|
kind: "numeric",
|
|
79271
|
-
field: "
|
|
79858
|
+
field: "power",
|
|
79272
79859
|
quantity: t("the power draw", "il consumo"),
|
|
79273
79860
|
label: t("Power", "Potenza"),
|
|
79274
79861
|
unit: "W",
|
|
@@ -79276,7 +79863,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79276
79863
|
},
|
|
79277
79864
|
{
|
|
79278
79865
|
kind: "numeric",
|
|
79279
|
-
field: "
|
|
79866
|
+
field: "energy",
|
|
79280
79867
|
quantity: t("the energy used", "l’energia consumata"),
|
|
79281
79868
|
label: t("Energy", "Energia"),
|
|
79282
79869
|
unit: "kWh",
|
|
@@ -79284,7 +79871,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79284
79871
|
},
|
|
79285
79872
|
{
|
|
79286
79873
|
kind: "numeric",
|
|
79287
|
-
field: "
|
|
79874
|
+
field: "voltage",
|
|
79288
79875
|
quantity: t("the voltage", "la tensione"),
|
|
79289
79876
|
label: t("Voltage", "Tensione"),
|
|
79290
79877
|
unit: "V",
|
|
@@ -79292,7 +79879,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79292
79879
|
},
|
|
79293
79880
|
{
|
|
79294
79881
|
kind: "numeric",
|
|
79295
|
-
field: "
|
|
79882
|
+
field: "current",
|
|
79296
79883
|
quantity: t("the current", "la corrente"),
|
|
79297
79884
|
label: t("Current", "Corrente"),
|
|
79298
79885
|
unit: "A",
|
|
@@ -79309,13 +79896,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79309
79896
|
label: t("Where", "Posizione"),
|
|
79310
79897
|
phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
|
|
79311
79898
|
icon: "map-pin"
|
|
79312
|
-
}, {
|
|
79313
|
-
kind: "numeric",
|
|
79314
|
-
field: "batteryPercent",
|
|
79315
|
-
quantity: t("the phone battery", "la batteria del telefono"),
|
|
79316
|
-
label: t("Battery", "Batteria"),
|
|
79317
|
-
unit: "%",
|
|
79318
|
-
icon: "battery"
|
|
79319
79899
|
}]
|
|
79320
79900
|
},
|
|
79321
79901
|
"pressure-sensor": {
|
|
@@ -79323,7 +79903,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79323
79903
|
noun: t("Pressure", "Pressione"),
|
|
79324
79904
|
state: [{
|
|
79325
79905
|
kind: "numeric",
|
|
79326
|
-
field: "
|
|
79906
|
+
field: "pressure",
|
|
79327
79907
|
quantity: t("the pressure", "la pressione"),
|
|
79328
79908
|
label: t("Pressure", "Pressione"),
|
|
79329
79909
|
unit: "hPa",
|
|
@@ -79359,7 +79939,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79359
79939
|
noun: t("Temperature", "Temperatura"),
|
|
79360
79940
|
state: [{
|
|
79361
79941
|
kind: "numeric",
|
|
79362
|
-
field: "
|
|
79942
|
+
field: "temperature",
|
|
79363
79943
|
quantity: t("the temperature", "la temperatura"),
|
|
79364
79944
|
label: t("Temperature", "Temperatura"),
|
|
79365
79945
|
unit: "°C",
|
|
@@ -79430,7 +80010,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79430
80010
|
state: [
|
|
79431
80011
|
{
|
|
79432
80012
|
kind: "numeric",
|
|
79433
|
-
field: "
|
|
80013
|
+
field: "level",
|
|
79434
80014
|
quantity: t("the battery level", "il livello della batteria"),
|
|
79435
80015
|
label: t("Battery", "Batteria"),
|
|
79436
80016
|
unit: "%",
|
|
@@ -79472,7 +80052,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79472
80052
|
icon: "battery-charging"
|
|
79473
80053
|
}
|
|
79474
80054
|
],
|
|
79475
|
-
events: { onStatusChanged: { notOperatorFacing: "the
|
|
80055
|
+
events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
|
|
79476
80056
|
extraEvents: [{
|
|
79477
80057
|
category: EventCategory.DeviceAwake,
|
|
79478
80058
|
label: t("Woke up", "Risvegliato"),
|
|
@@ -79490,7 +80070,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79490
80070
|
noun: t("Network link", "Collegamento di rete"),
|
|
79491
80071
|
state: [{
|
|
79492
80072
|
kind: "numeric",
|
|
79493
|
-
field: "
|
|
80073
|
+
field: "signal",
|
|
79494
80074
|
quantity: t("the signal strength", "l’intensità del segnale"),
|
|
79495
80075
|
label: t("Signal", "Segnale"),
|
|
79496
80076
|
unit: "%",
|
|
@@ -79583,6 +80163,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79583
80163
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79584
80164
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79585
80165
|
var SYSTEM_CAP_VOCABULARY = {
|
|
80166
|
+
"action-source": system(INTERNAL),
|
|
80167
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79586
80168
|
"addon-pages": system(UI_PLUMBING),
|
|
79587
80169
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79588
80170
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79804,6 +80386,31 @@ Object.freeze({
|
|
|
79804
80386
|
form: "single",
|
|
79805
80387
|
optional: false
|
|
79806
80388
|
}],
|
|
80389
|
+
"actions.get": [{
|
|
80390
|
+
name: "deviceId",
|
|
80391
|
+
form: "single",
|
|
80392
|
+
optional: true
|
|
80393
|
+
}],
|
|
80394
|
+
"actions.getLinks": [{
|
|
80395
|
+
name: "deviceId",
|
|
80396
|
+
form: "single",
|
|
80397
|
+
optional: false
|
|
80398
|
+
}],
|
|
80399
|
+
"actions.listForCamera": [{
|
|
80400
|
+
name: "deviceId",
|
|
80401
|
+
form: "single",
|
|
80402
|
+
optional: false
|
|
80403
|
+
}],
|
|
80404
|
+
"actions.run": [{
|
|
80405
|
+
name: "deviceId",
|
|
80406
|
+
form: "single",
|
|
80407
|
+
optional: true
|
|
80408
|
+
}],
|
|
80409
|
+
"actions.setLinks": [{
|
|
80410
|
+
name: "deviceId",
|
|
80411
|
+
form: "single",
|
|
80412
|
+
optional: false
|
|
80413
|
+
}],
|
|
79807
80414
|
"addonSettings.getDeviceSettings": [{
|
|
79808
80415
|
name: "deviceId",
|
|
79809
80416
|
form: "single",
|
|
@@ -83986,6 +84593,7 @@ function resolveGrantDeviceIds(scopes, fleet, access) {
|
|
|
83986
84593
|
}
|
|
83987
84594
|
return out;
|
|
83988
84595
|
}
|
|
84596
|
+
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
83989
84597
|
var MB = 1024 * 1024;
|
|
83990
84598
|
1024 * MB, 3072 * MB;
|
|
83991
84599
|
//#endregion
|
|
@@ -85707,13 +86315,13 @@ var temperatureAdapter = {
|
|
|
85707
86315
|
category: "TEMPERATURE_SENSOR"
|
|
85708
86316
|
}),
|
|
85709
86317
|
properties: (_cap, slice) => {
|
|
85710
|
-
const p = TemperatureSensorStatusSchema.pick({
|
|
85711
|
-
if (!p.success || p.data.
|
|
86318
|
+
const p = TemperatureSensorStatusSchema.pick({ temperature: true }).safeParse(slice);
|
|
86319
|
+
if (!p.success || p.data.temperature === null) return [];
|
|
85712
86320
|
return [{
|
|
85713
86321
|
namespace: "Alexa.TemperatureSensor",
|
|
85714
86322
|
name: "temperature",
|
|
85715
86323
|
value: {
|
|
85716
|
-
value: Math.round(p.data.
|
|
86324
|
+
value: Math.round(p.data.temperature * 10) / 10,
|
|
85717
86325
|
scale: "CELSIUS"
|
|
85718
86326
|
}
|
|
85719
86327
|
}];
|
|
@@ -86458,12 +87066,12 @@ var humidityAdapter = {
|
|
|
86458
87066
|
category: "TEMPERATURE_SENSOR"
|
|
86459
87067
|
}),
|
|
86460
87068
|
properties: (_cap, slice) => {
|
|
86461
|
-
const p = HumiditySensorStatusSchema.pick({
|
|
86462
|
-
if (!p.success || p.data.
|
|
87069
|
+
const p = HumiditySensorStatusSchema.pick({ humidity: true }).safeParse(slice);
|
|
87070
|
+
if (!p.success || p.data.humidity === null) return [];
|
|
86463
87071
|
return [{
|
|
86464
87072
|
namespace: "Alexa.HumiditySensor",
|
|
86465
87073
|
name: "relativeHumidity",
|
|
86466
|
-
value: { value: Math.max(0, Math.min(100, p.data.
|
|
87074
|
+
value: { value: Math.max(0, Math.min(100, p.data.humidity)) }
|
|
86467
87075
|
}];
|
|
86468
87076
|
},
|
|
86469
87077
|
directives: [],
|
|
@@ -86637,7 +87245,7 @@ async function handleSetBrightness(header, endpointRaw, payloadRaw, deps, _calle
|
|
|
86637
87245
|
try {
|
|
86638
87246
|
await api.brightness.setBrightness.mutate({
|
|
86639
87247
|
deviceId: targetDeviceId,
|
|
86640
|
-
percentage
|
|
87248
|
+
level: percentage
|
|
86641
87249
|
});
|
|
86642
87250
|
} catch (err) {
|
|
86643
87251
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -86781,11 +87389,11 @@ var GENERIC_ADAPTERS = [
|
|
|
86781
87389
|
},
|
|
86782
87390
|
properties: (capName, slice) => {
|
|
86783
87391
|
if (capName === "brightness") {
|
|
86784
|
-
const p = BrightnessStatusSchema.pick({
|
|
87392
|
+
const p = BrightnessStatusSchema.pick({ level: true }).safeParse(slice);
|
|
86785
87393
|
return p.success ? [{
|
|
86786
87394
|
namespace: "Alexa.BrightnessController",
|
|
86787
87395
|
name: "brightness",
|
|
86788
|
-
value: Math.max(0, Math.min(100, Math.round(p.data.
|
|
87396
|
+
value: Math.max(0, Math.min(100, Math.round(p.data.level)))
|
|
86789
87397
|
}] : [];
|
|
86790
87398
|
}
|
|
86791
87399
|
const p = SwitchStatusSchema.pick({ on: true }).safeParse(slice);
|
|
@@ -89835,7 +90443,7 @@ async function collectChildProperties(api, childDeviceId, properties, timeOfSamp
|
|
|
89835
90443
|
timeOfSample,
|
|
89836
90444
|
uncertaintyInMilliseconds: 0
|
|
89837
90445
|
});
|
|
89838
|
-
const level = numberField(await api.brightness.getStatus.query({ deviceId: childDeviceId }).catch(() => null), "
|
|
90446
|
+
const level = numberField(await api.brightness.getStatus.query({ deviceId: childDeviceId }).catch(() => null), "level");
|
|
89839
90447
|
if (level !== null) properties.push({
|
|
89840
90448
|
namespace: "Alexa.BrightnessController",
|
|
89841
90449
|
name: "brightness",
|
|
@@ -93718,7 +94326,7 @@ function indexByDrivingDevice(exported) {
|
|
|
93718
94326
|
}
|
|
93719
94327
|
var EnabledSchema = object({ enabled: boolean() });
|
|
93720
94328
|
var OnSchema = object({ on: boolean() });
|
|
93721
|
-
var PercentageSchema = object({
|
|
94329
|
+
var PercentageSchema = object({ level: number() });
|
|
93722
94330
|
var OnlineSchema = object({ online: boolean() });
|
|
93723
94331
|
function power(on) {
|
|
93724
94332
|
return {
|
|
@@ -93799,7 +94407,7 @@ function stateReportsFor(change, exported) {
|
|
|
93799
94407
|
case "brightness": {
|
|
93800
94408
|
const parsed = PercentageSchema.safeParse(change.slice);
|
|
93801
94409
|
if (!parsed.success) break;
|
|
93802
|
-
const value = Math.max(0, Math.min(100, Math.round(parsed.data.
|
|
94410
|
+
const value = Math.max(0, Math.min(100, Math.round(parsed.data.level)));
|
|
93803
94411
|
for (const e of of("child")) reports.push({
|
|
93804
94412
|
...e,
|
|
93805
94413
|
interfaceName: "Alexa.BrightnessController",
|