@camstack/addon-provider-homematic 1.2.176 → 1.2.178

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.
Files changed (21) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/.bundle-modules.json +595 -592
  3. package/dist/{MotionZonesSettings-CovCElVu.mjs → MotionZonesSettings-BVVZUT5W.mjs} +2 -2
  4. package/dist/{PrivacyMaskSettings-rppcqOKk.mjs → PrivacyMaskSettings-CwXKH_b2.mjs} +4 -4
  5. package/dist/{SceneMonitorEditor-pLU11CrP.mjs → SceneMonitorEditor-BVKxQm-p.mjs} +3 -3
  6. package/dist/_stub.js +1835 -1614
  7. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-Br6CLztL.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-CcupHdRt.mjs} +3 -3
  8. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DhsWtqcv.mjs +26 -0
  9. package/dist/addon-provider-homematic.css +1 -1
  10. package/dist/addon.js +412 -154
  11. package/dist/addon.mjs +412 -154
  12. package/dist/{hostInit-XHpsKoE0.mjs → hostInit-5g7LqEHZ.mjs} +2 -2
  13. package/dist/{player-overlays-Dq97wYPZ.mjs → player-overlays-Bje29rJB.mjs} +1 -1
  14. package/dist/remoteEntry.js +1 -1
  15. package/dist/{responsive-OpRUtaZs.mjs → responsive-CbUxzOF7.mjs} +1 -1
  16. package/dist/{scene-monitor-copy-BBuVH6QD.mjs → scene-monitor-copy-Dsn4V--Q.mjs} +1 -1
  17. package/dist/{square-CxQ2Du6f.mjs → square-Ck3xIWXT.mjs} +1 -1
  18. package/dist/{trash-2-BPDQvo53.mjs → trash-2-DJ35AyWZ.mjs} +1 -1
  19. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-DwBrRwfx.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BnW0Ooq9.mjs} +1 -1
  20. package/package.json +2 -2
  21. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DHKRjZRN.mjs +0 -26
package/dist/addon.mjs CHANGED
@@ -9,7 +9,7 @@ import { networkInterfaces } from "node:os";
9
9
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
11
11
  //#endregion
12
- //#region ../types/dist/event-category-CaURIwQA.mjs
12
+ //#region ../types/dist/event-category-BmPm98n0.mjs
13
13
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  EventCategory["SystemBoot"] = "system.boot";
15
15
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -493,6 +493,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
493
493
  EventCategory["RunningStarted"] = "running.started";
494
494
  /** Mirrors `runningStateCapability.events.onFinished`. */
495
495
  EventCategory["RunningFinished"] = "running.finished";
496
+ /** Mirrors `deviceRunsCapability.events.onRunOpened` - a durable run record opened. */
497
+ EventCategory["DeviceRunOpened"] = "device-run.opened";
498
+ /** Mirrors `deviceRunsCapability.events.onRunClosed` - a durable run record closed. */
499
+ EventCategory["DeviceRunClosed"] = "device-run.closed";
496
500
  /**
497
501
  * Cap event fired by every device that registers the `event-emitter`
498
502
  * capability. Mirrors `eventEmitterCapability.events.onEvent`. Carries
@@ -5841,7 +5845,7 @@ var ZodIssueCode = {
5841
5845
  var ZodFirstPartyTypeKind;
5842
5846
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5843
5847
  //#endregion
5844
- //#region ../types/dist/sleep-CSYuxssh.mjs
5848
+ //#region ../types/dist/sleep-BKzhQTSm.mjs
5845
5849
  /**
5846
5850
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5847
5851
  * window to float samples (D455).
@@ -9371,6 +9375,7 @@ var CAP_NAMES = Object.freeze([
9371
9375
  "device-ops",
9372
9376
  "device-provider",
9373
9377
  "device-removal-hook",
9378
+ "device-runs",
9374
9379
  "device-state",
9375
9380
  "device-status",
9376
9381
  "dishwasher",
@@ -11315,7 +11320,7 @@ object({
11315
11320
  params: record(string(), union([string(), number()])).optional()
11316
11321
  });
11317
11322
  //#endregion
11318
- //#region ../types/dist/composition-BBzVf2xd.mjs
11323
+ //#region ../types/dist/composition-BiKWlUCc.mjs
11319
11324
  /**
11320
11325
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11321
11326
  *
@@ -12248,7 +12253,15 @@ var HelperSpecSchema = discriminatedUnion("kind", [
12248
12253
  thresholdWatts: number().positive(),
12249
12254
  startDwellMs: number().int().nonnegative(),
12250
12255
  stopDwellMs: number().int().nonnegative(),
12251
- member: HelperMemberSchema
12256
+ member: HelperMemberSchema,
12257
+ /**
12258
+ * The plug that powers the appliance (`switch.on`). Optional: when set, the
12259
+ * composition carries a `power-source` feature, so the hub can cut and restore
12260
+ * that plug (power-source link of a NEW-target composition).
12261
+ */
12262
+ powerSwitch: HelperMemberSchema.optional(),
12263
+ /** How long a forced restart keeps the plug off; the cap's default when unset. */
12264
+ offSeconds: number().optional()
12252
12265
  }),
