@camstack/addon-export-google 0.1.116 → 0.1.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/export-google.addon.js +802 -194
- package/dist/export-google.addon.mjs +802 -194
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ async function dispatchCapCall(api, call) {
|
|
|
10
10
|
case "brightness.setBrightness":
|
|
11
11
|
await api.brightness.setBrightness.mutate({
|
|
12
12
|
deviceId: call.deviceId,
|
|
13
|
-
|
|
13
|
+
level: call.percentage
|
|
14
14
|
});
|
|
15
15
|
return;
|
|
16
16
|
case "lockControl.lock":
|
|
@@ -73,7 +73,7 @@ function createApiDeviceGateway(deps) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
|
-
//#region ../types/dist/event-category-
|
|
76
|
+
//#region ../types/dist/event-category-DmZDPDf_.mjs
|
|
77
77
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
78
78
|
EventCategory["SystemBoot"] = "system.boot";
|
|
79
79
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -700,7 +700,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
700
700
|
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
701
701
|
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
702
702
|
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
703
|
-
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
703
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
|
|
704
704
|
*/
|
|
705
705
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
706
706
|
/**
|
|
@@ -838,6 +838,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
838
838
|
*/
|
|
839
839
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
840
840
|
/**
|
|
841
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
842
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
843
|
+
*/
|
|
844
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
845
|
+
/**
|
|
841
846
|
* Progress update from a running model conversion job.
|
|
842
847
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
843
848
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5516,7 +5521,7 @@ var ZodIssueCode = {
|
|
|
5516
5521
|
var ZodFirstPartyTypeKind;
|
|
5517
5522
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5518
5523
|
//#endregion
|
|
5519
|
-
//#region ../types/dist/sleep
|
|
5524
|
+
//#region ../types/dist/sleep-Crlmu_tO.mjs
|
|
5520
5525
|
/**
|
|
5521
5526
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5522
5527
|
* window to float samples (D455).
|
|
@@ -8587,6 +8592,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8587
8592
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8588
8593
|
var CAP_NAMES = Object.freeze([
|
|
8589
8594
|
"accessories",
|
|
8595
|
+
"action-source",
|
|
8596
|
+
"actions",
|
|
8590
8597
|
"addon-pages",
|
|
8591
8598
|
"addon-pages-source",
|
|
8592
8599
|
"addon-routes",
|
|
@@ -8775,11 +8782,11 @@ var CAP_NAMES = Object.freeze([
|
|
|
8775
8782
|
Object.freeze({
|
|
8776
8783
|
"air-quality-sensor": [
|
|
8777
8784
|
{
|
|
8778
|
-
"path": "
|
|
8785
|
+
"path": "co2",
|
|
8779
8786
|
"valueType": "number"
|
|
8780
8787
|
},
|
|
8781
8788
|
{
|
|
8782
|
-
"path": "
|
|
8789
|
+
"path": "voc",
|
|
8783
8790
|
"valueType": "number"
|
|
8784
8791
|
},
|
|
8785
8792
|
{
|
|
@@ -8829,7 +8836,7 @@ Object.freeze({
|
|
|
8829
8836
|
}
|
|
8830
8837
|
],
|
|
8831
8838
|
"ambient-light-sensor": [{
|
|
8832
|
-
"path": "
|
|
8839
|
+
"path": "illuminance",
|
|
8833
8840
|
"valueType": "number"
|
|
8834
8841
|
}],
|
|
8835
8842
|
"audio-metrics": [
|
|
@@ -8890,7 +8897,7 @@ Object.freeze({
|
|
|
8890
8897
|
],
|
|
8891
8898
|
"battery": [
|
|
8892
8899
|
{
|
|
8893
|
-
"path": "
|
|
8900
|
+
"path": "level",
|
|
8894
8901
|
"valueType": "number"
|
|
8895
8902
|
},
|
|
8896
8903
|
{
|
|
@@ -8912,7 +8919,7 @@ Object.freeze({
|
|
|
8912
8919
|
"valueType": "number"
|
|
8913
8920
|
},
|
|
8914
8921
|
{
|
|
8915
|
-
"path": "
|
|
8922
|
+
"path": "voltage",
|
|
8916
8923
|
"valueType": "number"
|
|
8917
8924
|
},
|
|
8918
8925
|
{
|
|
@@ -8933,7 +8940,7 @@ Object.freeze({
|
|
|
8933
8940
|
"valueType": "boolean"
|
|
8934
8941
|
}],
|
|
8935
8942
|
"brightness": [{
|
|
8936
|
-
"path": "
|
|
8943
|
+
"path": "level",
|
|
8937
8944
|
"valueType": "number"
|
|
8938
8945
|
}],
|
|
8939
8946
|
"broker": [{
|
|
@@ -9134,7 +9141,7 @@ Object.freeze({
|
|
|
9134
9141
|
"valueType": "number"
|
|
9135
9142
|
},
|
|
9136
9143
|
{
|
|
9137
|
-
"path": "
|
|
9144
|
+
"path": "colorTemperature",
|
|
9138
9145
|
"valueType": "number"
|
|
9139
9146
|
}
|
|
9140
9147
|
],
|
|
@@ -9313,15 +9320,15 @@ Object.freeze({
|
|
|
9313
9320
|
"valueType": "string"
|
|
9314
9321
|
},
|
|
9315
9322
|
{
|
|
9316
|
-
"path": "
|
|
9323
|
+
"path": "remaining",
|
|
9317
9324
|
"valueType": "number"
|
|
9318
9325
|
},
|
|
9319
9326
|
{
|
|
9320
|
-
"path": "
|
|
9327
|
+
"path": "delayedStart",
|
|
9321
9328
|
"valueType": "number"
|
|
9322
9329
|
},
|
|
9323
9330
|
{
|
|
9324
|
-
"path": "
|
|
9331
|
+
"path": "progress",
|
|
9325
9332
|
"valueType": "number"
|
|
9326
9333
|
},
|
|
9327
9334
|
{
|
|
@@ -9435,7 +9442,7 @@ Object.freeze({
|
|
|
9435
9442
|
],
|
|
9436
9443
|
"fan-control": [
|
|
9437
9444
|
{
|
|
9438
|
-
"path": "
|
|
9445
|
+
"path": "speed",
|
|
9439
9446
|
"valueType": "number"
|
|
9440
9447
|
},
|
|
9441
9448
|
{
|
|
@@ -9535,7 +9542,7 @@ Object.freeze({
|
|
|
9535
9542
|
}
|
|
9536
9543
|
],
|
|
9537
9544
|
"humidity-sensor": [{
|
|
9538
|
-
"path": "
|
|
9545
|
+
"path": "humidity",
|
|
9539
9546
|
"valueType": "number"
|
|
9540
9547
|
}],
|
|
9541
9548
|
"image": [{
|
|
@@ -9645,7 +9652,7 @@ Object.freeze({
|
|
|
9645
9652
|
"valueType": "number"
|
|
9646
9653
|
},
|
|
9647
9654
|
{
|
|
9648
|
-
"path": "
|
|
9655
|
+
"path": "progress",
|
|
9649
9656
|
"valueType": "number"
|
|
9650
9657
|
},
|
|
9651
9658
|
{
|
|
@@ -9724,11 +9731,11 @@ Object.freeze({
|
|
|
9724
9731
|
"valueType": "string"
|
|
9725
9732
|
},
|
|
9726
9733
|
{
|
|
9727
|
-
"path": "
|
|
9734
|
+
"path": "position",
|
|
9728
9735
|
"valueType": "number"
|
|
9729
9736
|
},
|
|
9730
9737
|
{
|
|
9731
|
-
"path": "
|
|
9738
|
+
"path": "duration",
|
|
9732
9739
|
"valueType": "number"
|
|
9733
9740
|
},
|
|
9734
9741
|
{
|
|
@@ -9830,11 +9837,11 @@ Object.freeze({
|
|
|
9830
9837
|
]
|
|
9831
9838
|
},
|
|
9832
9839
|
{
|
|
9833
|
-
"path": "
|
|
9840
|
+
"path": "signal",
|
|
9834
9841
|
"valueType": "number"
|
|
9835
9842
|
},
|
|
9836
9843
|
{
|
|
9837
|
-
"path": "
|
|
9844
|
+
"path": "rssi",
|
|
9838
9845
|
"valueType": "number"
|
|
9839
9846
|
},
|
|
9840
9847
|
{
|
|
@@ -9889,6 +9896,18 @@ Object.freeze({
|
|
|
9889
9896
|
"path": "foodLevel",
|
|
9890
9897
|
"valueType": "number"
|
|
9891
9898
|
},
|
|
9899
|
+
{
|
|
9900
|
+
"path": "bowlFood",
|
|
9901
|
+
"valueType": "number"
|
|
9902
|
+
},
|
|
9903
|
+
{
|
|
9904
|
+
"path": "eating",
|
|
9905
|
+
"valueType": "boolean"
|
|
9906
|
+
},
|
|
9907
|
+
{
|
|
9908
|
+
"path": "supportsMarkRefilled",
|
|
9909
|
+
"valueType": "boolean"
|
|
9910
|
+
},
|
|
9892
9911
|
{
|
|
9893
9912
|
"path": "food1",
|
|
9894
9913
|
"valueType": "number"
|
|
@@ -9953,23 +9972,23 @@ Object.freeze({
|
|
|
9953
9972
|
],
|
|
9954
9973
|
"power-meter": [
|
|
9955
9974
|
{
|
|
9956
|
-
"path": "
|
|
9975
|
+
"path": "power",
|
|
9957
9976
|
"valueType": "number"
|
|
9958
9977
|
},
|
|
9959
9978
|
{
|
|
9960
|
-
"path": "
|
|
9979
|
+
"path": "energy",
|
|
9961
9980
|
"valueType": "number"
|
|
9962
9981
|
},
|
|
9963
9982
|
{
|
|
9964
|
-
"path": "
|
|
9983
|
+
"path": "voltage",
|
|
9965
9984
|
"valueType": "number"
|
|
9966
9985
|
},
|
|
9967
9986
|
{
|
|
9968
|
-
"path": "
|
|
9987
|
+
"path": "current",
|
|
9969
9988
|
"valueType": "number"
|
|
9970
9989
|
},
|
|
9971
9990
|
{
|
|
9972
|
-
"path": "
|
|
9991
|
+
"path": "apparentPower",
|
|
9973
9992
|
"valueType": "number"
|
|
9974
9993
|
},
|
|
9975
9994
|
{
|
|
@@ -9997,14 +10016,10 @@ Object.freeze({
|
|
|
9997
10016
|
{
|
|
9998
10017
|
"path": "gps.accuracyMeters",
|
|
9999
10018
|
"valueType": "number"
|
|
10000
|
-
},
|
|
10001
|
-
{
|
|
10002
|
-
"path": "batteryPercent",
|
|
10003
|
-
"valueType": "number"
|
|
10004
10019
|
}
|
|
10005
10020
|
],
|
|
10006
10021
|
"pressure-sensor": [{
|
|
10007
|
-
"path": "
|
|
10022
|
+
"path": "pressure",
|
|
10008
10023
|
"valueType": "number"
|
|
10009
10024
|
}],
|
|
10010
10025
|
"privacy-mask": [{
|
|
@@ -10318,7 +10333,7 @@ Object.freeze({
|
|
|
10318
10333
|
"valueType": "boolean"
|
|
10319
10334
|
}],
|
|
10320
10335
|
"temperature-sensor": [{
|
|
10321
|
-
"path": "
|
|
10336
|
+
"path": "temperature",
|
|
10322
10337
|
"valueType": "number"
|
|
10323
10338
|
}],
|
|
10324
10339
|
"update": [
|
|
@@ -10366,7 +10381,7 @@ Object.freeze({
|
|
|
10366
10381
|
"valueType": "string"
|
|
10367
10382
|
},
|
|
10368
10383
|
{
|
|
10369
|
-
"path": "
|
|
10384
|
+
"path": "progress",
|
|
10370
10385
|
"valueType": "number"
|
|
10371
10386
|
},
|
|
10372
10387
|
{
|
|
@@ -10851,7 +10866,7 @@ function errMsg(err) {
|
|
|
10851
10866
|
return String(err);
|
|
10852
10867
|
}
|
|
10853
10868
|
//#endregion
|
|
10854
|
-
//#region ../types/dist/composition-
|
|
10869
|
+
//#region ../types/dist/composition-CZImLpOI.mjs
|
|
10855
10870
|
/**
|
|
10856
10871
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10857
10872
|
*
|
|
@@ -15495,6 +15510,14 @@ var AutomationConditionLeafSchema = object({
|
|
|
15495
15510
|
array(union([string(), number()]))
|
|
15496
15511
|
])
|
|
15497
15512
|
});
|
|
15513
|
+
var AutomationConditionStationaryPresentSchema = object({
|
|
15514
|
+
kind: literal("stationary-present"),
|
|
15515
|
+
deviceId: number().int().nonnegative(),
|
|
15516
|
+
/** Class names; a macro class matches every raw class that maps to it. */
|
|
15517
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15518
|
+
/** The parked object must be in at least one of these zones. */
|
|
15519
|
+
zones: array(string().min(1)).min(1).optional()
|
|
15520
|
+
});
|
|
15498
15521
|
/**
|
|
15499
15522
|
* The expression leaf, declared as a plain object rather than an intersection
|
|
15500
15523
|
* with {@link ExpressionSourceSchema}: a discriminated union has to be able to
|
|
@@ -15528,7 +15551,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
|
|
|
15528
15551
|
child: AutomationConditionSchema
|
|
15529
15552
|
}),
|
|
15530
15553
|
AutomationConditionLeafSchema,
|
|
15531
|
-
AutomationConditionExpressionSchema
|
|
15554
|
+
AutomationConditionExpressionSchema,
|
|
15555
|
+
AutomationConditionStationaryPresentSchema
|
|
15532
15556
|
]));
|
|
15533
15557
|
/**
|
|
15534
15558
|
* What starts a run.
|
|
@@ -15569,7 +15593,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15569
15593
|
kind: literal("schedule"),
|
|
15570
15594
|
cron: string().min(1).max(120)
|
|
15571
15595
|
}),
|
|
15572
|
-
object({ kind: literal("manual") })
|
|
15596
|
+
object({ kind: literal("manual") }),
|
|
15597
|
+
object({
|
|
15598
|
+
kind: literal("detection"),
|
|
15599
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15600
|
+
* matches every raw class that maps to it; any other name matches
|
|
15601
|
+
* exactly. */
|
|
15602
|
+
classes: array(string().min(1)).min(1),
|
|
15603
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15604
|
+
/** The track must have visited at least one of these zones. */
|
|
15605
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15606
|
+
/** Best-so-far confidence the track must reach. */
|
|
15607
|
+
minScore: number().min(0).max(1).optional()
|
|
15608
|
+
}),
|
|
15609
|
+
object({
|
|
15610
|
+
kind: literal("stationary"),
|
|
15611
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15612
|
+
/** Class names; a macro class matches like the detection trigger. */
|
|
15613
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15614
|
+
/** The parked object must be in at least one of these zones. */
|
|
15615
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15616
|
+
/** `appeared`: it became parked. `departed`: the registry retired it.
|
|
15617
|
+
* The vocabulary of `PipelineAnalyticsStationaryChanged`. */
|
|
15618
|
+
phase: _enum(["appeared", "departed"])
|
|
15619
|
+
}),
|
|
15620
|
+
object({
|
|
15621
|
+
kind: literal("interval"),
|
|
15622
|
+
minutes: number().int().min(1).max(1440)
|
|
15623
|
+
})
|
|
15573
15624
|
]);
|
|
15574
15625
|
/**
|
|
15575
15626
|
* One action step.
|
|
@@ -15589,28 +15640,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15589
15640
|
* is called. The runner still receives a number and is untouched; the
|
|
15590
15641
|
* resolution is the recipe's job, not the runner's.
|
|
15591
15642
|
*/
|
|
15643
|
+
var AutomationWaitStepSchema = object({
|
|
15644
|
+
kind: literal("wait"),
|
|
15645
|
+
seconds: number().min(0).max(300)
|
|
15646
|
+
});
|
|
15647
|
+
var AutomationCapStepSchema = object({
|
|
15648
|
+
kind: literal("cap"),
|
|
15649
|
+
/**
|
|
15650
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15651
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15652
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15653
|
+
*/
|
|
15654
|
+
deviceId: union([
|
|
15655
|
+
number().int(),
|
|
15656
|
+
array(number().int()).min(1),
|
|
15657
|
+
object({ $var: string().min(1) })
|
|
15658
|
+
]),
|
|
15659
|
+
cap: string().min(1),
|
|
15660
|
+
method: string().min(1),
|
|
15661
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15662
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15663
|
+
* the expression leaf. */
|
|
15664
|
+
args: record(string(), unknown()).optional()
|
|
15665
|
+
});
|
|
15666
|
+
/**
|
|
15667
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15668
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15669
|
+
*/
|
|
15670
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15592
15671
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15672
|
+
AutomationWaitStepSchema,
|
|
15673
|
+
AutomationCapStepSchema,
|
|
15593
15674
|
object({
|
|
15594
|
-
kind: literal("
|
|
15595
|
-
|
|
15596
|
-
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
|
|
15602
|
-
|
|
15603
|
-
*/
|
|
15604
|
-
deviceId: union([
|
|
15605
|
-
number().int(),
|
|
15606
|
-
array(number().int()).min(1),
|
|
15607
|
-
object({ $var: string().min(1) })
|
|
15608
|
-
]),
|
|
15609
|
-
cap: string().min(1),
|
|
15610
|
-
method: string().min(1),
|
|
15611
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15612
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15613
|
-
args: record(string(), unknown()).optional()
|
|
15675
|
+
kind: literal("action"),
|
|
15676
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15677
|
+
actionId: string().min(1),
|
|
15678
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15679
|
+
variables: record(string(), union([
|
|
15680
|
+
string(),
|
|
15681
|
+
number(),
|
|
15682
|
+
boolean()
|
|
15683
|
+
])).optional()
|
|
15614
15684
|
}),
|
|
15615
15685
|
object({
|
|
15616
15686
|
kind: literal("code"),
|
|
@@ -15619,10 +15689,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15619
15689
|
code: string().min(1).max(2e4)
|
|
15620
15690
|
})
|
|
15621
15691
|
]);
|
|
15692
|
+
/**
|
|
15693
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15694
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15695
|
+
* actions. Absent means `single`.
|
|
15696
|
+
*
|
|
15697
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15698
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15699
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15700
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15701
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15702
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15703
|
+
* wait, never the single/queued limits.
|
|
15704
|
+
*/
|
|
15705
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15706
|
+
object({ mode: literal("single") }),
|
|
15707
|
+
object({ mode: literal("restart") }),
|
|
15708
|
+
object({
|
|
15709
|
+
mode: literal("queued"),
|
|
15710
|
+
max: number().int().min(1).max(10)
|
|
15711
|
+
}),
|
|
15712
|
+
object({
|
|
15713
|
+
mode: literal("parallel"),
|
|
15714
|
+
max: number().int().min(1).max(10)
|
|
15715
|
+
}),
|
|
15716
|
+
object({
|
|
15717
|
+
mode: literal("cooldown"),
|
|
15718
|
+
minutes: number().int().min(1).max(1440)
|
|
15719
|
+
})
|
|
15720
|
+
]);
|
|
15622
15721
|
var AutomationRecipeSchema = object({
|
|
15623
15722
|
triggers: array(AutomationTriggerSchema),
|
|
15624
15723
|
conditions: AutomationConditionSchema.optional(),
|
|
15625
|
-
actions: array(AutomationActionSchema)
|
|
15724
|
+
actions: array(AutomationActionSchema),
|
|
15725
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15726
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15727
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15728
|
+
});
|
|
15729
|
+
new Set([
|
|
15730
|
+
{
|
|
15731
|
+
id: "person",
|
|
15732
|
+
name: "Person"
|
|
15733
|
+
},
|
|
15734
|
+
{
|
|
15735
|
+
id: "vehicle",
|
|
15736
|
+
name: "Vehicle"
|
|
15737
|
+
},
|
|
15738
|
+
{
|
|
15739
|
+
id: "animal",
|
|
15740
|
+
name: "Animal"
|
|
15741
|
+
},
|
|
15742
|
+
{
|
|
15743
|
+
id: "package",
|
|
15744
|
+
name: "Package"
|
|
15745
|
+
}
|
|
15746
|
+
].map((l) => l.id));
|
|
15747
|
+
var COCO_TO_MACRO = {
|
|
15748
|
+
mapping: {
|
|
15749
|
+
person: "person",
|
|
15750
|
+
bicycle: "vehicle",
|
|
15751
|
+
car: "vehicle",
|
|
15752
|
+
motorcycle: "vehicle",
|
|
15753
|
+
airplane: "vehicle",
|
|
15754
|
+
bus: "vehicle",
|
|
15755
|
+
train: "vehicle",
|
|
15756
|
+
truck: "vehicle",
|
|
15757
|
+
boat: "vehicle",
|
|
15758
|
+
bird: "animal",
|
|
15759
|
+
cat: "animal",
|
|
15760
|
+
dog: "animal",
|
|
15761
|
+
horse: "animal",
|
|
15762
|
+
sheep: "animal",
|
|
15763
|
+
cow: "animal",
|
|
15764
|
+
elephant: "animal",
|
|
15765
|
+
bear: "animal",
|
|
15766
|
+
zebra: "animal",
|
|
15767
|
+
giraffe: "animal",
|
|
15768
|
+
suitcase: "package",
|
|
15769
|
+
backpack: "package",
|
|
15770
|
+
handbag: "package"
|
|
15771
|
+
},
|
|
15772
|
+
preserveOriginal: false
|
|
15773
|
+
};
|
|
15774
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15775
|
+
/**
|
|
15776
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15777
|
+
* so the editor can paint every block green or red with its reason.
|
|
15778
|
+
*
|
|
15779
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15780
|
+
* every condition node (containers and leaves, including the ones a
|
|
15781
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15782
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15783
|
+
* for an Action run). Skipped
|
|
15784
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15785
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15786
|
+
*
|
|
15787
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15788
|
+
* vocabulary so an Action run records the same step shape.
|
|
15789
|
+
*/
|
|
15790
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15791
|
+
var TraceValueSchema = union([
|
|
15792
|
+
string(),
|
|
15793
|
+
number(),
|
|
15794
|
+
boolean(),
|
|
15795
|
+
_null(),
|
|
15796
|
+
array(union([string(), number()]))
|
|
15797
|
+
]);
|
|
15798
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15799
|
+
"ran",
|
|
15800
|
+
"skipped-trigger",
|
|
15801
|
+
"skipped-conditions",
|
|
15802
|
+
"skipped-cooldown",
|
|
15803
|
+
"skipped-overlap",
|
|
15804
|
+
"failed",
|
|
15805
|
+
"aborted"
|
|
15806
|
+
]);
|
|
15807
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15808
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15809
|
+
"pass",
|
|
15810
|
+
"fail",
|
|
15811
|
+
"not-evaluated"
|
|
15812
|
+
]);
|
|
15813
|
+
var AutomationTriggerTraceSchema = object({
|
|
15814
|
+
kind: string().min(1),
|
|
15815
|
+
outcome: _enum(["pass", "fail"]),
|
|
15816
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
15817
|
+
reason: string(),
|
|
15818
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
15819
|
+
vars: record(string(), TraceValueSchema)
|
|
15820
|
+
});
|
|
15821
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
15822
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
15823
|
+
path: string().min(1),
|
|
15824
|
+
kind: _enum([
|
|
15825
|
+
"all",
|
|
15826
|
+
"any",
|
|
15827
|
+
"not",
|
|
15828
|
+
"condition",
|
|
15829
|
+
"expression",
|
|
15830
|
+
"stationary-present"
|
|
15831
|
+
]),
|
|
15832
|
+
outcome: TraceNodeOutcomeSchema,
|
|
15833
|
+
reason: string(),
|
|
15834
|
+
deviceId: number().int().optional(),
|
|
15835
|
+
cap: string().optional(),
|
|
15836
|
+
fieldPath: string().optional(),
|
|
15837
|
+
operator: string().optional(),
|
|
15838
|
+
expected: TraceValueSchema.optional(),
|
|
15839
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
15840
|
+
observed: TraceValueSchema.optional()
|
|
15841
|
+
});
|
|
15842
|
+
var AutomationRunVerdictSchema = object({
|
|
15843
|
+
mode: AutomationRunModeSchema,
|
|
15844
|
+
decision: _enum([
|
|
15845
|
+
"run",
|
|
15846
|
+
"queued",
|
|
15847
|
+
"restart",
|
|
15848
|
+
"drop",
|
|
15849
|
+
"cooldown",
|
|
15850
|
+
"bypass"
|
|
15851
|
+
]),
|
|
15852
|
+
reason: string()
|
|
15853
|
+
});
|
|
15854
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
15855
|
+
var AutomationStepTraceSchema = object({
|
|
15856
|
+
/** `actions.<i>` */
|
|
15857
|
+
path: string().min(1),
|
|
15858
|
+
kind: string().min(1),
|
|
15859
|
+
cap: string().optional(),
|
|
15860
|
+
method: string().optional(),
|
|
15861
|
+
deviceId: number().int().optional(),
|
|
15862
|
+
startedAt: number().optional(),
|
|
15863
|
+
endedAt: number().optional(),
|
|
15864
|
+
outcome: _enum([
|
|
15865
|
+
"ok",
|
|
15866
|
+
"error",
|
|
15867
|
+
"not-run"
|
|
15868
|
+
]),
|
|
15869
|
+
message: string().optional()
|
|
15870
|
+
});
|
|
15871
|
+
var AutomationRunTraceSchema = object({
|
|
15872
|
+
runId: string().min(1),
|
|
15873
|
+
startedAt: number(),
|
|
15874
|
+
endedAt: number(),
|
|
15875
|
+
trigger: AutomationTriggerTraceSchema,
|
|
15876
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
15877
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
15878
|
+
steps: array(AutomationStepTraceSchema),
|
|
15879
|
+
outcome: AutomationRunOutcomeSchema,
|
|
15880
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
15881
|
+
repeat: number().int().min(1),
|
|
15882
|
+
/** When the latest of those repeats happened. */
|
|
15883
|
+
lastAt: number()
|
|
15884
|
+
});
|
|
15885
|
+
/**
|
|
15886
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
15887
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
15888
|
+
*/
|
|
15889
|
+
var AutomationStateDocSchema = object({
|
|
15890
|
+
version: literal(1),
|
|
15891
|
+
lastRunStartedAt: number().nullable(),
|
|
15892
|
+
traces: array(AutomationRunTraceSchema)
|
|
15893
|
+
});
|
|
15894
|
+
/**
|
|
15895
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
15896
|
+
* declared as LIST ENTRIES, never as devices.
|
|
15897
|
+
*
|
|
15898
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
15899
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
15900
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
15901
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
15902
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
15903
|
+
*
|
|
15904
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
15905
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
15906
|
+
* runtime.
|
|
15907
|
+
*/
|
|
15908
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
15909
|
+
var ActionVariableTypeSchema = _enum([
|
|
15910
|
+
"string",
|
|
15911
|
+
"number",
|
|
15912
|
+
"boolean",
|
|
15913
|
+
"select"
|
|
15914
|
+
]);
|
|
15915
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
15916
|
+
var ActionVariableValueSchema = union([
|
|
15917
|
+
string(),
|
|
15918
|
+
number(),
|
|
15919
|
+
boolean()
|
|
15920
|
+
]);
|
|
15921
|
+
/**
|
|
15922
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
15923
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
15924
|
+
*/
|
|
15925
|
+
var ActionVariableSchema = object({
|
|
15926
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
15927
|
+
label: string().min(1).max(120).optional(),
|
|
15928
|
+
type: ActionVariableTypeSchema,
|
|
15929
|
+
required: boolean().optional(),
|
|
15930
|
+
default: ActionVariableValueSchema.optional(),
|
|
15931
|
+
/** The allowed values of a `select`. */
|
|
15932
|
+
options: array(string().min(1)).min(1).optional()
|
|
15933
|
+
}).superRefine((v, ctx) => {
|
|
15934
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
15935
|
+
code: "custom",
|
|
15936
|
+
message: "a select variable needs options",
|
|
15937
|
+
path: ["options"]
|
|
15938
|
+
});
|
|
15939
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
15940
|
+
code: "custom",
|
|
15941
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
15942
|
+
path: ["default"]
|
|
15943
|
+
});
|
|
15944
|
+
});
|
|
15945
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
15946
|
+
function variableValueError(variable, value) {
|
|
15947
|
+
switch (variable.type) {
|
|
15948
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
15949
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
15950
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
15951
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
15952
|
+
}
|
|
15953
|
+
}
|
|
15954
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
15955
|
+
function isInternalActionId(actionId) {
|
|
15956
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
15957
|
+
}
|
|
15958
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
15959
|
+
function addonIdOfActionId(actionId) {
|
|
15960
|
+
if (isInternalActionId(actionId)) return null;
|
|
15961
|
+
const at = actionId.indexOf(":");
|
|
15962
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
15963
|
+
}
|
|
15964
|
+
var ActionStatusSchema = object({
|
|
15965
|
+
isRunning: boolean(),
|
|
15966
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
15967
|
+
lastRunAt: number().nullable(),
|
|
15968
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
15969
|
+
lastError: string().nullable()
|
|
15970
|
+
});
|
|
15971
|
+
var ActionEntrySchema = object({
|
|
15972
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
15973
|
+
id: string().min(3),
|
|
15974
|
+
name: string().min(1).max(120),
|
|
15975
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
15976
|
+
addonId: string().min(1),
|
|
15977
|
+
source: ActionSourceKindSchema,
|
|
15978
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
15979
|
+
readOnly: boolean(),
|
|
15980
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
15981
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
15982
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
15983
|
+
status: ActionStatusSchema
|
|
15984
|
+
}).superRefine((entry, ctx) => {
|
|
15985
|
+
if (entry.source === "internal") {
|
|
15986
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
15987
|
+
code: "custom",
|
|
15988
|
+
message: "an internal action id is internal:<uuid>",
|
|
15989
|
+
path: ["id"]
|
|
15990
|
+
});
|
|
15991
|
+
return;
|
|
15992
|
+
}
|
|
15993
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
15994
|
+
code: "custom",
|
|
15995
|
+
message: "only an internal action carries steps",
|
|
15996
|
+
path: ["steps"]
|
|
15997
|
+
});
|
|
15998
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
15999
|
+
code: "custom",
|
|
16000
|
+
message: "an addon action is read-only here",
|
|
16001
|
+
path: ["readOnly"]
|
|
16002
|
+
});
|
|
16003
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
16004
|
+
code: "custom",
|
|
16005
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
16006
|
+
path: ["id"]
|
|
16007
|
+
});
|
|
16008
|
+
});
|
|
16009
|
+
/** What an operator writes for an internal action. */
|
|
16010
|
+
var ActionInputSchema = object({
|
|
16011
|
+
name: string().min(1).max(120),
|
|
16012
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
16013
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
16014
|
+
});
|
|
16015
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
16016
|
+
var ActionRunOriginSchema = object({
|
|
16017
|
+
/** The automation block whose step started it. */
|
|
16018
|
+
blockId: string().min(1).optional() });
|
|
16019
|
+
/** `started` = the caller did not ask to wait. */
|
|
16020
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
16021
|
+
var ActionRunResultSchema = object({
|
|
16022
|
+
runId: string().min(1),
|
|
16023
|
+
outcome: ActionRunOutcomeSchema,
|
|
16024
|
+
/** Why it did not run, or what failed. */
|
|
16025
|
+
message: string().optional()
|
|
16026
|
+
});
|
|
16027
|
+
_enum([
|
|
16028
|
+
"not-found",
|
|
16029
|
+
"read-only",
|
|
16030
|
+
"invalid-variables",
|
|
16031
|
+
"invalid-steps",
|
|
16032
|
+
"not-linked",
|
|
16033
|
+
"busy"
|
|
16034
|
+
]);
|
|
16035
|
+
object({
|
|
16036
|
+
actionId: string(),
|
|
16037
|
+
runId: string(),
|
|
16038
|
+
isRunning: boolean(),
|
|
16039
|
+
/** Set when the run ended. */
|
|
16040
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
16041
|
+
lastRunAt: number().nullable(),
|
|
16042
|
+
lastError: string().nullable()
|
|
15626
16043
|
});
|
|
15627
16044
|
/**
|
|
15628
16045
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -18222,7 +18639,7 @@ var CompositionEventPlanSchema = object({
|
|
|
18222
18639
|
stateField: string(),
|
|
18223
18640
|
fieldKey: string()
|
|
18224
18641
|
});
|
|
18225
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
18642
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
18226
18643
|
var CompositionProblemSchema = object({
|
|
18227
18644
|
code: _enum([
|
|
18228
18645
|
"reserved-variant",
|
|
@@ -18541,7 +18958,7 @@ var GROUP_TEMPLATES = [
|
|
|
18541
18958
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18542
18959
|
role: DeviceRole.TemperatureSensor,
|
|
18543
18960
|
outputCap: "temperature-sensor",
|
|
18544
|
-
outputField: "
|
|
18961
|
+
outputField: "temperature",
|
|
18545
18962
|
quantity: "temperature",
|
|
18546
18963
|
defaultAggregate: "mean",
|
|
18547
18964
|
empty: "null",
|
|
@@ -18552,7 +18969,7 @@ var GROUP_TEMPLATES = [
|
|
|
18552
18969
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18553
18970
|
role: DeviceRole.HumiditySensor,
|
|
18554
18971
|
outputCap: "humidity-sensor",
|
|
18555
|
-
outputField: "
|
|
18972
|
+
outputField: "humidity",
|
|
18556
18973
|
quantity: "humidity",
|
|
18557
18974
|
defaultAggregate: "mean",
|
|
18558
18975
|
empty: "null",
|
|
@@ -18563,7 +18980,7 @@ var GROUP_TEMPLATES = [
|
|
|
18563
18980
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18564
18981
|
role: DeviceRole.PressureSensor,
|
|
18565
18982
|
outputCap: "pressure-sensor",
|
|
18566
|
-
outputField: "
|
|
18983
|
+
outputField: "pressure",
|
|
18567
18984
|
quantity: "pressure",
|
|
18568
18985
|
defaultAggregate: "mean",
|
|
18569
18986
|
empty: "null",
|
|
@@ -18574,7 +18991,7 @@ var GROUP_TEMPLATES = [
|
|
|
18574
18991
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18575
18992
|
role: DeviceRole.AmbientLightSensor,
|
|
18576
18993
|
outputCap: "ambient-light-sensor",
|
|
18577
|
-
outputField: "
|
|
18994
|
+
outputField: "illuminance",
|
|
18578
18995
|
quantity: "illuminance",
|
|
18579
18996
|
defaultAggregate: "mean",
|
|
18580
18997
|
empty: "null",
|
|
@@ -18585,7 +19002,7 @@ var GROUP_TEMPLATES = [
|
|
|
18585
19002
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18586
19003
|
role: DeviceRole.PowerSensor,
|
|
18587
19004
|
outputCap: "power-meter",
|
|
18588
|
-
outputField: "
|
|
19005
|
+
outputField: "power",
|
|
18589
19006
|
quantity: "power",
|
|
18590
19007
|
defaultAggregate: "sum",
|
|
18591
19008
|
empty: "omit",
|
|
@@ -18596,7 +19013,7 @@ var GROUP_TEMPLATES = [
|
|
|
18596
19013
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18597
19014
|
role: DeviceRole.EnergySensor,
|
|
18598
19015
|
outputCap: "power-meter",
|
|
18599
|
-
outputField: "
|
|
19016
|
+
outputField: "energy",
|
|
18600
19017
|
quantity: "energy",
|
|
18601
19018
|
defaultAggregate: "sum",
|
|
18602
19019
|
empty: "omit",
|
|
@@ -18607,7 +19024,7 @@ var GROUP_TEMPLATES = [
|
|
|
18607
19024
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18608
19025
|
role: DeviceRole.BatterySensor,
|
|
18609
19026
|
outputCap: "battery",
|
|
18610
|
-
outputField: "
|
|
19027
|
+
outputField: "level",
|
|
18611
19028
|
quantity: "percentage",
|
|
18612
19029
|
defaultAggregate: "mean",
|
|
18613
19030
|
empty: "null",
|
|
@@ -19185,7 +19602,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
19185
19602
|
kind: "mutation",
|
|
19186
19603
|
auth: "admin",
|
|
19187
19604
|
access: "view"
|
|
19188
|
-
})
|
|
19605
|
+
}), method(object({
|
|
19606
|
+
blockId: string().min(1),
|
|
19607
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
19608
|
+
runStartedAt: number().optional(),
|
|
19609
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
19610
|
+
}), _void(), {
|
|
19611
|
+
kind: "mutation",
|
|
19612
|
+
auth: "admin"
|
|
19613
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
19614
|
+
traces: array(AutomationRunTraceSchema),
|
|
19615
|
+
lastError: string().nullable()
|
|
19616
|
+
}), { auth: "admin" });
|
|
19189
19617
|
/**
|
|
19190
19618
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
19191
19619
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -44303,51 +44731,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
44303
44731
|
kind: "mutation",
|
|
44304
44732
|
auth: "admin"
|
|
44305
44733
|
});
|
|
44306
|
-
new Set([
|
|
44307
|
-
{
|
|
44308
|
-
id: "person",
|
|
44309
|
-
name: "Person"
|
|
44310
|
-
},
|
|
44311
|
-
{
|
|
44312
|
-
id: "vehicle",
|
|
44313
|
-
name: "Vehicle"
|
|
44314
|
-
},
|
|
44315
|
-
{
|
|
44316
|
-
id: "animal",
|
|
44317
|
-
name: "Animal"
|
|
44318
|
-
},
|
|
44319
|
-
{
|
|
44320
|
-
id: "package",
|
|
44321
|
-
name: "Package"
|
|
44322
|
-
}
|
|
44323
|
-
].map((l) => l.id));
|
|
44324
|
-
var COCO_TO_MACRO = {
|
|
44325
|
-
mapping: {
|
|
44326
|
-
person: "person",
|
|
44327
|
-
bicycle: "vehicle",
|
|
44328
|
-
car: "vehicle",
|
|
44329
|
-
motorcycle: "vehicle",
|
|
44330
|
-
airplane: "vehicle",
|
|
44331
|
-
bus: "vehicle",
|
|
44332
|
-
train: "vehicle",
|
|
44333
|
-
truck: "vehicle",
|
|
44334
|
-
boat: "vehicle",
|
|
44335
|
-
bird: "animal",
|
|
44336
|
-
cat: "animal",
|
|
44337
|
-
dog: "animal",
|
|
44338
|
-
horse: "animal",
|
|
44339
|
-
sheep: "animal",
|
|
44340
|
-
cow: "animal",
|
|
44341
|
-
elephant: "animal",
|
|
44342
|
-
bear: "animal",
|
|
44343
|
-
zebra: "animal",
|
|
44344
|
-
giraffe: "animal",
|
|
44345
|
-
suitcase: "package",
|
|
44346
|
-
backpack: "package",
|
|
44347
|
-
handbag: "package"
|
|
44348
|
-
},
|
|
44349
|
-
preserveOriginal: false
|
|
44350
|
-
};
|
|
44351
44734
|
var AUDIO_MACRO_LABELS = [
|
|
44352
44735
|
{
|
|
44353
44736
|
id: "speech",
|
|
@@ -56800,9 +57183,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56800
57183
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56801
57184
|
object({
|
|
56802
57185
|
/** Carbon dioxide concentration in ppm. */
|
|
56803
|
-
|
|
57186
|
+
co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56804
57187
|
/** Total volatile organic compounds in ppb. */
|
|
56805
|
-
|
|
57188
|
+
voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56806
57189
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56807
57190
|
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56808
57191
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
@@ -56815,7 +57198,7 @@ object({
|
|
|
56815
57198
|
DeviceType.Sensor;
|
|
56816
57199
|
object({
|
|
56817
57200
|
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56818
|
-
|
|
57201
|
+
illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56819
57202
|
precision: 0,
|
|
56820
57203
|
label: "Illuminance"
|
|
56821
57204
|
})),
|
|
@@ -56912,6 +57295,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
56912
57295
|
* would produce more than `maxPoints` samples. */
|
|
56913
57296
|
sampleEveryMs: number().int().positive().optional()
|
|
56914
57297
|
}), AudioMetricsHistorySchema);
|
|
57298
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57299
|
+
actionId: string().min(1),
|
|
57300
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57301
|
+
}), _void(), {
|
|
57302
|
+
kind: "mutation",
|
|
57303
|
+
auth: "admin"
|
|
57304
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57305
|
+
kind: "mutation",
|
|
57306
|
+
auth: "admin"
|
|
57307
|
+
});
|
|
57308
|
+
/**
|
|
57309
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57310
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57311
|
+
*
|
|
57312
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57313
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57314
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57315
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57316
|
+
* drift (D3).
|
|
57317
|
+
*
|
|
57318
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57319
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57320
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57321
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57322
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57323
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57324
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57325
|
+
*
|
|
57326
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57327
|
+
* logged — never queued.
|
|
57328
|
+
*/
|
|
57329
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57330
|
+
var ActionLinksSchema = object({
|
|
57331
|
+
deviceId: number().int().nonnegative(),
|
|
57332
|
+
actionIds: array(string().min(1)).max(100)
|
|
57333
|
+
});
|
|
57334
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57335
|
+
actionId: string().min(1),
|
|
57336
|
+
deviceId: number().int().nonnegative().optional()
|
|
57337
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57338
|
+
role: "viewer",
|
|
57339
|
+
auth: "protected",
|
|
57340
|
+
kind: "query",
|
|
57341
|
+
caller: "required"
|
|
57342
|
+
}), method(object({
|
|
57343
|
+
actionId: string().min(1),
|
|
57344
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57345
|
+
wait: boolean().optional(),
|
|
57346
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57347
|
+
deviceId: number().int().nonnegative().optional()
|
|
57348
|
+
}), ActionRunResultSchema, {
|
|
57349
|
+
role: "viewer",
|
|
57350
|
+
auth: "protected",
|
|
57351
|
+
kind: "mutation",
|
|
57352
|
+
caller: "required"
|
|
57353
|
+
}), method(ActionIdInput, _void(), {
|
|
57354
|
+
kind: "mutation",
|
|
57355
|
+
auth: "admin"
|
|
57356
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57357
|
+
kind: "mutation",
|
|
57358
|
+
auth: "admin"
|
|
57359
|
+
}), method(object({
|
|
57360
|
+
actionId: string().min(1),
|
|
57361
|
+
action: ActionInputSchema.partial()
|
|
57362
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57363
|
+
kind: "mutation",
|
|
57364
|
+
auth: "admin"
|
|
57365
|
+
}), method(ActionIdInput, _void(), {
|
|
57366
|
+
kind: "mutation",
|
|
57367
|
+
auth: "admin"
|
|
57368
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57369
|
+
role: "viewer",
|
|
57370
|
+
auth: "protected",
|
|
57371
|
+
kind: "query"
|
|
57372
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57373
|
+
kind: "mutation",
|
|
57374
|
+
auth: "admin"
|
|
57375
|
+
});
|
|
56915
57376
|
object({
|
|
56916
57377
|
/** Whether the automation is currently enabled. Disabled automations
|
|
56917
57378
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -56965,7 +57426,7 @@ var BatteryStatusSchema = object({
|
|
|
56965
57426
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
56966
57427
|
* declines to band a non-finite reading, which is the correct shape.
|
|
56967
57428
|
*/
|
|
56968
|
-
|
|
57429
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
56969
57430
|
/**
|
|
56970
57431
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
56971
57432
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -56975,7 +57436,7 @@ var BatteryStatusSchema = object({
|
|
|
56975
57436
|
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
56976
57437
|
* power fields yet, or the firmware reported neither. Before it existed,
|
|
56977
57438
|
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
56978
|
-
* was drawn "on battery alone" — the same D315 defect `
|
|
57439
|
+
* was drawn "on battery alone" — the same D315 defect `level` closed
|
|
56979
57440
|
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
56980
57441
|
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
56981
57442
|
*/
|
|
@@ -56999,7 +57460,7 @@ var BatteryStatusSchema = object({
|
|
|
56999
57460
|
* that only report charge. A second reading on this cap, not a second
|
|
57000
57461
|
* `numeric-sensor` on the same device.
|
|
57001
57462
|
*/
|
|
57002
|
-
|
|
57463
|
+
voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57003
57464
|
/**
|
|
57004
57465
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57005
57466
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57033,7 +57494,7 @@ var BatteryStatusSchema = object({
|
|
|
57033
57494
|
/**
|
|
57034
57495
|
* True when the source is a BINARY low-battery indicator (HA
|
|
57035
57496
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
57036
|
-
* charge level — `
|
|
57497
|
+
* charge level — `level` is then a coarse stand-in (100 = normal,
|
|
57037
57498
|
* sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
|
|
57038
57499
|
* misleading exact percentage. Absent/false → genuine 0–100 % reading.
|
|
57039
57500
|
*/
|
|
@@ -57064,26 +57525,26 @@ DeviceType.Sensor;
|
|
|
57064
57525
|
* controls to this single-method surface.
|
|
57065
57526
|
*
|
|
57066
57527
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
57067
|
-
*
|
|
57528
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
57068
57529
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
57069
57530
|
* should surface those via the device's `getSettingsUISchema()`
|
|
57070
57531
|
* instead of bloating this cap.
|
|
57071
57532
|
*/
|
|
57072
57533
|
var BrightnessStatusSchema = object({
|
|
57073
57534
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57074
|
-
|
|
57535
|
+
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57075
57536
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57076
57537
|
lastChangedAt: number()
|
|
57077
57538
|
});
|
|
57078
57539
|
DeviceType.Light, method(object({
|
|
57079
57540
|
deviceId: number().int().nonnegative(),
|
|
57080
|
-
|
|
57541
|
+
level: number().min(0).max(100)
|
|
57081
57542
|
}), _void(), {
|
|
57082
57543
|
kind: "mutation",
|
|
57083
57544
|
auth: "protected"
|
|
57084
57545
|
}), object({
|
|
57085
57546
|
deviceId: number(),
|
|
57086
|
-
|
|
57547
|
+
level: number().min(0).max(100),
|
|
57087
57548
|
lastChangedAt: number()
|
|
57088
57549
|
});
|
|
57089
57550
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
@@ -57584,11 +58045,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
|
|
|
57584
58045
|
}),
|
|
57585
58046
|
object({
|
|
57586
58047
|
mode: literal("mired"),
|
|
57587
|
-
|
|
58048
|
+
colorTemperature: number().int().min(50).max(1e3)
|
|
57588
58049
|
})
|
|
57589
58050
|
]);
|
|
57590
58051
|
object({
|
|
57591
|
-
/** Active color mode — which of `rgb` / `hsv` / `
|
|
58052
|
+
/** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
|
|
57592
58053
|
* the bulb's current state. */
|
|
57593
58054
|
mode: _enum([
|
|
57594
58055
|
"rgb",
|
|
@@ -57600,7 +58061,7 @@ object({
|
|
|
57600
58061
|
/** Populated when `mode === 'hsv'`. */
|
|
57601
58062
|
hsv: HsvTripletSchema.optional(),
|
|
57602
58063
|
/** Populated when `mode === 'mired'`. */
|
|
57603
|
-
|
|
58064
|
+
colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57604
58065
|
/** Ms epoch of the last operator-driven change. */
|
|
57605
58066
|
lastChangedAt: number()
|
|
57606
58067
|
});
|
|
@@ -57619,7 +58080,7 @@ DeviceType.Light, method(object({
|
|
|
57619
58080
|
]),
|
|
57620
58081
|
rgb: RgbTripletSchema.optional(),
|
|
57621
58082
|
hsv: HsvTripletSchema.optional(),
|
|
57622
|
-
|
|
58083
|
+
colorTemperature: number().int().optional(),
|
|
57623
58084
|
lastChangedAt: number()
|
|
57624
58085
|
});
|
|
57625
58086
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
@@ -58045,11 +58506,11 @@ object({
|
|
|
58045
58506
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58046
58507
|
availablePrograms: array(string()),
|
|
58047
58508
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58048
|
-
|
|
58509
|
+
remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58049
58510
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58050
|
-
|
|
58511
|
+
delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58051
58512
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58052
|
-
|
|
58513
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58053
58514
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58054
58515
|
doorOpen: boolean().nullable(),
|
|
58055
58516
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58667,7 +59128,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58667
59128
|
object({
|
|
58668
59129
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58669
59130
|
* speed surface (single-speed fan). */
|
|
58670
|
-
|
|
59131
|
+
speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58671
59132
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58672
59133
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58673
59134
|
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
@@ -58687,7 +59148,7 @@ object({
|
|
|
58687
59148
|
});
|
|
58688
59149
|
DeviceType.Fan, method(object({
|
|
58689
59150
|
deviceId: number().int().nonnegative(),
|
|
58690
|
-
|
|
59151
|
+
speed: number().min(0).max(100)
|
|
58691
59152
|
}), _void(), {
|
|
58692
59153
|
kind: "mutation",
|
|
58693
59154
|
auth: "protected"
|
|
@@ -58870,7 +59331,7 @@ DeviceType.Humidifier, method(object({
|
|
|
58870
59331
|
});
|
|
58871
59332
|
object({
|
|
58872
59333
|
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58873
|
-
|
|
59334
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58874
59335
|
precision: 0,
|
|
58875
59336
|
label: "Humidity"
|
|
58876
59337
|
})),
|
|
@@ -59313,7 +59774,7 @@ object({
|
|
|
59313
59774
|
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59314
59775
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59315
59776
|
* task is active / progress is unavailable. */
|
|
59316
|
-
|
|
59777
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59317
59778
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59318
59779
|
* or null when unknown. */
|
|
59319
59780
|
currentCode: number().nullable().meta(readingMeta("none")),
|
|
@@ -59803,10 +60264,10 @@ object({
|
|
|
59803
60264
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59804
60265
|
/** Current playback position in ms. Null when not seekable or
|
|
59805
60266
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59806
|
-
|
|
60267
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59807
60268
|
/** Total duration of the current media in ms. Null when unknown
|
|
59808
60269
|
* (live stream) or nothing is playing. */
|
|
59809
|
-
|
|
60270
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59810
60271
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59811
60272
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59812
60273
|
shuffle: boolean().nullable(),
|
|
@@ -59833,7 +60294,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
|
|
|
59833
60294
|
auth: "protected"
|
|
59834
60295
|
}), method(object({
|
|
59835
60296
|
deviceId: number().int().nonnegative(),
|
|
59836
|
-
|
|
60297
|
+
position: number().int().nonnegative()
|
|
59837
60298
|
}), _void(), {
|
|
59838
60299
|
kind: "mutation",
|
|
59839
60300
|
auth: "protected"
|
|
@@ -60506,9 +60967,9 @@ var NetworkLinkStatusSchema = object({
|
|
|
60506
60967
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60507
60968
|
* SKIP a null rather than coerce it.
|
|
60508
60969
|
*/
|
|
60509
|
-
|
|
60970
|
+
signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60510
60971
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60511
|
-
|
|
60972
|
+
rssi: number().optional().meta(readingMeta("signal-level")),
|
|
60512
60973
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60513
60974
|
ssid: string().optional(),
|
|
60514
60975
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
@@ -61169,10 +61630,20 @@ var PetFeederDeviceStatusSchema = _enum([
|
|
|
61169
61630
|
]);
|
|
61170
61631
|
var gramsPortion = number().int().min(4).max(200);
|
|
61171
61632
|
object({
|
|
61172
|
-
/** Food
|
|
61173
|
-
*
|
|
61174
|
-
* bowl
|
|
61633
|
+
/** Food in the TANK (hopper), as the feeder's own sensor reports it
|
|
61634
|
+
* (`state.food`). A coarse level code, not grams — `0` is empty. The
|
|
61635
|
+
* amount in the bowl is `bowlFood`. On dual-hopper models this is the
|
|
61636
|
+
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
61637
|
+
* the device has not reported yet. */
|
|
61175
61638
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
61639
|
+
/** Food in the BOWL as the feeder reports it (`state.bowl`), in the
|
|
61640
|
+
* feeder's own units. Null when the model reports none. */
|
|
61641
|
+
bowlFood: number().nullable().meta(readingMeta("none")),
|
|
61642
|
+
/** True while the pet is eating (`state.eating`). */
|
|
61643
|
+
eating: boolean(),
|
|
61644
|
+
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
61645
|
+
* the client must not offer it. */
|
|
61646
|
+
supportsMarkRefilled: boolean(),
|
|
61176
61647
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61177
61648
|
* single-hopper models. */
|
|
61178
61649
|
food1: number().nullable().meta(readingMeta("none")),
|
|
@@ -61180,8 +61651,8 @@ object({
|
|
|
61180
61651
|
* single-hopper models. */
|
|
61181
61652
|
food2: number().nullable().meta(readingMeta("none")),
|
|
61182
61653
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61183
|
-
* (`device_class: problem`, on = low). True when the
|
|
61184
|
-
*
|
|
61654
|
+
* (`device_class: problem`, on = low). True when the tank reports empty,
|
|
61655
|
+
* or, on a dual-hopper model, when EITHER hopper is empty. */
|
|
61185
61656
|
lowFood: boolean(),
|
|
61186
61657
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
61187
61658
|
* device has no battery reading. */
|
|
@@ -61648,16 +62119,16 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61648
62119
|
auth: "admin"
|
|
61649
62120
|
});
|
|
61650
62121
|
object({
|
|
61651
|
-
/** Instantaneous power draw
|
|
61652
|
-
|
|
62122
|
+
/** Instantaneous power draw (watts). */
|
|
62123
|
+
power: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61653
62124
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61654
|
-
|
|
61655
|
-
/** Voltage
|
|
61656
|
-
|
|
62125
|
+
energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62126
|
+
/** Voltage (volts). */
|
|
62127
|
+
voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61657
62128
|
/** Current in amperes. */
|
|
61658
|
-
|
|
62129
|
+
current: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61659
62130
|
/** Apparent power in volt-amperes. */
|
|
61660
|
-
|
|
62131
|
+
apparentPower: number().optional().meta(readingMeta("apparent-power")),
|
|
61661
62132
|
/** Power factor (0..1) if reported. */
|
|
61662
62133
|
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61663
62134
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -61712,16 +62183,13 @@ object({
|
|
|
61712
62183
|
location: string().nullable(),
|
|
61713
62184
|
/** GPS coordinates when available. Null otherwise. */
|
|
61714
62185
|
gps: GpsLocationSchema.nullable(),
|
|
61715
|
-
/** Optional battery level of the tracking device (0..100). Null
|
|
61716
|
-
* when not reported. */
|
|
61717
|
-
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61718
62186
|
/** Ms epoch when the slice was last updated. */
|
|
61719
62187
|
lastChangedAt: number()
|
|
61720
62188
|
});
|
|
61721
62189
|
DeviceType.Presence;
|
|
61722
62190
|
object({
|
|
61723
62191
|
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61724
|
-
|
|
62192
|
+
pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61725
62193
|
/** Ms epoch when the slice was last updated. */
|
|
61726
62194
|
lastFetchedAt: number()
|
|
61727
62195
|
});
|
|
@@ -64731,7 +65199,7 @@ object({
|
|
|
64731
65199
|
DeviceType.Sensor;
|
|
64732
65200
|
object({
|
|
64733
65201
|
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64734
|
-
|
|
65202
|
+
temperature: number().nullable().meta(readingMeta("temperature", {
|
|
64735
65203
|
precision: 1,
|
|
64736
65204
|
label: "Temperature"
|
|
64737
65205
|
})),
|
|
@@ -64995,7 +65463,7 @@ object({
|
|
|
64995
65463
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
64996
65464
|
availableFanSpeeds: array(string()),
|
|
64997
65465
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
64998
|
-
|
|
65466
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
64999
65467
|
/** Current error code (0 / null = no error). */
|
|
65000
65468
|
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65001
65469
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
@@ -65936,6 +66404,104 @@ Object.freeze({
|
|
|
65936
66404
|
access: "create",
|
|
65937
66405
|
role: "admin"
|
|
65938
66406
|
},
|
|
66407
|
+
"actions.create": {
|
|
66408
|
+
capName: "actions",
|
|
66409
|
+
capScope: "system",
|
|
66410
|
+
addonId: null,
|
|
66411
|
+
access: "create",
|
|
66412
|
+
role: "admin"
|
|
66413
|
+
},
|
|
66414
|
+
"actions.delete": {
|
|
66415
|
+
capName: "actions",
|
|
66416
|
+
capScope: "system",
|
|
66417
|
+
addonId: null,
|
|
66418
|
+
access: "delete",
|
|
66419
|
+
role: "admin"
|
|
66420
|
+
},
|
|
66421
|
+
"actions.get": {
|
|
66422
|
+
capName: "actions",
|
|
66423
|
+
capScope: "system",
|
|
66424
|
+
addonId: null,
|
|
66425
|
+
access: "view",
|
|
66426
|
+
role: "viewer"
|
|
66427
|
+
},
|
|
66428
|
+
"actions.getLinks": {
|
|
66429
|
+
capName: "actions",
|
|
66430
|
+
capScope: "system",
|
|
66431
|
+
addonId: null,
|
|
66432
|
+
access: "view",
|
|
66433
|
+
role: "admin"
|
|
66434
|
+
},
|
|
66435
|
+
"actions.getTraces": {
|
|
66436
|
+
capName: "actions",
|
|
66437
|
+
capScope: "system",
|
|
66438
|
+
addonId: null,
|
|
66439
|
+
access: "view",
|
|
66440
|
+
role: "admin"
|
|
66441
|
+
},
|
|
66442
|
+
"actions.list": {
|
|
66443
|
+
capName: "actions",
|
|
66444
|
+
capScope: "system",
|
|
66445
|
+
addonId: null,
|
|
66446
|
+
access: "view",
|
|
66447
|
+
role: "admin"
|
|
66448
|
+
},
|
|
66449
|
+
"actions.listForCamera": {
|
|
66450
|
+
capName: "actions",
|
|
66451
|
+
capScope: "system",
|
|
66452
|
+
addonId: null,
|
|
66453
|
+
access: "view",
|
|
66454
|
+
role: "viewer"
|
|
66455
|
+
},
|
|
66456
|
+
"actions.run": {
|
|
66457
|
+
capName: "actions",
|
|
66458
|
+
capScope: "system",
|
|
66459
|
+
addonId: null,
|
|
66460
|
+
access: "create",
|
|
66461
|
+
role: "viewer"
|
|
66462
|
+
},
|
|
66463
|
+
"actions.setLinks": {
|
|
66464
|
+
capName: "actions",
|
|
66465
|
+
capScope: "system",
|
|
66466
|
+
addonId: null,
|
|
66467
|
+
access: "create",
|
|
66468
|
+
role: "admin"
|
|
66469
|
+
},
|
|
66470
|
+
"actions.stop": {
|
|
66471
|
+
capName: "actions",
|
|
66472
|
+
capScope: "system",
|
|
66473
|
+
addonId: null,
|
|
66474
|
+
access: "create",
|
|
66475
|
+
role: "admin"
|
|
66476
|
+
},
|
|
66477
|
+
"actions.update": {
|
|
66478
|
+
capName: "actions",
|
|
66479
|
+
capScope: "system",
|
|
66480
|
+
addonId: null,
|
|
66481
|
+
access: "create",
|
|
66482
|
+
role: "admin"
|
|
66483
|
+
},
|
|
66484
|
+
"actionSource.listActions": {
|
|
66485
|
+
capName: "action-source",
|
|
66486
|
+
capScope: "system",
|
|
66487
|
+
addonId: null,
|
|
66488
|
+
access: "view",
|
|
66489
|
+
role: "admin"
|
|
66490
|
+
},
|
|
66491
|
+
"actionSource.runAction": {
|
|
66492
|
+
capName: "action-source",
|
|
66493
|
+
capScope: "system",
|
|
66494
|
+
addonId: null,
|
|
66495
|
+
access: "create",
|
|
66496
|
+
role: "admin"
|
|
66497
|
+
},
|
|
66498
|
+
"actionSource.stopAction": {
|
|
66499
|
+
capName: "action-source",
|
|
66500
|
+
capScope: "system",
|
|
66501
|
+
addonId: null,
|
|
66502
|
+
access: "create",
|
|
66503
|
+
role: "admin"
|
|
66504
|
+
},
|
|
65939
66505
|
"addonPages.listPages": {
|
|
65940
66506
|
capName: "addon-pages",
|
|
65941
66507
|
capScope: "system",
|
|
@@ -67217,6 +67783,13 @@ Object.freeze({
|
|
|
67217
67783
|
access: "view",
|
|
67218
67784
|
role: "admin"
|
|
67219
67785
|
},
|
|
67786
|
+
"coreBlocks.getAutomationRunState": {
|
|
67787
|
+
capName: "core-blocks",
|
|
67788
|
+
capScope: "system",
|
|
67789
|
+
addonId: null,
|
|
67790
|
+
access: "view",
|
|
67791
|
+
role: "admin"
|
|
67792
|
+
},
|
|
67220
67793
|
"coreBlocks.getBlockSettings": {
|
|
67221
67794
|
capName: "core-blocks",
|
|
67222
67795
|
capScope: "system",
|
|
@@ -67238,6 +67811,13 @@ Object.freeze({
|
|
|
67238
67811
|
access: "view",
|
|
67239
67812
|
role: "admin"
|
|
67240
67813
|
},
|
|
67814
|
+
"coreBlocks.getTraces": {
|
|
67815
|
+
capName: "core-blocks",
|
|
67816
|
+
capScope: "system",
|
|
67817
|
+
addonId: null,
|
|
67818
|
+
access: "view",
|
|
67819
|
+
role: "admin"
|
|
67820
|
+
},
|
|
67241
67821
|
"coreBlocks.getTypeDefs": {
|
|
67242
67822
|
capName: "core-blocks",
|
|
67243
67823
|
capScope: "system",
|
|
@@ -67273,6 +67853,13 @@ Object.freeze({
|
|
|
67273
67853
|
access: "create",
|
|
67274
67854
|
role: "admin"
|
|
67275
67855
|
},
|
|
67856
|
+
"coreBlocks.reportAutomationRun": {
|
|
67857
|
+
capName: "core-blocks",
|
|
67858
|
+
capScope: "system",
|
|
67859
|
+
addonId: null,
|
|
67860
|
+
access: "create",
|
|
67861
|
+
role: "admin"
|
|
67862
|
+
},
|
|
67276
67863
|
"coreBlocks.restart": {
|
|
67277
67864
|
capName: "core-blocks",
|
|
67278
67865
|
capScope: "system",
|
|
@@ -75846,7 +76433,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75846
76433
|
label: t("Full brightness", "Luminosità massima"),
|
|
75847
76434
|
phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
|
|
75848
76435
|
icon: "sun",
|
|
75849
|
-
args: {
|
|
76436
|
+
args: { level: 100 }
|
|
75850
76437
|
},
|
|
75851
76438
|
{
|
|
75852
76439
|
id: "brightness.half",
|
|
@@ -75854,7 +76441,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75854
76441
|
label: t("Half brightness", "Luminosità a metà"),
|
|
75855
76442
|
phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
|
|
75856
76443
|
icon: "sun-dim",
|
|
75857
|
-
args: {
|
|
76444
|
+
args: { level: 50 }
|
|
75858
76445
|
},
|
|
75859
76446
|
{
|
|
75860
76447
|
id: "brightness.off",
|
|
@@ -75862,16 +76449,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75862
76449
|
label: t("Brightness off", "Luminosità a zero"),
|
|
75863
76450
|
phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
|
|
75864
76451
|
icon: "lightbulb-off",
|
|
75865
|
-
args: {
|
|
76452
|
+
args: { level: 0 }
|
|
75866
76453
|
},
|
|
75867
76454
|
{
|
|
75868
76455
|
id: "brightness.set",
|
|
75869
76456
|
method: "setBrightness",
|
|
75870
76457
|
label: t("Set brightness", "Imposta la luminosità"),
|
|
75871
|
-
phrase: t("Set the brightness of {device} to {
|
|
76458
|
+
phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
|
|
75872
76459
|
icon: "sun-medium",
|
|
75873
76460
|
openArgs: [{
|
|
75874
|
-
key: "
|
|
76461
|
+
key: "level",
|
|
75875
76462
|
label: PERCENT,
|
|
75876
76463
|
offer: {
|
|
75877
76464
|
kind: "number",
|
|
@@ -75885,13 +76472,13 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75885
76472
|
],
|
|
75886
76473
|
state: [{
|
|
75887
76474
|
kind: "numeric",
|
|
75888
|
-
field: "
|
|
76475
|
+
field: "level",
|
|
75889
76476
|
quantity: t("the brightness", "la luminosità"),
|
|
75890
76477
|
label: t("Brightness", "Luminosità"),
|
|
75891
76478
|
unit: "%",
|
|
75892
76479
|
icon: "sun"
|
|
75893
76480
|
}],
|
|
75894
|
-
events: { onBrightnessChanged: { notOperatorFacing: "the `
|
|
76481
|
+
events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
|
|
75895
76482
|
},
|
|
75896
76483
|
color: {
|
|
75897
76484
|
scope: "device",
|
|
@@ -75905,7 +76492,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75905
76492
|
icon: "sun",
|
|
75906
76493
|
args: { color: {
|
|
75907
76494
|
mode: "mired",
|
|
75908
|
-
|
|
76495
|
+
colorTemperature: 370
|
|
75909
76496
|
} }
|
|
75910
76497
|
},
|
|
75911
76498
|
{
|
|
@@ -75916,7 +76503,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75916
76503
|
icon: "snowflake",
|
|
75917
76504
|
args: { color: {
|
|
75918
76505
|
mode: "mired",
|
|
75919
|
-
|
|
76506
|
+
colorTemperature: 200
|
|
75920
76507
|
} }
|
|
75921
76508
|
},
|
|
75922
76509
|
{
|
|
@@ -76530,7 +77117,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76530
77117
|
label: t("Fan off", "Ventilatore spento"),
|
|
76531
77118
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
76532
77119
|
icon: "power-off",
|
|
76533
|
-
args: {
|
|
77120
|
+
args: { speed: 0 }
|
|
76534
77121
|
},
|
|
76535
77122
|
{
|
|
76536
77123
|
id: "fan.full",
|
|
@@ -76538,16 +77125,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76538
77125
|
label: t("Fan full", "Ventilatore al massimo"),
|
|
76539
77126
|
phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
|
|
76540
77127
|
icon: "fan",
|
|
76541
|
-
args: {
|
|
77128
|
+
args: { speed: 100 }
|
|
76542
77129
|
},
|
|
76543
77130
|
{
|
|
76544
77131
|
id: "fan.speed",
|
|
76545
77132
|
method: "setPercentage",
|
|
76546
77133
|
label: t("Set speed", "Imposta la velocità"),
|
|
76547
|
-
phrase: t("Set the speed of {device} to {
|
|
77134
|
+
phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
|
|
76548
77135
|
icon: "fan",
|
|
76549
77136
|
openArgs: [{
|
|
76550
|
-
key: "
|
|
77137
|
+
key: "speed",
|
|
76551
77138
|
label: t("Speed", "Velocità"),
|
|
76552
77139
|
offer: {
|
|
76553
77140
|
kind: "number",
|
|
@@ -76609,7 +77196,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76609
77196
|
],
|
|
76610
77197
|
state: [{
|
|
76611
77198
|
kind: "numeric",
|
|
76612
|
-
field: "
|
|
77199
|
+
field: "speed",
|
|
76613
77200
|
quantity: t("the speed", "la velocità"),
|
|
76614
77201
|
label: t("Speed", "Velocità"),
|
|
76615
77202
|
unit: "%",
|
|
@@ -77407,7 +77994,7 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77407
77994
|
},
|
|
77408
77995
|
{
|
|
77409
77996
|
kind: "numeric",
|
|
77410
|
-
field: "
|
|
77997
|
+
field: "progress",
|
|
77411
77998
|
quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
|
|
77412
77999
|
label: t("Progress", "Avanzamento"),
|
|
77413
78000
|
unit: "%",
|
|
@@ -77765,10 +78352,10 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77765
78352
|
id: "media.seek",
|
|
77766
78353
|
method: "seek",
|
|
77767
78354
|
label: t("Seek", "Vai al punto"),
|
|
77768
|
-
phrase: t("Move {device} to {
|
|
78355
|
+
phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
|
|
77769
78356
|
icon: "fast-forward",
|
|
77770
78357
|
openArgs: [{
|
|
77771
|
-
key: "
|
|
78358
|
+
key: "position",
|
|
77772
78359
|
label: t("Position", "Posizione"),
|
|
77773
78360
|
offer: {
|
|
77774
78361
|
kind: "number",
|
|
@@ -78817,7 +79404,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78817
79404
|
state: [
|
|
78818
79405
|
{
|
|
78819
79406
|
kind: "numeric",
|
|
78820
|
-
field: "
|
|
79407
|
+
field: "co2",
|
|
78821
79408
|
quantity: t("the CO₂", "la CO₂"),
|
|
78822
79409
|
label: t("CO₂", "CO₂"),
|
|
78823
79410
|
unit: "ppm",
|
|
@@ -78825,7 +79412,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78825
79412
|
},
|
|
78826
79413
|
{
|
|
78827
79414
|
kind: "numeric",
|
|
78828
|
-
field: "
|
|
79415
|
+
field: "voc",
|
|
78829
79416
|
quantity: t("the VOC level", "il livello di COV"),
|
|
78830
79417
|
label: t("VOC", "COV"),
|
|
78831
79418
|
unit: "ppb",
|
|
@@ -78861,7 +79448,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78861
79448
|
noun: t("Light level", "Luminosità ambiente"),
|
|
78862
79449
|
state: [{
|
|
78863
79450
|
kind: "numeric",
|
|
78864
|
-
field: "
|
|
79451
|
+
field: "illuminance",
|
|
78865
79452
|
quantity: t("the light level", "la luminosità"),
|
|
78866
79453
|
label: t("Illuminance", "Illuminamento"),
|
|
78867
79454
|
unit: "lx",
|
|
@@ -79064,7 +79651,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79064
79651
|
noun: t("Humidity", "Umidità"),
|
|
79065
79652
|
state: [{
|
|
79066
79653
|
kind: "numeric",
|
|
79067
|
-
field: "
|
|
79654
|
+
field: "humidity",
|
|
79068
79655
|
quantity: t("the humidity", "l’umidità"),
|
|
79069
79656
|
label: t("Humidity", "Umidità"),
|
|
79070
79657
|
unit: "%",
|
|
@@ -79112,7 +79699,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79112
79699
|
state: [
|
|
79113
79700
|
{
|
|
79114
79701
|
kind: "numeric",
|
|
79115
|
-
field: "
|
|
79702
|
+
field: "power",
|
|
79116
79703
|
quantity: t("the power draw", "il consumo"),
|
|
79117
79704
|
label: t("Power", "Potenza"),
|
|
79118
79705
|
unit: "W",
|
|
@@ -79120,7 +79707,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79120
79707
|
},
|
|
79121
79708
|
{
|
|
79122
79709
|
kind: "numeric",
|
|
79123
|
-
field: "
|
|
79710
|
+
field: "energy",
|
|
79124
79711
|
quantity: t("the energy used", "l’energia consumata"),
|
|
79125
79712
|
label: t("Energy", "Energia"),
|
|
79126
79713
|
unit: "kWh",
|
|
@@ -79128,7 +79715,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79128
79715
|
},
|
|
79129
79716
|
{
|
|
79130
79717
|
kind: "numeric",
|
|
79131
|
-
field: "
|
|
79718
|
+
field: "voltage",
|
|
79132
79719
|
quantity: t("the voltage", "la tensione"),
|
|
79133
79720
|
label: t("Voltage", "Tensione"),
|
|
79134
79721
|
unit: "V",
|
|
@@ -79136,7 +79723,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79136
79723
|
},
|
|
79137
79724
|
{
|
|
79138
79725
|
kind: "numeric",
|
|
79139
|
-
field: "
|
|
79726
|
+
field: "current",
|
|
79140
79727
|
quantity: t("the current", "la corrente"),
|
|
79141
79728
|
label: t("Current", "Corrente"),
|
|
79142
79729
|
unit: "A",
|
|
@@ -79153,13 +79740,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79153
79740
|
label: t("Where", "Posizione"),
|
|
79154
79741
|
phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
|
|
79155
79742
|
icon: "map-pin"
|
|
79156
|
-
}, {
|
|
79157
|
-
kind: "numeric",
|
|
79158
|
-
field: "batteryPercent",
|
|
79159
|
-
quantity: t("the phone battery", "la batteria del telefono"),
|
|
79160
|
-
label: t("Battery", "Batteria"),
|
|
79161
|
-
unit: "%",
|
|
79162
|
-
icon: "battery"
|
|
79163
79743
|
}]
|
|
79164
79744
|
},
|
|
79165
79745
|
"pressure-sensor": {
|
|
@@ -79167,7 +79747,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79167
79747
|
noun: t("Pressure", "Pressione"),
|
|
79168
79748
|
state: [{
|
|
79169
79749
|
kind: "numeric",
|
|
79170
|
-
field: "
|
|
79750
|
+
field: "pressure",
|
|
79171
79751
|
quantity: t("the pressure", "la pressione"),
|
|
79172
79752
|
label: t("Pressure", "Pressione"),
|
|
79173
79753
|
unit: "hPa",
|
|
@@ -79203,7 +79783,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79203
79783
|
noun: t("Temperature", "Temperatura"),
|
|
79204
79784
|
state: [{
|
|
79205
79785
|
kind: "numeric",
|
|
79206
|
-
field: "
|
|
79786
|
+
field: "temperature",
|
|
79207
79787
|
quantity: t("the temperature", "la temperatura"),
|
|
79208
79788
|
label: t("Temperature", "Temperatura"),
|
|
79209
79789
|
unit: "°C",
|
|
@@ -79274,7 +79854,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79274
79854
|
state: [
|
|
79275
79855
|
{
|
|
79276
79856
|
kind: "numeric",
|
|
79277
|
-
field: "
|
|
79857
|
+
field: "level",
|
|
79278
79858
|
quantity: t("the battery level", "il livello della batteria"),
|
|
79279
79859
|
label: t("Battery", "Batteria"),
|
|
79280
79860
|
unit: "%",
|
|
@@ -79316,7 +79896,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79316
79896
|
icon: "battery-charging"
|
|
79317
79897
|
}
|
|
79318
79898
|
],
|
|
79319
|
-
events: { onStatusChanged: { notOperatorFacing: "the
|
|
79899
|
+
events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
|
|
79320
79900
|
extraEvents: [{
|
|
79321
79901
|
category: EventCategory.DeviceAwake,
|
|
79322
79902
|
label: t("Woke up", "Risvegliato"),
|
|
@@ -79334,7 +79914,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79334
79914
|
noun: t("Network link", "Collegamento di rete"),
|
|
79335
79915
|
state: [{
|
|
79336
79916
|
kind: "numeric",
|
|
79337
|
-
field: "
|
|
79917
|
+
field: "signal",
|
|
79338
79918
|
quantity: t("the signal strength", "l’intensità del segnale"),
|
|
79339
79919
|
label: t("Signal", "Segnale"),
|
|
79340
79920
|
unit: "%",
|
|
@@ -79427,6 +80007,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79427
80007
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79428
80008
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79429
80009
|
var SYSTEM_CAP_VOCABULARY = {
|
|
80010
|
+
"action-source": system(INTERNAL),
|
|
80011
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79430
80012
|
"addon-pages": system(UI_PLUMBING),
|
|
79431
80013
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79432
80014
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79648,6 +80230,31 @@ Object.freeze({
|
|
|
79648
80230
|
form: "single",
|
|
79649
80231
|
optional: false
|
|
79650
80232
|
}],
|
|
80233
|
+
"actions.get": [{
|
|
80234
|
+
name: "deviceId",
|
|
80235
|
+
form: "single",
|
|
80236
|
+
optional: true
|
|
80237
|
+
}],
|
|
80238
|
+
"actions.getLinks": [{
|
|
80239
|
+
name: "deviceId",
|
|
80240
|
+
form: "single",
|
|
80241
|
+
optional: false
|
|
80242
|
+
}],
|
|
80243
|
+
"actions.listForCamera": [{
|
|
80244
|
+
name: "deviceId",
|
|
80245
|
+
form: "single",
|
|
80246
|
+
optional: false
|
|
80247
|
+
}],
|
|
80248
|
+
"actions.run": [{
|
|
80249
|
+
name: "deviceId",
|
|
80250
|
+
form: "single",
|
|
80251
|
+
optional: true
|
|
80252
|
+
}],
|
|
80253
|
+
"actions.setLinks": [{
|
|
80254
|
+
name: "deviceId",
|
|
80255
|
+
form: "single",
|
|
80256
|
+
optional: false
|
|
80257
|
+
}],
|
|
79651
80258
|
"addonSettings.getDeviceSettings": [{
|
|
79652
80259
|
name: "deviceId",
|
|
79653
80260
|
form: "single",
|
|
@@ -83729,6 +84336,7 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
|
83729
84336
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
83730
84337
|
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
83731
84338
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
84339
|
+
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
83732
84340
|
var MB = 1024 * 1024;
|
|
83733
84341
|
1024 * MB, 3072 * MB;
|
|
83734
84342
|
//#endregion
|
|
@@ -83879,7 +84487,7 @@ var TRAIT_CATALOG = [
|
|
|
83879
84487
|
attributes: () => ({}),
|
|
83880
84488
|
projectState: (rawStatus) => {
|
|
83881
84489
|
const parsed = BrightnessStatusSchema.safeParse(rawStatus);
|
|
83882
|
-
return parsed.success ? { brightness: Math.round(parsed.data.
|
|
84490
|
+
return parsed.success ? { brightness: Math.round(parsed.data.level) } : null;
|
|
83883
84491
|
},
|
|
83884
84492
|
commands: ["action.devices.commands.BrightnessAbsolute"],
|
|
83885
84493
|
resolveCommand: ({ deviceId, command, params }) => {
|