@camstack/addon-provider-homeassistant 1.2.644 → 1.2.645
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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{ha-broker-source-tDtT7Zi-.js → ha-broker-source-DAoZm6wm.js} +412 -154
- package/dist/{ha-broker-source-DmHRCdW2.mjs → ha-broker-source-DLhSaXYb.mjs} +412 -154
- package/dist/ha-export/ha-export.addon.js +5 -1
- package/dist/ha-export/ha-export.addon.mjs +5 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
1
|
+
//#region ../types/dist/event-category-BmPm98n0.mjs
|
|
2
2
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
3
3
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4
4
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -482,6 +482,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
482
482
|
EventCategory["RunningStarted"] = "running.started";
|
|
483
483
|
/** Mirrors `runningStateCapability.events.onFinished`. */
|
|
484
484
|
EventCategory["RunningFinished"] = "running.finished";
|
|
485
|
+
/** Mirrors `deviceRunsCapability.events.onRunOpened` - a durable run record opened. */
|
|
486
|
+
EventCategory["DeviceRunOpened"] = "device-run.opened";
|
|
487
|
+
/** Mirrors `deviceRunsCapability.events.onRunClosed` - a durable run record closed. */
|
|
488
|
+
EventCategory["DeviceRunClosed"] = "device-run.closed";
|
|
485
489
|
/**
|
|
486
490
|
* Cap event fired by every device that registers the `event-emitter`
|
|
487
491
|
* capability. Mirrors `eventEmitterCapability.events.onEvent`. Carries
|
|
@@ -5963,7 +5967,7 @@ var ZodIssueCode = {
|
|
|
5963
5967
|
var ZodFirstPartyTypeKind;
|
|
5964
5968
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5965
5969
|
//#endregion
|
|
5966
|
-
//#region ../types/dist/sleep-
|
|
5970
|
+
//#region ../types/dist/sleep-BKzhQTSm.mjs
|
|
5967
5971
|
/**
|
|
5968
5972
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5969
5973
|
* window to float samples (D455).
|
|
@@ -9704,6 +9708,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
9704
9708
|
"device-ops",
|
|
9705
9709
|
"device-provider",
|
|
9706
9710
|
"device-removal-hook",
|
|
9711
|
+
"device-runs",
|
|
9707
9712
|
"device-state",
|
|
9708
9713
|
"device-status",
|
|
9709
9714
|
"dishwasher",
|
|
@@ -11648,7 +11653,7 @@ object({
|
|
|
11648
11653
|
params: record(string(), union([string(), number()])).optional()
|
|
11649
11654
|
});
|
|
11650
11655
|
//#endregion
|
|
11651
|
-
//#region ../types/dist/composition-
|
|
11656
|
+
//#region ../types/dist/composition-BiKWlUCc.mjs
|
|
11652
11657
|
/**
|
|
11653
11658
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
11654
11659
|
*
|
|
@@ -12581,7 +12586,15 @@ var HelperSpecSchema = discriminatedUnion("kind", [
|
|
|
12581
12586
|
thresholdWatts: number().positive(),
|
|
12582
12587
|
startDwellMs: number().int().nonnegative(),
|
|
12583
12588
|
stopDwellMs: number().int().nonnegative(),
|
|
12584
|
-
member: HelperMemberSchema
|
|
12589
|
+
member: HelperMemberSchema,
|
|
12590
|
+
/**
|
|
12591
|
+
* The plug that powers the appliance (`switch.on`). Optional: when set, the
|
|
12592
|
+
* composition carries a `power-source` feature, so the hub can cut and restore
|
|
12593
|
+
* that plug (power-source link of a NEW-target composition).
|
|
12594
|
+
*/
|
|
12595
|
+
powerSwitch: HelperMemberSchema.optional(),
|
|
12596
|
+
/** How long a forced restart keeps the plug off; the cap's default when unset. */
|
|
12597
|
+
offSeconds: number().optional()
|
|
12585
12598
|
}),
|
|
12586
12599
|
object({
|
|
12587
12600
|
kind: literal("statistic"),
|
|
@@ -14123,7 +14136,13 @@ var MigrationLedgerEntrySchema = object({
|
|
|
14123
14136
|
/** Why it is `blocked` or `held` (`dependency-failed`, `snapshot-refused`, …). */
|
|
14124
14137
|
reason: string().nullable(),
|
|
14125
14138
|
nodeId: string().nullable(),
|
|
14126
|
-
bootId: string().nullable()
|
|
14139
|
+
bootId: string().nullable(),
|
|
14140
|
+
/**
|
|
14141
|
+
* The catalogued meta of this id (description, body kind, store, `dependsOn`…),
|
|
14142
|
+
* joined by the engine from the catalogues it knows this boot. Absent when no
|
|
14143
|
+
* catalogue lists the id (a newer database).
|
|
14144
|
+
*/
|
|
14145
|
+
meta: MigrationMetaSchema.optional()
|
|
14127
14146
|
});
|
|
14128
14147
|
/** A catalogued migration that is not applied, with where it stands. */
|
|
14129
14148
|
var MigrationPendingEntrySchema = object({
|
|
@@ -19930,6 +19949,14 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
19930
19949
|
}
|
|
19931
19950
|
} }
|
|
19932
19951
|
},
|
|
19952
|
+
"device-runs": {
|
|
19953
|
+
scope: "device",
|
|
19954
|
+
noun: t("Runs", "Esecuzioni"),
|
|
19955
|
+
events: {
|
|
19956
|
+
onRunOpened: { notOperatorFacing: "the durable record of a run that the running-state start flip already announces" },
|
|
19957
|
+
onRunClosed: { notOperatorFacing: "the durable record of a run that the running-state finish flip already announces" }
|
|
19958
|
+
}
|
|
19959
|
+
},
|
|
19933
19960
|
update: {
|
|
19934
19961
|
scope: "device",
|
|
19935
19962
|
noun: t("Firmware update", "Aggiornamento firmware"),
|
|
@@ -46834,6 +46861,117 @@ function actuator(input) {
|
|
|
46834
46861
|
};
|
|
46835
46862
|
}
|
|
46836
46863
|
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
46864
|
+
var PowerSourceRefusalReasonSchema = _enum([
|
|
46865
|
+
"no-power-source",
|
|
46866
|
+
"switch-missing",
|
|
46867
|
+
"switch-offline",
|
|
46868
|
+
"switch-unknown",
|
|
46869
|
+
"restart-in-progress",
|
|
46870
|
+
"switch-call-failed"
|
|
46871
|
+
]);
|
|
46872
|
+
var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
|
|
46873
|
+
accepted: literal(false),
|
|
46874
|
+
reason: PowerSourceRefusalReasonSchema,
|
|
46875
|
+
/** One line for the operator, naming the switch. */
|
|
46876
|
+
message: string()
|
|
46877
|
+
})]);
|
|
46878
|
+
var PowerSourceInfoSchema = object({
|
|
46879
|
+
/** False when the device has no power source linked; the rest is then empty. */
|
|
46880
|
+
linked: boolean(),
|
|
46881
|
+
switchDeviceId: number().nullable(),
|
|
46882
|
+
switchName: string().nullable(),
|
|
46883
|
+
/** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
|
|
46884
|
+
switchOn: boolean().nullable(),
|
|
46885
|
+
switchOnline: boolean().nullable(),
|
|
46886
|
+
restartInProgress: boolean(),
|
|
46887
|
+
offSeconds: number().int()
|
|
46888
|
+
});
|
|
46889
|
+
/** The composed slice: the switch state the link mirrors, plus the stored off time. */
|
|
46890
|
+
var PowerSourceStateSchema = object({
|
|
46891
|
+
/** Null while the switch has not reported: unknown is never `false` (D393). */
|
|
46892
|
+
switchOn: boolean().nullable(),
|
|
46893
|
+
offSeconds: number().int(),
|
|
46894
|
+
lastFetchedAt: number()
|
|
46895
|
+
});
|
|
46896
|
+
var POWER_SOURCE_DEVICE_TYPES = [
|
|
46897
|
+
DeviceType.Gateway,
|
|
46898
|
+
DeviceType.Hub,
|
|
46899
|
+
DeviceType.Camera,
|
|
46900
|
+
DeviceType.Sensor,
|
|
46901
|
+
DeviceType.MediaPlayer,
|
|
46902
|
+
DeviceType.Vacuum,
|
|
46903
|
+
DeviceType.Generic,
|
|
46904
|
+
DeviceType.Washer,
|
|
46905
|
+
DeviceType.Dryer,
|
|
46906
|
+
DeviceType.Dishwasher,
|
|
46907
|
+
DeviceType.PetFountain,
|
|
46908
|
+
DeviceType.Fan,
|
|
46909
|
+
DeviceType.Humidifier,
|
|
46910
|
+
DeviceType.Climate,
|
|
46911
|
+
DeviceType.WaterHeater
|
|
46912
|
+
];
|
|
46913
|
+
var powerSourceCustomize = {
|
|
46914
|
+
version: 1,
|
|
46915
|
+
targets: [{
|
|
46916
|
+
id: "switch",
|
|
46917
|
+
cardinality: "scalar",
|
|
46918
|
+
vocabulary: {
|
|
46919
|
+
cap: "power-source",
|
|
46920
|
+
stateField: "switchOn"
|
|
46921
|
+
},
|
|
46922
|
+
deviceTypes: POWER_SOURCE_DEVICE_TYPES,
|
|
46923
|
+
apply: "add",
|
|
46924
|
+
path: "switchOn",
|
|
46925
|
+
sources: [{
|
|
46926
|
+
kind: "switch",
|
|
46927
|
+
transforms: [{ kind: "identity" }]
|
|
46928
|
+
}],
|
|
46929
|
+
companions: [{
|
|
46930
|
+
kind: "constant",
|
|
46931
|
+
path: "offSeconds",
|
|
46932
|
+
value: 10,
|
|
46933
|
+
when: "add"
|
|
46934
|
+
}, {
|
|
46935
|
+
kind: "clock",
|
|
46936
|
+
path: "lastFetchedAt",
|
|
46937
|
+
when: "always"
|
|
46938
|
+
}],
|
|
46939
|
+
sourceReport: { status: "assignment-status" }
|
|
46940
|
+
}]
|
|
46941
|
+
};
|
|
46942
|
+
var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
|
|
46943
|
+
var powerSourceCapability = {
|
|
46944
|
+
name: "power-source",
|
|
46945
|
+
scope: "device",
|
|
46946
|
+
mode: "singleton",
|
|
46947
|
+
deviceTypes: POWER_SOURCE_DEVICE_TYPES,
|
|
46948
|
+
methods: {
|
|
46949
|
+
getStatus: systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "admin" }),
|
|
46950
|
+
powerOn: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
|
|
46951
|
+
kind: "mutation",
|
|
46952
|
+
auth: "admin"
|
|
46953
|
+
}),
|
|
46954
|
+
powerOff: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
|
|
46955
|
+
kind: "mutation",
|
|
46956
|
+
auth: "admin"
|
|
46957
|
+
}),
|
|
46958
|
+
forceRestart: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
|
|
46959
|
+
kind: "mutation",
|
|
46960
|
+
auth: "admin"
|
|
46961
|
+
})
|
|
46962
|
+
},
|
|
46963
|
+
runtimeState: PowerSourceStateSchema,
|
|
46964
|
+
customize: powerSourceCustomize,
|
|
46965
|
+
/**
|
|
46966
|
+
* Runtime-state durability: **session** — mirrored from the linked switch on
|
|
46967
|
+
* its next report; a restored value would outlive the reading it names.
|
|
46968
|
+
*
|
|
46969
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
46970
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
46971
|
+
*/
|
|
46972
|
+
durability: "session",
|
|
46973
|
+
history: "none"
|
|
46974
|
+
};
|
|
46837
46975
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
46838
46976
|
DeviceType.Camera;
|
|
46839
46977
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
@@ -48259,6 +48397,101 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
|
|
|
48259
48397
|
kind: "mutation",
|
|
48260
48398
|
auth: "admin"
|
|
48261
48399
|
});
|
|
48400
|
+
/**
|
|
48401
|
+
* device-runs - the durable record of ONE run of a device: a washing cycle, a
|
|
48402
|
+
* dishwasher cycle, later a mow or a clean (D992).
|
|
48403
|
+
*
|
|
48404
|
+
* A run is a DOCUMENT (opened at one instant, closed at another, carrying what
|
|
48405
|
+
* was measured over it), never a sample - device-history keeps the numbers over
|
|
48406
|
+
* time and its `device-runs` provider keeps these documents beside them, because
|
|
48407
|
+
* the energy of a run is a question about device-history's own series. The
|
|
48408
|
+
* record is written from the `running-state` flip on `DeviceStateChanged`; it
|
|
48409
|
+
* survives a restart (the open row is on disk) and a missed flip (boot compares
|
|
48410
|
+
* the open rows against the live snapshots).
|
|
48411
|
+
*
|
|
48412
|
+
* Every measurement is `number | null` and `null` means "could not be
|
|
48413
|
+
* measured", never `0` (D393). A run closed by the boot reconcile because the
|
|
48414
|
+
* device stopped while nobody was watching has `outcome: 'unknown'`.
|
|
48415
|
+
*/
|
|
48416
|
+
var DeviceRunKindSchema = _enum([
|
|
48417
|
+
"appliance",
|
|
48418
|
+
"mower",
|
|
48419
|
+
"vacuum"
|
|
48420
|
+
]);
|
|
48421
|
+
var DeviceRunStateSchema = _enum(["open", "closed"]);
|
|
48422
|
+
var DeviceRunOutcomeSchema = _enum([
|
|
48423
|
+
"completed",
|
|
48424
|
+
"aborted",
|
|
48425
|
+
"error",
|
|
48426
|
+
"unknown"
|
|
48427
|
+
]);
|
|
48428
|
+
/** What opened or closed the run. `reconcile` is the boot comparison against live state. */
|
|
48429
|
+
var DeviceRunSourceSchema = _enum([
|
|
48430
|
+
"running-state",
|
|
48431
|
+
"activity",
|
|
48432
|
+
"reconcile"
|
|
48433
|
+
]);
|
|
48434
|
+
/** How the energy of a run was obtained; `null` when it could not be. */
|
|
48435
|
+
var DeviceRunEnergyMethodSchema = _enum(["counter-delta", "history-integral"]);
|
|
48436
|
+
var DeviceRunPhaseSchema = object({
|
|
48437
|
+
phase: string(),
|
|
48438
|
+
at: number()
|
|
48439
|
+
});
|
|
48440
|
+
/** The kind-specific block; a later phase adds a branch, nothing else changes. */
|
|
48441
|
+
var DeviceRunDetailSchema = discriminatedUnion("kind", [object({
|
|
48442
|
+
kind: literal("appliance"),
|
|
48443
|
+
/** kWh used over the run. */
|
|
48444
|
+
energyKwh: number().nullable().meta(readingMeta("energy")),
|
|
48445
|
+
energyMethod: DeviceRunEnergyMethodSchema.nullable(),
|
|
48446
|
+
/** Highest power seen while the run was open. */
|
|
48447
|
+
peakW: number().nullable().meta(readingMeta("power")),
|
|
48448
|
+
/** Time-weighted mean power while the run was open. */
|
|
48449
|
+
avgW: number().nullable().meta(readingMeta("power")),
|
|
48450
|
+
/** The program the appliance said it ran when the run opened. */
|
|
48451
|
+
program: string().nullable(),
|
|
48452
|
+
remainingAtStartSec: number().nullable().meta(readingMeta("duration")),
|
|
48453
|
+
/** The last phase the device reported before the run closed. */
|
|
48454
|
+
finalPhase: string().nullable(),
|
|
48455
|
+
/**
|
|
48456
|
+
* The meter's energy counter when the run opened; `null` when the meter had
|
|
48457
|
+
* not said (or the run was opened late, by the boot reconcile). It lives in
|
|
48458
|
+
* the row so a run that outlives a restart still ends with `end - start`.
|
|
48459
|
+
*/
|
|
48460
|
+
energyStartKwh: number().nullable().meta(readingMeta("energy")),
|
|
48461
|
+
/** Milliseconds of power readings behind `avgW` - the weight a restart resumes the mean with. */
|
|
48462
|
+
powerObservedMs: number()
|
|
48463
|
+
})]);
|
|
48464
|
+
var DeviceRunSchema = object({
|
|
48465
|
+
/** `${deviceId}:${startedAt}`. */
|
|
48466
|
+
runId: string(),
|
|
48467
|
+
deviceId: number().int(),
|
|
48468
|
+
kind: DeviceRunKindSchema,
|
|
48469
|
+
state: DeviceRunStateSchema,
|
|
48470
|
+
startedAt: number(),
|
|
48471
|
+
endedAt: number().nullable(),
|
|
48472
|
+
durationMs: number().nullable(),
|
|
48473
|
+
outcome: DeviceRunOutcomeSchema.nullable(),
|
|
48474
|
+
startSource: DeviceRunSourceSchema,
|
|
48475
|
+
endSource: DeviceRunSourceSchema.nullable(),
|
|
48476
|
+
/** Where the device's running bit came from (`running-state.source`); `null` when it did not say. */
|
|
48477
|
+
runningSource: _enum(["native", "assigned"]).nullable(),
|
|
48478
|
+
phases: array(DeviceRunPhaseSchema),
|
|
48479
|
+
detail: DeviceRunDetailSchema
|
|
48480
|
+
});
|
|
48481
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, method(object({
|
|
48482
|
+
deviceId: number().int(),
|
|
48483
|
+
outcome: DeviceRunOutcomeSchema.optional(),
|
|
48484
|
+
atFrom: number().optional(),
|
|
48485
|
+
atTo: number().optional(),
|
|
48486
|
+
limit: number().int().positive().max(200).default(50),
|
|
48487
|
+
cursor: string().optional()
|
|
48488
|
+
}), object({
|
|
48489
|
+
runs: array(DeviceRunSchema).readonly(),
|
|
48490
|
+
nextCursor: string().nullable()
|
|
48491
|
+
})), method(object({
|
|
48492
|
+
deviceId: number().int(),
|
|
48493
|
+
runId: string()
|
|
48494
|
+
}), DeviceRunSchema.nullable()), method(object({ deviceId: number().int() }), DeviceRunSchema.nullable());
|
|
48262
48495
|
var DeviceCaStatusSchema = discriminatedUnion("state", [
|
|
48263
48496
|
object({ state: literal("absent") }),
|
|
48264
48497
|
object({
|
|
@@ -48394,8 +48627,8 @@ method(object({}), object({
|
|
|
48394
48627
|
});
|
|
48395
48628
|
var KeychainKeySourceSchema = object({
|
|
48396
48629
|
kind: _enum([
|
|
48397
|
-
"
|
|
48398
|
-
"previous-
|
|
48630
|
+
"mounted-file",
|
|
48631
|
+
"previous-mounted-file",
|
|
48399
48632
|
"platform",
|
|
48400
48633
|
"default-file"
|
|
48401
48634
|
]),
|
|
@@ -52954,7 +53187,8 @@ var PALETTE_ENTRY_IDS = [
|
|
|
52954
53187
|
"switch",
|
|
52955
53188
|
"siren",
|
|
52956
53189
|
"button",
|
|
52957
|
-
"doorbell"
|
|
53190
|
+
"doorbell",
|
|
53191
|
+
"appliance-cycle"
|
|
52958
53192
|
];
|
|
52959
53193
|
var AUDIO_ENTRY_ID = "audio";
|
|
52960
53194
|
/** Six rungs, quiet → loud. The opaque end is the entry's hex. */
|
|
@@ -53025,7 +53259,8 @@ var CAMSTACK_HEX = {
|
|
|
53025
53259
|
switch: "#7a812a",
|
|
53026
53260
|
siren: "#ac5d7f",
|
|
53027
53261
|
button: "#b276cd",
|
|
53028
|
-
doorbell: "#0087ab"
|
|
53262
|
+
doorbell: "#0087ab",
|
|
53263
|
+
"appliance-cycle": "#2a8c8c"
|
|
53029
53264
|
};
|
|
53030
53265
|
var CAMSTACK_FALLBACK = [
|
|
53031
53266
|
"#b34dc7",
|
|
@@ -53090,7 +53325,8 @@ var HIGH_CONTRAST_HEX = {
|
|
|
53090
53325
|
switch: "#d05259",
|
|
53091
53326
|
siren: "#cd67b3",
|
|
53092
53327
|
button: "#c9746a",
|
|
53093
|
-
doorbell: "#338eeb"
|
|
53328
|
+
doorbell: "#338eeb",
|
|
53329
|
+
"appliance-cycle": "#00848a"
|
|
53094
53330
|
};
|
|
53095
53331
|
var HIGH_CONTRAST_FALLBACK = [
|
|
53096
53332
|
"#817f3b",
|
|
@@ -53155,7 +53391,8 @@ var OKABE_ITO_HEX = {
|
|
|
53155
53391
|
switch: "#ad2c4e",
|
|
53156
53392
|
siren: "#348e08",
|
|
53157
53393
|
button: "#d27303",
|
|
53158
|
-
doorbell: "#55770f"
|
|
53394
|
+
doorbell: "#55770f",
|
|
53395
|
+
"appliance-cycle": "#00737d"
|
|
53159
53396
|
};
|
|
53160
53397
|
var OKABE_ITO_FALLBACK = [
|
|
53161
53398
|
"#9a3784",
|
|
@@ -53364,6 +53601,7 @@ sub("switch", "control", "control", "switch", "Switch");
|
|
|
53364
53601
|
sub("siren", "control", "control", "siren", "Siren");
|
|
53365
53602
|
sub("button", "control", "control", "button", "Button");
|
|
53366
53603
|
sub("doorbell", "control", "control", "doorbell", "Doorbell");
|
|
53604
|
+
sub("appliance-cycle", "control", "control", "switch", "Appliance cycle");
|
|
53367
53605
|
for (const l of AUDIO_MACRO_LABELS) {
|
|
53368
53606
|
const kind = `audio-${l.id}`;
|
|
53369
53607
|
if (entries.has(kind)) continue;
|
|
@@ -62011,7 +62249,8 @@ var CAP_TO_KIND = {
|
|
|
62011
62249
|
cover: "cover",
|
|
62012
62250
|
switch: "switch",
|
|
62013
62251
|
button: "button",
|
|
62014
|
-
doorbell: "doorbell"
|
|
62252
|
+
doorbell: "doorbell",
|
|
62253
|
+
"running-state": "appliance-cycle"
|
|
62015
62254
|
};
|
|
62016
62255
|
function buildDescriptor(capName, kind) {
|
|
62017
62256
|
const t = EVENT_TAXONOMY[kind];
|
|
@@ -65213,10 +65452,7 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
65213
65452
|
}), InstallPackageResultSchema, {
|
|
65214
65453
|
kind: "mutation",
|
|
65215
65454
|
auth: "admin"
|
|
65216
|
-
}), method(object({
|
|
65217
|
-
kind: "mutation",
|
|
65218
|
-
auth: "admin"
|
|
65219
|
-
}), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
|
|
65455
|
+
}), method(object({
|
|
65220
65456
|
packageName: string().min(1),
|
|
65221
65457
|
nodeId: string().optional(),
|
|
65222
65458
|
everywhere: boolean().optional()
|
|
@@ -66477,19 +66713,19 @@ var RemoteSetConfigResultSchema = discriminatedUnion("status", [object({ status:
|
|
|
66477
66713
|
reason: _enum(["unknown-template", "not-a-media-player"]),
|
|
66478
66714
|
detail: string()
|
|
66479
66715
|
})]);
|
|
66480
|
-
var deviceInput
|
|
66716
|
+
var deviceInput = object({ deviceId: number().int().nonnegative() });
|
|
66481
66717
|
DeviceType.MediaPlayer;
|
|
66482
|
-
method(deviceInput
|
|
66718
|
+
method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
|
|
66483
66719
|
kind: "mutation",
|
|
66484
66720
|
auth: "admin"
|
|
66485
|
-
}), method(deviceInput
|
|
66721
|
+
}), method(deviceInput, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput.extend({
|
|
66486
66722
|
role: RemoteRoleSchema,
|
|
66487
66723
|
/** Sends in a row (volume steps). */
|
|
66488
66724
|
repeat: number().int().min(1).max(50).default(1)
|
|
66489
66725
|
}), RemoteSendResultSchema, {
|
|
66490
66726
|
kind: "mutation",
|
|
66491
66727
|
auth: "protected"
|
|
66492
|
-
}), method(deviceInput
|
|
66728
|
+
}), method(deviceInput.extend({
|
|
66493
66729
|
command: RemoteMediaCommandSchema,
|
|
66494
66730
|
muted: boolean().optional(),
|
|
66495
66731
|
source: string().optional(),
|
|
@@ -70852,117 +71088,6 @@ var lockControlCapability = {
|
|
|
70852
71088
|
* whether persisting is worth a SQLite commit. */
|
|
70853
71089
|
volatileStateFields: ["lastChangedAt"]
|
|
70854
71090
|
};
|
|
70855
|
-
var PowerSourceRefusalReasonSchema = _enum([
|
|
70856
|
-
"no-power-source",
|
|
70857
|
-
"switch-missing",
|
|
70858
|
-
"switch-offline",
|
|
70859
|
-
"switch-unknown",
|
|
70860
|
-
"restart-in-progress",
|
|
70861
|
-
"switch-call-failed"
|
|
70862
|
-
]);
|
|
70863
|
-
var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
|
|
70864
|
-
accepted: literal(false),
|
|
70865
|
-
reason: PowerSourceRefusalReasonSchema,
|
|
70866
|
-
/** One line for the operator, naming the switch. */
|
|
70867
|
-
message: string()
|
|
70868
|
-
})]);
|
|
70869
|
-
var PowerSourceInfoSchema = object({
|
|
70870
|
-
/** False when the device has no power source linked; the rest is then empty. */
|
|
70871
|
-
linked: boolean(),
|
|
70872
|
-
switchDeviceId: number().nullable(),
|
|
70873
|
-
switchName: string().nullable(),
|
|
70874
|
-
/** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
|
|
70875
|
-
switchOn: boolean().nullable(),
|
|
70876
|
-
switchOnline: boolean().nullable(),
|
|
70877
|
-
restartInProgress: boolean(),
|
|
70878
|
-
offSeconds: number().int()
|
|
70879
|
-
});
|
|
70880
|
-
/** The composed slice: the switch state the link mirrors, plus the stored off time. */
|
|
70881
|
-
var PowerSourceStateSchema = object({
|
|
70882
|
-
/** Null while the switch has not reported: unknown is never `false` (D393). */
|
|
70883
|
-
switchOn: boolean().nullable(),
|
|
70884
|
-
offSeconds: number().int(),
|
|
70885
|
-
lastFetchedAt: number()
|
|
70886
|
-
});
|
|
70887
|
-
var POWER_SOURCE_DEVICE_TYPES = [
|
|
70888
|
-
DeviceType.Gateway,
|
|
70889
|
-
DeviceType.Hub,
|
|
70890
|
-
DeviceType.Camera,
|
|
70891
|
-
DeviceType.Sensor,
|
|
70892
|
-
DeviceType.MediaPlayer,
|
|
70893
|
-
DeviceType.Vacuum,
|
|
70894
|
-
DeviceType.Generic,
|
|
70895
|
-
DeviceType.Washer,
|
|
70896
|
-
DeviceType.Dryer,
|
|
70897
|
-
DeviceType.Dishwasher,
|
|
70898
|
-
DeviceType.PetFountain,
|
|
70899
|
-
DeviceType.Fan,
|
|
70900
|
-
DeviceType.Humidifier,
|
|
70901
|
-
DeviceType.Climate,
|
|
70902
|
-
DeviceType.WaterHeater
|
|
70903
|
-
];
|
|
70904
|
-
var powerSourceCustomize = {
|
|
70905
|
-
version: 1,
|
|
70906
|
-
targets: [{
|
|
70907
|
-
id: "switch",
|
|
70908
|
-
cardinality: "scalar",
|
|
70909
|
-
vocabulary: {
|
|
70910
|
-
cap: "power-source",
|
|
70911
|
-
stateField: "switchOn"
|
|
70912
|
-
},
|
|
70913
|
-
deviceTypes: POWER_SOURCE_DEVICE_TYPES,
|
|
70914
|
-
apply: "add",
|
|
70915
|
-
path: "switchOn",
|
|
70916
|
-
sources: [{
|
|
70917
|
-
kind: "switch",
|
|
70918
|
-
transforms: [{ kind: "identity" }]
|
|
70919
|
-
}],
|
|
70920
|
-
companions: [{
|
|
70921
|
-
kind: "constant",
|
|
70922
|
-
path: "offSeconds",
|
|
70923
|
-
value: 10,
|
|
70924
|
-
when: "add"
|
|
70925
|
-
}, {
|
|
70926
|
-
kind: "clock",
|
|
70927
|
-
path: "lastFetchedAt",
|
|
70928
|
-
when: "always"
|
|
70929
|
-
}],
|
|
70930
|
-
sourceReport: { status: "assignment-status" }
|
|
70931
|
-
}]
|
|
70932
|
-
};
|
|
70933
|
-
var deviceInput = object({ deviceId: number().int().nonnegative() });
|
|
70934
|
-
var powerSourceCapability = {
|
|
70935
|
-
name: "power-source",
|
|
70936
|
-
scope: "device",
|
|
70937
|
-
mode: "singleton",
|
|
70938
|
-
deviceTypes: POWER_SOURCE_DEVICE_TYPES,
|
|
70939
|
-
methods: {
|
|
70940
|
-
getStatus: systemMethod(deviceInput, PowerSourceInfoSchema, { auth: "admin" }),
|
|
70941
|
-
powerOn: systemMethod(deviceInput, PowerSourceActionResultSchema, {
|
|
70942
|
-
kind: "mutation",
|
|
70943
|
-
auth: "admin"
|
|
70944
|
-
}),
|
|
70945
|
-
powerOff: systemMethod(deviceInput, PowerSourceActionResultSchema, {
|
|
70946
|
-
kind: "mutation",
|
|
70947
|
-
auth: "admin"
|
|
70948
|
-
}),
|
|
70949
|
-
forceRestart: systemMethod(deviceInput, PowerSourceActionResultSchema, {
|
|
70950
|
-
kind: "mutation",
|
|
70951
|
-
auth: "admin"
|
|
70952
|
-
})
|
|
70953
|
-
},
|
|
70954
|
-
runtimeState: PowerSourceStateSchema,
|
|
70955
|
-
customize: powerSourceCustomize,
|
|
70956
|
-
/**
|
|
70957
|
-
* Runtime-state durability: **session** — mirrored from the linked switch on
|
|
70958
|
-
* its next report; a restored value would outlive the reading it names.
|
|
70959
|
-
*
|
|
70960
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
70961
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
70962
|
-
*/
|
|
70963
|
-
durability: "session",
|
|
70964
|
-
history: "none"
|
|
70965
|
-
};
|
|
70966
71091
|
/**
|
|
70967
71092
|
* A monotonic total between resets (D944). Energy uses `power-meter.energy`
|
|
70968
71093
|
* so dashboards keep one series; every other instantaneous reading lands here.
|
|
@@ -74512,6 +74637,10 @@ var RUNNING_DEVICE_TYPES = Object.values(DeviceType);
|
|
|
74512
74637
|
/** Generic Customize target for the running boolean (D936). */
|
|
74513
74638
|
var runningCustomize = {
|
|
74514
74639
|
version: 1,
|
|
74640
|
+
overridable: [{
|
|
74641
|
+
path: "running",
|
|
74642
|
+
by: "running"
|
|
74643
|
+
}],
|
|
74515
74644
|
targets: [{
|
|
74516
74645
|
id: "running",
|
|
74517
74646
|
cardinality: "scalar",
|
|
@@ -74569,7 +74698,7 @@ var runningCustomize = {
|
|
|
74569
74698
|
kind: "constant",
|
|
74570
74699
|
path: "phase",
|
|
74571
74700
|
value: null,
|
|
74572
|
-
when: "
|
|
74701
|
+
when: "add"
|
|
74573
74702
|
},
|
|
74574
74703
|
{
|
|
74575
74704
|
kind: "clock",
|
|
@@ -77853,7 +77982,7 @@ var ExternalIdentityKeySchema = object({
|
|
|
77853
77982
|
provider: string().min(1),
|
|
77854
77983
|
subject: string().min(1)
|
|
77855
77984
|
});
|
|
77856
|
-
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
77985
|
+
method(_void(), array(UserSummarySchema), { auth: "admin" }), method(_void(), object({ defaultPasswordInUse: boolean() }), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
77857
77986
|
kind: "mutation",
|
|
77858
77987
|
auth: "admin",
|
|
77859
77988
|
access: "create"
|
|
@@ -81229,13 +81358,6 @@ Object.freeze({
|
|
|
81229
81358
|
access: "view",
|
|
81230
81359
|
role: "admin"
|
|
81231
81360
|
},
|
|
81232
|
-
"addons.installFromWorkspace": {
|
|
81233
|
-
capName: "addons",
|
|
81234
|
-
capScope: "system",
|
|
81235
|
-
addonId: null,
|
|
81236
|
-
access: "create",
|
|
81237
|
-
role: "admin"
|
|
81238
|
-
},
|
|
81239
81361
|
"addons.installPackage": {
|
|
81240
81362
|
capName: "addons",
|
|
81241
81363
|
capScope: "system",
|
|
@@ -81243,13 +81365,6 @@ Object.freeze({
|
|
|
81243
81365
|
access: "create",
|
|
81244
81366
|
role: "admin"
|
|
81245
81367
|
},
|
|
81246
|
-
"addons.isWorkspaceAvailable": {
|
|
81247
|
-
capName: "addons",
|
|
81248
|
-
capScope: "system",
|
|
81249
|
-
addonId: null,
|
|
81250
|
-
access: "view",
|
|
81251
|
-
role: "admin"
|
|
81252
|
-
},
|
|
81253
81368
|
"addons.list": {
|
|
81254
81369
|
capName: "addons",
|
|
81255
81370
|
capScope: "system",
|
|
@@ -81299,13 +81414,6 @@ Object.freeze({
|
|
|
81299
81414
|
access: "view",
|
|
81300
81415
|
role: "admin"
|
|
81301
81416
|
},
|
|
81302
|
-
"addons.listWorkspacePackages": {
|
|
81303
|
-
capName: "addons",
|
|
81304
|
-
capScope: "system",
|
|
81305
|
-
addonId: null,
|
|
81306
|
-
access: "view",
|
|
81307
|
-
role: "admin"
|
|
81308
|
-
},
|
|
81309
81417
|
"addons.onAddonLogs": {
|
|
81310
81418
|
capName: "addons",
|
|
81311
81419
|
capScope: "system",
|
|
@@ -83973,6 +84081,27 @@ Object.freeze({
|
|
|
83973
84081
|
access: "create",
|
|
83974
84082
|
role: "admin"
|
|
83975
84083
|
},
|
|
84084
|
+
"deviceRuns.getCurrentRun": {
|
|
84085
|
+
capName: "device-runs",
|
|
84086
|
+
capScope: "device",
|
|
84087
|
+
addonId: null,
|
|
84088
|
+
access: "view",
|
|
84089
|
+
role: "viewer"
|
|
84090
|
+
},
|
|
84091
|
+
"deviceRuns.getRun": {
|
|
84092
|
+
capName: "device-runs",
|
|
84093
|
+
capScope: "device",
|
|
84094
|
+
addonId: null,
|
|
84095
|
+
access: "view",
|
|
84096
|
+
role: "viewer"
|
|
84097
|
+
},
|
|
84098
|
+
"deviceRuns.listRuns": {
|
|
84099
|
+
capName: "device-runs",
|
|
84100
|
+
capScope: "device",
|
|
84101
|
+
addonId: null,
|
|
84102
|
+
access: "view",
|
|
84103
|
+
role: "viewer"
|
|
84104
|
+
},
|
|
83976
84105
|
"deviceState.claimFields": {
|
|
83977
84106
|
capName: "device-state",
|
|
83978
84107
|
capScope: "system",
|
|
@@ -90686,6 +90815,13 @@ Object.freeze({
|
|
|
90686
90815
|
access: "view",
|
|
90687
90816
|
role: "admin"
|
|
90688
90817
|
},
|
|
90818
|
+
"userManagement.getAdminBootstrapStatus": {
|
|
90819
|
+
capName: "user-management",
|
|
90820
|
+
capScope: "system",
|
|
90821
|
+
addonId: null,
|
|
90822
|
+
access: "view",
|
|
90823
|
+
role: "admin"
|
|
90824
|
+
},
|
|
90689
90825
|
"userManagement.getTotpStatus": {
|
|
90690
90826
|
capName: "user-management",
|
|
90691
90827
|
capScope: "system",
|
|
@@ -92182,6 +92318,21 @@ Object.freeze({
|
|
|
92182
92318
|
form: "single",
|
|
92183
92319
|
optional: false
|
|
92184
92320
|
}],
|
|
92321
|
+
"deviceRuns.getCurrentRun": [{
|
|
92322
|
+
name: "deviceId",
|
|
92323
|
+
form: "single",
|
|
92324
|
+
optional: false
|
|
92325
|
+
}],
|
|
92326
|
+
"deviceRuns.getRun": [{
|
|
92327
|
+
name: "deviceId",
|
|
92328
|
+
form: "single",
|
|
92329
|
+
optional: false
|
|
92330
|
+
}],
|
|
92331
|
+
"deviceRuns.listRuns": [{
|
|
92332
|
+
name: "deviceId",
|
|
92333
|
+
form: "single",
|
|
92334
|
+
optional: false
|
|
92335
|
+
}],
|
|
92185
92336
|
"deviceState.claimFields": [{
|
|
92186
92337
|
name: "deviceId",
|
|
92187
92338
|
form: "single",
|
|
@@ -94928,13 +95079,114 @@ NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
|
94928
95079
|
*
|
|
94929
95080
|
* Pure, RN-safe: the viewer imports the support rule from here.
|
|
94930
95081
|
*/
|
|
95082
|
+
/**
|
|
95083
|
+
* Control caps that still have a raise and a clear an operator names: an
|
|
95084
|
+
* appliance cycle raises when it STARTS and clears when it FINISHES. Kept out
|
|
95085
|
+
* of `SOURCE_CAP_ACTIVE_FIELD` on purpose — that table also makes a device a
|
|
95086
|
+
* camera-sensor / recorder-trigger source, and a dishwasher is neither.
|
|
95087
|
+
*/
|
|
95088
|
+
var CYCLE_RAISED_FIELD_BY_CAP = { "running-state": "running" };
|
|
94931
95089
|
/** Event kind → the boolean field of its cap slice that means "raised". */
|
|
94932
95090
|
var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.entries(EVENT_KIND_BY_CAP).flatMap(([capName, descriptor]) => {
|
|
95091
|
+
const cycleField = CYCLE_RAISED_FIELD_BY_CAP[capName];
|
|
95092
|
+
if (cycleField !== void 0) return [[descriptor.kind, cycleField]];
|
|
94933
95093
|
const field = SOURCE_CAP_ACTIVE_FIELD[capName];
|
|
94934
95094
|
if (field === void 0 || descriptor.category !== "sensor") return [];
|
|
94935
95095
|
return [[descriptor.kind, field]];
|
|
94936
95096
|
})));
|
|
94937
95097
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
95098
|
+
Object.freeze({
|
|
95099
|
+
contact: {
|
|
95100
|
+
starts: {
|
|
95101
|
+
en: "opened",
|
|
95102
|
+
it: "si apre"
|
|
95103
|
+
},
|
|
95104
|
+
finishes: {
|
|
95105
|
+
en: "closed",
|
|
95106
|
+
it: "si chiude"
|
|
95107
|
+
}
|
|
95108
|
+
},
|
|
95109
|
+
"motion-sensor": {
|
|
95110
|
+
starts: {
|
|
95111
|
+
en: "motion detected",
|
|
95112
|
+
it: "movimento rilevato"
|
|
95113
|
+
},
|
|
95114
|
+
finishes: {
|
|
95115
|
+
en: "motion stopped",
|
|
95116
|
+
it: "movimento terminato"
|
|
95117
|
+
}
|
|
95118
|
+
},
|
|
95119
|
+
smoke: {
|
|
95120
|
+
starts: {
|
|
95121
|
+
en: "smoke detected",
|
|
95122
|
+
it: "fumo rilevato"
|
|
95123
|
+
},
|
|
95124
|
+
finishes: {
|
|
95125
|
+
en: "smoke gone",
|
|
95126
|
+
it: "fumo scomparso"
|
|
95127
|
+
}
|
|
95128
|
+
},
|
|
95129
|
+
flood: {
|
|
95130
|
+
starts: {
|
|
95131
|
+
en: "water detected",
|
|
95132
|
+
it: "acqua rilevata"
|
|
95133
|
+
},
|
|
95134
|
+
finishes: {
|
|
95135
|
+
en: "dry again",
|
|
95136
|
+
it: "di nuovo asciutto"
|
|
95137
|
+
}
|
|
95138
|
+
},
|
|
95139
|
+
gas: {
|
|
95140
|
+
starts: {
|
|
95141
|
+
en: "gas detected",
|
|
95142
|
+
it: "gas rilevato"
|
|
95143
|
+
},
|
|
95144
|
+
finishes: {
|
|
95145
|
+
en: "gas gone",
|
|
95146
|
+
it: "gas scomparso"
|
|
95147
|
+
}
|
|
95148
|
+
},
|
|
95149
|
+
"carbon-monoxide": {
|
|
95150
|
+
starts: {
|
|
95151
|
+
en: "carbon monoxide detected",
|
|
95152
|
+
it: "monossido rilevato"
|
|
95153
|
+
},
|
|
95154
|
+
finishes: {
|
|
95155
|
+
en: "carbon monoxide gone",
|
|
95156
|
+
it: "monossido scomparso"
|
|
95157
|
+
}
|
|
95158
|
+
},
|
|
95159
|
+
vibration: {
|
|
95160
|
+
starts: {
|
|
95161
|
+
en: "vibration detected",
|
|
95162
|
+
it: "vibrazione rilevata"
|
|
95163
|
+
},
|
|
95164
|
+
finishes: {
|
|
95165
|
+
en: "vibration stopped",
|
|
95166
|
+
it: "vibrazione terminata"
|
|
95167
|
+
}
|
|
95168
|
+
},
|
|
95169
|
+
tamper: {
|
|
95170
|
+
starts: {
|
|
95171
|
+
en: "tampered with",
|
|
95172
|
+
it: "manomesso"
|
|
95173
|
+
},
|
|
95174
|
+
finishes: {
|
|
95175
|
+
en: "tamper cleared",
|
|
95176
|
+
it: "manomissione rientrata"
|
|
95177
|
+
}
|
|
95178
|
+
},
|
|
95179
|
+
"appliance-cycle": {
|
|
95180
|
+
starts: {
|
|
95181
|
+
en: "the cycle started",
|
|
95182
|
+
it: "il ciclo parte"
|
|
95183
|
+
},
|
|
95184
|
+
finishes: {
|
|
95185
|
+
en: "the cycle finished",
|
|
95186
|
+
it: "il ciclo è terminato"
|
|
95187
|
+
}
|
|
95188
|
+
}
|
|
95189
|
+
});
|
|
94938
95190
|
object({
|
|
94939
95191
|
phase: _enum(["raised", "resolved"]),
|
|
94940
95192
|
episodeId: string().min(1),
|
|
@@ -95141,6 +95393,10 @@ var STATE_SUMMARY_VARS = [
|
|
|
95141
95393
|
[...RULE_TEXT],
|
|
95142
95394
|
[...RULE_TEXT],
|
|
95143
95395
|
[...RULE_TEXT],
|
|
95396
|
+
[...RULE_TEXT],
|
|
95397
|
+
[...RULE_TEXT],
|
|
95398
|
+
[...RULE_TEXT],
|
|
95399
|
+
[...RULE_TEXT],
|
|
95144
95400
|
[...RULE_BODY_ONLY],
|
|
95145
95401
|
[...RULE_TEXT],
|
|
95146
95402
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
@@ -95158,6 +95414,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
95158
95414
|
[...RULE_TEXT],
|
|
95159
95415
|
[...RULE_TEXT],
|
|
95160
95416
|
[...RULE_TEXT],
|
|
95417
|
+
[...RULE_TEXT],
|
|
95161
95418
|
([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
|
|
95162
95419
|
[...RULE_TEXT],
|
|
95163
95420
|
[...RULE_TEXT],
|
|
@@ -95402,6 +95659,7 @@ new Set([
|
|
|
95402
95659
|
"siren",
|
|
95403
95660
|
"button",
|
|
95404
95661
|
"doorbell",
|
|
95662
|
+
"appliance-cycle",
|
|
95405
95663
|
"audio-speech",
|
|
95406
95664
|
"audio-scream",
|
|
95407
95665
|
"audio-crying",
|