12253
12266
  object({
12254
12267
  kind: literal("statistic"),
@@ -13646,7 +13659,13 @@ var MigrationLedgerEntrySchema = object({
13646
13659
  /** Why it is `blocked` or `held` (`dependency-failed`, `snapshot-refused`, …). */
13647
13660
  reason: string().nullable(),
13648
13661
  nodeId: string().nullable(),
13649
- bootId: string().nullable()
13662
+ bootId: string().nullable(),
13663
+ /**
13664
+ * The catalogued meta of this id (description, body kind, store, `dependsOn`…),
13665
+ * joined by the engine from the catalogues it knows this boot. Absent when no
13666
+ * catalogue lists the id (a newer database).
13667
+ */
13668
+ meta: MigrationMetaSchema.optional()
13650
13669
  });
13651
13670
  /** A catalogued migration that is not applied, with where it stands. */
13652
13671
  var MigrationPendingEntrySchema = object({
@@ -19453,6 +19472,14 @@ var APPLIANCE_CAP_VOCABULARY = {
19453
19472
  }
19454
19473
  } }
19455
19474
  },
19475
+ "device-runs": {
19476
+ scope: "device",
19477
+ noun: t("Runs", "Esecuzioni"),
19478
+ events: {
19479
+ onRunOpened: { notOperatorFacing: "the durable record of a run that the running-state start flip already announces" },
19480
+ onRunClosed: { notOperatorFacing: "the durable record of a run that the running-state finish flip already announces" }
19481
+ }
19482
+ },
19456
19483
  update: {
19457
19484
  scope: "device",
19458
19485
  noun: t("Firmware update", "Aggiornamento firmware"),
@@ -46114,6 +46141,117 @@ function actuator(input) {
46114
46141
  };
46115
46142
  }
46116
46143
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
46144
+ var PowerSourceRefusalReasonSchema = _enum([
46145
+ "no-power-source",
46146
+ "switch-missing",
46147
+ "switch-offline",
46148
+ "switch-unknown",
46149
+ "restart-in-progress",
46150
+ "switch-call-failed"
46151
+ ]);
46152
+ var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
46153
+ accepted: literal(false),
46154
+ reason: PowerSourceRefusalReasonSchema,
46155
+ /** One line for the operator, naming the switch. */
46156
+ message: string()
46157
+ })]);
46158
+ var PowerSourceInfoSchema = object({
46159
+ /** False when the device has no power source linked; the rest is then empty. */
46160
+ linked: boolean(),
46161
+ switchDeviceId: number().nullable(),
46162
+ switchName: string().nullable(),
46163
+ /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
46164
+ switchOn: boolean().nullable(),
46165
+ switchOnline: boolean().nullable(),
46166
+ restartInProgress: boolean(),
46167
+ offSeconds: number().int()
46168
+ });
46169
+ /** The composed slice: the switch state the link mirrors, plus the stored off time. */
46170
+ var PowerSourceStateSchema = object({
46171
+ /** Null while the switch has not reported: unknown is never `false` (D393). */
46172
+ switchOn: boolean().nullable(),
46173
+ offSeconds: number().int(),
46174
+ lastFetchedAt: number()
46175
+ });
46176
+ var POWER_SOURCE_DEVICE_TYPES = [
46177
+ DeviceType.Gateway,
46178
+ DeviceType.Hub,
46179
+ DeviceType.Camera,
46180
+ DeviceType.Sensor,
46181
+ DeviceType.MediaPlayer,
46182
+ DeviceType.Vacuum,
46183
+ DeviceType.Generic,
46184
+ DeviceType.Washer,
46185
+ DeviceType.Dryer,
46186
+ DeviceType.Dishwasher,
46187
+ DeviceType.PetFountain,
46188
+ DeviceType.Fan,
46189
+ DeviceType.Humidifier,
46190
+ DeviceType.Climate,
46191
+ DeviceType.WaterHeater
46192
+ ];
46193
+ var powerSourceCustomize = {
46194
+ version: 1,
46195
+ targets: [{
46196
+ id: "switch",
46197
+ cardinality: "scalar",
46198
+ vocabulary: {
46199
+ cap: "power-source",
46200
+ stateField: "switchOn"
46201
+ },
46202
+ deviceTypes: POWER_SOURCE_DEVICE_TYPES,
46203
+ apply: "add",
46204
+ path: "switchOn",
46205
+ sources: [{
46206
+ kind: "switch",
46207
+ transforms: [{ kind: "identity" }]
46208
+ }],
46209
+ companions: [{
46210
+ kind: "constant",
46211
+ path: "offSeconds",
46212
+ value: 10,
46213
+ when: "add"
46214
+ }, {
46215
+ kind: "clock",
46216
+ path: "lastFetchedAt",
46217
+ when: "always"
46218
+ }],
46219
+ sourceReport: { status: "assignment-status" }
46220
+ }]
46221
+ };
46222
+ var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
46223
+ var powerSourceCapability = {
46224
+ name: "power-source",
46225
+ scope: "device",
46226
+ mode: "singleton",
46227
+ deviceTypes: POWER_SOURCE_DEVICE_TYPES,
46228
+ methods: {
46229
+ getStatus: systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "admin" }),
46230
+ powerOn: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
46231
+ kind: "mutation",
46232
+ auth: "admin"
46233
+ }),
46234
+ powerOff: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
46235
+ kind: "mutation",
46236
+ auth: "admin"
46237
+ }),
46238
+ forceRestart: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
46239
+ kind: "mutation",
46240
+ auth: "admin"
46241
+ })
46242
+ },
46243
+ runtimeState: PowerSourceStateSchema,
46244
+ customize: powerSourceCustomize,
46245
+ /**
46246
+ * Runtime-state durability: **session** — mirrored from the linked switch on
46247
+ * its next report; a restored value would outlive the reading it names.
46248
+ *
46249
+ * See `RuntimeStateDurability`. Enforced by
46250
+ * `scripts/check-runtime-state-durability.ts`.
46251
+ */
46252
+ durability: "session",
46253
+ history: "none"
46254
+ };
46117
46255
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
46118
46256
  DeviceType.Camera;
