@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
|
@@ -14,7 +14,7 @@ async function dispatchCapCall(api, call) {
|
|
|
14
14
|
case "brightness.setBrightness":
|
|
15
15
|
await api.brightness.setBrightness.mutate({
|
|
16
16
|
deviceId: call.deviceId,
|
|
17
|
-
|
|
17
|
+
level: call.percentage
|
|
18
18
|
});
|
|
19
19
|
return;
|
|
20
20
|
case "lockControl.lock":
|
|
@@ -77,7 +77,7 @@ function createApiDeviceGateway(deps) {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region ../types/dist/event-category-
|
|
80
|
+
//#region ../types/dist/event-category-DmZDPDf_.mjs
|
|
81
81
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
82
82
|
EventCategory["SystemBoot"] = "system.boot";
|
|
83
83
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -704,7 +704,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
704
704
|
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
705
705
|
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
706
706
|
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
707
|
-
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
707
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
|
|
708
708
|
*/
|
|
709
709
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
710
710
|
/**
|
|
@@ -842,6 +842,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
842
842
|
*/
|
|
843
843
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
844
844
|
/**
|
|
845
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
846
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
847
|
+
*/
|
|
848
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
849
|
+
/**
|
|
845
850
|
* Progress update from a running model conversion job.
|
|
846
851
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
847
852
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5520,7 +5525,7 @@ var ZodIssueCode = {
|
|
|
5520
5525
|
var ZodFirstPartyTypeKind;
|
|
5521
5526
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5522
5527
|
//#endregion
|
|
5523
|
-
//#region ../types/dist/sleep
|
|
5528
|
+
//#region ../types/dist/sleep-Crlmu_tO.mjs
|
|
5524
5529
|
/**
|
|
5525
5530
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5526
5531
|
* window to float samples (D455).
|
|
@@ -8591,6 +8596,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8591
8596
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8592
8597
|
var CAP_NAMES = Object.freeze([
|
|
8593
8598
|
"accessories",
|
|
8599
|
+
"action-source",
|
|
8600
|
+
"actions",
|
|
8594
8601
|
"addon-pages",
|
|
8595
8602
|
"addon-pages-source",
|
|
8596
8603
|
"addon-routes",
|
|
@@ -8779,11 +8786,11 @@ var CAP_NAMES = Object.freeze([
|
|
|
8779
8786
|
Object.freeze({
|
|
8780
8787
|
"air-quality-sensor": [
|
|
8781
8788
|
{
|
|
8782
|
-
"path": "
|
|
8789
|
+
"path": "co2",
|
|
8783
8790
|
"valueType": "number"
|
|
8784
8791
|
},
|
|
8785
8792
|
{
|
|
8786
|
-
"path": "
|
|
8793
|
+
"path": "voc",
|
|
8787
8794
|
"valueType": "number"
|
|
8788
8795
|
},
|
|
8789
8796
|
{
|
|
@@ -8833,7 +8840,7 @@ Object.freeze({
|
|
|
8833
8840
|
}
|
|
8834
8841
|
],
|
|
8835
8842
|
"ambient-light-sensor": [{
|
|
8836
|
-
"path": "
|
|
8843
|
+
"path": "illuminance",
|
|
8837
8844
|
"valueType": "number"
|
|
8838
8845
|
}],
|
|
8839
8846
|
"audio-metrics": [
|
|
@@ -8894,7 +8901,7 @@ Object.freeze({
|
|
|
8894
8901
|
],
|
|
8895
8902
|
"battery": [
|
|
8896
8903
|
{
|
|
8897
|
-
"path": "
|
|
8904
|
+
"path": "level",
|
|
8898
8905
|
"valueType": "number"
|
|
8899
8906
|
},
|
|
8900
8907
|
{
|
|
@@ -8916,7 +8923,7 @@ Object.freeze({
|
|
|
8916
8923
|
"valueType": "number"
|
|
8917
8924
|
},
|
|
8918
8925
|
{
|
|
8919
|
-
"path": "
|
|
8926
|
+
"path": "voltage",
|
|
8920
8927
|
"valueType": "number"
|
|
8921
8928
|
},
|
|
8922
8929
|
{
|
|
@@ -8937,7 +8944,7 @@ Object.freeze({
|
|
|
8937
8944
|
"valueType": "boolean"
|
|
8938
8945
|
}],
|
|
8939
8946
|
"brightness": [{
|
|
8940
|
-
"path": "
|
|
8947
|
+
"path": "level",
|
|
8941
8948
|
"valueType": "number"
|
|
8942
8949
|
}],
|
|
8943
8950
|
"broker": [{
|
|
@@ -9138,7 +9145,7 @@ Object.freeze({
|
|
|
9138
9145
|
"valueType": "number"
|
|
9139
9146
|
},
|
|
9140
9147
|
{
|
|
9141
|
-
"path": "
|
|
9148
|
+
"path": "colorTemperature",
|
|
9142
9149
|
"valueType": "number"
|
|
9143
9150
|
}
|
|
9144
9151
|
],
|
|
@@ -9317,15 +9324,15 @@ Object.freeze({
|
|
|
9317
9324
|
"valueType": "string"
|
|
9318
9325
|
},
|
|
9319
9326
|
{
|
|
9320
|
-
"path": "
|
|
9327
|
+
"path": "remaining",
|
|
9321
9328
|
"valueType": "number"
|
|
9322
9329
|
},
|
|
9323
9330
|
{
|
|
9324
|
-
"path": "
|
|
9331
|
+
"path": "delayedStart",
|
|
9325
9332
|
"valueType": "number"
|
|
9326
9333
|
},
|
|
9327
9334
|
{
|
|
9328
|
-
"path": "
|
|
9335
|
+
"path": "progress",
|
|
9329
9336
|
"valueType": "number"
|
|
9330
9337
|
},
|
|
9331
9338
|
{
|
|
@@ -9439,7 +9446,7 @@ Object.freeze({
|
|
|
9439
9446
|
],
|
|
9440
9447
|
"fan-control": [
|
|
9441
9448
|
{
|
|
9442
|
-
"path": "
|
|
9449
|
+
"path": "speed",
|
|
9443
9450
|
"valueType": "number"
|
|
9444
9451
|
},
|
|
9445
9452
|
{
|
|
@@ -9539,7 +9546,7 @@ Object.freeze({
|
|
|
9539
9546
|
}
|
|
9540
9547
|
],
|
|
9541
9548
|
"humidity-sensor": [{
|
|
9542
|
-
"path": "
|
|
9549
|
+
"path": "humidity",
|
|
9543
9550
|
"valueType": "number"
|
|
9544
9551
|
}],
|
|
9545
9552
|
"image": [{
|
|
@@ -9649,7 +9656,7 @@ Object.freeze({
|
|
|
9649
9656
|
"valueType": "number"
|
|
9650
9657
|
},
|
|
9651
9658
|
{
|
|
9652
|
-
"path": "
|
|
9659
|
+
"path": "progress",
|
|
9653
9660
|
"valueType": "number"
|
|
9654
9661
|
},
|
|
9655
9662
|
{
|
|
@@ -9728,11 +9735,11 @@ Object.freeze({
|
|
|
9728
9735
|
"valueType": "string"
|
|
9729
9736
|
},
|
|
9730
9737
|
{
|
|
9731
|
-
"path": "
|
|
9738
|
+
"path": "position",
|
|
9732
9739
|
"valueType": "number"
|
|
9733
9740
|
},
|
|
9734
9741
|
{
|
|
9735
|
-
"path": "
|
|
9742
|
+
"path": "duration",
|
|
9736
9743
|
"valueType": "number"
|
|
9737
9744
|
},
|
|
9738
9745
|
{
|
|
@@ -9834,11 +9841,11 @@ Object.freeze({
|
|
|
9834
9841
|
]
|
|
9835
9842
|
},
|
|
9836
9843
|
{
|
|
9837
|
-
"path": "
|
|
9844
|
+
"path": "signal",
|
|
9838
9845
|
"valueType": "number"
|
|
9839
9846
|
},
|
|
9840
9847
|
{
|
|
9841
|
-
"path": "
|
|
9848
|
+
"path": "rssi",
|
|
9842
9849
|
"valueType": "number"
|
|
9843
9850
|
},
|
|
9844
9851
|
{
|
|
@@ -9893,6 +9900,18 @@ Object.freeze({
|
|
|
9893
9900
|
"path": "foodLevel",
|
|
9894
9901
|
"valueType": "number"
|
|
9895
9902
|
},
|
|
9903
|
+
{
|
|
9904
|
+
"path": "bowlFood",
|
|
9905
|
+
"valueType": "number"
|
|
9906
|
+
},
|
|
9907
|
+
{
|
|
9908
|
+
"path": "eating",
|
|
9909
|
+
"valueType": "boolean"
|
|
9910
|
+
},
|
|
9911
|
+
{
|
|
9912
|
+
"path": "supportsMarkRefilled",
|
|
9913
|
+
"valueType": "boolean"
|
|
9914
|
+
},
|
|
9896
9915
|
{
|
|
9897
9916
|
"path": "food1",
|
|
9898
9917
|
"valueType": "number"
|
|
@@ -9957,23 +9976,23 @@ Object.freeze({
|
|
|
9957
9976
|
],
|
|
9958
9977
|
"power-meter": [
|
|
9959
9978
|
{
|
|
9960
|
-
"path": "
|
|
9979
|
+
"path": "power",
|
|
9961
9980
|
"valueType": "number"
|
|
9962
9981
|
},
|
|
9963
9982
|
{
|
|
9964
|
-
"path": "
|
|
9983
|
+
"path": "energy",
|
|
9965
9984
|
"valueType": "number"
|
|
9966
9985
|
},
|
|
9967
9986
|
{
|
|
9968
|
-
"path": "
|
|
9987
|
+
"path": "voltage",
|
|
9969
9988
|
"valueType": "number"
|
|
9970
9989
|
},
|
|
9971
9990
|
{
|
|
9972
|
-
"path": "
|
|
9991
|
+
"path": "current",
|
|
9973
9992
|
"valueType": "number"
|
|
9974
9993
|
},
|
|
9975
9994
|
{
|
|
9976
|
-
"path": "
|
|
9995
|
+
"path": "apparentPower",
|
|
9977
9996
|
"valueType": "number"
|
|
9978
9997
|
},
|
|
9979
9998
|
{
|
|
@@ -10001,14 +10020,10 @@ Object.freeze({
|
|
|
10001
10020
|
{
|
|
10002
10021
|
"path": "gps.accuracyMeters",
|
|
10003
10022
|
"valueType": "number"
|
|
10004
|
-
},
|
|
10005
|
-
{
|
|
10006
|
-
"path": "batteryPercent",
|
|
10007
|
-
"valueType": "number"
|
|
10008
10023
|
}
|
|
10009
10024
|
],
|
|
10010
10025
|
"pressure-sensor": [{
|
|
10011
|
-
"path": "
|
|
10026
|
+
"path": "pressure",
|
|
10012
10027
|
"valueType": "number"
|
|
10013
10028
|
}],
|
|
10014
10029
|
"privacy-mask": [{
|
|
@@ -10322,7 +10337,7 @@ Object.freeze({
|
|
|
10322
10337
|
"valueType": "boolean"
|
|
10323
10338
|
}],
|
|
10324
10339
|
"temperature-sensor": [{
|
|
10325
|
-
"path": "
|
|
10340
|
+
"path": "temperature",
|
|
10326
10341
|
"valueType": "number"
|
|
10327
10342
|
}],
|
|
10328
10343
|
"update": [
|
|
@@ -10370,7 +10385,7 @@ Object.freeze({
|
|
|
10370
10385
|
"valueType": "string"
|
|
10371
10386
|
},
|
|
10372
10387
|
{
|
|
10373
|
-
"path": "
|
|
10388
|
+
"path": "progress",
|
|
10374
10389
|
"valueType": "number"
|
|
10375
10390
|
},
|
|
10376
10391
|
{
|
|
@@ -10855,7 +10870,7 @@ function errMsg(err) {
|
|
|
10855
10870
|
return String(err);
|
|
10856
10871
|
}
|
|
10857
10872
|
//#endregion
|
|
10858
|
-
//#region ../types/dist/composition-
|
|
10873
|
+
//#region ../types/dist/composition-CZImLpOI.mjs
|
|
10859
10874
|
/**
|
|
10860
10875
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10861
10876
|
*
|
|
@@ -15499,6 +15514,14 @@ var AutomationConditionLeafSchema = object({
|
|
|
15499
15514
|
array(union([string(), number()]))
|
|
15500
15515
|
])
|
|
15501
15516
|
});
|
|
15517
|
+
var AutomationConditionStationaryPresentSchema = object({
|
|
15518
|
+
kind: literal("stationary-present"),
|
|
15519
|
+
deviceId: number().int().nonnegative(),
|
|
15520
|
+
/** Class names; a macro class matches every raw class that maps to it. */
|
|
15521
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15522
|
+
/** The parked object must be in at least one of these zones. */
|
|
15523
|
+
zones: array(string().min(1)).min(1).optional()
|
|
15524
|
+
});
|
|
15502
15525
|
/**
|
|
15503
15526
|
* The expression leaf, declared as a plain object rather than an intersection
|
|
15504
15527
|
* with {@link ExpressionSourceSchema}: a discriminated union has to be able to
|
|
@@ -15532,7 +15555,8 @@ var AutomationConditionSchema = lazy(() => discriminatedUnion("kind", [
|
|
|
15532
15555
|
child: AutomationConditionSchema
|
|
15533
15556
|
}),
|
|
15534
15557
|
AutomationConditionLeafSchema,
|
|
15535
|
-
AutomationConditionExpressionSchema
|
|
15558
|
+
AutomationConditionExpressionSchema,
|
|
15559
|
+
AutomationConditionStationaryPresentSchema
|
|
15536
15560
|
]));
|
|
15537
15561
|
/**
|
|
15538
15562
|
* What starts a run.
|
|
@@ -15573,7 +15597,34 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15573
15597
|
kind: literal("schedule"),
|
|
15574
15598
|
cron: string().min(1).max(120)
|
|
15575
15599
|
}),
|
|
15576
|
-
object({ kind: literal("manual") })
|
|
15600
|
+
object({ kind: literal("manual") }),
|
|
15601
|
+
object({
|
|
15602
|
+
kind: literal("detection"),
|
|
15603
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15604
|
+
* matches every raw class that maps to it; any other name matches
|
|
15605
|
+
* exactly. */
|
|
15606
|
+
classes: array(string().min(1)).min(1),
|
|
15607
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15608
|
+
/** The track must have visited at least one of these zones. */
|
|
15609
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15610
|
+
/** Best-so-far confidence the track must reach. */
|
|
15611
|
+
minScore: number().min(0).max(1).optional()
|
|
15612
|
+
}),
|
|
15613
|
+
object({
|
|
15614
|
+
kind: literal("stationary"),
|
|
15615
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15616
|
+
/** Class names; a macro class matches like the detection trigger. */
|
|
15617
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15618
|
+
/** The parked object must be in at least one of these zones. */
|
|
15619
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15620
|
+
/** `appeared`: it became parked. `departed`: the registry retired it.
|
|
15621
|
+
* The vocabulary of `PipelineAnalyticsStationaryChanged`. */
|
|
15622
|
+
phase: _enum(["appeared", "departed"])
|
|
15623
|
+
}),
|
|
15624
|
+
object({
|
|
15625
|
+
kind: literal("interval"),
|
|
15626
|
+
minutes: number().int().min(1).max(1440)
|
|
15627
|
+
})
|
|
15577
15628
|
]);
|
|
15578
15629
|
/**
|
|
15579
15630
|
* One action step.
|
|
@@ -15593,28 +15644,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15593
15644
|
* is called. The runner still receives a number and is untouched; the
|
|
15594
15645
|
* resolution is the recipe's job, not the runner's.
|
|
15595
15646
|
*/
|
|
15647
|
+
var AutomationWaitStepSchema = object({
|
|
15648
|
+
kind: literal("wait"),
|
|
15649
|
+
seconds: number().min(0).max(300)
|
|
15650
|
+
});
|
|
15651
|
+
var AutomationCapStepSchema = object({
|
|
15652
|
+
kind: literal("cap"),
|
|
15653
|
+
/**
|
|
15654
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15655
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15656
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15657
|
+
*/
|
|
15658
|
+
deviceId: union([
|
|
15659
|
+
number().int(),
|
|
15660
|
+
array(number().int()).min(1),
|
|
15661
|
+
object({ $var: string().min(1) })
|
|
15662
|
+
]),
|
|
15663
|
+
cap: string().min(1),
|
|
15664
|
+
method: string().min(1),
|
|
15665
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15666
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15667
|
+
* the expression leaf. */
|
|
15668
|
+
args: record(string(), unknown()).optional()
|
|
15669
|
+
});
|
|
15670
|
+
/**
|
|
15671
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15672
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15673
|
+
*/
|
|
15674
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15596
15675
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15676
|
+
AutomationWaitStepSchema,
|
|
15677
|
+
AutomationCapStepSchema,
|
|
15597
15678
|
object({
|
|
15598
|
-
kind: literal("
|
|
15599
|
-
|
|
15600
|
-
|
|
15601
|
-
|
|
15602
|
-
|
|
15603
|
-
|
|
15604
|
-
|
|
15605
|
-
|
|
15606
|
-
|
|
15607
|
-
*/
|
|
15608
|
-
deviceId: union([
|
|
15609
|
-
number().int(),
|
|
15610
|
-
array(number().int()).min(1),
|
|
15611
|
-
object({ $var: string().min(1) })
|
|
15612
|
-
]),
|
|
15613
|
-
cap: string().min(1),
|
|
15614
|
-
method: string().min(1),
|
|
15615
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15616
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15617
|
-
args: record(string(), unknown()).optional()
|
|
15679
|
+
kind: literal("action"),
|
|
15680
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15681
|
+
actionId: string().min(1),
|
|
15682
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15683
|
+
variables: record(string(), union([
|
|
15684
|
+
string(),
|
|
15685
|
+
number(),
|
|
15686
|
+
boolean()
|
|
15687
|
+
])).optional()
|
|
15618
15688
|
}),
|
|
15619
15689
|
object({
|
|
15620
15690
|
kind: literal("code"),
|
|
@@ -15623,10 +15693,357 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15623
15693
|
code: string().min(1).max(2e4)
|
|
15624
15694
|
})
|
|
15625
15695
|
]);
|
|
15696
|
+
/**
|
|
15697
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15698
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15699
|
+
* actions. Absent means `single`.
|
|
15700
|
+
*
|
|
15701
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15702
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15703
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15704
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15705
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15706
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15707
|
+
* wait, never the single/queued limits.
|
|
15708
|
+
*/
|
|
15709
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15710
|
+
object({ mode: literal("single") }),
|
|
15711
|
+
object({ mode: literal("restart") }),
|
|
15712
|
+
object({
|
|
15713
|
+
mode: literal("queued"),
|
|
15714
|
+
max: number().int().min(1).max(10)
|
|
15715
|
+
}),
|
|
15716
|
+
object({
|
|
15717
|
+
mode: literal("parallel"),
|
|
15718
|
+
max: number().int().min(1).max(10)
|
|
15719
|
+
}),
|
|
15720
|
+
object({
|
|
15721
|
+
mode: literal("cooldown"),
|
|
15722
|
+
minutes: number().int().min(1).max(1440)
|
|
15723
|
+
})
|
|
15724
|
+
]);
|
|
15626
15725
|
var AutomationRecipeSchema = object({
|
|
15627
15726
|
triggers: array(AutomationTriggerSchema),
|
|
15628
15727
|
conditions: AutomationConditionSchema.optional(),
|
|
15629
|
-
actions: array(AutomationActionSchema)
|
|
15728
|
+
actions: array(AutomationActionSchema),
|
|
15729
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15730
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15731
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15732
|
+
});
|
|
15733
|
+
new Set([
|
|
15734
|
+
{
|
|
15735
|
+
id: "person",
|
|
15736
|
+
name: "Person"
|
|
15737
|
+
},
|
|
15738
|
+
{
|
|
15739
|
+
id: "vehicle",
|
|
15740
|
+
name: "Vehicle"
|
|
15741
|
+
},
|
|
15742
|
+
{
|
|
15743
|
+
id: "animal",
|
|
15744
|
+
name: "Animal"
|
|
15745
|
+
},
|
|
15746
|
+
{
|
|
15747
|
+
id: "package",
|
|
15748
|
+
name: "Package"
|
|
15749
|
+
}
|
|
15750
|
+
].map((l) => l.id));
|
|
15751
|
+
var COCO_TO_MACRO = {
|
|
15752
|
+
mapping: {
|
|
15753
|
+
person: "person",
|
|
15754
|
+
bicycle: "vehicle",
|
|
15755
|
+
car: "vehicle",
|
|
15756
|
+
motorcycle: "vehicle",
|
|
15757
|
+
airplane: "vehicle",
|
|
15758
|
+
bus: "vehicle",
|
|
15759
|
+
train: "vehicle",
|
|
15760
|
+
truck: "vehicle",
|
|
15761
|
+
boat: "vehicle",
|
|
15762
|
+
bird: "animal",
|
|
15763
|
+
cat: "animal",
|
|
15764
|
+
dog: "animal",
|
|
15765
|
+
horse: "animal",
|
|
15766
|
+
sheep: "animal",
|
|
15767
|
+
cow: "animal",
|
|
15768
|
+
elephant: "animal",
|
|
15769
|
+
bear: "animal",
|
|
15770
|
+
zebra: "animal",
|
|
15771
|
+
giraffe: "animal",
|
|
15772
|
+
suitcase: "package",
|
|
15773
|
+
backpack: "package",
|
|
15774
|
+
handbag: "package"
|
|
15775
|
+
},
|
|
15776
|
+
preserveOriginal: false
|
|
15777
|
+
};
|
|
15778
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15779
|
+
/**
|
|
15780
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15781
|
+
* so the editor can paint every block green or red with its reason.
|
|
15782
|
+
*
|
|
15783
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15784
|
+
* every condition node (containers and leaves, including the ones a
|
|
15785
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15786
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15787
|
+
* for an Action run). Skipped
|
|
15788
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15789
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15790
|
+
*
|
|
15791
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15792
|
+
* vocabulary so an Action run records the same step shape.
|
|
15793
|
+
*/
|
|
15794
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15795
|
+
var TraceValueSchema = union([
|
|
15796
|
+
string(),
|
|
15797
|
+
number(),
|
|
15798
|
+
boolean(),
|
|
15799
|
+
_null(),
|
|
15800
|
+
array(union([string(), number()]))
|
|
15801
|
+
]);
|
|
15802
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15803
|
+
"ran",
|
|
15804
|
+
"skipped-trigger",
|
|
15805
|
+
"skipped-conditions",
|
|
15806
|
+
"skipped-cooldown",
|
|
15807
|
+
"skipped-overlap",
|
|
15808
|
+
"failed",
|
|
15809
|
+
"aborted"
|
|
15810
|
+
]);
|
|
15811
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15812
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15813
|
+
"pass",
|
|
15814
|
+
"fail",
|
|
15815
|
+
"not-evaluated"
|
|
15816
|
+
]);
|
|
15817
|
+
var AutomationTriggerTraceSchema = object({
|
|
15818
|
+
kind: string().min(1),
|
|
15819
|
+
outcome: _enum(["pass", "fail"]),
|
|
15820
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
15821
|
+
reason: string(),
|
|
15822
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
15823
|
+
vars: record(string(), TraceValueSchema)
|
|
15824
|
+
});
|
|
15825
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
15826
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
15827
|
+
path: string().min(1),
|
|
15828
|
+
kind: _enum([
|
|
15829
|
+
"all",
|
|
15830
|
+
"any",
|
|
15831
|
+
"not",
|
|
15832
|
+
"condition",
|
|
15833
|
+
"expression",
|
|
15834
|
+
"stationary-present"
|
|
15835
|
+
]),
|
|
15836
|
+
outcome: TraceNodeOutcomeSchema,
|
|
15837
|
+
reason: string(),
|
|
15838
|
+
deviceId: number().int().optional(),
|
|
15839
|
+
cap: string().optional(),
|
|
15840
|
+
fieldPath: string().optional(),
|
|
15841
|
+
operator: string().optional(),
|
|
15842
|
+
expected: TraceValueSchema.optional(),
|
|
15843
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
15844
|
+
observed: TraceValueSchema.optional()
|
|
15845
|
+
});
|
|
15846
|
+
var AutomationRunVerdictSchema = object({
|
|
15847
|
+
mode: AutomationRunModeSchema,
|
|
15848
|
+
decision: _enum([
|
|
15849
|
+
"run",
|
|
15850
|
+
"queued",
|
|
15851
|
+
"restart",
|
|
15852
|
+
"drop",
|
|
15853
|
+
"cooldown",
|
|
15854
|
+
"bypass"
|
|
15855
|
+
]),
|
|
15856
|
+
reason: string()
|
|
15857
|
+
});
|
|
15858
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
15859
|
+
var AutomationStepTraceSchema = object({
|
|
15860
|
+
/** `actions.<i>` */
|
|
15861
|
+
path: string().min(1),
|
|
15862
|
+
kind: string().min(1),
|
|
15863
|
+
cap: string().optional(),
|
|
15864
|
+
method: string().optional(),
|
|
15865
|
+
deviceId: number().int().optional(),
|
|
15866
|
+
startedAt: number().optional(),
|
|
15867
|
+
endedAt: number().optional(),
|
|
15868
|
+
outcome: _enum([
|
|
15869
|
+
"ok",
|
|
15870
|
+
"error",
|
|
15871
|
+
"not-run"
|
|
15872
|
+
]),
|
|
15873
|
+
message: string().optional()
|
|
15874
|
+
});
|
|
15875
|
+
var AutomationRunTraceSchema = object({
|
|
15876
|
+
runId: string().min(1),
|
|
15877
|
+
startedAt: number(),
|
|
15878
|
+
endedAt: number(),
|
|
15879
|
+
trigger: AutomationTriggerTraceSchema,
|
|
15880
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
15881
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
15882
|
+
steps: array(AutomationStepTraceSchema),
|
|
15883
|
+
outcome: AutomationRunOutcomeSchema,
|
|
15884
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
15885
|
+
repeat: number().int().min(1),
|
|
15886
|
+
/** When the latest of those repeats happened. */
|
|
15887
|
+
lastAt: number()
|
|
15888
|
+
});
|
|
15889
|
+
/**
|
|
15890
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
15891
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
15892
|
+
*/
|
|
15893
|
+
var AutomationStateDocSchema = object({
|
|
15894
|
+
version: literal(1),
|
|
15895
|
+
lastRunStartedAt: number().nullable(),
|
|
15896
|
+
traces: array(AutomationRunTraceSchema)
|
|
15897
|
+
});
|
|
15898
|
+
/**
|
|
15899
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
15900
|
+
* declared as LIST ENTRIES, never as devices.
|
|
15901
|
+
*
|
|
15902
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
15903
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
15904
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
15905
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
15906
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
15907
|
+
*
|
|
15908
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
15909
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
15910
|
+
* runtime.
|
|
15911
|
+
*/
|
|
15912
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
15913
|
+
var ActionVariableTypeSchema = _enum([
|
|
15914
|
+
"string",
|
|
15915
|
+
"number",
|
|
15916
|
+
"boolean",
|
|
15917
|
+
"select"
|
|
15918
|
+
]);
|
|
15919
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
15920
|
+
var ActionVariableValueSchema = union([
|
|
15921
|
+
string(),
|
|
15922
|
+
number(),
|
|
15923
|
+
boolean()
|
|
15924
|
+
]);
|
|
15925
|
+
/**
|
|
15926
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
15927
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
15928
|
+
*/
|
|
15929
|
+
var ActionVariableSchema = object({
|
|
15930
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
15931
|
+
label: string().min(1).max(120).optional(),
|
|
15932
|
+
type: ActionVariableTypeSchema,
|
|
15933
|
+
required: boolean().optional(),
|
|
15934
|
+
default: ActionVariableValueSchema.optional(),
|
|
15935
|
+
/** The allowed values of a `select`. */
|
|
15936
|
+
options: array(string().min(1)).min(1).optional()
|
|
15937
|
+
}).superRefine((v, ctx) => {
|
|
15938
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
15939
|
+
code: "custom",
|
|
15940
|
+
message: "a select variable needs options",
|
|
15941
|
+
path: ["options"]
|
|
15942
|
+
});
|
|
15943
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
15944
|
+
code: "custom",
|
|
15945
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
15946
|
+
path: ["default"]
|
|
15947
|
+
});
|
|
15948
|
+
});
|
|
15949
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
15950
|
+
function variableValueError(variable, value) {
|
|
15951
|
+
switch (variable.type) {
|
|
15952
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
15953
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
15954
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
15955
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
15956
|
+
}
|
|
15957
|
+
}
|
|
15958
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
15959
|
+
function isInternalActionId(actionId) {
|
|
15960
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
15961
|
+
}
|
|
15962
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
15963
|
+
function addonIdOfActionId(actionId) {
|
|
15964
|
+
if (isInternalActionId(actionId)) return null;
|
|
15965
|
+
const at = actionId.indexOf(":");
|
|
15966
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
15967
|
+
}
|
|
15968
|
+
var ActionStatusSchema = object({
|
|
15969
|
+
isRunning: boolean(),
|
|
15970
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
15971
|
+
lastRunAt: number().nullable(),
|
|
15972
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
15973
|
+
lastError: string().nullable()
|
|
15974
|
+
});
|
|
15975
|
+
var ActionEntrySchema = object({
|
|
15976
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
15977
|
+
id: string().min(3),
|
|
15978
|
+
name: string().min(1).max(120),
|
|
15979
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
15980
|
+
addonId: string().min(1),
|
|
15981
|
+
source: ActionSourceKindSchema,
|
|
15982
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
15983
|
+
readOnly: boolean(),
|
|
15984
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
15985
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
15986
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
15987
|
+
status: ActionStatusSchema
|
|
15988
|
+
}).superRefine((entry, ctx) => {
|
|
15989
|
+
if (entry.source === "internal") {
|
|
15990
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
15991
|
+
code: "custom",
|
|
15992
|
+
message: "an internal action id is internal:<uuid>",
|
|
15993
|
+
path: ["id"]
|
|
15994
|
+
});
|
|
15995
|
+
return;
|
|
15996
|
+
}
|
|
15997
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
15998
|
+
code: "custom",
|
|
15999
|
+
message: "only an internal action carries steps",
|
|
16000
|
+
path: ["steps"]
|
|
16001
|
+
});
|
|
16002
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
16003
|
+
code: "custom",
|
|
16004
|
+
message: "an addon action is read-only here",
|
|
16005
|
+
path: ["readOnly"]
|
|
16006
|
+
});
|
|
16007
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
16008
|
+
code: "custom",
|
|
16009
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
16010
|
+
path: ["id"]
|
|
16011
|
+
});
|
|
16012
|
+
});
|
|
16013
|
+
/** What an operator writes for an internal action. */
|
|
16014
|
+
var ActionInputSchema = object({
|
|
16015
|
+
name: string().min(1).max(120),
|
|
16016
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
16017
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
16018
|
+
});
|
|
16019
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
16020
|
+
var ActionRunOriginSchema = object({
|
|
16021
|
+
/** The automation block whose step started it. */
|
|
16022
|
+
blockId: string().min(1).optional() });
|
|
16023
|
+
/** `started` = the caller did not ask to wait. */
|
|
16024
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
16025
|
+
var ActionRunResultSchema = object({
|
|
16026
|
+
runId: string().min(1),
|
|
16027
|
+
outcome: ActionRunOutcomeSchema,
|
|
16028
|
+
/** Why it did not run, or what failed. */
|
|
16029
|
+
message: string().optional()
|
|
16030
|
+
});
|
|
16031
|
+
_enum([
|
|
16032
|
+
"not-found",
|
|
16033
|
+
"read-only",
|
|
16034
|
+
"invalid-variables",
|
|
16035
|
+
"invalid-steps",
|
|
16036
|
+
"not-linked",
|
|
16037
|
+
"busy"
|
|
16038
|
+
]);
|
|
16039
|
+
object({
|
|
16040
|
+
actionId: string(),
|
|
16041
|
+
runId: string(),
|
|
16042
|
+
isRunning: boolean(),
|
|
16043
|
+
/** Set when the run ended. */
|
|
16044
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
16045
|
+
lastRunAt: number().nullable(),
|
|
16046
|
+
lastError: string().nullable()
|
|
15630
16047
|
});
|
|
15631
16048
|
/**
|
|
15632
16049
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -18226,7 +18643,7 @@ var CompositionEventPlanSchema = object({
|
|
|
18226
18643
|
stateField: string(),
|
|
18227
18644
|
fieldKey: string()
|
|
18228
18645
|
});
|
|
18229
|
-
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.
|
|
18646
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
|
|
18230
18647
|
var CompositionProblemSchema = object({
|
|
18231
18648
|
code: _enum([
|
|
18232
18649
|
"reserved-variant",
|
|
@@ -18545,7 +18962,7 @@ var GROUP_TEMPLATES = [
|
|
|
18545
18962
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18546
18963
|
role: DeviceRole.TemperatureSensor,
|
|
18547
18964
|
outputCap: "temperature-sensor",
|
|
18548
|
-
outputField: "
|
|
18965
|
+
outputField: "temperature",
|
|
18549
18966
|
quantity: "temperature",
|
|
18550
18967
|
defaultAggregate: "mean",
|
|
18551
18968
|
empty: "null",
|
|
@@ -18556,7 +18973,7 @@ var GROUP_TEMPLATES = [
|
|
|
18556
18973
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18557
18974
|
role: DeviceRole.HumiditySensor,
|
|
18558
18975
|
outputCap: "humidity-sensor",
|
|
18559
|
-
outputField: "
|
|
18976
|
+
outputField: "humidity",
|
|
18560
18977
|
quantity: "humidity",
|
|
18561
18978
|
defaultAggregate: "mean",
|
|
18562
18979
|
empty: "null",
|
|
@@ -18567,7 +18984,7 @@ var GROUP_TEMPLATES = [
|
|
|
18567
18984
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18568
18985
|
role: DeviceRole.PressureSensor,
|
|
18569
18986
|
outputCap: "pressure-sensor",
|
|
18570
|
-
outputField: "
|
|
18987
|
+
outputField: "pressure",
|
|
18571
18988
|
quantity: "pressure",
|
|
18572
18989
|
defaultAggregate: "mean",
|
|
18573
18990
|
empty: "null",
|
|
@@ -18578,7 +18995,7 @@ var GROUP_TEMPLATES = [
|
|
|
18578
18995
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18579
18996
|
role: DeviceRole.AmbientLightSensor,
|
|
18580
18997
|
outputCap: "ambient-light-sensor",
|
|
18581
|
-
outputField: "
|
|
18998
|
+
outputField: "illuminance",
|
|
18582
18999
|
quantity: "illuminance",
|
|
18583
19000
|
defaultAggregate: "mean",
|
|
18584
19001
|
empty: "null",
|
|
@@ -18589,7 +19006,7 @@ var GROUP_TEMPLATES = [
|
|
|
18589
19006
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18590
19007
|
role: DeviceRole.PowerSensor,
|
|
18591
19008
|
outputCap: "power-meter",
|
|
18592
|
-
outputField: "
|
|
19009
|
+
outputField: "power",
|
|
18593
19010
|
quantity: "power",
|
|
18594
19011
|
defaultAggregate: "sum",
|
|
18595
19012
|
empty: "omit",
|
|
@@ -18600,7 +19017,7 @@ var GROUP_TEMPLATES = [
|
|
|
18600
19017
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18601
19018
|
role: DeviceRole.EnergySensor,
|
|
18602
19019
|
outputCap: "power-meter",
|
|
18603
|
-
outputField: "
|
|
19020
|
+
outputField: "energy",
|
|
18604
19021
|
quantity: "energy",
|
|
18605
19022
|
defaultAggregate: "sum",
|
|
18606
19023
|
empty: "omit",
|
|
@@ -18611,7 +19028,7 @@ var GROUP_TEMPLATES = [
|
|
|
18611
19028
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18612
19029
|
role: DeviceRole.BatterySensor,
|
|
18613
19030
|
outputCap: "battery",
|
|
18614
|
-
outputField: "
|
|
19031
|
+
outputField: "level",
|
|
18615
19032
|
quantity: "percentage",
|
|
18616
19033
|
defaultAggregate: "mean",
|
|
18617
19034
|
empty: "null",
|
|
@@ -19189,7 +19606,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
19189
19606
|
kind: "mutation",
|
|
19190
19607
|
auth: "admin",
|
|
19191
19608
|
access: "view"
|
|
19192
|
-
})
|
|
19609
|
+
}), method(object({
|
|
19610
|
+
blockId: string().min(1),
|
|
19611
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
19612
|
+
runStartedAt: number().optional(),
|
|
19613
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
19614
|
+
}), _void(), {
|
|
19615
|
+
kind: "mutation",
|
|
19616
|
+
auth: "admin"
|
|
19617
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
19618
|
+
traces: array(AutomationRunTraceSchema),
|
|
19619
|
+
lastError: string().nullable()
|
|
19620
|
+
}), { auth: "admin" });
|
|
19193
19621
|
/**
|
|
19194
19622
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
19195
19623
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -44307,51 +44735,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
44307
44735
|
kind: "mutation",
|
|
44308
44736
|
auth: "admin"
|
|
44309
44737
|
});
|
|
44310
|
-
new Set([
|
|
44311
|
-
{
|
|
44312
|
-
id: "person",
|
|
44313
|
-
name: "Person"
|
|
44314
|
-
},
|
|
44315
|
-
{
|
|
44316
|
-
id: "vehicle",
|
|
44317
|
-
name: "Vehicle"
|
|
44318
|
-
},
|
|
44319
|
-
{
|
|
44320
|
-
id: "animal",
|
|
44321
|
-
name: "Animal"
|
|
44322
|
-
},
|
|
44323
|
-
{
|
|
44324
|
-
id: "package",
|
|
44325
|
-
name: "Package"
|
|
44326
|
-
}
|
|
44327
|
-
].map((l) => l.id));
|
|
44328
|
-
var COCO_TO_MACRO = {
|
|
44329
|
-
mapping: {
|
|
44330
|
-
person: "person",
|
|
44331
|
-
bicycle: "vehicle",
|
|
44332
|
-
car: "vehicle",
|
|
44333
|
-
motorcycle: "vehicle",
|
|
44334
|
-
airplane: "vehicle",
|
|
44335
|
-
bus: "vehicle",
|
|
44336
|
-
train: "vehicle",
|
|
44337
|
-
truck: "vehicle",
|
|
44338
|
-
boat: "vehicle",
|
|
44339
|
-
bird: "animal",
|
|
44340
|
-
cat: "animal",
|
|
44341
|
-
dog: "animal",
|
|
44342
|
-
horse: "animal",
|
|
44343
|
-
sheep: "animal",
|
|
44344
|
-
cow: "animal",
|
|
44345
|
-
elephant: "animal",
|
|
44346
|
-
bear: "animal",
|
|
44347
|
-
zebra: "animal",
|
|
44348
|
-
giraffe: "animal",
|
|
44349
|
-
suitcase: "package",
|
|
44350
|
-
backpack: "package",
|
|
44351
|
-
handbag: "package"
|
|
44352
|
-
},
|
|
44353
|
-
preserveOriginal: false
|
|
44354
|
-
};
|
|
44355
44738
|
var AUDIO_MACRO_LABELS = [
|
|
44356
44739
|
{
|
|
44357
44740
|
id: "speech",
|
|
@@ -56804,9 +57187,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56804
57187
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
56805
57188
|
object({
|
|
56806
57189
|
/** Carbon dioxide concentration in ppm. */
|
|
56807
|
-
|
|
57190
|
+
co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
|
|
56808
57191
|
/** Total volatile organic compounds in ppb. */
|
|
56809
|
-
|
|
57192
|
+
voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
|
|
56810
57193
|
/** Particulate matter ≤ 2.5 μm in µg/m³. */
|
|
56811
57194
|
pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
|
|
56812
57195
|
/** Particulate matter ≤ 10 μm in µg/m³. */
|
|
@@ -56819,7 +57202,7 @@ object({
|
|
|
56819
57202
|
DeviceType.Sensor;
|
|
56820
57203
|
object({
|
|
56821
57204
|
/** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
|
|
56822
|
-
|
|
57205
|
+
illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
|
|
56823
57206
|
precision: 0,
|
|
56824
57207
|
label: "Illuminance"
|
|
56825
57208
|
})),
|
|
@@ -56916,6 +57299,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
56916
57299
|
* would produce more than `maxPoints` samples. */
|
|
56917
57300
|
sampleEveryMs: number().int().positive().optional()
|
|
56918
57301
|
}), AudioMetricsHistorySchema);
|
|
57302
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57303
|
+
actionId: string().min(1),
|
|
57304
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57305
|
+
}), _void(), {
|
|
57306
|
+
kind: "mutation",
|
|
57307
|
+
auth: "admin"
|
|
57308
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57309
|
+
kind: "mutation",
|
|
57310
|
+
auth: "admin"
|
|
57311
|
+
});
|
|
57312
|
+
/**
|
|
57313
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57314
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57315
|
+
*
|
|
57316
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57317
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57318
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57319
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57320
|
+
* drift (D3).
|
|
57321
|
+
*
|
|
57322
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57323
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57324
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57325
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57326
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57327
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57328
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57329
|
+
*
|
|
57330
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57331
|
+
* logged — never queued.
|
|
57332
|
+
*/
|
|
57333
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57334
|
+
var ActionLinksSchema = object({
|
|
57335
|
+
deviceId: number().int().nonnegative(),
|
|
57336
|
+
actionIds: array(string().min(1)).max(100)
|
|
57337
|
+
});
|
|
57338
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57339
|
+
actionId: string().min(1),
|
|
57340
|
+
deviceId: number().int().nonnegative().optional()
|
|
57341
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57342
|
+
role: "viewer",
|
|
57343
|
+
auth: "protected",
|
|
57344
|
+
kind: "query",
|
|
57345
|
+
caller: "required"
|
|
57346
|
+
}), method(object({
|
|
57347
|
+
actionId: string().min(1),
|
|
57348
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57349
|
+
wait: boolean().optional(),
|
|
57350
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57351
|
+
deviceId: number().int().nonnegative().optional()
|
|
57352
|
+
}), ActionRunResultSchema, {
|
|
57353
|
+
role: "viewer",
|
|
57354
|
+
auth: "protected",
|
|
57355
|
+
kind: "mutation",
|
|
57356
|
+
caller: "required"
|
|
57357
|
+
}), method(ActionIdInput, _void(), {
|
|
57358
|
+
kind: "mutation",
|
|
57359
|
+
auth: "admin"
|
|
57360
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57361
|
+
kind: "mutation",
|
|
57362
|
+
auth: "admin"
|
|
57363
|
+
}), method(object({
|
|
57364
|
+
actionId: string().min(1),
|
|
57365
|
+
action: ActionInputSchema.partial()
|
|
57366
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57367
|
+
kind: "mutation",
|
|
57368
|
+
auth: "admin"
|
|
57369
|
+
}), method(ActionIdInput, _void(), {
|
|
57370
|
+
kind: "mutation",
|
|
57371
|
+
auth: "admin"
|
|
57372
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57373
|
+
role: "viewer",
|
|
57374
|
+
auth: "protected",
|
|
57375
|
+
kind: "query"
|
|
57376
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57377
|
+
kind: "mutation",
|
|
57378
|
+
auth: "admin"
|
|
57379
|
+
});
|
|
56919
57380
|
object({
|
|
56920
57381
|
/** Whether the automation is currently enabled. Disabled automations
|
|
56921
57382
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -56969,7 +57430,7 @@ var BatteryStatusSchema = object({
|
|
|
56969
57430
|
* Consumers must SKIP a null rather than coerce it — `battery-band` already
|
|
56970
57431
|
* declines to band a non-finite reading, which is the correct shape.
|
|
56971
57432
|
*/
|
|
56972
|
-
|
|
57433
|
+
level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
|
|
56973
57434
|
/**
|
|
56974
57435
|
* Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
|
|
56975
57436
|
* Reolink-specific for the Solar Panel 2 accessory (will become
|
|
@@ -56979,7 +57440,7 @@ var BatteryStatusSchema = object({
|
|
|
56979
57440
|
* `'unknown'` is the absence of an answer: the provider has not read the
|
|
56980
57441
|
* power fields yet, or the firmware reported neither. Before it existed,
|
|
56981
57442
|
* two unreadable fields produced `'none'`, and a camera nobody had reached
|
|
56982
|
-
* was drawn "on battery alone" — the same D315 defect `
|
|
57443
|
+
* was drawn "on battery alone" — the same D315 defect `level` closed
|
|
56983
57444
|
* by going nullable. Consumers SKIP it (no charger state published, no
|
|
56984
57445
|
* glyph, no HomeKit ChargingState) rather than coerce it either way.
|
|
56985
57446
|
*/
|
|
@@ -57003,7 +57464,7 @@ var BatteryStatusSchema = object({
|
|
|
57003
57464
|
* that only report charge. A second reading on this cap, not a second
|
|
57004
57465
|
* `numeric-sensor` on the same device.
|
|
57005
57466
|
*/
|
|
57006
|
-
|
|
57467
|
+
voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
57007
57468
|
/**
|
|
57008
57469
|
* Ms epoch of the last time the device PROVED it was reachable — a
|
|
57009
57470
|
* completed firmware round-trip, an observed wake, or an inbound push
|
|
@@ -57037,7 +57498,7 @@ var BatteryStatusSchema = object({
|
|
|
57037
57498
|
/**
|
|
57038
57499
|
* True when the source is a BINARY low-battery indicator (HA
|
|
57039
57500
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
57040
|
-
* charge level — `
|
|
57501
|
+
* charge level — `level` is then a coarse stand-in (100 = normal,
|
|
57041
57502
|
* sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
|
|
57042
57503
|
* misleading exact percentage. Absent/false → genuine 0–100 % reading.
|
|
57043
57504
|
*/
|
|
@@ -57068,26 +57529,26 @@ DeviceType.Sensor;
|
|
|
57068
57529
|
* controls to this single-method surface.
|
|
57069
57530
|
*
|
|
57070
57531
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
57071
|
-
*
|
|
57532
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
57072
57533
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
57073
57534
|
* should surface those via the device's `getSettingsUISchema()`
|
|
57074
57535
|
* instead of bloating this cap.
|
|
57075
57536
|
*/
|
|
57076
57537
|
var BrightnessStatusSchema = object({
|
|
57077
57538
|
/** Current level as 0..100 inclusive. Firmware-reported. */
|
|
57078
|
-
|
|
57539
|
+
level: number().min(0).max(100).meta(readingMeta("percentage")),
|
|
57079
57540
|
/** Ms epoch of the last operator-driven change. Useful for UI freshness. */
|
|
57080
57541
|
lastChangedAt: number()
|
|
57081
57542
|
});
|
|
57082
57543
|
DeviceType.Light, method(object({
|
|
57083
57544
|
deviceId: number().int().nonnegative(),
|
|
57084
|
-
|
|
57545
|
+
level: number().min(0).max(100)
|
|
57085
57546
|
}), _void(), {
|
|
57086
57547
|
kind: "mutation",
|
|
57087
57548
|
auth: "protected"
|
|
57088
57549
|
}), object({
|
|
57089
57550
|
deviceId: number(),
|
|
57090
|
-
|
|
57551
|
+
level: number().min(0).max(100),
|
|
57091
57552
|
lastChangedAt: number()
|
|
57092
57553
|
});
|
|
57093
57554
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
@@ -57588,11 +58049,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
|
|
|
57588
58049
|
}),
|
|
57589
58050
|
object({
|
|
57590
58051
|
mode: literal("mired"),
|
|
57591
|
-
|
|
58052
|
+
colorTemperature: number().int().min(50).max(1e3)
|
|
57592
58053
|
})
|
|
57593
58054
|
]);
|
|
57594
58055
|
object({
|
|
57595
|
-
/** Active color mode — which of `rgb` / `hsv` / `
|
|
58056
|
+
/** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
|
|
57596
58057
|
* the bulb's current state. */
|
|
57597
58058
|
mode: _enum([
|
|
57598
58059
|
"rgb",
|
|
@@ -57604,7 +58065,7 @@ object({
|
|
|
57604
58065
|
/** Populated when `mode === 'hsv'`. */
|
|
57605
58066
|
hsv: HsvTripletSchema.optional(),
|
|
57606
58067
|
/** Populated when `mode === 'mired'`. */
|
|
57607
|
-
|
|
58068
|
+
colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
|
|
57608
58069
|
/** Ms epoch of the last operator-driven change. */
|
|
57609
58070
|
lastChangedAt: number()
|
|
57610
58071
|
});
|
|
@@ -57623,7 +58084,7 @@ DeviceType.Light, method(object({
|
|
|
57623
58084
|
]),
|
|
57624
58085
|
rgb: RgbTripletSchema.optional(),
|
|
57625
58086
|
hsv: HsvTripletSchema.optional(),
|
|
57626
|
-
|
|
58087
|
+
colorTemperature: number().int().optional(),
|
|
57627
58088
|
lastChangedAt: number()
|
|
57628
58089
|
});
|
|
57629
58090
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
@@ -58049,11 +58510,11 @@ object({
|
|
|
58049
58510
|
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
58050
58511
|
availablePrograms: array(string()),
|
|
58051
58512
|
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
58052
|
-
|
|
58513
|
+
remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58053
58514
|
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
58054
|
-
|
|
58515
|
+
delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
|
|
58055
58516
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
58056
|
-
|
|
58517
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58057
58518
|
/** True when the door is reported open; null when the door state is not known. */
|
|
58058
58519
|
doorOpen: boolean().nullable(),
|
|
58059
58520
|
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
@@ -58671,7 +59132,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
|
58671
59132
|
object({
|
|
58672
59133
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
58673
59134
|
* speed surface (single-speed fan). */
|
|
58674
|
-
|
|
59135
|
+
speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
58675
59136
|
/** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
|
|
58676
59137
|
* a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
|
|
58677
59138
|
percentageStep: number().positive().optional().meta(readingMeta("percentage")),
|
|
@@ -58691,7 +59152,7 @@ object({
|
|
|
58691
59152
|
});
|
|
58692
59153
|
DeviceType.Fan, method(object({
|
|
58693
59154
|
deviceId: number().int().nonnegative(),
|
|
58694
|
-
|
|
59155
|
+
speed: number().min(0).max(100)
|
|
58695
59156
|
}), _void(), {
|
|
58696
59157
|
kind: "mutation",
|
|
58697
59158
|
auth: "protected"
|
|
@@ -58874,7 +59335,7 @@ DeviceType.Humidifier, method(object({
|
|
|
58874
59335
|
});
|
|
58875
59336
|
object({
|
|
58876
59337
|
/** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
|
|
58877
|
-
|
|
59338
|
+
humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
|
|
58878
59339
|
precision: 0,
|
|
58879
59340
|
label: "Humidity"
|
|
58880
59341
|
})),
|
|
@@ -59317,7 +59778,7 @@ object({
|
|
|
59317
59778
|
batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59318
59779
|
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
59319
59780
|
* task is active / progress is unavailable. */
|
|
59320
|
-
|
|
59781
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
59321
59782
|
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
59322
59783
|
* or null when unknown. */
|
|
59323
59784
|
currentCode: number().nullable().meta(readingMeta("none")),
|
|
@@ -59807,10 +60268,10 @@ object({
|
|
|
59807
60268
|
currentMedia: MediaInfoSchema.nullable(),
|
|
59808
60269
|
/** Current playback position in ms. Null when not seekable or
|
|
59809
60270
|
* nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
|
|
59810
|
-
|
|
60271
|
+
position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59811
60272
|
/** Total duration of the current media in ms. Null when unknown
|
|
59812
60273
|
* (live stream) or nothing is playing. */
|
|
59813
|
-
|
|
60274
|
+
duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
|
|
59814
60275
|
/** Shuffle toggle. Null when no shuffle surface.
|
|
59815
60276
|
* Pair with `DeviceFeature.MediaPlayerShuffle`. */
|
|
59816
60277
|
shuffle: boolean().nullable(),
|
|
@@ -59837,7 +60298,7 @@ DeviceType.MediaPlayer, method(object({ deviceId: number().int().nonnegative() }
|
|
|
59837
60298
|
auth: "protected"
|
|
59838
60299
|
}), method(object({
|
|
59839
60300
|
deviceId: number().int().nonnegative(),
|
|
59840
|
-
|
|
60301
|
+
position: number().int().nonnegative()
|
|
59841
60302
|
}), _void(), {
|
|
59842
60303
|
kind: "mutation",
|
|
59843
60304
|
auth: "protected"
|
|
@@ -60510,9 +60971,9 @@ var NetworkLinkStatusSchema = object({
|
|
|
60510
60971
|
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
60511
60972
|
* SKIP a null rather than coerce it.
|
|
60512
60973
|
*/
|
|
60513
|
-
|
|
60974
|
+
signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
60514
60975
|
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
60515
|
-
|
|
60976
|
+
rssi: number().optional().meta(readingMeta("signal-level")),
|
|
60516
60977
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
60517
60978
|
ssid: string().optional(),
|
|
60518
60979
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
@@ -61173,10 +61634,20 @@ var PetFeederDeviceStatusSchema = _enum([
|
|
|
61173
61634
|
]);
|
|
61174
61635
|
var gramsPortion = number().int().min(4).max(200);
|
|
61175
61636
|
object({
|
|
61176
|
-
/** Food
|
|
61177
|
-
*
|
|
61178
|
-
* bowl
|
|
61637
|
+
/** Food in the TANK (hopper), as the feeder's own sensor reports it
|
|
61638
|
+
* (`state.food`). A coarse level code, not grams — `0` is empty. The
|
|
61639
|
+
* amount in the bowl is `bowlFood`. On dual-hopper models this is the
|
|
61640
|
+
* combined reading; per-hopper levels live in `food1`/`food2`. Null when
|
|
61641
|
+
* the device has not reported yet. */
|
|
61179
61642
|
foodLevel: number().nullable().meta(readingMeta("none")),
|
|
61643
|
+
/** Food in the BOWL as the feeder reports it (`state.bowl`), in the
|
|
61644
|
+
* feeder's own units. Null when the model reports none. */
|
|
61645
|
+
bowlFood: number().nullable().meta(readingMeta("none")),
|
|
61646
|
+
/** True while the pet is eating (`state.eating`). */
|
|
61647
|
+
eating: boolean(),
|
|
61648
|
+
/** Whether `markFoodReplenished` does anything on this model. When false
|
|
61649
|
+
* the client must not offer it. */
|
|
61650
|
+
supportsMarkRefilled: boolean(),
|
|
61180
61651
|
/** Hopper-1 food level (grams) on dual-hopper feeders; null on
|
|
61181
61652
|
* single-hopper models. */
|
|
61182
61653
|
food1: number().nullable().meta(readingMeta("none")),
|
|
@@ -61184,8 +61655,8 @@ object({
|
|
|
61184
61655
|
* single-hopper models. */
|
|
61185
61656
|
food2: number().nullable().meta(readingMeta("none")),
|
|
61186
61657
|
/** Derived low-food flag — mirrors the HA `food_level` binary_sensor
|
|
61187
|
-
* (`device_class: problem`, on = low). True when the
|
|
61188
|
-
*
|
|
61658
|
+
* (`device_class: problem`, on = low). True when the tank reports empty,
|
|
61659
|
+
* or, on a dual-hopper model, when EITHER hopper is empty. */
|
|
61189
61660
|
lowFood: boolean(),
|
|
61190
61661
|
/** Battery charge 0..100 (%). Null on mains-powered models or when the
|
|
61191
61662
|
* device has no battery reading. */
|
|
@@ -61652,16 +62123,16 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
61652
62123
|
auth: "admin"
|
|
61653
62124
|
});
|
|
61654
62125
|
object({
|
|
61655
|
-
/** Instantaneous power draw
|
|
61656
|
-
|
|
62126
|
+
/** Instantaneous power draw (watts). */
|
|
62127
|
+
power: number().optional().meta(readingMeta("power", { label: "Power" })),
|
|
61657
62128
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
61658
|
-
|
|
61659
|
-
/** Voltage
|
|
61660
|
-
|
|
62129
|
+
energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
62130
|
+
/** Voltage (volts). */
|
|
62131
|
+
voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
61661
62132
|
/** Current in amperes. */
|
|
61662
|
-
|
|
62133
|
+
current: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
61663
62134
|
/** Apparent power in volt-amperes. */
|
|
61664
|
-
|
|
62135
|
+
apparentPower: number().optional().meta(readingMeta("apparent-power")),
|
|
61665
62136
|
/** Power factor (0..1) if reported. */
|
|
61666
62137
|
powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
|
|
61667
62138
|
/** Ms epoch when the slice was last updated. */
|
|
@@ -61716,16 +62187,13 @@ object({
|
|
|
61716
62187
|
location: string().nullable(),
|
|
61717
62188
|
/** GPS coordinates when available. Null otherwise. */
|
|
61718
62189
|
gps: GpsLocationSchema.nullable(),
|
|
61719
|
-
/** Optional battery level of the tracking device (0..100). Null
|
|
61720
|
-
* when not reported. */
|
|
61721
|
-
batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
61722
62190
|
/** Ms epoch when the slice was last updated. */
|
|
61723
62191
|
lastChangedAt: number()
|
|
61724
62192
|
});
|
|
61725
62193
|
DeviceType.Presence;
|
|
61726
62194
|
object({
|
|
61727
62195
|
/** Current pressure in hPa. `null` when the sample was refused (D393). */
|
|
61728
|
-
|
|
62196
|
+
pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
|
|
61729
62197
|
/** Ms epoch when the slice was last updated. */
|
|
61730
62198
|
lastFetchedAt: number()
|
|
61731
62199
|
});
|
|
@@ -64735,7 +65203,7 @@ object({
|
|
|
64735
65203
|
DeviceType.Sensor;
|
|
64736
65204
|
object({
|
|
64737
65205
|
/** Current temperature in Celsius. `null` when the sample was refused (D393). */
|
|
64738
|
-
|
|
65206
|
+
temperature: number().nullable().meta(readingMeta("temperature", {
|
|
64739
65207
|
precision: 1,
|
|
64740
65208
|
label: "Temperature"
|
|
64741
65209
|
})),
|
|
@@ -64999,7 +65467,7 @@ object({
|
|
|
64999
65467
|
/** Speed tokens the hardware accepts — drives the UI selector. */
|
|
65000
65468
|
availableFanSpeeds: array(string()),
|
|
65001
65469
|
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
65002
|
-
|
|
65470
|
+
progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
65003
65471
|
/** Current error code (0 / null = no error). */
|
|
65004
65472
|
errorCode: number().nullable().meta(readingMeta("none")),
|
|
65005
65473
|
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
@@ -65940,6 +66408,104 @@ Object.freeze({
|
|
|
65940
66408
|
access: "create",
|
|
65941
66409
|
role: "admin"
|
|
65942
66410
|
},
|
|
66411
|
+
"actions.create": {
|
|
66412
|
+
capName: "actions",
|
|
66413
|
+
capScope: "system",
|
|
66414
|
+
addonId: null,
|
|
66415
|
+
access: "create",
|
|
66416
|
+
role: "admin"
|
|
66417
|
+
},
|
|
66418
|
+
"actions.delete": {
|
|
66419
|
+
capName: "actions",
|
|
66420
|
+
capScope: "system",
|
|
66421
|
+
addonId: null,
|
|
66422
|
+
access: "delete",
|
|
66423
|
+
role: "admin"
|
|
66424
|
+
},
|
|
66425
|
+
"actions.get": {
|
|
66426
|
+
capName: "actions",
|
|
66427
|
+
capScope: "system",
|
|
66428
|
+
addonId: null,
|
|
66429
|
+
access: "view",
|
|
66430
|
+
role: "viewer"
|
|
66431
|
+
},
|
|
66432
|
+
"actions.getLinks": {
|
|
66433
|
+
capName: "actions",
|
|
66434
|
+
capScope: "system",
|
|
66435
|
+
addonId: null,
|
|
66436
|
+
access: "view",
|
|
66437
|
+
role: "admin"
|
|
66438
|
+
},
|
|
66439
|
+
"actions.getTraces": {
|
|
66440
|
+
capName: "actions",
|
|
66441
|
+
capScope: "system",
|
|
66442
|
+
addonId: null,
|
|
66443
|
+
access: "view",
|
|
66444
|
+
role: "admin"
|
|
66445
|
+
},
|
|
66446
|
+
"actions.list": {
|
|
66447
|
+
capName: "actions",
|
|
66448
|
+
capScope: "system",
|
|
66449
|
+
addonId: null,
|
|
66450
|
+
access: "view",
|
|
66451
|
+
role: "admin"
|
|
66452
|
+
},
|
|
66453
|
+
"actions.listForCamera": {
|
|
66454
|
+
capName: "actions",
|
|
66455
|
+
capScope: "system",
|
|
66456
|
+
addonId: null,
|
|
66457
|
+
access: "view",
|
|
66458
|
+
role: "viewer"
|
|
66459
|
+
},
|
|
66460
|
+
"actions.run": {
|
|
66461
|
+
capName: "actions",
|
|
66462
|
+
capScope: "system",
|
|
66463
|
+
addonId: null,
|
|
66464
|
+
access: "create",
|
|
66465
|
+
role: "viewer"
|
|
66466
|
+
},
|
|
66467
|
+
"actions.setLinks": {
|
|
66468
|
+
capName: "actions",
|
|
66469
|
+
capScope: "system",
|
|
66470
|
+
addonId: null,
|
|
66471
|
+
access: "create",
|
|
66472
|
+
role: "admin"
|
|
66473
|
+
},
|
|
66474
|
+
"actions.stop": {
|
|
66475
|
+
capName: "actions",
|
|
66476
|
+
capScope: "system",
|
|
66477
|
+
addonId: null,
|
|
66478
|
+
access: "create",
|
|
66479
|
+
role: "admin"
|
|
66480
|
+
},
|
|
66481
|
+
"actions.update": {
|
|
66482
|
+
capName: "actions",
|
|
66483
|
+
capScope: "system",
|
|
66484
|
+
addonId: null,
|
|
66485
|
+
access: "create",
|
|
66486
|
+
role: "admin"
|
|
66487
|
+
},
|
|
66488
|
+
"actionSource.listActions": {
|
|
66489
|
+
capName: "action-source",
|
|
66490
|
+
capScope: "system",
|
|
66491
|
+
addonId: null,
|
|
66492
|
+
access: "view",
|
|
66493
|
+
role: "admin"
|
|
66494
|
+
},
|
|
66495
|
+
"actionSource.runAction": {
|
|
66496
|
+
capName: "action-source",
|
|
66497
|
+
capScope: "system",
|
|
66498
|
+
addonId: null,
|
|
66499
|
+
access: "create",
|
|
66500
|
+
role: "admin"
|
|
66501
|
+
},
|
|
66502
|
+
"actionSource.stopAction": {
|
|
66503
|
+
capName: "action-source",
|
|
66504
|
+
capScope: "system",
|
|
66505
|
+
addonId: null,
|
|
66506
|
+
access: "create",
|
|
66507
|
+
role: "admin"
|
|
66508
|
+
},
|
|
65943
66509
|
"addonPages.listPages": {
|
|
65944
66510
|
capName: "addon-pages",
|
|
65945
66511
|
capScope: "system",
|
|
@@ -67221,6 +67787,13 @@ Object.freeze({
|
|
|
67221
67787
|
access: "view",
|
|
67222
67788
|
role: "admin"
|
|
67223
67789
|
},
|
|
67790
|
+
"coreBlocks.getAutomationRunState": {
|
|
67791
|
+
capName: "core-blocks",
|
|
67792
|
+
capScope: "system",
|
|
67793
|
+
addonId: null,
|
|
67794
|
+
access: "view",
|
|
67795
|
+
role: "admin"
|
|
67796
|
+
},
|
|
67224
67797
|
"coreBlocks.getBlockSettings": {
|
|
67225
67798
|
capName: "core-blocks",
|
|
67226
67799
|
capScope: "system",
|
|
@@ -67242,6 +67815,13 @@ Object.freeze({
|
|
|
67242
67815
|
access: "view",
|
|
67243
67816
|
role: "admin"
|
|
67244
67817
|
},
|
|
67818
|
+
"coreBlocks.getTraces": {
|
|
67819
|
+
capName: "core-blocks",
|
|
67820
|
+
capScope: "system",
|
|
67821
|
+
addonId: null,
|
|
67822
|
+
access: "view",
|
|
67823
|
+
role: "admin"
|
|
67824
|
+
},
|
|
67245
67825
|
"coreBlocks.getTypeDefs": {
|
|
67246
67826
|
capName: "core-blocks",
|
|
67247
67827
|
capScope: "system",
|
|
@@ -67277,6 +67857,13 @@ Object.freeze({
|
|
|
67277
67857
|
access: "create",
|
|
67278
67858
|
role: "admin"
|
|
67279
67859
|
},
|
|
67860
|
+
"coreBlocks.reportAutomationRun": {
|
|
67861
|
+
capName: "core-blocks",
|
|
67862
|
+
capScope: "system",
|
|
67863
|
+
addonId: null,
|
|
67864
|
+
access: "create",
|
|
67865
|
+
role: "admin"
|
|
67866
|
+
},
|
|
67280
67867
|
"coreBlocks.restart": {
|
|
67281
67868
|
capName: "core-blocks",
|
|
67282
67869
|
capScope: "system",
|
|
@@ -75850,7 +76437,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75850
76437
|
label: t("Full brightness", "Luminosità massima"),
|
|
75851
76438
|
phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
|
|
75852
76439
|
icon: "sun",
|
|
75853
|
-
args: {
|
|
76440
|
+
args: { level: 100 }
|
|
75854
76441
|
},
|
|
75855
76442
|
{
|
|
75856
76443
|
id: "brightness.half",
|
|
@@ -75858,7 +76445,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75858
76445
|
label: t("Half brightness", "Luminosità a metà"),
|
|
75859
76446
|
phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
|
|
75860
76447
|
icon: "sun-dim",
|
|
75861
|
-
args: {
|
|
76448
|
+
args: { level: 50 }
|
|
75862
76449
|
},
|
|
75863
76450
|
{
|
|
75864
76451
|
id: "brightness.off",
|
|
@@ -75866,16 +76453,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75866
76453
|
label: t("Brightness off", "Luminosità a zero"),
|
|
75867
76454
|
phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
|
|
75868
76455
|
icon: "lightbulb-off",
|
|
75869
|
-
args: {
|
|
76456
|
+
args: { level: 0 }
|
|
75870
76457
|
},
|
|
75871
76458
|
{
|
|
75872
76459
|
id: "brightness.set",
|
|
75873
76460
|
method: "setBrightness",
|
|
75874
76461
|
label: t("Set brightness", "Imposta la luminosità"),
|
|
75875
|
-
phrase: t("Set the brightness of {device} to {
|
|
76462
|
+
phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
|
|
75876
76463
|
icon: "sun-medium",
|
|
75877
76464
|
openArgs: [{
|
|
75878
|
-
key: "
|
|
76465
|
+
key: "level",
|
|
75879
76466
|
label: PERCENT,
|
|
75880
76467
|
offer: {
|
|
75881
76468
|
kind: "number",
|
|
@@ -75889,13 +76476,13 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75889
76476
|
],
|
|
75890
76477
|
state: [{
|
|
75891
76478
|
kind: "numeric",
|
|
75892
|
-
field: "
|
|
76479
|
+
field: "level",
|
|
75893
76480
|
quantity: t("the brightness", "la luminosità"),
|
|
75894
76481
|
label: t("Brightness", "Luminosità"),
|
|
75895
76482
|
unit: "%",
|
|
75896
76483
|
icon: "sun"
|
|
75897
76484
|
}],
|
|
75898
|
-
events: { onBrightnessChanged: { notOperatorFacing: "the `
|
|
76485
|
+
events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
|
|
75899
76486
|
},
|
|
75900
76487
|
color: {
|
|
75901
76488
|
scope: "device",
|
|
@@ -75909,7 +76496,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75909
76496
|
icon: "sun",
|
|
75910
76497
|
args: { color: {
|
|
75911
76498
|
mode: "mired",
|
|
75912
|
-
|
|
76499
|
+
colorTemperature: 370
|
|
75913
76500
|
} }
|
|
75914
76501
|
},
|
|
75915
76502
|
{
|
|
@@ -75920,7 +76507,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
75920
76507
|
icon: "snowflake",
|
|
75921
76508
|
args: { color: {
|
|
75922
76509
|
mode: "mired",
|
|
75923
|
-
|
|
76510
|
+
colorTemperature: 200
|
|
75924
76511
|
} }
|
|
75925
76512
|
},
|
|
75926
76513
|
{
|
|
@@ -76534,7 +77121,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76534
77121
|
label: t("Fan off", "Ventilatore spento"),
|
|
76535
77122
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
76536
77123
|
icon: "power-off",
|
|
76537
|
-
args: {
|
|
77124
|
+
args: { speed: 0 }
|
|
76538
77125
|
},
|
|
76539
77126
|
{
|
|
76540
77127
|
id: "fan.full",
|
|
@@ -76542,16 +77129,16 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76542
77129
|
label: t("Fan full", "Ventilatore al massimo"),
|
|
76543
77130
|
phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
|
|
76544
77131
|
icon: "fan",
|
|
76545
|
-
args: {
|
|
77132
|
+
args: { speed: 100 }
|
|
76546
77133
|
},
|
|
76547
77134
|
{
|
|
76548
77135
|
id: "fan.speed",
|
|
76549
77136
|
method: "setPercentage",
|
|
76550
77137
|
label: t("Set speed", "Imposta la velocità"),
|
|
76551
|
-
phrase: t("Set the speed of {device} to {
|
|
77138
|
+
phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
|
|
76552
77139
|
icon: "fan",
|
|
76553
77140
|
openArgs: [{
|
|
76554
|
-
key: "
|
|
77141
|
+
key: "speed",
|
|
76555
77142
|
label: t("Speed", "Velocità"),
|
|
76556
77143
|
offer: {
|
|
76557
77144
|
kind: "number",
|
|
@@ -76613,7 +77200,7 @@ var ACTUATOR_CAP_VOCABULARY = {
|
|
|
76613
77200
|
],
|
|
76614
77201
|
state: [{
|
|
76615
77202
|
kind: "numeric",
|
|
76616
|
-
field: "
|
|
77203
|
+
field: "speed",
|
|
76617
77204
|
quantity: t("the speed", "la velocità"),
|
|
76618
77205
|
label: t("Speed", "Velocità"),
|
|
76619
77206
|
unit: "%",
|
|
@@ -77411,7 +77998,7 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77411
77998
|
},
|
|
77412
77999
|
{
|
|
77413
78000
|
kind: "numeric",
|
|
77414
|
-
field: "
|
|
78001
|
+
field: "progress",
|
|
77415
78002
|
quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
|
|
77416
78003
|
label: t("Progress", "Avanzamento"),
|
|
77417
78004
|
unit: "%",
|
|
@@ -77769,10 +78356,10 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77769
78356
|
id: "media.seek",
|
|
77770
78357
|
method: "seek",
|
|
77771
78358
|
label: t("Seek", "Vai al punto"),
|
|
77772
|
-
phrase: t("Move {device} to {
|
|
78359
|
+
phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
|
|
77773
78360
|
icon: "fast-forward",
|
|
77774
78361
|
openArgs: [{
|
|
77775
|
-
key: "
|
|
78362
|
+
key: "position",
|
|
77776
78363
|
label: t("Position", "Posizione"),
|
|
77777
78364
|
offer: {
|
|
77778
78365
|
kind: "number",
|
|
@@ -78821,7 +79408,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78821
79408
|
state: [
|
|
78822
79409
|
{
|
|
78823
79410
|
kind: "numeric",
|
|
78824
|
-
field: "
|
|
79411
|
+
field: "co2",
|
|
78825
79412
|
quantity: t("the CO₂", "la CO₂"),
|
|
78826
79413
|
label: t("CO₂", "CO₂"),
|
|
78827
79414
|
unit: "ppm",
|
|
@@ -78829,7 +79416,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78829
79416
|
},
|
|
78830
79417
|
{
|
|
78831
79418
|
kind: "numeric",
|
|
78832
|
-
field: "
|
|
79419
|
+
field: "voc",
|
|
78833
79420
|
quantity: t("the VOC level", "il livello di COV"),
|
|
78834
79421
|
label: t("VOC", "COV"),
|
|
78835
79422
|
unit: "ppb",
|
|
@@ -78865,7 +79452,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78865
79452
|
noun: t("Light level", "Luminosità ambiente"),
|
|
78866
79453
|
state: [{
|
|
78867
79454
|
kind: "numeric",
|
|
78868
|
-
field: "
|
|
79455
|
+
field: "illuminance",
|
|
78869
79456
|
quantity: t("the light level", "la luminosità"),
|
|
78870
79457
|
label: t("Illuminance", "Illuminamento"),
|
|
78871
79458
|
unit: "lx",
|
|
@@ -79068,7 +79655,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79068
79655
|
noun: t("Humidity", "Umidità"),
|
|
79069
79656
|
state: [{
|
|
79070
79657
|
kind: "numeric",
|
|
79071
|
-
field: "
|
|
79658
|
+
field: "humidity",
|
|
79072
79659
|
quantity: t("the humidity", "l’umidità"),
|
|
79073
79660
|
label: t("Humidity", "Umidità"),
|
|
79074
79661
|
unit: "%",
|
|
@@ -79116,7 +79703,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79116
79703
|
state: [
|
|
79117
79704
|
{
|
|
79118
79705
|
kind: "numeric",
|
|
79119
|
-
field: "
|
|
79706
|
+
field: "power",
|
|
79120
79707
|
quantity: t("the power draw", "il consumo"),
|
|
79121
79708
|
label: t("Power", "Potenza"),
|
|
79122
79709
|
unit: "W",
|
|
@@ -79124,7 +79711,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79124
79711
|
},
|
|
79125
79712
|
{
|
|
79126
79713
|
kind: "numeric",
|
|
79127
|
-
field: "
|
|
79714
|
+
field: "energy",
|
|
79128
79715
|
quantity: t("the energy used", "l’energia consumata"),
|
|
79129
79716
|
label: t("Energy", "Energia"),
|
|
79130
79717
|
unit: "kWh",
|
|
@@ -79132,7 +79719,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79132
79719
|
},
|
|
79133
79720
|
{
|
|
79134
79721
|
kind: "numeric",
|
|
79135
|
-
field: "
|
|
79722
|
+
field: "voltage",
|
|
79136
79723
|
quantity: t("the voltage", "la tensione"),
|
|
79137
79724
|
label: t("Voltage", "Tensione"),
|
|
79138
79725
|
unit: "V",
|
|
@@ -79140,7 +79727,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79140
79727
|
},
|
|
79141
79728
|
{
|
|
79142
79729
|
kind: "numeric",
|
|
79143
|
-
field: "
|
|
79730
|
+
field: "current",
|
|
79144
79731
|
quantity: t("the current", "la corrente"),
|
|
79145
79732
|
label: t("Current", "Corrente"),
|
|
79146
79733
|
unit: "A",
|
|
@@ -79157,13 +79744,6 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79157
79744
|
label: t("Where", "Posizione"),
|
|
79158
79745
|
phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
|
|
79159
79746
|
icon: "map-pin"
|
|
79160
|
-
}, {
|
|
79161
|
-
kind: "numeric",
|
|
79162
|
-
field: "batteryPercent",
|
|
79163
|
-
quantity: t("the phone battery", "la batteria del telefono"),
|
|
79164
|
-
label: t("Battery", "Batteria"),
|
|
79165
|
-
unit: "%",
|
|
79166
|
-
icon: "battery"
|
|
79167
79747
|
}]
|
|
79168
79748
|
},
|
|
79169
79749
|
"pressure-sensor": {
|
|
@@ -79171,7 +79751,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79171
79751
|
noun: t("Pressure", "Pressione"),
|
|
79172
79752
|
state: [{
|
|
79173
79753
|
kind: "numeric",
|
|
79174
|
-
field: "
|
|
79754
|
+
field: "pressure",
|
|
79175
79755
|
quantity: t("the pressure", "la pressione"),
|
|
79176
79756
|
label: t("Pressure", "Pressione"),
|
|
79177
79757
|
unit: "hPa",
|
|
@@ -79207,7 +79787,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79207
79787
|
noun: t("Temperature", "Temperatura"),
|
|
79208
79788
|
state: [{
|
|
79209
79789
|
kind: "numeric",
|
|
79210
|
-
field: "
|
|
79790
|
+
field: "temperature",
|
|
79211
79791
|
quantity: t("the temperature", "la temperatura"),
|
|
79212
79792
|
label: t("Temperature", "Temperatura"),
|
|
79213
79793
|
unit: "°C",
|
|
@@ -79278,7 +79858,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79278
79858
|
state: [
|
|
79279
79859
|
{
|
|
79280
79860
|
kind: "numeric",
|
|
79281
|
-
field: "
|
|
79861
|
+
field: "level",
|
|
79282
79862
|
quantity: t("the battery level", "il livello della batteria"),
|
|
79283
79863
|
label: t("Battery", "Batteria"),
|
|
79284
79864
|
unit: "%",
|
|
@@ -79320,7 +79900,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79320
79900
|
icon: "battery-charging"
|
|
79321
79901
|
}
|
|
79322
79902
|
],
|
|
79323
|
-
events: { onStatusChanged: { notOperatorFacing: "the
|
|
79903
|
+
events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
|
|
79324
79904
|
extraEvents: [{
|
|
79325
79905
|
category: EventCategory.DeviceAwake,
|
|
79326
79906
|
label: t("Woke up", "Risvegliato"),
|
|
@@ -79338,7 +79918,7 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79338
79918
|
noun: t("Network link", "Collegamento di rete"),
|
|
79339
79919
|
state: [{
|
|
79340
79920
|
kind: "numeric",
|
|
79341
|
-
field: "
|
|
79921
|
+
field: "signal",
|
|
79342
79922
|
quantity: t("the signal strength", "l’intensità del segnale"),
|
|
79343
79923
|
label: t("Signal", "Segnale"),
|
|
79344
79924
|
unit: "%",
|
|
@@ -79431,6 +80011,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79431
80011
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79432
80012
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79433
80013
|
var SYSTEM_CAP_VOCABULARY = {
|
|
80014
|
+
"action-source": system(INTERNAL),
|
|
80015
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79434
80016
|
"addon-pages": system(UI_PLUMBING),
|
|
79435
80017
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79436
80018
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79652,6 +80234,31 @@ Object.freeze({
|
|
|
79652
80234
|
form: "single",
|
|
79653
80235
|
optional: false
|
|
79654
80236
|
}],
|
|
80237
|
+
"actions.get": [{
|
|
80238
|
+
name: "deviceId",
|
|
80239
|
+
form: "single",
|
|
80240
|
+
optional: true
|
|
80241
|
+
}],
|
|
80242
|
+
"actions.getLinks": [{
|
|
80243
|
+
name: "deviceId",
|
|
80244
|
+
form: "single",
|
|
80245
|
+
optional: false
|
|
80246
|
+
}],
|
|
80247
|
+
"actions.listForCamera": [{
|
|
80248
|
+
name: "deviceId",
|
|
80249
|
+
form: "single",
|
|
80250
|
+
optional: false
|
|
80251
|
+
}],
|
|
80252
|
+
"actions.run": [{
|
|
80253
|
+
name: "deviceId",
|
|
80254
|
+
form: "single",
|
|
80255
|
+
optional: true
|
|
80256
|
+
}],
|
|
80257
|
+
"actions.setLinks": [{
|
|
80258
|
+
name: "deviceId",
|
|
80259
|
+
form: "single",
|
|
80260
|
+
optional: false
|
|
80261
|
+
}],
|
|
79655
80262
|
"addonSettings.getDeviceSettings": [{
|
|
79656
80263
|
name: "deviceId",
|
|
79657
80264
|
form: "single",
|
|
@@ -83733,6 +84340,7 @@ DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
|
83733
84340
|
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
83734
84341
|
DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
|
|
83735
84342
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
84343
|
+
String.raw`(?<=^|["'(\s>,\[{])`;
|
|
83736
84344
|
var MB = 1024 * 1024;
|
|
83737
84345
|
1024 * MB, 3072 * MB;
|
|
83738
84346
|
//#endregion
|
|
@@ -83883,7 +84491,7 @@ var TRAIT_CATALOG = [
|
|
|
83883
84491
|
attributes: () => ({}),
|
|
83884
84492
|
projectState: (rawStatus) => {
|
|
83885
84493
|
const parsed = BrightnessStatusSchema.safeParse(rawStatus);
|
|
83886
|
-
return parsed.success ? { brightness: Math.round(parsed.data.
|
|
84494
|
+
return parsed.success ? { brightness: Math.round(parsed.data.level) } : null;
|
|
83887
84495
|
},
|
|
83888
84496
|
commands: ["action.devices.commands.BrightnessAbsolute"],
|
|
83889
84497
|
resolveCommand: ({ deviceId, command, params }) => {
|