@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
|
@@ -5,7 +5,7 @@ import "node:fs";
|
|
|
5
5
|
import "node:path";
|
|
6
6
|
import "node:child_process";
|
|
7
7
|
import "node:zlib";
|
|
8
|
-
//#region ../types/dist/event-category-
|
|
8
|
+
//#region ../types/dist/event-category-DmZDPDf_.mjs
|
|
9
9
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
10
10
|
EventCategory["SystemBoot"] = "system.boot";
|
|
11
11
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -632,7 +632,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
632
632
|
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
633
633
|
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
634
634
|
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
635
|
-
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
635
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
|
|
636
636
|
*/
|
|
637
637
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
638
638
|
/**
|
|
@@ -770,6 +770,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
770
770
|
*/
|
|
771
771
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
772
772
|
/**
|
|
773
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
774
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
775
|
+
*/
|
|
776
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
777
|
+
/**
|
|
773
778
|
* Progress update from a running model conversion job.
|
|
774
779
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
775
780
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5448,7 +5453,7 @@ var ZodIssueCode = {
|
|
|
5448
5453
|
var ZodFirstPartyTypeKind;
|
|
5449
5454
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5450
5455
|
//#endregion
|
|
5451
|
-
//#region ../types/dist/sleep
|
|
5456
|
+
//#region ../types/dist/sleep-Crlmu_tO.mjs
|
|
5452
5457
|
/**
|
|
5453
5458
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5454
5459
|
* window to float samples (D455).
|
|
@@ -8519,6 +8524,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8519
8524
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8520
8525
|
var CAP_NAMES = Object.freeze([
|
|
8521
8526
|
"accessories",
|
|
8527
|
+
"action-source",
|
|
8528
|
+
"actions",
|
|
8522
8529
|
"addon-pages",
|
|
8523
8530
|
"addon-pages-source",
|
|
8524
8531
|
"addon-routes",
|
|
@@ -8707,11 +8714,11 @@ var CAP_NAMES = Object.freeze([
|
|
|
8707
8714
|
Object.freeze({
|
|
8708
8715
|
"air-quality-sensor": [
|
|
8709
8716
|
{
|
|
8710
|
-
"path": "
|
|
8717
|
+
"path": "co2",
|
|
8711
8718
|
"valueType": "number"
|
|
8712
8719
|
},
|
|
8713
8720
|
{
|
|
8714
|
-
"path": "
|
|
8721
|
+
"path": "voc",
|
|
8715
8722
|
"valueType": "number"
|
|
8716
8723
|
},
|
|
8717
8724
|
{
|
|
@@ -8761,7 +8768,7 @@ Object.freeze({
|
|
|
8761
8768
|
}
|
|
8762
8769
|
],
|
|
8763
8770
|
"ambient-light-sensor": [{
|
|
8764
|
-
"path": "
|
|
8771
|
+
"path": "illuminance",
|
|
8765
8772
|
"valueType": "number"
|
|
8766
8773
|
}],
|
|
8767
8774
|
"audio-metrics": [
|
|
@@ -8822,7 +8829,7 @@ Object.freeze({
|
|
|
8822
8829
|
],
|
|
8823
8830
|
"battery": [
|
|
8824
8831
|
{
|
|
8825
|
-
"path": "
|
|
8832
|
+
"path": "level",
|
|
8826
8833
|
"valueType": "number"
|
|
8827
8834
|
},
|
|
8828
8835
|
{
|
|
@@ -8844,7 +8851,7 @@ Object.freeze({
|
|
|
8844
8851
|
"valueType": "number"
|
|
8845
8852
|
},
|
|
8846
8853
|
{
|
|
8847
|
-
"path": "
|
|
8854
|
+
"path": "voltage",
|
|
8848
8855
|
"valueType": "number"
|
|
8849
8856
|
},
|
|
8850
8857
|
{
|
|
@@ -8865,7 +8872,7 @@ Object.freeze({
|
|
|
8865
8872
|
"valueType": "boolean"
|
|
8866
8873
|
}],
|
|
8867
8874
|
"brightness": [{
|
|
8868
|
-
"path": "
|
|
8875
|
+
"path": "level",
|
|
8869
8876
|
"valueType": "number"
|
|
8870
8877
|
}],
|
|
8871
8878
|
"broker": [{
|
|
@@ -9066,7 +9073,7 @@ Object.freeze({
|
|
|
9066
9073
|
"valueType": "number"
|
|
9067
9074
|
},
|
|
9068
9075
|
{
|
|
9069
|
-
"path": "
|
|
9076
|
+
"path": "colorTemperature",
|
|
9070
9077
|
"valueType": "number"
|
|
9071
9078
|
}
|
|
9072
9079
|
],
|
|
@@ -9245,15 +9252,15 @@ Object.freeze({
|
|
|
9245
9252
|
"valueType": "string"
|
|
9246
9253
|
},
|
|
9247
9254
|
{
|
|
9248
|
-
"path": "
|
|
9255
|
+
"path": "remaining",
|
|
9249
9256
|
"valueType": "number"
|
|
9250
9257
|
},
|
|
9251
9258
|
{
|
|
9252
|
-
"path": "
|
|
9259
|
+
"path": "delayedStart",
|
|
9253
9260
|
"valueType": "number"
|
|
9254
9261
|
},
|
|
9255
9262
|
{
|
|
9256
|
-
"path": "
|
|
9263
|
+
"path": "progress",
|
|
9257
9264
|
"valueType": "number"
|
|
9258
9265
|
},
|
|
9259
9266
|
{
|
|
@@ -9367,7 +9374,7 @@ Object.freeze({
|
|
|
9367
9374
|
],
|
|
9368
9375
|
"fan-control": [
|
|
9369
9376
|
{
|
|
9370
|
-
"path": "
|
|
9377
|
+
"path": "speed",
|
|
9371
9378
|
"valueType": "number"
|
|
9372
9379
|
},
|
|
9373
9380
|
{
|
|
@@ -9467,7 +9474,7 @@ Object.freeze({
|
|
|
9467
9474
|
}
|
|
9468
9475
|
],
|
|
9469
9476
|
"humidity-sensor": [{
|
|
9470
|
-
"path": "
|
|
9477
|
+
"path": "humidity",
|
|
9471
9478
|
"valueType": "number"
|
|
9472
9479
|
}],
|
|
9473
9480
|
"image": [{
|
|
@@ -9577,7 +9584,7 @@ Object.freeze({
|
|
|
9577
9584
|
"valueType": "number"
|
|
9578
9585
|
},
|
|
9579
9586
|
{
|
|
9580
|
-
"path": "
|
|
9587
|
+
"path": "progress",
|
|
9581
9588
|
"valueType": "number"
|
|
9582
9589
|
},
|
|
9583
9590
|
{
|
|
@@ -9656,11 +9663,11 @@ Object.freeze({
|
|
|
9656
9663
|
"valueType": "string"
|
|
9657
9664
|
},
|
|
9658
9665
|
{
|
|
9659
|
-
"path": "
|
|
9666
|
+
"path": "position",
|
|
9660
9667
|
"valueType": "number"
|
|
9661
9668
|
},
|
|
9662
9669
|
{
|
|
9663
|
-
"path": "
|
|
9670
|
+
"path": "duration",
|
|
9664
9671
|
"valueType": "number"
|
|
9665
9672
|
},
|
|
9666
9673
|
{
|
|
@@ -9762,11 +9769,11 @@ Object.freeze({
|
|
|
9762
9769
|
]
|
|
9763
9770
|
},
|
|
9764
9771
|
{
|
|
9765
|
-
"path": "
|
|
9772
|
+
"path": "signal",
|
|
9766
9773
|
"valueType": "number"
|
|
9767
9774
|
},
|
|
9768
9775
|
{
|
|
9769
|
-
"path": "
|
|
9776
|
+
"path": "rssi",
|
|
9770
9777
|
"valueType": "number"
|
|
9771
9778
|
},
|
|
9772
9779
|
{
|
|
@@ -9821,6 +9828,18 @@ Object.freeze({
|
|
|
9821
9828
|
"path": "foodLevel",
|
|
9822
9829
|
"valueType": "number"
|
|
9823
9830
|
},
|
|
9831
|
+
{
|
|
9832
|
+
"path": "bowlFood",
|
|
9833
|
+
"valueType": "number"
|
|
9834
|
+
},
|
|
9835
|
+
{
|
|
9836
|
+
"path": "eating",
|
|
9837
|
+
"valueType": "boolean"
|
|
9838
|
+
},
|
|
9839
|
+
{
|
|
9840
|
+
"path": "supportsMarkRefilled",
|
|
9841
|
+
"valueType": "boolean"
|
|
9842
|
+
},
|
|
9824
9843
|
{
|
|
9825
9844
|
"path": "food1",
|
|
9826
9845
|
"valueType": "number"
|
|
@@ -9885,23 +9904,23 @@ Object.freeze({
|
|
|
9885
9904
|
],
|
|
9886
9905
|
"power-meter": [
|
|
9887
9906
|
{
|
|
9888
|
-
"path": "
|
|
9907
|
+
"path": "power",
|
|
9889
9908
|
"valueType": "number"
|
|
9890
9909
|
},
|
|
9891
9910
|
{
|
|
9892
|
-
"path": "
|
|
9911
|
+
"path": "energy",
|
|
9893
9912
|
"valueType": "number"
|
|
9894
9913
|
},
|
|
9895
9914
|
{
|
|
9896
|
-
"path": "
|
|
9915
|
+
"path": "voltage",
|
|
9897
9916
|
"valueType": "number"
|
|
9898
9917
|
},
|
|
9899
9918
|
{
|
|
9900
|
-
"path": "
|
|
9919
|
+
"path": "current",
|
|
9901
9920
|
"valueType": "number"
|
|
9902
9921
|
},
|
|
9903
9922
|
{
|
|
9904
|
-
"path": "
|
|
9923
|
+
"path": "apparentPower",
|
|
9905
9924
|
"valueType": "number"
|
|
9906
9925
|
},
|
|
9907
9926
|
{
|
|
@@ -9929,14 +9948,10 @@ Object.freeze({
|
|
|
9929
9948
|
{
|
|
9930
9949
|
"path": "gps.accuracyMeters",
|
|
9931
9950
|
"valueType": "number"
|
|
9932
|
-
},
|
|
9933
|
-
{
|
|
9934
|
-
"path": "batteryPercent",
|
|
9935
|
-
"valueType": "number"
|
|
9936
9951
|
}
|
|
9937
9952
|
],
|
|
9938
9953
|
"pressure-sensor": [{
|
|
9939
|
-
"path": "
|
|
9954
|
+
"path": "pressure",
|
|
9940
9955
|
"valueType": "number"
|
|
9941
9956
|
}],
|
|
9942
9957
|
"privacy-mask": [{
|
|
@@ -10250,7 +10265,7 @@ Object.freeze({
|
|
|
10250
10265
|
"valueType": "boolean"
|
|
10251
10266
|
}],
|
|
10252
10267
|
"temperature-sensor": [{
|
|
10253
|
-
"path": "
|
|
10268
|
+
"path": "temperature",
|
|
10254
10269
|
"valueType": "number"
|
|
10255
10270
|
}],
|
|
10256
10271
|
"update": [
|
|
@@ -10298,7 +10313,7 @@ Object.freeze({
|
|
|
10298
10313
|
"valueType": "string"
|
|
10299
10314
|
},
|
|
10300
10315
|
{
|
|
10301
|
-
"path": "
|
|
10316
|
+
"path": "progress",
|
|
10302
10317
|
"valueType": "number"
|
|
10303
10318
|
},
|
|
10304
10319
|
{
|
|
@@ -10783,7 +10798,7 @@ function errMsg(err) {
|
|
|
10783
10798
|
return String(err);
|
|
10784
10799
|
}
|
|
10785
10800
|
//#endregion
|
|
10786
|
-
//#region ../types/dist/composition-
|
|
10801
|
+
//#region ../types/dist/composition-CZImLpOI.mjs
|
|
10787
10802
|
/**
|
|
10788
10803
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10789
10804
|
*
|
|
@@ -15590,6 +15605,14 @@ var AutomationConditionLeafSchema = object({
|
|
|
15590
15605
|
array(union([string(), number()]))
|
|
15591
15606
|
])
|
|
15592
15607
|
});
|
|
15608
|
+
var AutomationConditionStationaryPresentSchema = object({
|
|
15609
|
+
kind: literal("stationary-present"),
|
|
15610
|
+
deviceId: number().int().nonnegative(),
|
|
15611
|
+
/** Class names; a macro class matches every raw class that maps to it. */
|
|
15612
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15613
|
+
/** The parked object must be in at least one of these zones. */
|
|
15614
|
+
zones: array(string().min(1)).min(1).optional()
|
|
15615
|
+
});
|
|
15593
15616
|
/**
|
|
15594
15617
|
* The expression leaf, declared as a plain object rather than an intersection
|
|
15595
15618
|
* with {@link ExpressionSourceSchema}: a discriminated union has to be able to
|
|
@@ -15623,7 +15646,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
|
|
|
15623
15646
|
child: AutomationConditionSchema
|
|
15624
15647
|
}),
|
|
15625
15648
|
AutomationConditionLeafSchema,
|
|
15626
|
-
AutomationConditionExpressionSchema
|
|
15649
|
+
AutomationConditionExpressionSchema,
|
|
15650
|
+
AutomationConditionStationaryPresentSchema
|
|
15627
15651
|
]));
|
|
15628
15652
|
/**
|
|
15629
15653
|
* What starts a run.
|
|
@@ -15664,7 +15688,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15664
15688
|
kind: literal("schedule"),
|
|
15665
15689
|
cron: string().min(1).max(120)
|
|
15666
15690
|
}),
|
|
15667
|
-
object({ kind: literal("manual") })
|
|
15691
|
+
object({ kind: literal("manual") }),
|
|
15692
|
+
object({
|
|
15693
|
+
kind: literal("detection"),
|
|
15694
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15695
|
+
* matches every raw class that maps to it; any other name matches
|
|
15696
|
+
* exactly. */
|
|
15697
|
+
classes: array(string().min(1)).min(1),
|
|
15698
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15699
|
+
/** The track must have visited at least one of these zones. */
|
|
15700
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15701
|
+
/** Best-so-far confidence the track must reach. */
|
|
15702
|
+
minScore: number().min(0).max(1).optional()
|
|
15703
|
+
}),
|
|
15704
|
+
object({
|
|
15705
|
+
kind: literal("stationary"),
|
|
15706
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15707
|
+
/** Class names; a macro class matches like the detection trigger. */
|
|
15708
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15709
|
+
/** The parked object must be in at least one of these zones. */
|
|
15710
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15711
|
+
/** `appeared`: it became parked. `departed`: the registry retired it.
|
|
15712
|
+
* The vocabulary of `PipelineAnalyticsStationaryChanged`. */
|
|
15713
|
+
phase: _enum(["appeared", "departed"])
|
|
15714
|
+
}),
|
|
15715
|
+
object({
|
|
15716
|
+
kind: literal("interval"),
|
|
15717
|
+
minutes: number().int().min(1).max(1440)
|
|
15718
|
+
})
|
|
15668
15719
|
]);
|
|
15669
15720
|
/**
|
|
15670
15721
|
* One action step.
|
|
@@ -15684,28 +15735,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15684
15735
|
* is called. The runner still receives a number and is untouched; the
|
|
15685
15736
|
* resolution is the recipe's job, not the runner's.
|
|
15686
15737
|
*/
|
|
15738
|
+
var AutomationWaitStepSchema = object({
|
|
15739
|
+
kind: literal("wait"),
|
|
15740
|
+
seconds: number().min(0).max(300)
|
|
15741
|
+
});
|
|
15742
|
+
var AutomationCapStepSchema = object({
|
|
15743
|
+
kind: literal("cap"),
|
|
15744
|
+
/**
|
|
15745
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15746
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15747
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15748
|
+
*/
|
|
15749
|
+
deviceId: union([
|
|
15750
|
+
number().int(),
|
|
15751
|
+
array(number().int()).min(1),
|
|
15752
|
+
object({ $var: string().min(1) })
|
|
15753
|
+
]),
|
|
15754
|
+
cap: string().min(1),
|
|
15755
|
+
method: string().min(1),
|
|
15756
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15757
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15758
|
+
* the expression leaf. */
|
|
15759
|
+
args: record(string(), unknown()).optional()
|
|
15760
|
+
});
|
|
15761
|
+
/**
|
|
15762
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15763
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15764
|
+
*/
|
|
15765
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15687
15766
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15767
|
+
AutomationWaitStepSchema,
|
|
15768
|
+
AutomationCapStepSchema,
|
|
15688
15769
|
object({
|
|
15689
|
-
kind: literal("
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
|
|
15695
|
-
|
|
15696
|
-
|
|
15697
|
-
|
|
15698
|
-
*/
|
|
15699
|
-
deviceId: union([
|
|
15700
|
-
number().int(),
|
|
15701
|
-
array(number().int()).min(1),
|
|
15702
|
-
object({ $var: string().min(1) })
|
|
15703
|
-
]),
|
|
15704
|
-
cap: string().min(1),
|
|
15705
|
-
method: string().min(1),
|
|
15706
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15707
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15708
|
-
args: record(string(), unknown()).optional()
|
|
15770
|
+
kind: literal("action"),
|
|
15771
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15772
|
+
actionId: string().min(1),
|
|
15773
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15774
|
+
variables: record(string(), union([
|
|
15775
|
+
string(),
|
|
15776
|
+
number(),
|
|
15777
|
+
boolean()
|
|
15778
|
+
])).optional()
|
|
15709
15779
|
}),
|
|
15710
15780
|
object({
|
|
15711
15781
|
kind: literal("code"),
|
|
@@ -15714,10 +15784,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15714
15784
|
code: string().min(1).max(2e4)
|
|
15715
15785
|
})
|
|
15716
15786
|
]);
|
|
15787
|
+
/**
|
|
15788
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15789
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15790
|
+
* actions. Absent means `single`.
|
|
15791
|
+
*
|
|
15792
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15793
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15794
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15795
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15796
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15797
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15798
|
+
* wait, never the single/queued limits.
|
|
15799
|
+
*/
|
|
15800
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15801
|
+
object({ mode: literal("single") }),
|
|
15802
|
+
object({ mode: literal("restart") }),
|
|
15803
|
+
object({
|
|
15804
|
+
mode: literal("queued"),
|
|
15805
|
+
max: number().int().min(1).max(10)
|
|
15806
|
+
}),
|
|
15807
|
+
object({
|
|
15808
|
+
mode: literal("parallel"),
|
|
15809
|
+
max: number().int().min(1).max(10)
|
|
15810
|
+
}),
|
|
15811
|
+
object({
|
|
15812
|
+
mode: literal("cooldown"),
|
|
15813
|
+
minutes: number().int().min(1).max(1440)
|
|
15814
|
+
})
|
|
15815
|
+
]);
|
|
15717
15816
|
var AutomationRecipeSchema = object({
|
|
15718
15817
|
triggers: array(AutomationTriggerSchema),
|
|
15719
15818
|
conditions: AutomationConditionSchema.optional(),
|
|
15720
|
-
actions: array(AutomationActionSchema)
|
|
15819
|
+
actions: array(AutomationActionSchema),
|
|
15820
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15821
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15822
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15823
|
+
});
|
|
15824
|
+
new Set([
|
|
15825
|
+
{
|
|
15826
|
+
id: "person",
|
|
15827
|
+
name: "Person"
|
|
15828
|
+
},
|
|
15829
|
+
{
|
|
15830
|
+
id: "vehicle",
|
|
15831
|
+
name: "Vehicle"
|
|
15832
|
+
},
|
|
15833
|
+
{
|
|
15834
|
+
id: "animal",
|
|
15835
|
+
name: "Animal"
|
|
15836
|
+
},
|
|
15837
|
+
{
|
|
15838
|
+
id: "package",
|
|
15839
|
+
name: "Package"
|
|
15840
|
+
}
|
|
15841
|
+
].map((l) => l.id));
|
|
15842
|
+
var COCO_TO_MACRO = {
|
|
15843
|
+
mapping: {
|
|
15844
|
+
person: "person",
|
|
15845
|
+
bicycle: "vehicle",
|
|
15846
|
+
car: "vehicle",
|
|
15847
|
+
motorcycle: "vehicle",
|
|
15848
|
+
airplane: "vehicle",
|
|
15849
|
+
bus: "vehicle",
|
|
15850
|
+
train: "vehicle",
|
|
15851
|
+
truck: "vehicle",
|
|
15852
|
+
boat: "vehicle",
|
|
15853
|
+
bird: "animal",
|
|
15854
|
+
cat: "animal",
|
|
15855
|
+
dog: "animal",
|
|
15856
|
+
horse: "animal",
|
|
15857
|
+
sheep: "animal",
|
|
15858
|
+
cow: "animal",
|
|
15859
|
+
elephant: "animal",
|
|
15860
|
+
bear: "animal",
|
|
15861
|
+
zebra: "animal",
|
|
15862
|
+
giraffe: "animal",
|
|
15863
|
+
suitcase: "package",
|
|
15864
|
+
backpack: "package",
|
|
15865
|
+
handbag: "package"
|
|
15866
|
+
},
|
|
15867
|
+
preserveOriginal: false
|
|
15868
|
+
};
|
|
15869
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15870
|
+
/**
|
|
15871
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15872
|
+
* so the editor can paint every block green or red with its reason.
|
|
15873
|
+
*
|
|
15874
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15875
|
+
* every condition node (containers and leaves, including the ones a
|
|
15876
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15877
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15878
|
+
* for an Action run). Skipped
|
|
15879
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15880
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15881
|
+
*
|
|
15882
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15883
|
+
* vocabulary so an Action run records the same step shape.
|
|
15884
|
+
*/
|
|
15885
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15886
|
+
var TraceValueSchema = union([
|
|
15887
|
+
string(),
|
|
15888
|
+
number(),
|
|
15889
|
+
boolean(),
|
|
15890
|
+
_null(),
|
|
15891
|
+
array(union([string(), number()]))
|
|
15892
|
+
]);
|
|
15893
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15894
|
+
"ran",
|
|
15895
|
+
"skipped-trigger",
|
|
15896
|
+
"skipped-conditions",
|
|
15897
|
+
"skipped-cooldown",
|
|
15898
|
+
"skipped-overlap",
|
|
15899
|
+
"failed",
|
|
15900
|
+
"aborted"
|
|
15901
|
+
]);
|
|
15902
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15903
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15904
|
+
"pass",
|
|
15905
|
+
"fail",
|
|
15906
|
+
"not-evaluated"
|
|
15907
|
+
]);
|
|
15908
|
+
var AutomationTriggerTraceSchema = object({
|
|
15909
|
+
kind: string().min(1),
|
|
15910
|
+
outcome: _enum(["pass", "fail"]),
|
|
15911
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
15912
|
+
reason: string(),
|
|
15913
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
15914
|
+
vars: record(string(), TraceValueSchema)
|
|
15915
|
+
});
|
|
15916
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
15917
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
15918
|
+
path: string().min(1),
|
|
15919
|
+
kind: _enum([
|
|
15920
|
+
"all",
|
|
15921
|
+
"any",
|
|
15922
|
+
"not",
|
|
15923
|
+
"condition",
|
|
15924
|
+
"expression",
|
|
15925
|
+
"stationary-present"
|
|
15926
|
+
]),
|
|
15927
|
+
outcome: TraceNodeOutcomeSchema,
|
|
15928
|
+
reason: string(),
|
|
15929
|
+
deviceId: number().int().optional(),
|
|
15930
|
+
cap: string().optional(),
|
|
15931
|
+
fieldPath: string().optional(),
|
|
15932
|
+
operator: string().optional(),
|
|
15933
|
+
expected: TraceValueSchema.optional(),
|
|
15934
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
15935
|
+
observed: TraceValueSchema.optional()
|
|
15936
|
+
});
|
|
15937
|
+
var AutomationRunVerdictSchema = object({
|
|
15938
|
+
mode: AutomationRunModeSchema,
|
|
15939
|
+
decision: _enum([
|
|
15940
|
+
"run",
|
|
15941
|
+
"queued",
|
|
15942
|
+
"restart",
|
|
15943
|
+
"drop",
|
|
15944
|
+
"cooldown",
|
|
15945
|
+
"bypass"
|
|
15946
|
+
]),
|
|
15947
|
+
reason: string()
|
|
15948
|
+
});
|
|
15949
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
15950
|
+
var AutomationStepTraceSchema = object({
|
|
15951
|
+
/** `actions.<i>` */
|
|
15952
|
+
path: string().min(1),
|
|
15953
|
+
kind: string().min(1),
|
|
15954
|
+
cap: string().optional(),
|
|
15955
|
+
method: string().optional(),
|
|
15956
|
+
deviceId: number().int().optional(),
|
|
15957
|
+
startedAt: number().optional(),
|
|
15958
|
+
endedAt: number().optional(),
|
|
15959
|
+
outcome: _enum([
|
|
15960
|
+
"ok",
|
|
15961
|
+
"error",
|
|
15962
|
+
"not-run"
|
|
15963
|
+
]),
|
|
15964
|
+
message: string().optional()
|
|
15965
|
+
});
|
|
15966
|
+
var AutomationRunTraceSchema = object({
|
|
15967
|
+
runId: string().min(1),
|
|
15968
|
+
startedAt: number(),
|
|
15969
|
+
endedAt: number(),
|
|
15970
|
+
trigger: AutomationTriggerTraceSchema,
|
|
15971
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
15972
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
15973
|
+
steps: array(AutomationStepTraceSchema),
|
|
15974
|
+
outcome: AutomationRunOutcomeSchema,
|
|
15975
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
15976
|
+
repeat: number().int().min(1),
|
|
15977
|
+
/** When the latest of those repeats happened. */
|
|
15978
|
+
lastAt: number()
|
|
15979
|
+
});
|
|
15980
|
+
/**
|
|
15981
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
15982
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
15983
|
+
*/
|
|
15984
|
+
var AutomationStateDocSchema = object({
|
|
15985
|
+
version: literal(1),
|
|
15986
|
+
lastRunStartedAt: number().nullable(),
|
|
15987
|
+
traces: array(AutomationRunTraceSchema)
|
|
15988
|
+
});
|
|
15989
|
+
/**
|
|
15990
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
15991
|
+
* declared as LIST ENTRIES, never as devices.
|
|
15992
|
+
*
|
|
15993
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
15994
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
15995
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
15996
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
15997
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
15998
|
+
*
|
|
15999
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
16000
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
16001
|
+
* runtime.
|
|
16002
|
+
*/
|
|
16003
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
16004
|
+
var ActionVariableTypeSchema = _enum([
|
|
16005
|
+
"string",
|
|
16006
|
+
"number",
|
|
16007
|
+
"boolean",
|
|
16008
|
+
"select"
|
|
16009
|
+
]);
|
|
16010
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
16011
|
+
var ActionVariableValueSchema = union([
|
|
16012
|
+
string(),
|
|
16013
|
+
number(),
|
|
16014
|
+
boolean()
|
|
16015
|
+
]);
|
|
16016
|
+
/**
|
|
16017
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
16018
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
16019
|
+
*/
|
|
16020
|
+
var ActionVariableSchema = object({
|
|
16021
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
16022
|
+
label: string().min(1).max(120).optional(),
|
|
16023
|
+
type: ActionVariableTypeSchema,
|
|
16024
|
+
required: boolean().optional(),
|
|
16025
|
+
default: ActionVariableValueSchema.optional(),
|
|
16026
|
+
/** The allowed values of a `select`. */
|
|
16027
|
+
options: array(string().min(1)).min(1).optional()
|
|
16028
|
+
}).superRefine((v, ctx) => {
|
|
16029
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
16030
|
+
code: "custom",
|
|
16031
|
+
message: "a select variable needs options",
|
|
16032
|
+
path: ["options"]
|
|
16033
|
+
});
|
|
16034
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
16035
|
+
code: "custom",
|
|
16036
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
16037
|
+
path: ["default"]
|
|
16038
|
+
});
|
|
16039
|
+
});
|
|
16040
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
16041
|
+
function variableValueError(variable, value) {
|
|
16042
|
+
switch (variable.type) {
|
|
16043
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
16044
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
16045
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
16046
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
16047
|
+
}
|
|
16048
|
+
}
|
|
16049
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
16050
|
+
function isInternalActionId(actionId) {
|
|
16051
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
16052
|
+
}
|
|
16053
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
16054
|
+
function addonIdOfActionId(actionId) {
|
|
16055
|
+
if (isInternalActionId(actionId)) return null;
|
|
16056
|
+
const at = actionId.indexOf(":");
|
|
16057
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
16058
|
+
}
|
|
16059
|
+
var ActionStatusSchema = object({
|
|
16060
|
+
isRunning: boolean(),
|
|
16061
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
16062
|
+
lastRunAt: number().nullable(),
|
|
16063
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
16064
|
+
lastError: string().nullable()
|
|
16065
|
+
});
|
|
16066
|
+
var ActionEntrySchema = object({
|
|
16067
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
16068
|
+
id: string().min(3),
|
|
16069
|
+
name: string().min(1).max(120),
|
|
16070
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
16071
|
+
addonId: string().min(1),
|
|
16072
|
+
source: ActionSourceKindSchema,
|
|
16073
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
16074
|
+
readOnly: boolean(),
|
|
16075
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
16076
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
16077
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
16078
|
+
status: ActionStatusSchema
|
|
16079
|
+
}).superRefine((entry, ctx) => {
|
|
16080
|
+
if (entry.source === "internal") {
|
|
16081
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
16082
|
+
code: "custom",
|
|
16083
|
+
message: "an internal action id is internal:<uuid>",
|
|
16084
|
+
path: ["id"]
|
|
16085
|
+
});
|
|
16086
|
+
return;
|
|
16087
|
+
}
|
|
16088
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
16089
|
+
code: "custom",
|
|
16090
|
+
message: "only an internal action carries steps",
|
|
16091
|
+
path: ["steps"]
|
|
16092
|
+
});
|
|
16093
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
16094
|
+
code: "custom",
|
|
16095
|
+
message: "an addon action is read-only here",
|
|
16096
|
+
path: ["readOnly"]
|
|
16097
|
+
});
|
|
16098
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
16099
|
+
code: "custom",
|
|
16100
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
16101
|
+
path: ["id"]
|
|
16102
|
+
});
|
|
16103
|
+
});
|
|
16104
|
+
/** What an operator writes for an internal action. */
|
|
16105
|
+
var ActionInputSchema = object({
|
|
16106
|
+
name: string().min(1).max(120),
|
|
16107
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
16108
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
16109
|
+
});
|
|
16110
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
16111
|
+
var ActionRunOriginSchema = object({
|
|
16112
|
+
/** The automation block whose step started it. */
|
|
16113
|
+
blockId: string().min(1).optional() });
|
|
16114
|
+
/** `started` = the caller did not ask to wait. */
|
|
16115
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
16116
|
+
var ActionRunResultSchema = object({
|
|
16117
|
+
runId: string().min(1),
|
|
16118
|
+
outcome: ActionRunOutcomeSchema,
|
|
16119
|
+
/** Why it did not run, or what failed. */
|
|
16120
|
+
message: string().optional()
|
|
16121
|
+
});
|
|
16122
|
+
_enum([
|
|
16123
|
+
"not-found",
|
|
16124
|
+
"read-only",
|
|
16125
|
+
"invalid-variables",
|
|
16126
|
+
"invalid-steps",
|
|
16127
|
+
"not-linked",
|
|
16128
|
+
"busy"
|
|
16129
|
+
]);
|
|
16130
|
+
object({
|
|
16131
|
+
actionId: string(),
|
|
16132
|
+
runId: string(),
|
|
16133
|
+
isRunning: boolean(),
|
|
16134
|
+
/** Set when the run ended. */
|
|
16135
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
16136
|
+
lastRunAt: number().nullable(),
|
|
16137
|
+
lastError: string().nullable()
|
|
15721
16138
|
});
|
|
15722
16139
|
/**
|
|
15723
16140
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -18317,7 +18734,7 @@ var CompositionEventPlanSchema = object({
|
|
|
18317
18734
|
stateField: string(),
|
|
18318
18735
|
fieldKey: string()
|
|
18319
18736
|
});
|
|
18320
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
18737
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
18321
18738
|
var CompositionProblemSchema = object({
|
|
18322
18739
|
code: _enum([
|
|
18323
18740
|
"reserved-variant",
|
|
@@ -18636,7 +19053,7 @@ var GROUP_TEMPLATES = [
|
|
|
18636
19053
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18637
19054
|
role: DeviceRole.TemperatureSensor,
|
|
18638
19055
|
outputCap: "temperature-sensor",
|
|
18639
|
-
outputField: "
|
|
19056
|
+
outputField: "temperature",
|
|
18640
19057
|
quantity: "temperature",
|
|
18641
19058
|
defaultAggregate: "mean",
|
|
18642
19059
|
empty: "null",
|
|
@@ -18647,7 +19064,7 @@ var GROUP_TEMPLATES = [
|
|
|
18647
19064
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18648
19065
|
role: DeviceRole.HumiditySensor,
|
|
18649
19066
|
outputCap: "humidity-sensor",
|
|
18650
|
-
outputField: "
|
|
19067
|
+
outputField: "humidity",
|
|
18651
19068
|
quantity: "humidity",
|
|
18652
19069
|
defaultAggregate: "mean",
|
|
18653
19070
|
empty: "null",
|
|
@@ -18658,7 +19075,7 @@ var GROUP_TEMPLATES = [
|
|
|
18658
19075
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18659
19076
|
role: DeviceRole.PressureSensor,
|
|
18660
19077
|
outputCap: "pressure-sensor",
|
|
18661
|
-
outputField: "
|
|
19078
|
+
outputField: "pressure",
|
|
18662
19079
|
quantity: "pressure",
|
|
18663
19080
|
defaultAggregate: "mean",
|
|
18664
19081
|
empty: "null",
|
|
@@ -18669,7 +19086,7 @@ var GROUP_TEMPLATES = [
|
|
|
18669
19086
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18670
19087
|
role: DeviceRole.AmbientLightSensor,
|
|
18671
19088
|
outputCap: "ambient-light-sensor",
|
|
18672
|
-
outputField: "
|
|
19089
|
+
outputField: "illuminance",
|
|
18673
19090
|
quantity: "illuminance",
|
|
18674
19091
|
defaultAggregate: "mean",
|
|
18675
19092
|
empty: "null",
|
|
@@ -18680,7 +19097,7 @@ var GROUP_TEMPLATES = [
|
|
|
18680
19097
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18681
19098
|
role: DeviceRole.PowerSensor,
|
|
18682
19099
|
outputCap: "power-meter",
|
|
18683
|
-
outputField: "
|
|
19100
|
+
outputField: "power",
|
|
18684
19101
|
quantity: "power",
|
|
18685
19102
|
defaultAggregate: "sum",
|
|
18686
19103
|
empty: "omit",
|
|
@@ -18691,7 +19108,7 @@ var GROUP_TEMPLATES = [
|
|
|
18691
19108
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18692
19109
|
role: DeviceRole.EnergySensor,
|
|
18693
19110
|
outputCap: "power-meter",
|
|
18694
|
-
outputField: "
|
|
19111
|
+
outputField: "energy",
|
|
18695
19112
|
quantity: "energy",
|
|
18696
19113
|
defaultAggregate: "sum",
|
|
18697
19114
|
empty: "omit",
|
|
@@ -18702,7 +19119,7 @@ var GROUP_TEMPLATES = [
|
|
|
18702
19119
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18703
19120
|
role: DeviceRole.BatterySensor,
|
|
18704
19121
|
outputCap: "battery",
|
|
18705
|
-
outputField: "
|
|
19122
|
+
outputField: "level",
|
|
18706
19123
|
quantity: "percentage",
|
|
18707
19124
|
defaultAggregate: "mean",
|
|
18708
19125
|
empty: "null",
|
|
@@ -19280,7 +19697,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
19280
19697
|
kind: "mutation",
|
|
19281
19698
|
auth: "admin",
|
|
19282
19699
|
access: "view"
|
|
19283
|
-
})
|
|
19700
|
+
}), method(object({
|
|
19701
|
+
blockId: string().min(1),
|
|
19702
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
19703
|
+
runStartedAt: number().optional(),
|
|
19704
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
19705
|
+
}), _void(), {
|
|
19706
|
+
kind: "mutation",
|
|
19707
|
+
auth: "admin"
|
|
19708
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
19709
|
+
traces: array(AutomationRunTraceSchema),
|
|
19710
|
+
lastError: string().nullable()
|
|
19711
|
+
}), { auth: "admin" });
|
|
19284
19712
|
/**
|
|
19285
19713
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
19286
19714
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -44398,51 +44826,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
44398
44826
|
kind: "mutation",
|
|
44399
44827
|
auth: "admin"
|
|
44400
44828
|
});
|
|
44401
|
-
new Set([
|
|
44402
|
-
{
|
|
44403
|
-
id: "person",
|
|
44404
|
-
name: "Person"
|
|
44405
|
-
},
|
|
44406
|
-
{
|
|
44407
|
-
id: "vehicle",
|
|
44408
|
-
name: "Vehicle"
|
|
44409
|
-
},
|
|
44410
|
-
{
|
|
44411
|
-
id: "animal",
|
|
44412
|
-
name: "Animal"
|
|
44413
|
-
},
|
|
44414
|
-
{
|
|
44415
|
-
id: "package",
|
|
44416
|
-
name: "Package"
|
|
44417
|
-
}
|
|
44418
|
-
].map((l) => l.id));
|
|
44419
|
-
var COCO_TO_MACRO = {
|
|
44420
|
-
mapping: {
|
|
44421
|
-
person: "person",
|
|
44422
|
-
bicycle: "vehicle",
|
|
44423
|
-
car: "vehicle",
|
|
44424
|
-
motorcycle: "vehicle",
|
|
44425
|
-
airplane: "vehicle",
|
|
44426
|
-
bus: "vehicle",
|
|
44427
|
-
train: "vehicle",
|
|
44428
|
-
truck: "vehicle",
|
|
44429
|
-
boat: "vehicle",
|
|
44430
|
-
bird: "animal",
|
|
44431
|
-
cat: "animal",
|
|
44432
|
-
dog: "animal",
|
|
44433
|
-
horse: "animal",
|
|
44434
|
-
sheep: "animal",
|
|
44435
|
-
cow: "animal",
|
|
44436
|
-
elephant: "animal",
|
|
44437
|
-
bear: "animal",
|
|
44438
|
-
zebra: "animal",
|
|
44439
|
-
giraffe: "animal",
|
|
44440
|
-
suitcase: "package",
|
|
44441
|
-
backpack: "package",
|
|
44442
|
-
handbag: "package"
|
|
44443
|
-
},
|
|
44444
|
-
preserveOriginal: false
|
|
44445
|
-
};
|
|
44446
44829
|
var AUDIO_MACRO_LABELS = [
|
|
44447
44830
|
{
|
|
44448
44831
|
id: "speech",
|
|
@@ -56895,9 +57278,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56895
57278
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56896
57279
|
object({
|
|
56897
57280
|
/** Carbon dioxide concentration in ppm. */
|
|
56898
|
-
|
|
57281
|
+
co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56899
57282
|
/** Total volatile organic compounds in ppb. */
|
|
56900
|
-
|
|
57283
|
+
voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56901
57284
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56902
57285
|
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56903
57286
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
@@ -56910,7 +57293,7 @@ object({
|
|
|
56910
57293
|
DeviceType.Sensor;
|
|
56911
57294
|
object({
|
|
56912
57295
|
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56913
|
-
|
|
57296
|
+
illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56914
57297
|
precision: 0,
|
|
56915
57298
|
label: "Illuminance"
|
|
56916
57299
|
})),
|
|
@@ -57007,6 +57390,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
57007
57390
|
* would produce more than `maxPoints` samples. */
|
|
57008
57391
|
sampleEveryMs: number().int().positive().optional()
|
|
57009
57392
|
}), AudioMetricsHistorySchema);
|
|
57393
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57394
|
+
actionId: string().min(1),
|
|
57395
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57396
|
+
}), _void(), {
|
|
57397
|
+
kind: "mutation",
|
|
57398
|
+
auth: "admin"
|
|
57399
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57400
|
+
kind: "mutation",
|
|
57401
|
+
auth: "admin"
|
|
57402
|
+
});
|
|
57403
|
+
/**
|
|
57404
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57405
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57406
|
+
*
|
|
57407
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57408
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57409
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57410
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57411
|
+
* drift (D3).
|
|
57412
|
+
*
|
|
57413
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57414
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57415
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57416
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57417
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57418
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57419
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57420
|
+
*
|
|
57421
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57422
|
+
* logged — never queued.
|
|
57423
|
+
*/
|
|
57424
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57425
|
+
var ActionLinksSchema = object({
|
|
57426
|
+
deviceId: number().int().nonnegative(),
|
|
57427
|
+
actionIds: array(string().min(1)).max(100)
|
|
57428
|
+
});
|
|
57429
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57430
|
+
actionId: string().min(1),
|
|
57431
|
+
deviceId: number().int().nonnegative().optional()
|
|
57432
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57433
|
+
role: "viewer",
|
|
57434
|
+
auth: "protected",
|
|
57435
|
+
kind: "query",
|
|
57436
|
+
caller: "required"
|
|
57437
|
+
}), method(object({
|
|
57438
|
+
actionId: string().min(1),
|
|
57439
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57440
|
+
wait: boolean().optional(),
|
|
57441
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57442
|
+
deviceId: number().int().nonnegative().optional()
|
|
57443
|
+
}), ActionRunResultSchema, {
|
|
57444
|
+
role: "viewer",
|
|
57445
|
+
auth: "protected",
|
|
57446
|
+
kind: "mutation",
|
|
57447
|
+
caller: "required"
|
|
57448
|
+
}), method(ActionIdInput, _void(), {
|
|
57449
|
+
kind: "mutation",
|
|
57450
|
+
auth: "admin"
|
|
57451
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57452
|
+
kind: "mutation",
|
|
57453
|
+
auth: "admin"
|
|
57454
|
+
}), method(object({
|
|
57455
|
+
actionId: string().min(1),
|
|
57456
|
+
action: ActionInputSchema.partial()
|
|
57457
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57458
|
+
kind: "mutation",
|
|
57459
|
+
auth: "admin"
|
|
57460
|
+
}), method(ActionIdInput, _void(), {
|
|
57461
|
+
kind: "mutation",
|
|
57462
|
+
auth: "admin"
|
|
57463
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57464
|
+
role: "viewer",
|
|
57465
|
+
auth: "protected",
|
|
57466
|
+
kind: "query"
|
|
57467
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57468
|
+
kind: "mutation",
|
|
57469
|
+
auth: "admin"
|
|
57470
|
+
});
|
|
57010
57471
|
object({
|
|
57011
57472
|
/** Whether the automation is currently enabled. Disabled automations
|
|
57012
57473
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -57060,7 +57521,7 @@ var BatteryStatusSchema = object({
|
|
|
57060
57521
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
57061
57522
|
* declines to band a non-finite reading, which is the correct shape.
|
|
57062
57523
|
*/
|
|
57063
|
-
|
|
57524
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
57064
57525
|
/**
|
|
57065
57526
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
57066
57527
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -57070,7 +57531,7 @@ var BatteryStatusSchema = object({
|
|
|
57070
57531
|
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
57071
57532
|
* power fields yet, or the firmware reported neither. Before it existed,
|
|
57072
57533
|
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
57073
|
-
* was drawn "on battery alone" — the same D315 defect `
|
|
57534
|
+
* was drawn "on battery alone" — the same D315 defect `level` closed
|
|
57074
57535
|
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
57075
57536
|
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
57076
57537
|
*/
|
|
@@ -57094,7 +57555,7 @@ var BatteryStatusSchema = object({
|
|
|
57094
57555
|
* that only report charge. A second reading on this cap, not a second
|
|
57095
57556
|
* `numeric-sensor` on the same device.
|
|
57096
57557
|
*/
|
|
57097
|
-
|
|
57558
|
+
voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57098
57559
|
/**
|
|
57099
57560
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57100
57561
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57128,7 +57589,7 @@ var BatteryStatusSchema = object({
|
|
|
57128
57589
|
/**
|
|
57129
57590
|
* True when the source is a BINARY low-battery indicator (HA
|
|
57130
57591
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
57131
|
-
* charge level — `
|
|
57592
|
+
* charge level — `level` is then a coarse stand-in (100 = normal,
|
|
57132
57593
|
* sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
|
|
57133
57594
|
* misleading exact percentage. Absent/false → genuine 0–100 % reading.
|
|
57134
57595
|
*/
|
|
@@ -57159,26 +57620,26 @@ DeviceType.Sensor;
|
|
|
57159
57620
|
* controls to this single-method surface.
|
|
57160
57621
|
*
|
|
57161
57622
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
57162
|
-
*
|
|
57623
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
57163
57624
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
57164
57625
|
* should surface those via the device's `getSettingsUISchema()`
|
|
57165
57626
|
* instead of bloating this cap.
|
|
57166
57627
|
*/
|
|
57167
57628
|
var BrightnessStatusSchema = object({
|
|
57168
57629
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57169
|
-
|
|
57630
|
+
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57170
57631
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57171
57632
|
lastChangedAt: number()
|
|
57172
57633
|
});
|
|
57173
57634
|
DeviceType.Light, method(object({
|
|
57174
57635
|
deviceId: number().int().nonnegative(),
|
|
57175
|
-
|
|
57636
|
+
level: number().min(0).max(100)
|
|
57176
57637
|
}), _void(), {
|
|
57177
57638
|
kind: "mutation",
|
|
57178
57639
|
auth: "protected"
|
|
57179
57640
|
}), object({
|
|
57180
57641
|
deviceId: number(),
|
|
57181
|
-
|
|
57642
|
+
level: number().min(0).max(100),
|
|
57182
57643
|
lastChangedAt: number()
|
|
57183
57644
|
});
|
|
57184
57645
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
@@ -57679,11 +58140,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
|
|
|
57679
58140
|
}),
|
|
57680
58141
|
object({
|
|
57681
58142
|
mode: literal("mired"),
|
|
57682
|
-
|
|
58143
|
+
colorTemperature: number().int().min(50).max(1e3)
|
|
57683
58144
|
})
|
|
57684
58145
|
]);
|
|
57685
58146
|
object({
|
|
57686
|
-
/** Active color mode — which of `rgb` / `hsv` / `
|
|
58147
|
+
/** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
|
|
57687
58148
|
* the bulb's current state. */
|
|
57688
58149
|
mode: _enum([
|
|
57689
58150
|
"rgb",
|
|
@@ -57695,7 +58156,7 @@ object({
|
|
|
57695
58156
|
/** Populated when `mode === 'hsv'`. */
|
|
57696
58157
|
hsv: HsvTripletSchema.optional(),
|
|
57697
58158
|
/** Populated when `mode === 'mired'`. */
|
|
57698
|
-
|
|
58159
|
+
colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57699
58160
|
/** Ms epoch of the last operator-driven change. */
|
|
57700
58161
|
lastChangedAt: number()
|
|
57701
58162
|
});
|
|
@@ -57714,7 +58175,7 @@ DeviceType.Light, method(object({
|
|
|
57714
58175
|
]),
|
|
57715
58176
|
rgb: RgbTripletSchema.optional(),
|
|
57716
58177
|
hsv: HsvTripletSchema.optional(),
|
|
57717
|
-
|
|
58178
|
+
colorTemperature: number().int().optional(),
|
|
57718
58179
|
lastChangedAt: number()
|
|
57719
58180
|
});
|
|
57720
58181
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
@@ -58152,11 +58613,11 @@ object({
|
|
|
58152
58613
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58153
58614
|
availablePrograms: array(string()),
|
|
58154
58615
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58155
|
-
|
|
58616
|
+
remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58156
58617
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58157
|
-
|
|
58618
|
+
delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58158
58619
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58159
|
-
|
|
58620
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58160
58621
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58161
58622
|
doorOpen: boolean().nullable(),
|
|
58162
58623
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58774,7 +59235,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58774
59235
|
object({
|
|
58775
59236
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58776
59237
|
* speed surface (single-speed fan). */
|
|
58777
|
-
|
|
59238
|
+
speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58778
59239
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58779
59240
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58780
59241
|
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
@@ -58794,7 +59255,7 @@ object({
|
|
|
58794
59255
|
});
|
|
58795
59256
|
DeviceType.Fan, method(object({
|
|
58796
59257
|
deviceId: number().int().nonnegative(),
|
|
58797
|
-
|
|
59258
|
+
speed: number().min(0).max(100)
|
|
58798
59259
|
}), _void(), {
|
|
58799
59260
|
kind: "mutation",
|
|
58800
59261
|
auth: "protected"
|
|
@@ -58985,7 +59446,7 @@ DeviceType.Humidifier, method(object({
|
|
|
58985
59446
|
*/
|
|
58986
59447
|
var HumiditySensorStatusSchema = object({
|
|
58987
59448
|
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58988
|
-
|
|
59449
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58989
59450
|
precision: 0,
|
|
58990
59451
|
label: "Humidity"
|
|
58991
59452
|
})),
|
|
@@ -59428,7 +59889,7 @@ object({
|
|
|
59428
59889
|
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59429
59890
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59430
59891
|
* task is active / progress is unavailable. */
|
|
59431
|
-
|
|
59892
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59432
59893
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59433
59894
|
* or null when unknown. */
|
|
59434
59895
|
currentCode: number().nullable().meta(readingMeta("none")),
|
|
@@ -59918,10 +60379,10 @@ object({
|
|
|
59918
60379
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59919
60380
|
/** Current playback position in ms. Null when not seekable or
|
|
59920
60381
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59921
|
-
|
|
60382
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59922
60383
|
/** Total duration of the current media in ms. Null when unknown
|
|
59923
60384
|
* (live stream) or nothing is playing. */
|
|
59924
|
-
|
|
60385
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59925
60386
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59926
60387
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59927
60388
|
shuffle: boolean().nullable(),
|
|
@@ -59948,7 +60409,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
|
|
|
59948
60409
|
auth: "protected"
|
|
59949
60410
|
}), method(object({
|
|
59950
60411
|
deviceId: number().int().nonnegative(),
|
|
59951
|
-
|
|
60412
|
+
position: number().int().nonnegative()
|
|
59952
60413
|
}), _void(), {
|
|
59953
60414
|
kind: "mutation",
|
|
59954
60415
|
auth: "protected"
|
|
@@ -60621,9 +61082,9 @@ var NetworkLinkStatusSchema = object({
|
|
|
60621
61082
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60622
61083
|
* SKIP a null rather than coerce it.
|
|
60623
61084
|
*/
|
|
60624
|
-
|
|
61085
|
+
signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60625
61086
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60626
|
-
|
|
61087
|
+
rssi: number().optional().meta(readingMeta("signal-level")),
|
|
60627
61088
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60628
61089
|
ssid: string().optional(),
|
|
60629
61090
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
@@ -61284,10 +61745,20 @@ var PetFeederDeviceStatusSchema = _enum([
|
|
|
61284
61745
|
]);
|
|
61285
61746
|
var gramsPortion = number().int().min(4).max(200);
|
|
61286
61747
|
object({
|
|
61287
|
-
/** Food
|
|
61288
|
-
*
|
|
61289
|
-
* bowl
|
|
61748
|
+
/** Food in the TANK (hopper), as the feeder's own sensor reports it
|
|
61749
|
+
* (`state.food`). A coarse level code, not grams — `0` is empty. The
|
|
61750
|
+
* amount in the bowl is `bowlFood`. On dual-hopper models this is the
|
|
61751
|
+
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
61752
|
+
* the device has not reported yet. */
|
|
61290
61753
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
61754
|
+
/** Food in the BOWL as the feeder reports it (`state.bowl`), in the
|
|
61755
|
+
* feeder's own units. Null when the model reports none. */
|
|
61756
|
+
bowlFood: number().nullable().meta(readingMeta("none")),
|
|
61757
|
+
/** True while the pet is eating (`state.eating`). */
|
|
61758
|
+
eating: boolean(),
|
|
61759
|
+
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
61760
|
+
* the client must not offer it. */
|
|
61761
|
+
supportsMarkRefilled: boolean(),
|
|
61291
61762
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61292
61763
|
* single-hopper models. */
|
|
61293
61764
|
food1: number().nullable().meta(readingMeta("none")),
|
|
@@ -61295,8 +61766,8 @@ object({
|
|
|
61295
61766
|
* single-hopper models. */
|
|
61296
61767
|
food2: number().nullable().meta(readingMeta("none")),
|
|
61297
61768
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61298
|
-
* (`device_class: problem`, on = low). True when the
|
|
61299
|
-
*
|
|
61769
|
+
* (`device_class: problem`, on = low). True when the tank reports empty,
|
|
61770
|
+
* or, on a dual-hopper model, when EITHER hopper is empty. */
|
|
61300
61771
|
lowFood: boolean(),
|
|
61301
61772
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
61302
61773
|
* device has no battery reading. */
|
|
@@ -61763,16 +62234,16 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61763
62234
|
auth: "admin"
|
|
61764
62235
|
});
|
|
61765
62236
|
object({
|
|
61766
|
-
/** Instantaneous power draw
|
|
61767
|
-
|
|
62237
|
+
/** Instantaneous power draw (watts). */
|
|
62238
|
+
power: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61768
62239
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61769
|
-
|
|
61770
|
-
/** Voltage
|
|
61771
|
-
|
|
62240
|
+
energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62241
|
+
/** Voltage (volts). */
|
|
62242
|
+
voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61772
62243
|
/** Current in amperes. */
|
|
61773
|
-
|
|
62244
|
+
current: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61774
62245
|
/** Apparent power in volt-amperes. */
|
|
61775
|
-
|
|
62246
|
+
apparentPower: number().optional().meta(readingMeta("apparent-power")),
|
|
61776
62247
|
/** Power factor (0..1) if reported. */
|
|
61777
62248
|
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61778
62249
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -61827,16 +62298,13 @@ var PresenceStatusSchema = object({
|
|
|
61827
62298
|
location: string().nullable(),
|
|
61828
62299
|
/** GPS coordinates when available. Null otherwise. */
|
|
61829
62300
|
gps: GpsLocationSchema.nullable(),
|
|
61830
|
-
/** Optional battery level of the tracking device (0..100). Null
|
|
61831
|
-
* when not reported. */
|
|
61832
|
-
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61833
62301
|
/** Ms epoch when the slice was last updated. */
|
|
61834
62302
|
lastChangedAt: number()
|
|
61835
62303
|
});
|
|
61836
62304
|
DeviceType.Presence;
|
|
61837
62305
|
object({
|
|
61838
62306
|
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61839
|
-
|
|
62307
|
+
pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61840
62308
|
/** Ms epoch when the slice was last updated. */
|
|
61841
62309
|
lastFetchedAt: number()
|
|
61842
62310
|
});
|
|
@@ -64858,7 +65326,7 @@ DeviceType.Sensor;
|
|
|
64858
65326
|
*/
|
|
64859
65327
|
var TemperatureSensorStatusSchema = object({
|
|
64860
65328
|
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64861
|
-
|
|
65329
|
+
temperature: number().nullable().meta(readingMeta("temperature", {
|
|
64862
65330
|
precision: 1,
|
|
64863
65331
|
label: "Temperature"
|
|
64864
65332
|
})),
|
|
@@ -65122,7 +65590,7 @@ object({
|
|
|
65122
65590
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
65123
65591
|
availableFanSpeeds: array(string()),
|
|
65124
65592
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
65125
|
-
|
|
65593
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65126
65594
|
/** Current error code (0 / null = no error). */
|
|
65127
65595
|
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65128
65596
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
@@ -66063,6 +66531,104 @@ Object.freeze({
|
|
|
66063
66531
|
access: "create",
|
|
66064
66532
|
role: "admin"
|
|
66065
66533
|
},
|
|
66534
|
+
"actions.create": {
|
|
66535
|
+
capName: "actions",
|
|
66536
|
+
capScope: "system",
|
|
66537
|
+
addonId: null,
|
|
66538
|
+
access: "create",
|
|
66539
|
+
role: "admin"
|
|
66540
|
+
},
|
|
66541
|
+
"actions.delete": {
|
|
66542
|
+
capName: "actions",
|
|
66543
|
+
capScope: "system",
|
|
66544
|
+
addonId: null,
|
|
66545
|
+
access: "delete",
|
|
66546
|
+
role: "admin"
|
|
66547
|
+
},
|
|
66548
|
+
"actions.get": {
|
|
66549
|
+
capName: "actions",
|
|
66550
|
+
capScope: "system",
|
|
66551
|
+
addonId: null,
|
|
66552
|
+
access: "view",
|
|
66553
|
+
role: "viewer"
|
|
66554
|
+
},
|
|
66555
|
+
"actions.getLinks": {
|
|
66556
|
+
capName: "actions",
|
|
66557
|
+
capScope: "system",
|
|
66558
|
+
addonId: null,
|
|
66559
|
+
access: "view",
|
|
66560
|
+
role: "admin"
|
|
66561
|
+
},
|
|
66562
|
+
"actions.getTraces": {
|
|
66563
|
+
capName: "actions",
|
|
66564
|
+
capScope: "system",
|
|
66565
|
+
addonId: null,
|
|
66566
|
+
access: "view",
|
|
66567
|
+
role: "admin"
|
|
66568
|
+
},
|
|
66569
|
+
"actions.list": {
|
|
66570
|
+
capName: "actions",
|
|
66571
|
+
capScope: "system",
|
|
66572
|
+
addonId: null,
|
|
66573
|
+
access: "view",
|
|
66574
|
+
role: "admin"
|
|
66575
|
+
},
|
|
66576
|
+
"actions.listForCamera": {
|
|
66577
|
+
capName: "actions",
|
|
66578
|
+
capScope: "system",
|
|
66579
|
+
addonId: null,
|
|
66580
|
+
access: "view",
|
|
66581
|
+
role: "viewer"
|
|
66582
|
+
},
|
|
66583
|
+
"actions.run": {
|
|
66584
|
+
capName: "actions",
|
|
66585
|
+
capScope: "system",
|
|
66586
|
+
addonId: null,
|
|
66587
|
+
access: "create",
|
|
66588
|
+
role: "viewer"
|
|
66589
|
+
},
|
|
66590
|
+
"actions.setLinks": {
|
|
66591
|
+
capName: "actions",
|
|
66592
|
+
capScope: "system",
|
|
66593
|
+
addonId: null,
|
|
66594
|
+
access: "create",
|
|
66595
|
+
role: "admin"
|
|
66596
|
+
},
|
|
66597
|
+
"actions.stop": {
|
|
66598
|
+
capName: "actions",
|
|
66599
|
+
capScope: "system",
|
|
66600
|
+
addonId: null,
|
|
66601
|
+
access: "create",
|
|
66602
|
+
role: "admin"
|
|
66603
|
+
},
|
|
66604
|
+
"actions.update": {
|
|
66605
|
+
capName: "actions",
|
|
66606
|
+
capScope: "system",
|
|
66607
|
+
addonId: null,
|
|
66608
|
+
access: "create",
|
|
66609
|
+
role: "admin"
|
|
66610
|
+
},
|
|
66611
|
+
"actionSource.listActions": {
|
|
66612
|
+
capName: "action-source",
|
|
66613
|
+
capScope: "system",
|
|
66614
|
+
addonId: null,
|
|
66615
|
+
access: "view",
|
|
66616
|
+
role: "admin"
|
|
66617
|
+
},
|
|
66618
|
+
"actionSource.runAction": {
|
|
66619
|
+
capName: "action-source",
|
|
66620
|
+
capScope: "system",
|
|
66621
|
+
addonId: null,
|
|
66622
|
+
access: "create",
|
|
66623
|
+
role: "admin"
|
|
66624
|
+
},
|
|
66625
|
+
"actionSource.stopAction": {
|
|
66626
|
+
capName: "action-source",
|
|
66627
|
+
capScope: "system",
|
|
66628
|
+
addonId: null,
|
|
66629
|
+
access: "create",
|
|
66630
|
+
role: "admin"
|
|
66631
|
+
},
|
|
66066
66632
|
"addonPages.listPages": {
|
|
66067
66633
|
capName: "addon-pages",
|
|
66068
66634
|
capScope: "system",
|
|
@@ -67344,6 +67910,13 @@ Object.freeze({
|
|
|
67344
67910
|
access: "view",
|
|
67345
67911
|
role: "admin"
|
|
67346
67912
|
},
|
|
67913
|
+
"coreBlocks.getAutomationRunState": {
|
|
67914
|
+
capName: "core-blocks",
|
|
67915
|
+
capScope: "system",
|
|
67916
|
+
addonId: null,
|
|
67917
|
+
access: "view",
|
|
67918
|
+
role: "admin"
|
|
67919
|
+
},
|
|
67347
67920
|
"coreBlocks.getBlockSettings": {
|
|
67348
67921
|
capName: "core-blocks",
|
|
67349
67922
|
capScope: "system",
|
|
@@ -67365,6 +67938,13 @@ Object.freeze({
|
|
|
67365
67938
|
access: "view",
|
|
67366
67939
|
role: "admin"
|
|
67367
67940
|
},
|
|
67941
|
+
"coreBlocks.getTraces": {
|
|
67942
|
+
capName: "core-blocks",
|
|
67943
|
+
capScope: "system",
|
|
67944
|
+
addonId: null,
|
|
67945
|
+
access: "view",
|
|
67946
|
+
role: "admin"
|
|
67947
|
+
},
|
|
67368
67948
|
"coreBlocks.getTypeDefs": {
|
|
67369
67949
|
capName: "core-blocks",
|
|
67370
67950
|
capScope: "system",
|
|
@@ -67400,6 +67980,13 @@ Object.freeze({
|
|
|
67400
67980
|
access: "create",
|
|
67401
67981
|
role: "admin"
|
|
67402
67982
|
},
|
|
67983
|
+
"coreBlocks.reportAutomationRun": {
|
|
67984
|
+
capName: "core-blocks",
|
|
67985
|
+
capScope: "system",
|
|
67986
|
+
addonId: null,
|
|
67987
|
+
access: "create",
|
|
67988
|
+
role: "admin"
|
|
67989
|
+
},
|
|
67403
67990
|
"coreBlocks.restart": {
|
|
67404
67991
|
capName: "core-blocks",
|
|
67405
67992
|
capScope: "system",
|
|
@@ -75973,7 +76560,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75973
76560
|
label: t("Full brightness", "Luminosità massima"),
|
|
75974
76561
|
phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
|
|
75975
76562
|
icon: "sun",
|
|
75976
|
-
args: {
|
|
76563
|
+
args: { level: 100 }
|
|
75977
76564
|
},
|
|
75978
76565
|
{
|
|
75979
76566
|
id: "brightness.half",
|
|
@@ -75981,7 +76568,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75981
76568
|
label: t("Half brightness", "Luminosità a metà"),
|
|
75982
76569
|
phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
|
|
75983
76570
|
icon: "sun-dim",
|
|
75984
|
-
args: {
|
|
76571
|
+
args: { level: 50 }
|
|
75985
76572
|
},
|
|
75986
76573
|
{
|
|
75987
76574
|
id: "brightness.off",
|
|
@@ -75989,16 +76576,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75989
76576
|
label: t("Brightness off", "Luminosità a zero"),
|
|
75990
76577
|
phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
|
|
75991
76578
|
icon: "lightbulb-off",
|
|
75992
|
-
args: {
|
|
76579
|
+
args: { level: 0 }
|
|
75993
76580
|
},
|
|
75994
76581
|
{
|
|
75995
76582
|
id: "brightness.set",
|
|
75996
76583
|
method: "setBrightness",
|
|
75997
76584
|
label: t("Set brightness", "Imposta la luminosità"),
|
|
75998
|
-
phrase: t("Set the brightness of {device} to {
|
|
76585
|
+
phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
|
|
75999
76586
|
icon: "sun-medium",
|
|
76000
76587
|
openArgs: [{
|
|
76001
|
-
key: "
|
|
76588
|
+
key: "level",
|
|
76002
76589
|
label: PERCENT,
|
|
76003
76590
|
offer: {
|
|
76004
76591
|
kind: "number",
|
|
@@ -76012,13 +76599,13 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76012
76599
|
],
|
|
76013
76600
|
state: [{
|
|
76014
76601
|
kind: "numeric",
|
|
76015
|
-
field: "
|
|
76602
|
+
field: "level",
|
|
76016
76603
|
quantity: t("the brightness", "la luminosità"),
|
|
76017
76604
|
label: t("Brightness", "Luminosità"),
|
|
76018
76605
|
unit: "%",
|
|
76019
76606
|
icon: "sun"
|
|
76020
76607
|
}],
|
|
76021
|
-
events: { onBrightnessChanged: { notOperatorFacing: "the `
|
|
76608
|
+
events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
|
|
76022
76609
|
},
|
|
76023
76610
|
color: {
|
|
76024
76611
|
scope: "device",
|
|
@@ -76032,7 +76619,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76032
76619
|
icon: "sun",
|
|
76033
76620
|
args: { color: {
|
|
76034
76621
|
mode: "mired",
|
|
76035
|
-
|
|
76622
|
+
colorTemperature: 370
|
|
76036
76623
|
} }
|
|
76037
76624
|
},
|
|
76038
76625
|
{
|
|
@@ -76043,7 +76630,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76043
76630
|
icon: "snowflake",
|
|
76044
76631
|
args: { color: {
|
|
76045
76632
|
mode: "mired",
|
|
76046
|
-
|
|
76633
|
+
colorTemperature: 200
|
|
76047
76634
|
} }
|
|
76048
76635
|
},
|
|
76049
76636
|
{
|
|
@@ -76657,7 +77244,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76657
77244
|
label: t("Fan off", "Ventilatore spento"),
|
|
76658
77245
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
76659
77246
|
icon: "power-off",
|
|
76660
|
-
args: {
|
|
77247
|
+
args: { speed: 0 }
|
|
76661
77248
|
},
|
|
76662
77249
|
{
|
|
76663
77250
|
id: "fan.full",
|
|
@@ -76665,16 +77252,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76665
77252
|
label: t("Fan full", "Ventilatore al massimo"),
|
|
76666
77253
|
phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
|
|
76667
77254
|
icon: "fan",
|
|
76668
|
-
args: {
|
|
77255
|
+
args: { speed: 100 }
|
|
76669
77256
|
},
|
|
76670
77257
|
{
|
|
76671
77258
|
id: "fan.speed",
|
|
76672
77259
|
method: "setPercentage",
|
|
76673
77260
|
label: t("Set speed", "Imposta la velocità"),
|
|
76674
|
-
phrase: t("Set the speed of {device} to {
|
|
77261
|
+
phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
|
|
76675
77262
|
icon: "fan",
|
|
76676
77263
|
openArgs: [{
|
|
76677
|
-
key: "
|
|
77264
|
+
key: "speed",
|
|
76678
77265
|
label: t("Speed", "Velocità"),
|
|
76679
77266
|
offer: {
|
|
76680
77267
|
kind: "number",
|
|
@@ -76736,7 +77323,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76736
77323
|
],
|
|
76737
77324
|
state: [{
|
|
76738
77325
|
kind: "numeric",
|
|
76739
|
-
field: "
|
|
77326
|
+
field: "speed",
|
|
76740
77327
|
quantity: t("the speed", "la velocità"),
|
|
76741
77328
|
label: t("Speed", "Velocità"),
|
|
76742
77329
|
unit: "%",
|
|
@@ -77534,7 +78121,7 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77534
78121
|
},
|
|
77535
78122
|
{
|
|
77536
78123
|
kind: "numeric",
|
|
77537
|
-
field: "
|
|
78124
|
+
field: "progress",
|
|
77538
78125
|
quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
|
|
77539
78126
|
label: t("Progress", "Avanzamento"),
|
|
77540
78127
|
unit: "%",
|
|
@@ -77892,10 +78479,10 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77892
78479
|
id: "media.seek",
|
|
77893
78480
|
method: "seek",
|
|
77894
78481
|
label: t("Seek", "Vai al punto"),
|
|
77895
|
-
phrase: t("Move {device} to {
|
|
78482
|
+
phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
|
|
77896
78483
|
icon: "fast-forward",
|
|
77897
78484
|
openArgs: [{
|
|
77898
|
-
key: "
|
|
78485
|
+
key: "position",
|
|
77899
78486
|
label: t("Position", "Posizione"),
|
|
77900
78487
|
offer: {
|
|
77901
78488
|
kind: "number",
|
|
@@ -78944,7 +79531,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78944
79531
|
state: [
|
|
78945
79532
|
{
|
|
78946
79533
|
kind: "numeric",
|
|
78947
|
-
field: "
|
|
79534
|
+
field: "co2",
|
|
78948
79535
|
quantity: t("the CO₂", "la CO₂"),
|
|
78949
79536
|
label: t("CO₂", "CO₂"),
|
|
78950
79537
|
unit: "ppm",
|
|
@@ -78952,7 +79539,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78952
79539
|
},
|
|
78953
79540
|
{
|
|
78954
79541
|
kind: "numeric",
|
|
78955
|
-
field: "
|
|
79542
|
+
field: "voc",
|
|
78956
79543
|
quantity: t("the VOC level", "il livello di COV"),
|
|
78957
79544
|
label: t("VOC", "COV"),
|
|
78958
79545
|
unit: "ppb",
|
|
@@ -78988,7 +79575,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78988
79575
|
noun: t("Light level", "Luminosità ambiente"),
|
|
78989
79576
|
state: [{
|
|
78990
79577
|
kind: "numeric",
|
|
78991
|
-
field: "
|
|
79578
|
+
field: "illuminance",
|
|
78992
79579
|
quantity: t("the light level", "la luminosità"),
|
|
78993
79580
|
label: t("Illuminance", "Illuminamento"),
|
|
78994
79581
|
unit: "lx",
|
|
@@ -79191,7 +79778,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79191
79778
|
noun: t("Humidity", "Umidità"),
|
|
79192
79779
|
state: [{
|
|
79193
79780
|
kind: "numeric",
|
|
79194
|
-
field: "
|
|
79781
|
+
field: "humidity",
|
|
79195
79782
|
quantity: t("the humidity", "l’umidità"),
|
|
79196
79783
|
label: t("Humidity", "Umidità"),
|
|
79197
79784
|
unit: "%",
|
|
@@ -79239,7 +79826,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79239
79826
|
state: [
|
|
79240
79827
|
{
|
|
79241
79828
|
kind: "numeric",
|
|
79242
|
-
field: "
|
|
79829
|
+
field: "power",
|
|
79243
79830
|
quantity: t("the power draw", "il consumo"),
|
|
79244
79831
|
label: t("Power", "Potenza"),
|
|
79245
79832
|
unit: "W",
|
|
@@ -79247,7 +79834,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79247
79834
|
},
|
|
79248
79835
|
{
|
|
79249
79836
|
kind: "numeric",
|
|
79250
|
-
field: "
|
|
79837
|
+
field: "energy",
|
|
79251
79838
|
quantity: t("the energy used", "l’energia consumata"),
|
|
79252
79839
|
label: t("Energy", "Energia"),
|
|
79253
79840
|
unit: "kWh",
|
|
@@ -79255,7 +79842,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79255
79842
|
},
|
|
79256
79843
|
{
|
|
79257
79844
|
kind: "numeric",
|
|
79258
|
-
field: "
|
|
79845
|
+
field: "voltage",
|
|
79259
79846
|
quantity: t("the voltage", "la tensione"),
|
|
79260
79847
|
label: t("Voltage", "Tensione"),
|
|
79261
79848
|
unit: "V",
|
|
@@ -79263,7 +79850,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79263
79850
|
},
|
|
79264
79851
|
{
|
|
79265
79852
|
kind: "numeric",
|
|
79266
|
-
field: "
|
|
79853
|
+
field: "current",
|
|
79267
79854
|
quantity: t("the current", "la corrente"),
|
|
79268
79855
|
label: t("Current", "Corrente"),
|
|
79269
79856
|
unit: "A",
|
|
@@ -79280,13 +79867,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79280
79867
|
label: t("Where", "Posizione"),
|
|
79281
79868
|
phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
|
|
79282
79869
|
icon: "map-pin"
|
|
79283
|
-
}, {
|
|
79284
|
-
kind: "numeric",
|
|
79285
|
-
field: "batteryPercent",
|
|
79286
|
-
quantity: t("the phone battery", "la batteria del telefono"),
|
|
79287
|
-
label: t("Battery", "Batteria"),
|
|
79288
|
-
unit: "%",
|
|
79289
|
-
icon: "battery"
|
|
79290
79870
|
}]
|
|
79291
79871
|
},
|
|
79292
79872
|
"pressure-sensor": {
|
|
@@ -79294,7 +79874,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79294
79874
|
noun: t("Pressure", "Pressione"),
|
|
79295
79875
|
state: [{
|
|
79296
79876
|
kind: "numeric",
|
|
79297
|
-
field: "
|
|
79877
|
+
field: "pressure",
|
|
79298
79878
|
quantity: t("the pressure", "la pressione"),
|
|
79299
79879
|
label: t("Pressure", "Pressione"),
|
|
79300
79880
|
unit: "hPa",
|
|
@@ -79330,7 +79910,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79330
79910
|
noun: t("Temperature", "Temperatura"),
|
|
79331
79911
|
state: [{
|
|
79332
79912
|
kind: "numeric",
|
|
79333
|
-
field: "
|
|
79913
|
+
field: "temperature",
|
|
79334
79914
|
quantity: t("the temperature", "la temperatura"),
|
|
79335
79915
|
label: t("Temperature", "Temperatura"),
|
|
79336
79916
|
unit: "°C",
|
|
@@ -79401,7 +79981,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79401
79981
|
state: [
|
|
79402
79982
|
{
|
|
79403
79983
|
kind: "numeric",
|
|
79404
|
-
field: "
|
|
79984
|
+
field: "level",
|
|
79405
79985
|
quantity: t("the battery level", "il livello della batteria"),
|
|
79406
79986
|
label: t("Battery", "Batteria"),
|
|
79407
79987
|
unit: "%",
|
|
@@ -79443,7 +80023,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79443
80023
|
icon: "battery-charging"
|
|
79444
80024
|
}
|
|
79445
80025
|
],
|
|
79446
|
-
events: { onStatusChanged: { notOperatorFacing: "the
|
|
80026
|
+
events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
|
|
79447
80027
|
extraEvents: [{
|
|
79448
80028
|
category: EventCategory.DeviceAwake,
|
|
79449
80029
|
label: t("Woke up", "Risvegliato"),
|
|
@@ -79461,7 +80041,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79461
80041
|
noun: t("Network link", "Collegamento di rete"),
|
|
79462
80042
|
state: [{
|
|
79463
80043
|
kind: "numeric",
|
|
79464
|
-
field: "
|
|
80044
|
+
field: "signal",
|
|
79465
80045
|
quantity: t("the signal strength", "l’intensità del segnale"),
|
|
79466
80046
|
label: t("Signal", "Segnale"),
|
|
79467
80047
|
unit: "%",
|
|
@@ -79554,6 +80134,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79554
80134
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79555
80135
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79556
80136
|
var SYSTEM_CAP_VOCABULARY = {
|
|
80137
|
+
"action-source": system(INTERNAL),
|
|
80138
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79557
80139
|
"addon-pages": system(UI_PLUMBING),
|
|
79558
80140
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79559
80141
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79775,6 +80357,31 @@ Object.freeze({
|
|
|
79775
80357
|
form: "single",
|
|
79776
80358
|
optional: false
|
|
79777
80359
|
}],
|
|
80360
|
+
"actions.get": [{
|
|
80361
|
+
name: "deviceId",
|
|
80362
|
+
form: "single",
|
|
80363
|
+
optional: true
|
|
80364
|
+
}],
|
|
80365
|
+
"actions.getLinks": [{
|
|
80366
|
+
name: "deviceId",
|
|
80367
|
+
form: "single",
|
|
80368
|
+
optional: false
|
|
80369
|
+
}],
|
|
80370
|
+
"actions.listForCamera": [{
|
|
80371
|
+
name: "deviceId",
|
|
80372
|
+
form: "single",
|
|
80373
|
+
optional: false
|
|
80374
|
+
}],
|
|
80375
|
+
"actions.run": [{
|
|
80376
|
+
name: "deviceId",
|
|
80377
|
+
form: "single",
|
|
80378
|
+
optional: true
|
|
80379
|
+
}],
|
|
80380
|
+
"actions.setLinks": [{
|
|
80381
|
+
name: "deviceId",
|
|
80382
|
+
form: "single",
|
|
80383
|
+
optional: false
|
|
80384
|
+
}],
|
|
79778
80385
|
"addonSettings.getDeviceSettings": [{
|
|
79779
80386
|
name: "deviceId",
|
|
79780
80387
|
form: "single",
|
|
@@ -83957,6 +84564,7 @@ function resolveGrantDeviceIds(scopes, fleet, access) {
|
|
|
83957
84564
|
}
|
|
83958
84565
|
return out;
|
|
83959
84566
|
}
|
|
84567
|
+
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
83960
84568
|
var MB = 1024 * 1024;
|
|
83961
84569
|
1024 * MB, 3072 * MB;
|
|
83962
84570
|
//#endregion
|
|
@@ -85678,13 +86286,13 @@ var temperatureAdapter = {
|
|
|
85678
86286
|
category: "TEMPERATURE_SENSOR"
|
|
85679
86287
|
}),
|
|
85680
86288
|
properties: (_cap, slice) => {
|
|
85681
|
-
const p = TemperatureSensorStatusSchema.pick({
|
|
85682
|
-
if (!p.success || p.data.
|
|
86289
|
+
const p = TemperatureSensorStatusSchema.pick({ temperature: true }).safeParse(slice);
|
|
86290
|
+
if (!p.success || p.data.temperature === null) return [];
|
|
85683
86291
|
return [{
|
|
85684
86292
|
namespace: "Alexa.TemperatureSensor",
|
|
85685
86293
|
name: "temperature",
|
|
85686
86294
|
value: {
|
|
85687
|
-
value: Math.round(p.data.
|
|
86295
|
+
value: Math.round(p.data.temperature * 10) / 10,
|
|
85688
86296
|
scale: "CELSIUS"
|
|
85689
86297
|
}
|
|
85690
86298
|
}];
|
|
@@ -86429,12 +87037,12 @@ var humidityAdapter = {
|
|
|
86429
87037
|
category: "TEMPERATURE_SENSOR"
|
|
86430
87038
|
}),
|
|
86431
87039
|
properties: (_cap, slice) => {
|
|
86432
|
-
const p = HumiditySensorStatusSchema.pick({
|
|
86433
|
-
if (!p.success || p.data.
|
|
87040
|
+
const p = HumiditySensorStatusSchema.pick({ humidity: true }).safeParse(slice);
|
|
87041
|
+
if (!p.success || p.data.humidity === null) return [];
|
|
86434
87042
|
return [{
|
|
86435
87043
|
namespace: "Alexa.HumiditySensor",
|
|
86436
87044
|
name: "relativeHumidity",
|
|
86437
|
-
value: { value: Math.max(0, Math.min(100, p.data.
|
|
87045
|
+
value: { value: Math.max(0, Math.min(100, p.data.humidity)) }
|
|
86438
87046
|
}];
|
|
86439
87047
|
},
|
|
86440
87048
|
directives: [],
|
|
@@ -86608,7 +87216,7 @@ async function handleSetBrightness(header, endpointRaw, payloadRaw, deps, _calle
|
|
|
86608
87216
|
try {
|
|
86609
87217
|
await api.brightness.setBrightness.mutate({
|
|
86610
87218
|
deviceId: targetDeviceId,
|
|
86611
|
-
percentage
|
|
87219
|
+
level: percentage
|
|
86612
87220
|
});
|
|
86613
87221
|
} catch (err) {
|
|
86614
87222
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -86752,11 +87360,11 @@ var GENERIC_ADAPTERS = [
|
|
|
86752
87360
|
},
|
|
86753
87361
|
properties: (capName, slice) => {
|
|
86754
87362
|
if (capName === "brightness") {
|
|
86755
|
-
const p = BrightnessStatusSchema.pick({
|
|
87363
|
+
const p = BrightnessStatusSchema.pick({ level: true }).safeParse(slice);
|
|
86756
87364
|
return p.success ? [{
|
|
86757
87365
|
namespace: "Alexa.BrightnessController",
|
|
86758
87366
|
name: "brightness",
|
|
86759
|
-
value: Math.max(0, Math.min(100, Math.round(p.data.
|
|
87367
|
+
value: Math.max(0, Math.min(100, Math.round(p.data.level)))
|
|
86760
87368
|
}] : [];
|
|
86761
87369
|
}
|
|
86762
87370
|
const p = SwitchStatusSchema.pick({ on: true }).safeParse(slice);
|
|
@@ -89806,7 +90414,7 @@ async function collectChildProperties(api, childDeviceId, properties, timeOfSamp
|
|
|
89806
90414
|
timeOfSample,
|
|
89807
90415
|
uncertaintyInMilliseconds: 0
|
|
89808
90416
|
});
|
|
89809
|
-
const level = numberField(await api.brightness.getStatus.query({ deviceId: childDeviceId }).catch(() => null), "
|
|
90417
|
+
const level = numberField(await api.brightness.getStatus.query({ deviceId: childDeviceId }).catch(() => null), "level");
|
|
89810
90418
|
if (level !== null) properties.push({
|
|
89811
90419
|
namespace: "Alexa.BrightnessController",
|
|
89812
90420
|
name: "brightness",
|
|
@@ -93689,7 +94297,7 @@ function indexByDrivingDevice(exported) {
|
|
|
93689
94297
|
}
|
|
93690
94298
|
var EnabledSchema = object({ enabled: boolean() });
|
|
93691
94299
|
var OnSchema = object({ on: boolean() });
|
|
93692
|
-
var PercentageSchema = object({
|
|
94300
|
+
var PercentageSchema = object({ level: number() });
|
|
93693
94301
|
var OnlineSchema = object({ online: boolean() });
|
|
93694
94302
|
function power(on) {
|
|
93695
94303
|
return {
|
|
@@ -93770,7 +94378,7 @@ function stateReportsFor(change, exported) {
|
|
|
93770
94378
|
case "brightness": {
|
|
93771
94379
|
const parsed = PercentageSchema.safeParse(change.slice);
|
|
93772
94380
|
if (!parsed.success) break;
|
|
93773
|
-
const value = Math.max(0, Math.min(100, Math.round(parsed.data.
|
|
94381
|
+
const value = Math.max(0, Math.min(100, Math.round(parsed.data.level)));
|
|
93774
94382
|
for (const e of of("child")) reports.push({
|
|
93775
94383
|
...e,
|
|
93776
94384
|
interfaceName: "Alexa.BrightnessController",
|