46119
46257
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
@@ -47539,6 +47677,101 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
47539
47677
  kind: "mutation",
47540
47678
  auth: "admin"
47541
47679
  });
47680
+ /**
47681
+ * device-runs - the durable record of ONE run of a device: a washing cycle, a
47682
+ * dishwasher cycle, later a mow or a clean (D992).
47683
+ *
47684
+ * A run is a DOCUMENT (opened at one instant, closed at another, carrying what
47685
+ * was measured over it), never a sample - device-history keeps the numbers over
47686
+ * time and its `device-runs` provider keeps these documents beside them, because
47687
+ * the energy of a run is a question about device-history's own series. The
47688
+ * record is written from the `running-state` flip on `DeviceStateChanged`; it
47689
+ * survives a restart (the open row is on disk) and a missed flip (boot compares
47690
+ * the open rows against the live snapshots).
47691
+ *
47692
+ * Every measurement is `number | null` and `null` means "could not be
47693
+ * measured", never `0` (D393). A run closed by the boot reconcile because the
47694
+ * device stopped while nobody was watching has `outcome: 'unknown'`.
47695
+ */
47696
+ var DeviceRunKindSchema = _enum([
47697
+ "appliance",
47698
+ "mower",
47699
+ "vacuum"
47700
+ ]);
47701
+ var DeviceRunStateSchema = _enum(["open", "closed"]);
47702
+ var DeviceRunOutcomeSchema = _enum([
47703
+ "completed",
47704
+ "aborted",
47705
+ "error",
47706
+ "unknown"
47707
+ ]);
47708
+ /** What opened or closed the run. `reconcile` is the boot comparison against live state. */
47709
+ var DeviceRunSourceSchema = _enum([
47710
+ "running-state",
47711
+ "activity",
47712
+ "reconcile"
47713
+ ]);
47714
+ /** How the energy of a run was obtained; `null` when it could not be. */
47715
+ var DeviceRunEnergyMethodSchema = _enum(["counter-delta", "history-integral"]);
47716
+ var DeviceRunPhaseSchema = object({
47717
+ phase: string(),
47718
+ at: number()
47719
+ });
47720
+ /** The kind-specific block; a later phase adds a branch, nothing else changes. */
47721
+ var DeviceRunDetailSchema = discriminatedUnion("kind", [object({
47722
+ kind: literal("appliance"),
47723
+ /** kWh used over the run. */
47724
+ energyKwh: number().nullable().meta(readingMeta("energy")),
47725
+ energyMethod: DeviceRunEnergyMethodSchema.nullable(),
47726
+ /** Highest power seen while the run was open. */
47727
+ peakW: number().nullable().meta(readingMeta("power")),
47728
+ /** Time-weighted mean power while the run was open. */
47729
+ avgW: number().nullable().meta(readingMeta("power")),
47730
+ /** The program the appliance said it ran when the run opened. */
47731
+ program: string().nullable(),
47732
+ remainingAtStartSec: number().nullable().meta(readingMeta("duration")),
47733
+ /** The last phase the device reported before the run closed. */
47734
+ finalPhase: string().nullable(),
47735
+ /**
47736
+ * The meter's energy counter when the run opened; `null` when the meter had
47737
+ * not said (or the run was opened late, by the boot reconcile). It lives in
47738
+ * the row so a run that outlives a restart still ends with `end - start`.
47739
+ */
47740
+ energyStartKwh: number().nullable().meta(readingMeta("energy")),
47741
+ /** Milliseconds of power readings behind `avgW` - the weight a restart resumes the mean with. */
47742
+ powerObservedMs: number()
47743
+ })]);
47744
+ var DeviceRunSchema = object({
47745
+ /** `${deviceId}:${startedAt}`. */
47746
+ runId: string(),
47747
+ deviceId: number().int(),
47748
+ kind: DeviceRunKindSchema,
47749
+ state: DeviceRunStateSchema,
47750
+ startedAt: number(),
47751
+ endedAt: number().nullable(),
47752
+ durationMs: number().nullable(),
47753
+ outcome: DeviceRunOutcomeSchema.nullable(),
47754
+ startSource: DeviceRunSourceSchema,
47755
+ endSource: DeviceRunSourceSchema.nullable(),
47756
+ /** Where the device's running bit came from (`running-state.source`); `null` when it did not say. */
47757
+ runningSource: _enum(["native", "assigned"]).nullable(),
47758
+ phases: array(DeviceRunPhaseSchema),
47759
+ detail: DeviceRunDetailSchema
47760
+ });
47761
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, method(object({
47762
+ deviceId: number().int(),
47763
+ outcome: DeviceRunOutcomeSchema.optional(),
47764
+ atFrom: number().optional(),
47765
+ atTo: number().optional(),
47766
+ limit: number().int().positive().max(200).default(50),
47767
+ cursor: string().optional()
47768
+ }), object({
47769
+ runs: array(DeviceRunSchema).readonly(),
47770
+ nextCursor: string().nullable()
47771
+ })), method(object({
47772
+ deviceId: number().int(),
47773
+ runId: string()
47774
+ }), DeviceRunSchema.nullable()), method(object({ deviceId: number().int() }), DeviceRunSchema.nullable());
47542
47775
  var DeviceCaStatusSchema = discriminatedUnion("state", [
47543
47776
  object({ state: literal("absent") }),
47544
47777
  object({
@@ -47674,8 +47907,8 @@ method(object({}), object({
47674
47907
  });
47675
47908
  var KeychainKeySourceSchema = object({
47676
47909
  kind: _enum([
47677
- "config-file",
47678
- "previous-config-file",
47910
+ "mounted-file",
47911
+ "previous-mounted-file",
47679
47912
  "platform",
47680
47913
  "default-file"
47681
47914
  ]),
@@ -52171,7 +52404,8 @@ var PALETTE_ENTRY_IDS = [
52171
52404
  "switch",
52172
52405
  "siren",
52173
52406
  "button",
52174
- "doorbell"
52407
+ "doorbell",
52408
+ "appliance-cycle"
52175
52409
  ];
52176
52410
  var AUDIO_ENTRY_ID = "audio";
52177
52411
  /** Six rungs, quiet → loud. The opaque end is the entry's hex. */
@@ -52242,7 +52476,8 @@ var CAMSTACK_HEX = {
52242
52476
  switch: "#7a812a",
52243
52477
  siren: "#ac5d7f",
52244
52478
  button: "#b276cd",
52245
- doorbell: "#0087ab"
52479
+ doorbell: "#0087ab",
52480
+ "appliance-cycle": "#2a8c8c"
52246
52481
  };
52247
52482
  var CAMSTACK_FALLBACK = [
52248
52483
  "#b34dc7",
@@ -52307,7 +52542,8 @@ var HIGH_CONTRAST_HEX = {
52307
52542
  switch: "#d05259",
52308
52543
  siren: "#cd67b3",
52309
52544
  button: "#c9746a",
52310
- doorbell: "#338eeb"
52545
+ doorbell: "#338eeb",
52546
+ "appliance-cycle": "#00848a"
52311
52547
  };
52312
52548
  var HIGH_CONTRAST_FALLBACK = [
52313
52549
  "#817f3b",
@@ -52372,7 +52608,8 @@ var OKABE_ITO_HEX = {
52372
52608
  switch: "#ad2c4e",
52373
52609
  siren: "#348e08",
52374
52610
  button: "#d27303",
52375
- doorbell: "#55770f"
52611
+ doorbell: "#55770f",
52612
+ "appliance-cycle": "#00737d"
52376
52613
  };
52377
52614
  var OKABE_ITO_FALLBACK = [
52378
52615
  "#9a3784",
@@ -52581,6 +52818,7 @@ sub("switch", "control", "control", "switch", "Switch");
52581
52818
  sub("siren", "control", "control", "siren", "Siren");
52582
52819
  sub("button", "control", "control", "button", "Button");
52583
52820
  sub("doorbell", "control", "control", "doorbell", "Doorbell");
52821
+ sub("appliance-cycle", "control", "control", "switch", "Appliance cycle");
52584
52822
  for (const l of AUDIO_MACRO_LABELS) {
52585
52823
  const kind = `audio-${l.id}`;
52586
52824
  if (entries.has(kind)) continue;
@@ -61212,7 +61450,8 @@ var CAP_TO_KIND = {
61212
61450
  cover: "cover",
61213
61451
  switch: "switch",
61214
61452
  button: "button",
61215
- doorbell: "doorbell"
61453
+ doorbell: "doorbell",
61454
+ "running-state": "appliance-cycle"
61216
61455
  };
61217
61456
  function buildDescriptor(capName, kind) {
61218
61457
  const t = EVENT_TAXONOMY[kind];
@@ -64342,10 +64581,7 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
64342
64581
  }), InstallPackageResultSchema, {
64343
64582
  kind: "mutation",
64344
64583
  auth: "admin"
64345
- }), method(object({ packageName: string() }), InstallPackageResultSchema, {
64346
- kind: "mutation",
64347
- auth: "admin"
64348
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
64584
+ }), method(object({
64349
64585
  packageName: string().min(1),
64350
64586
  nodeId: string().optional(),
64351
64587
  everywhere: boolean().optional()
@@ -65606,19 +65842,19 @@ var RemoteSetConfigResultSchema = discriminatedUnion("status", [object({ status:
65606
65842
  reason: _enum(["unknown-template", "not-a-media-player"]),
65607
65843
  detail: string()
65608
65844
  })]);
65609
- var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
65845
+ var deviceInput = object({ deviceId: number().int().nonnegative() });
65610
65846
  DeviceType.MediaPlayer;
65611
- method(deviceInput$1, RemoteConfigSchema, { auth: "admin" }), method(deviceInput$1.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
65847
+ method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
65612
65848
  kind: "mutation",
65613
65849
  auth: "admin"
65614
- }), method(deviceInput$1, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput$1.extend({
65850
+ }), method(deviceInput, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput.extend({
65615
65851
  role: RemoteRoleSchema,
65616
65852
  /** Sends in a row (volume steps). */
65617
65853
  repeat: number().int().min(1).max(50).default(1)
65618
65854
  }), RemoteSendResultSchema, {
65619
65855
  kind: "mutation",
65620
65856
  auth: "protected"
65621
- }), method(deviceInput$1.extend({
65857
+ }), method(deviceInput.extend({
65622
65858
  command: RemoteMediaCommandSchema,
65623
65859
  muted: boolean().optional(),
65624
65860
  source: string().optional(),
@@ -69938,117 +70174,6 @@ var lockControlCapability = {
69938
70174
  * whether persisting is worth a SQLite commit. */
69939
70175
  volatileStateFields: ["lastChangedAt"]
69940
70176
  };
69941
- var PowerSourceRefusalReasonSchema = _enum([
69942
- "no-power-source",
69943
- "switch-missing",
69944
- "switch-offline",
69945
- "switch-unknown",
69946
- "restart-in-progress",
69947
- "switch-call-failed"
69948
- ]);
69949
- var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
69950
- accepted: literal(false),
69951
- reason: PowerSourceRefusalReasonSchema,
69952
- /** One line for the operator, naming the switch. */
69953
- message: string()
69954
- })]);
69955
- var PowerSourceInfoSchema = object({
69956
- /** False when the device has no power source linked; the rest is then empty. */
69957
- linked: boolean(),
69958
- switchDeviceId: number().nullable(),
69959
- switchName: string().nullable(),
69960
- /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
69961
- switchOn: boolean().nullable(),
69962
- switchOnline: boolean().nullable(),
69963
- restartInProgress: boolean(),
69964
- offSeconds: number().int()
69965
- });
69966
- /** The composed slice: the switch state the link mirrors, plus the stored off time. */
69967
- var PowerSourceStateSchema = object({
69968
- /** Null while the switch has not reported: unknown is never `false` (D393). */
69969
- switchOn: boolean().nullable(),
69970
- offSeconds: number().int(),
69971
- lastFetchedAt: number()
69972
- });
69973
- var POWER_SOURCE_DEVICE_TYPES = [
69974
- DeviceType.Gateway,
69975
- DeviceType.Hub,
69976
- DeviceType.Camera,
69977
- DeviceType.Sensor,
69978
- DeviceType.MediaPlayer,
69979
- DeviceType.Vacuum,
69980
- DeviceType.Generic,
69981
- DeviceType.Washer,
69982
- DeviceType.Dryer,
69983
- DeviceType.Dishwasher,
69984
- DeviceType.PetFountain,
69985
- DeviceType.Fan,
69986
- DeviceType.Humidifier,
69987
- DeviceType.Climate,
69988
- DeviceType.WaterHeater
69989
- ];
69990
- var powerSourceCustomize = {
69991
- version: 1,
69992
- targets: [{
69993
- id: "switch",
69994
- cardinality: "scalar",
69995
- vocabulary: {
69996
- cap: "power-source",
69997
- stateField: "switchOn"
69998
- },
69999
- deviceTypes: POWER_SOURCE_DEVICE_TYPES,
70000
- apply: "add",
70001
- path: "switchOn",
70002
- sources: [{
70003
- kind: "switch",
70004
- transforms: [{ kind: "identity" }]
70005
- }],
70006
- companions: [{
70007
- kind: "constant",
70008
- path: "offSeconds",
70009
- value: 10,
70010
- when: "add"
70011
- }, {
70012
- kind: "clock",
70013
- path: "lastFetchedAt",
70014
- when: "always"
70015
- }],
70016
- sourceReport: { status: "assignment-status" }
70017
- }]
70018
- };
70019
- var deviceInput = object({ deviceId: number().int().nonnegative() });
70020
- var powerSourceCapability = {
70021
- name: "power-source",
70022
- scope: "device",
70023
- mode: "singleton",
70024
- deviceTypes: POWER_SOURCE_DEVICE_TYPES,
70025
- methods: {
70026
- getStatus: systemMethod(deviceInput, PowerSourceInfoSchema, { auth: "admin" }),
70027
- powerOn: systemMethod(deviceInput, PowerSourceActionResultSchema, {
70028
- kind: "mutation",
70029
- auth: "admin"
70030
- }),
70031
- powerOff: systemMethod(deviceInput, PowerSourceActionResultSchema, {
70032
- kind: "mutation",
70033
- auth: "admin"
70034
- }),
70035
- forceRestart: systemMethod(deviceInput, PowerSourceActionResultSchema, {
70036
- kind: "mutation",
70037
- auth: "admin"
70038
- })
70039
- },
70040
- runtimeState: PowerSourceStateSchema,
70041
- customize: powerSourceCustomize,
70042
- /**
70043
- * Runtime-state durability: **session** — mirrored from the linked switch on
70044
- * its next report; a restored value would outlive the reading it names.
70045
- *
70046
- * See `RuntimeStateDurability`. Enforced by
70047
- * `scripts/check-runtime-state-durability.ts`.
70048
- */
70049
- durability: "session",
70050
- history: "none"
70051
- };
70052
70177
  /**
70053
70178
  * A monotonic total between resets (D944). Energy uses `power-meter.energy`
70054
70179
  * so dashboards keep one series; every other instantaneous reading lands here.
@@ -73590,6 +73715,10 @@ var RUNNING_DEVICE_TYPES = Object.values(DeviceType);
73590
73715
  /** Generic Customize target for the running boolean (D936). */
73591
73716
  var runningCustomize = {
73592
73717
  version: 1,
73718
+ overridable: [{
73719
+ path: "running",
73720
+ by: "running"
73721
+ }],
73593
73722
  targets: [{
73594
73723
  id: "running",
73595
73724
  cardinality: "scalar",
@@ -73647,7 +73776,7 @@ var runningCustomize = {
73647
73776
  kind: "constant",
73648
73777
  path: "phase",
73649
73778
  value: null,
73650
- when: "always"
73779
+ when: "add"
73651
73780
  },
73652
73781
  {
73653
73782
  kind: "clock",
@@ -76931,7 +77060,7 @@ var ExternalIdentityKeySchema = object({
76931
77060
  provider: string().min(1),
76932
77061
  subject: string().min(1)
76933
77062
  });
76934
- method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
77063
+ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(_void(), object({ defaultPasswordInUse: boolean() }), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
76935
77064
  kind: "mutation",
76936
77065
  auth: "admin",
76937
77066
  access: "create"
@@ -80270,13 +80399,6 @@ Object.freeze({
80270
80399
  access: "view",
80271
80400
  role: "admin"
80272
80401
  },
80273
- "addons.installFromWorkspace": {
80274
- capName: "addons",
80275
- capScope: "system",
80276
- addonId: null,
80277
- access: "create",
80278
- role: "admin"
80279
- },
80280
80402
  "addons.installPackage": {
80281
80403
  capName: "addons",
80282
80404
  capScope: "system",
@@ -80284,13 +80406,6 @@ Object.freeze({
80284
80406
  access: "create",
80285
80407
  role: "admin"
80286
80408
  },
80287
- "addons.isWorkspaceAvailable": {
80288
- capName: "addons",
80289
- capScope: "system",
80290
- addonId: null,
80291
- access: "view",
80292
- role: "admin"
80293
- },
80294
80409
  "addons.list": {
80295
80410
  capName: "addons",
80296
80411
  capScope: "system",
@@ -80340,13 +80455,6 @@ Object.freeze({
80340
80455
  access: "view",
80341
80456
  role: "admin"
80342
80457
  },
80343
- "addons.listWorkspacePackages": {
80344
- capName: "addons",
80345
- capScope: "system",
80346
- addonId: null,
80347
- access: "view",
80348
- role: "admin"
80349
- },
80350
80458
  "addons.onAddonLogs": {
80351
80459
  capName: "addons",
80352
80460
  capScope: "system",
@@ -83014,6 +83122,27 @@ Object.freeze({
83014
83122
  access: "create",
83015
83123
  role: "admin"
83016
83124
  },
83125
+ "deviceRuns.getCurrentRun": {
83126
+ capName: "device-runs",
83127
+ capScope: "device",
83128
+ addonId: null,
83129
+ access: "view",
83130
+ role: "viewer"
83131
+ },
83132
+ "deviceRuns.getRun": {
83133
+ capName: "device-runs",
83134
+ capScope: "device",
83135
+ addonId: null,
83136
+ access: "view",
83137
+ role: "viewer"
83138
+ },
83139
+ "deviceRuns.listRuns": {
83140
+ capName: "device-runs",
83141
+ capScope: "device",
83142
+ addonId: null,
83143
+ access: "view",
83144
+ role: "viewer"
83145
+ },
83017
83146
  "deviceState.claimFields": {
83018
83147
  capName: "device-state",
83019
83148
  capScope: "system",
@@ -89727,6 +89856,13 @@ Object.freeze({
89727
89856
  access: "view",
89728
89857
  role: "admin"
89729
89858
  },
89859
+ "userManagement.getAdminBootstrapStatus": {
89860
+ capName: "user-management",
89861
+ capScope: "system",
89862
+ addonId: null,
89863
+ access: "view",
89864
+ role: "admin"
89865
+ },
89730
89866
  "userManagement.getTotpStatus": {
89731
89867
  capName: "user-management",
89732
89868
  capScope: "system",
@@ -91212,6 +91348,21 @@ Object.freeze({
91212
91348
  form: "single",
91213
91349
  optional: false
91214
91350
  }],
91351
+ "deviceRuns.getCurrentRun": [{
91352
+ name: "deviceId",
91353
+ form: "single",
91354
+ optional: false
91355
+ }],
91356
+ "deviceRuns.getRun": [{
91357
+ name: "deviceId",
91358
+ form: "single",
91359
+ optional: false
91360
+ }],
91361
+ "deviceRuns.listRuns": [{
91362
+ name: "deviceId",
91363
+ form: "single",
91364
+ optional: false
91365
+ }],
91215
91366
  "deviceState.claimFields": [{
91216
91367
  name: "deviceId",
91217
91368
  form: "single",
@@ -93694,13 +93845,114 @@ NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
93694
93845
  *
93695
93846
  * Pure, RN-safe: the viewer imports the support rule from here.
93696
93847
  */
93848
+ /**
93849
+ * Control caps that still have a raise and a clear an operator names: an
93850
+ * appliance cycle raises when it STARTS and clears when it FINISHES. Kept out
93851
+ * of `SOURCE_CAP_ACTIVE_FIELD` on purpose — that table also makes a device a
93852
+ * camera-sensor / recorder-trigger source, and a dishwasher is neither.
93853
+ */
93854
+ var CYCLE_RAISED_FIELD_BY_CAP = { "running-state": "running" };
93697
93855
  /** Event kind → the boolean field of its cap slice that means "raised". */
93698
93856
  var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.entries(EVENT_KIND_BY_CAP).flatMap(([capName, descriptor]) => {
93857
+ const cycleField = CYCLE_RAISED_FIELD_BY_CAP[capName];
93858
+ if (cycleField !== void 0) return [[descriptor.kind, cycleField]];
93699
93859
  const field = SOURCE_CAP_ACTIVE_FIELD[capName];
93700
93860
  if (field === void 0 || descriptor.category !== "sensor") return [];
93701
93861
  return [[descriptor.kind, field]];
93702
93862
  })));
93703
93863
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
93864
+ Object.freeze({
93865
+ contact: {
93866
+ starts: {
93867
+ en: "opened",
93868
+ it: "si apre"
93869
+ },
93870
+ finishes: {
93871
+ en: "closed",
93872
+ it: "si chiude"
93873
+ }
93874
+ },
93875
+ "motion-sensor": {
93876
+ starts: {
93877
+ en: "motion detected",
93878
+ it: "movimento rilevato"
93879
+ },
93880
+ finishes: {
93881
+ en: "motion stopped",
93882
+ it: "movimento terminato"
93883
+ }
93884
+ },
93885
+ smoke: {
93886
+ starts: {
93887
+ en: "smoke detected",
93888
+ it: "fumo rilevato"
93889
+ },
93890
+ finishes: {
93891
+ en: "smoke gone",
93892
+ it: "fumo scomparso"
93893
+ }
93894
+ },
93895
+ flood: {
93896
+ starts: {
93897
+ en: "water detected",
93898
+ it: "acqua rilevata"
93899
+ },
93900
+ finishes: {
93901
+ en: "dry again",
93902
+ it: "di nuovo asciutto"
93903
+ }
93904
+ },
93905
+ gas: {
93906
+ starts: {
93907
+ en: "gas detected",
93908
+ it: "gas rilevato"
93909
+ },
93910
+ finishes: {
93911
+ en: "gas gone",
93912
+ it: "gas scomparso"
93913
+ }
93914
+ },
93915
+ "carbon-monoxide": {
93916
+ starts: {
93917
+ en: "carbon monoxide detected",
93918
+ it: "monossido rilevato"
93919
+ },
93920
+ finishes: {
93921
+ en: "carbon monoxide gone",
93922
+ it: "monossido scomparso"
93923
+ }
93924
+ },
93925
+ vibration: {
93926
+ starts: {
93927
+ en: "vibration detected",
93928
+ it: "vibrazione rilevata"
93929
+ },
93930
+ finishes: {
93931
+ en: "vibration stopped",
93932
+ it: "vibrazione terminata"
93933
+ }
93934
+ },
93935
+ tamper: {
93936
+ starts: {
93937
+ en: "tampered with",
93938
+ it: "manomesso"
93939
+ },
93940
+ finishes: {
93941
+ en: "tamper cleared",
93942
+ it: "manomissione rientrata"
93943
+ }
93944
+ },
93945
+ "appliance-cycle": {
93946
+ starts: {
93947
+ en: "the cycle started",
93948
+ it: "il ciclo parte"
93949
+ },
93950
+ finishes: {
93951
+ en: "the cycle finished",
93952
+ it: "il ciclo è terminato"
93953
+ }
93954
+ }
93955
+ });
93704
93956
  object({
93705
93957
  phase: _enum(["raised", "resolved"]),
93706
93958
  episodeId: string().min(1),
@@ -93907,6 +94159,10 @@ var STATE_SUMMARY_VARS = [
93907
94159
  [...RULE_TEXT],
93908
94160
  [...RULE_TEXT],
93909
94161
  [...RULE_TEXT],
94162
+ [...RULE_TEXT],
94163
+ [...RULE_TEXT],
94164
+ [...RULE_TEXT],
94165
+ [...RULE_TEXT],
93910
94166
  [...RULE_BODY_ONLY],
93911
94167
  [...RULE_TEXT],
93912
94168
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
@@ -93924,6 +94180,7 @@ var STATE_SUMMARY_VARS = [
93924
94180
  [...RULE_TEXT],
93925
94181
  [...RULE_TEXT],
93926
94182
  [...RULE_TEXT],
94183
+ [...RULE_TEXT],
93927
94184
  ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
93928
94185
  [...RULE_TEXT],
93929
94186
  [...RULE_TEXT],
@@ -94168,6 +94425,7 @@ new Set([
94168
94425
  "siren",
94169
94426
  "button",
94170
94427
  "doorbell",
94428
+ "appliance-cycle",
94171
94429
  "audio-speech",
94172
94430
  "audio-scream",
94173
94431
  "audio-crying",