@camstack/addon-provider-homematic 1.2.206 → 1.2.208

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 (18) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/_stub.js +658 -658
  3. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-DZpqsn6u.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-CWWYk9PV.mjs} +4 -4
  4. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-O65jH-mE.mjs +26 -0
  5. package/dist/addon-provider-homematic.css +1 -1
  6. package/dist/addon.js +1304 -93
  7. package/dist/addon.mjs +1304 -93
  8. package/dist/{hostInit-DBO78Hu-.mjs → hostInit-D_zf6ohM.mjs} +3 -3
  9. package/dist/remoteEntry.js +1 -1
  10. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-D1CbMi19.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-Bgts9bVd.mjs} +1 -1
  11. package/dist/widgets/_stub.js +138 -138
  12. package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-Bwve1HPK.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-Dlfyrtfr.mjs} +2 -2
  13. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DPAzT3m6.mjs +26 -0
  14. package/dist/widgets/{hostInit-DSjxilwJ.mjs → hostInit-Yhkl--bk.mjs} +2 -2
  15. package/dist/widgets/remoteEntry.js +1 -1
  16. package/package.json +4 -4
  17. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CiaZc7Zu.mjs +0 -26
  18. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DaUa1YeZ.mjs +0 -26
package/dist/addon.js CHANGED
@@ -8,7 +8,7 @@ let crypto$1 = require("crypto");
8
8
  let fs_promises = require("fs/promises");
9
9
  let path = require("path");
10
10
  let node_os = require("node:os");
11
- //#region ../types/dist/event-category-CY27-fF0.mjs
11
+ //#region ../types/dist/event-category-7P4A3bYA.mjs
12
12
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
13
13
  EventCategory["SystemBoot"] = "system.boot";
14
14
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -239,6 +239,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
239
239
  * dropped) — consumers MUST also gate on the device record's `probed` flag.
240
240
  */
241
241
  EventCategory["DeviceReady"] = "device.ready";
242
+ /**
243
+ * An identity link (D1063) became `linked` — auto on strong evidence or
244
+ * confirmed by the operator — or a confirmed link's evidence came back. Telemetry: the `identity-links` record is the
245
+ * truth, and core-blocks reconciles its contributions from it as well.
246
+ * Payload: `IdentityLinkEventPayload`.
247
+ */
248
+ EventCategory["IdentityLinkCreated"] = "identity-link.created";
249
+ /**
250
+ * A `linked` identity link stopped acting: its evidence is gone (an auto link
251
+ * is deleted; an operator-confirmed one stays `linked`, flagged
252
+ * `evidenceGone`, and no longer acts), a side was removed, or the operator
253
+ * unlinked it. Payload: `IdentityLinkEventPayload` with `reason`.
254
+ */
255
+ EventCategory["IdentityLinkLost"] = "identity-link.lost";
242
256
  EventCategory["IntegrationEnabled"] = "integration.enabled";
243
257
  EventCategory["IntegrationDisabled"] = "integration.disabled";
244
258
  EventCategory["IntegrationDeleted"] = "integration.deleted";
@@ -840,7 +854,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
840
854
  return EventCategory;
841
855
  }({});
842
856
  //#endregion
843
- //#region ../types/dist/composed-stable-id-BNTaDZEh.mjs
857
+ //#region ../types/dist/composed-stable-id-DIeNz933.mjs
844
858
  /**
845
859
  import { errMsg } from '@camstack/types'
846
860
  * Extract a human-readable message from an unknown error value.
@@ -1288,6 +1302,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1288
1302
  /** A machine that runs workloads or is an appliance with its own OS: a
1289
1303
  * server, a hypervisor, a gateway console, a CCU. */
1290
1304
  DeviceRole["Host"] = "host";
1305
+ /** An uninterruptible power supply: battery charge, mains status and load. A
1306
+ * `DeviceType.Sensor` device. */
1307
+ DeviceRole["Ups"] = "ups";
1291
1308
  return DeviceRole;
1292
1309
  }({});
1293
1310
  /**
@@ -6114,7 +6131,7 @@ var ZodIssueCode = {
6114
6131
  var ZodFirstPartyTypeKind;
6115
6132
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6116
6133
  //#endregion
6117
- //#region ../types/dist/sleep-BT1bLgPq.mjs
6134
+ //#region ../types/dist/runtime-capabilities-B36VcCR6.mjs
6118
6135
  /**
6119
6136
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6120
6137
  * window to float samples (D455).
@@ -7323,6 +7340,18 @@ function isInstanceEnabled(body) {
7323
7340
  }
7324
7341
  /** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
7325
7342
  var SWITCH_KEY = "enabled";
7343
+ /**
7344
+ * The "Add device" mode an instance gets when its provider states none, from how the provider's
7345
+ * devices are found: `lan` scans, `account` adopts the account's children, anything else is manual.
7346
+ * The one place this default lives.
7347
+ */
7348
+ function defaultAddDeviceMode(description) {
7349
+ switch (description.discovery?.mode) {
7350
+ case "lan": return "scan";
7351
+ case "account": return "children";
7352
+ default: return "none";
7353
+ }
7354
+ }
7326
7355
  /** The keys of the kind's secret fields that sit at the top level of the body. */
7327
7356
  function topLevelSecretKeys(paths) {
7328
7357
  return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
@@ -7425,6 +7454,7 @@ var RecordIntegrationInstances = class {
7425
7454
  enabled: isInstanceEnabled(record.data),
7426
7455
  formValues: shown,
7427
7456
  kind,
7457
+ addDevice: this.hooks.addDevice?.(record.data) ?? defaultAddDeviceMode(this.hooks.description),
7428
7458
  ...health?.status !== void 0 ? { status: health.status } : {},
7429
7459
  ...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
7430
7460
  };
@@ -10694,14 +10724,104 @@ var SubscribeAudioChunksInputSchema = object({
10694
10724
  var SubscribeAudioChunksResultSchema = object({
10695
10725
  /** Opaque id passed to `pullAudioChunks` / `unsubscribeAudioChunks`. */
10696
10726
  subscriptionId: string() });
10697
- var BrokerStatsSchema = object({
10698
- status: _enum([
10699
- "idle",
10700
- "connecting",
10701
- "streaming",
10702
- "error",
10703
- "stopped"
10727
+ var BrokerStatusSchema = _enum([
10728
+ "idle",
10729
+ "connecting",
10730
+ "streaming",
10731
+ "error",
10732
+ "stopped"
10733
+ ]);
10734
+ /**
10735
+ * The encode a derived stream's feeder was last spawned with — the read-only
10736
+ * "effective encode". Read off the ffmpeg argv that runs, so it cannot drift
10737
+ * from what the operator's profile and the carrier's rules resolved to.
10738
+ */
10739
+ var DerivedEffectiveEncodeSchema = object({
10740
+ /** `-c:v` of the argv (`libx264`, a hardware encoder, `copy`); null when absent. */
10741
+ encoder: string().nullable(),
10742
+ /** Output frame rate; null when the source cadence passes through unmeasured. */
10743
+ fps: number$1().nullable(),
10744
+ gopFrames: number$1(),
10745
+ /** ABR target (`-b:v`), kbps. */
10746
+ targetKbps: number$1().nullable(),
10747
+ /** Ceiling (`-maxrate`), kbps. */
10748
+ capKbps: number$1().nullable(),
10749
+ bufsizeKbps: number$1().nullable(),
10750
+ /**
10751
+ * `copy` = source audio untouched, `aac` = re-encoded, `profile` = operator's
10752
+ * encode, `none` = the operator dropped the track.
10753
+ */
10754
+ audio: _enum([
10755
+ "copy",
10756
+ "aac",
10757
+ "profile",
10758
+ "none"
10759
+ ])
10760
+ });
10761
+ /**
10762
+ * A derived stream's source: a **profile** slot (follows whatever physical
10763
+ * stream that profile is assigned to) or a **camStream** (pinned to one
10764
+ * physical stream regardless of assignment).
10765
+ */
10766
+ var DerivedSourceRefSchema = union([object({
10767
+ kind: literal("profile"),
10768
+ profile: _enum([
10769
+ "high",
10770
+ "mid",
10771
+ "low"
10772
+ ])
10773
+ }), object({
10774
+ kind: literal("camStream"),
10775
+ camStreamId: string()
10776
+ })]);
10777
+ object({
10778
+ width: number$1().nullable(),
10779
+ height: number$1().nullable(),
10780
+ fps: number$1().nullable(),
10781
+ idrIntervalMs: number$1().nullable(),
10782
+ /** `h264` / `h265` when observed. */
10783
+ videoCodec: _enum(["h264", "h265"]).nullable(),
10784
+ /** Upper-cased SDP name (`AAC`, `PCMU`) when the source has an audio track. */
10785
+ audioCodec: string().nullable()
10786
+ });
10787
+ /**
10788
+ * The full effective encode of a derived-stream profile: the stats the broker
10789
+ * publishes in `getBrokerStats.derivedEncode` plus the resolved geometry, the
10790
+ * flags that say WHY a number differs from the request, and the ffmpeg output
10791
+ * argv. One function (`computeDerivedEncode`) produces it for both the
10792
+ * broker's start path and `previewDerivedEncode`.
10793
+ */
10794
+ var DerivedEncodePreviewSchema = DerivedEffectiveEncodeSchema.extend({
10795
+ /** Final picture size; `null` when neither the profile nor the source names it. */
10796
+ width: number$1().nullable(),
10797
+ height: number$1().nullable(),
10798
+ /** `h264` / `h265` re-encode, `copy` remux; `null` is never returned (the encoder always resolves). */
10799
+ videoCodec: _enum([
10800
+ "h264",
10801
+ "h265",
10802
+ "copy"
10704
10803
  ]),
10804
+ requestedFps: number$1().nullable(),
10805
+ /** The requested fps exceeded the source and the source cadence won. */
10806
+ fpsClampedToSource: boolean(),
10807
+ /** Lowest bitrate accepted for this geometry x fps; `null` when unknown. */
10808
+ floorKbps: number$1().nullable(),
10809
+ /** The explicit bitrate was below the floor and was raised to it. */
10810
+ raisedToFloor: boolean(),
10811
+ /** What the profile asked for when it was raised; `null` otherwise. */
10812
+ requestedKbps: number$1().nullable(),
10813
+ /** Seconds between keyframes; `null` when the output cadence is unknown. */
10814
+ keyframeIntervalSec: number$1().nullable(),
10815
+ /** The ffmpeg argv, with the source loopback URL in `-i`. */
10816
+ args: array(string())
10817
+ });
10818
+ /** Result of `previewDerivedEncode`: a plan, or the reason there is none. */
10819
+ var PreviewDerivedEncodeResultSchema = discriminatedUnion("kind", [object({
10820
+ kind: literal("preview"),
10821
+ preview: DerivedEncodePreviewSchema
10822
+ }), object({ kind: literal("no-source") })]);
10823
+ var BrokerStatsSchema = object({
10824
+ status: BrokerStatusSchema,
10705
10825
  inputFps: number$1(),
10706
10826
  encodedSubscribers: number$1(),
10707
10827
  uptimeMs: number$1(),
@@ -10741,7 +10861,9 @@ var BrokerStatsSchema = object({
10741
10861
  * alone that the mute is on the packet path and not merely persisted.
10742
10862
  */
10743
10863
  audioMuted: boolean().optional(),
10744
- audioMutedDropped: number$1().optional()
10864
+ audioMutedDropped: number$1().optional(),
10865
+ /** Present for a derived broker once its feeder has spawned at least once. */
10866
+ derivedEncode: DerivedEffectiveEncodeSchema.optional()
10745
10867
  });
10746
10868
  /**
10747
10869
  * Exporter-facing "profile restream" entry. Returned by
@@ -10856,6 +10978,10 @@ var CAP_VOCABULARY_BY_NAME = {
10856
10978
  it: "Commuta {device}"
10857
10979
  },
10858
10980
  icon: "toggle-right",
10981
+ sideEffects: [{
10982
+ field: "on",
10983
+ negate: true
10984
+ }],
10859
10985
  offeredWhen: {
10860
10986
  method: "getOptions",
10861
10987
  field: "supportsSetState"
@@ -11970,7 +12096,15 @@ var CAP_VOCABULARY_BY_NAME = {
11970
12096
  effect: {
11971
12097
  field: "state",
11972
12098
  value: "locked"
11973
- }
12099
+ },
12100
+ hold: { effects: [{
12101
+ field: "state",
12102
+ value: "locking",
12103
+ when: {
12104
+ field: "state",
12105
+ notIn: ["locked"]
12106
+ }
12107
+ }] }
11974
12108
  },
11975
12109
  {
11976
12110
  id: "lock.unlock",
@@ -11999,7 +12133,15 @@ var CAP_VOCABULARY_BY_NAME = {
11999
12133
  effect: {
12000
12134
  field: "state",
12001
12135
  value: "unlocked"
12002
- }
12136
+ },
12137
+ hold: { effects: [{
12138
+ field: "state",
12139
+ value: "unlocking",
12140
+ when: {
12141
+ field: "state",
12142
+ notIn: ["unlocked"]
12143
+ }
12144
+ }] }
12003
12145
  },
12004
12146
  {
12005
12147
  id: "lock.open",
@@ -12313,6 +12455,14 @@ var CAP_VOCABULARY_BY_NAME = {
12313
12455
  step: .5,
12314
12456
  unit: "°C"
12315
12457
  }
12458
+ }],
12459
+ effect: {
12460
+ field: "targetLow",
12461
+ fromArg: "targetLow"
12462
+ },
12463
+ sideEffects: [{
12464
+ field: "targetHigh",
12465
+ fromArg: "targetHigh"
12316
12466
  }]
12317
12467
  },
12318
12468
  {
@@ -12369,7 +12519,11 @@ var CAP_VOCABULARY_BY_NAME = {
12369
12519
  from: "status",
12370
12520
  field: "availableFanModes"
12371
12521
  }
12372
- }]
12522
+ }],
12523
+ effect: {
12524
+ field: "fanMode",
12525
+ fromArg: "fanMode"
12526
+ }
12373
12527
  },
12374
12528
  {
12375
12529
  id: "climate.preset",
@@ -12394,7 +12548,11 @@ var CAP_VOCABULARY_BY_NAME = {
12394
12548
  from: "status",
12395
12549
  field: "availablePresets"
12396
12550
  }
12397
- }]
12551
+ }],
12552
+ effect: {
12553
+ field: "preset",
12554
+ fromArg: "preset"
12555
+ }
12398
12556
  },
12399
12557
  {
12400
12558
  id: "climate.swingVerticalOn",
@@ -12627,7 +12785,15 @@ var CAP_VOCABULARY_BY_NAME = {
12627
12785
  effect: {
12628
12786
  field: "speed",
12629
12787
  value: 100
12630
- }
12788
+ },
12789
+ sideEffects: [{
12790
+ field: "preset",
12791
+ value: "",
12792
+ when: {
12793
+ field: "preset",
12794
+ notIn: [""]
12795
+ }
12796
+ }]
12631
12797
  },
12632
12798
  {
12633
12799
  id: "fan.speed",
@@ -12658,7 +12824,15 @@ var CAP_VOCABULARY_BY_NAME = {
12658
12824
  effect: {
12659
12825
  field: "speed",
12660
12826
  fromArg: "speed"
12661
- }
12827
+ },
12828
+ sideEffects: [{
12829
+ field: "preset",
12830
+ value: "",
12831
+ when: {
12832
+ field: "preset",
12833
+ notIn: [""]
12834
+ }
12835
+ }]
12662
12836
  },
12663
12837
  {
12664
12838
  id: "fan.preset",
@@ -12683,7 +12857,11 @@ var CAP_VOCABULARY_BY_NAME = {
12683
12857
  from: "status",
12684
12858
  field: "availablePresets"
12685
12859
  }
12686
- }]
12860
+ }],
12861
+ effect: {
12862
+ field: "preset",
12863
+ fromArg: "preset"
12864
+ }
12687
12865
  },
12688
12866
  {
12689
12867
  id: "fan.forward",
@@ -13228,7 +13406,15 @@ var CAP_VOCABULARY_BY_NAME = {
13228
13406
  effect: {
13229
13407
  field: "state",
13230
13408
  value: "disarmed"
13231
- }
13409
+ },
13410
+ hold: { effects: [{
13411
+ field: "state",
13412
+ value: "disarming",
13413
+ when: {
13414
+ field: "state",
13415
+ notIn: ["disarmed"]
13416
+ }
13417
+ }] }
13232
13418
  },
13233
13419
  {
13234
13420
  id: "alarm.arm.home",
@@ -13258,7 +13444,15 @@ var CAP_VOCABULARY_BY_NAME = {
13258
13444
  effect: {
13259
13445
  field: "state",
13260
13446
  value: "armed_home"
13261
- }
13447
+ },
13448
+ hold: { effects: [{
13449
+ field: "state",
13450
+ value: "arming",
13451
+ when: {
13452
+ field: "state",
13453
+ notIn: ["armed_home"]
13454
+ }
13455
+ }] }
13262
13456
  },
13263
13457
  {
13264
13458
  id: "alarm.arm.away",
@@ -13288,7 +13482,15 @@ var CAP_VOCABULARY_BY_NAME = {
13288
13482
  effect: {
13289
13483
  field: "state",
13290
13484
  value: "armed_away"
13291
- }
13485
+ },
13486
+ hold: { effects: [{
13487
+ field: "state",
13488
+ value: "arming",
13489
+ when: {
13490
+ field: "state",
13491
+ notIn: ["armed_away"]
13492
+ }
13493
+ }] }
13292
13494
  },
13293
13495
  {
13294
13496
  id: "alarm.arm.night",
@@ -13318,7 +13520,15 @@ var CAP_VOCABULARY_BY_NAME = {
13318
13520
  effect: {
13319
13521
  field: "state",
13320
13522
  value: "armed_night"
13321
- }
13523
+ },
13524
+ hold: { effects: [{
13525
+ field: "state",
13526
+ value: "arming",
13527
+ when: {
13528
+ field: "state",
13529
+ notIn: ["armed_night"]
13530
+ }
13531
+ }] }
13322
13532
  },
13323
13533
  {
13324
13534
  id: "alarm.arm.vacation",
@@ -13348,7 +13558,15 @@ var CAP_VOCABULARY_BY_NAME = {
13348
13558
  effect: {
13349
13559
  field: "state",
13350
13560
  value: "armed_vacation"
13351
- }
13561
+ },
13562
+ hold: { effects: [{
13563
+ field: "state",
13564
+ value: "arming",
13565
+ when: {
13566
+ field: "state",
13567
+ notIn: ["armed_vacation"]
13568
+ }
13569
+ }] }
13352
13570
  },
13353
13571
  {
13354
13572
  id: "alarm.arm.custom_bypass",
@@ -13378,7 +13596,15 @@ var CAP_VOCABULARY_BY_NAME = {
13378
13596
  effect: {
13379
13597
  field: "state",
13380
13598
  value: "armed_custom_bypass"
13381
- }
13599
+ },
13600
+ hold: { effects: [{
13601
+ field: "state",
13602
+ value: "arming",
13603
+ when: {
13604
+ field: "state",
13605
+ notIn: ["armed_custom_bypass"]
13606
+ }
13607
+ }] }
13382
13608
  }
13383
13609
  ],
13384
13610
  state: [{
@@ -14520,7 +14746,14 @@ var CAP_VOCABULARY_BY_NAME = {
14520
14746
  quantity: "mass"
14521
14747
  },
14522
14748
  optional: true
14523
- }]
14749
+ }],
14750
+ hold: {
14751
+ effects: [{
14752
+ field: "feeding",
14753
+ value: true
14754
+ }],
14755
+ holdMs: 1e4
14756
+ }
14524
14757
  },
14525
14758
  {
14526
14759
  id: "petFeeder.feedHoppers",
@@ -14564,7 +14797,14 @@ var CAP_VOCABULARY_BY_NAME = {
14564
14797
  quantity: "mass"
14565
14798
  },
14566
14799
  optional: true
14567
- }]
14800
+ }],
14801
+ hold: {
14802
+ effects: [{
14803
+ field: "feeding",
14804
+ value: true
14805
+ }],
14806
+ holdMs: 1e4
14807
+ }
14568
14808
  },
14569
14809
  {
14570
14810
  id: "petFeeder.cancelFeed",
@@ -14655,7 +14895,11 @@ var CAP_VOCABULARY_BY_NAME = {
14655
14895
  it: "Attiva il blocco bambini di {device}"
14656
14896
  },
14657
14897
  icon: "lock",
14658
- args: { on: true }
14898
+ args: { on: true },
14899
+ effect: {
14900
+ field: "childLock",
14901
+ value: true
14902
+ }
14659
14903
  },
14660
14904
  {
14661
14905
  id: "petFeeder.childLockOff",
@@ -14669,7 +14913,11 @@ var CAP_VOCABULARY_BY_NAME = {
14669
14913
  it: "Disattiva il blocco bambini di {device}"
14670
14914
  },
14671
14915
  icon: "lock-open",
14672
- args: { on: false }
14916
+ args: { on: false },
14917
+ effect: {
14918
+ field: "childLock",
14919
+ value: false
14920
+ }
14673
14921
  },
14674
14922
  {
14675
14923
  id: "petFeeder.lightOn",
@@ -14683,7 +14931,11 @@ var CAP_VOCABULARY_BY_NAME = {
14683
14931
  it: "Accendi la spia di {device}"
14684
14932
  },
14685
14933
  icon: "lightbulb",
14686
- args: { on: true }
14934
+ args: { on: true },
14935
+ effect: {
14936
+ field: "indicatorLight",
14937
+ value: true
14938
+ }
14687
14939
  },
14688
14940
  {
14689
14941
  id: "petFeeder.lightOff",
@@ -14697,7 +14949,11 @@ var CAP_VOCABULARY_BY_NAME = {
14697
14949
  it: "Spegni la spia di {device}"
14698
14950
  },
14699
14951
  icon: "lightbulb-off",
14700
- args: { on: false }
14952
+ args: { on: false },
14953
+ effect: {
14954
+ field: "indicatorLight",
14955
+ value: false
14956
+ }
14701
14957
  },
14702
14958
  {
14703
14959
  id: "petFeeder.feedSoundOn",
@@ -14711,7 +14967,11 @@ var CAP_VOCABULARY_BY_NAME = {
14711
14967
  it: "Attiva il suono di erogazione di {device}"
14712
14968
  },
14713
14969
  icon: "volume-2",
14714
- args: { on: true }
14970
+ args: { on: true },
14971
+ effect: {
14972
+ field: "feedSound",
14973
+ value: true
14974
+ }
14715
14975
  },
14716
14976
  {
14717
14977
  id: "petFeeder.feedSoundOff",
@@ -14725,7 +14985,11 @@ var CAP_VOCABULARY_BY_NAME = {
14725
14985
  it: "Disattiva il suono di erogazione di {device}"
14726
14986
  },
14727
14987
  icon: "volume-x",
14728
- args: { on: false }
14988
+ args: { on: false },
14989
+ effect: {
14990
+ field: "feedSound",
14991
+ value: false
14992
+ }
14729
14993
  },
14730
14994
  {
14731
14995
  id: "petFeeder.volume",
@@ -14750,7 +15014,11 @@ var CAP_VOCABULARY_BY_NAME = {
14750
15014
  min: 0,
14751
15015
  step: 1
14752
15016
  }
14753
- }]
15017
+ }],
15018
+ effect: {
15019
+ field: "volume",
15020
+ fromArg: "level"
15021
+ }
14754
15022
  }
14755
15023
  ],
14756
15024
  state: [
@@ -14822,7 +15090,11 @@ var CAP_VOCABULARY_BY_NAME = {
14822
15090
  it: "Avvia la pompa di {device}"
14823
15091
  },
14824
15092
  icon: "play",
14825
- args: { on: true }
15093
+ args: { on: true },
15094
+ effect: {
15095
+ field: "pumpRunning",
15096
+ value: true
15097
+ }
14826
15098
  }, {
14827
15099
  id: "petFountain.pumpOff",
14828
15100
  method: "setPump",
@@ -14835,7 +15107,11 @@ var CAP_VOCABULARY_BY_NAME = {
14835
15107
  it: "Ferma la pompa di {device}"
14836
15108
  },
14837
15109
  icon: "square",
14838
- args: { on: false }
15110
+ args: { on: false },
15111
+ effect: {
15112
+ field: "pumpRunning",
15113
+ value: false
15114
+ }
14839
15115
  }],
14840
15116
  state: [{
14841
15117
  kind: "boolean",
@@ -14887,7 +15163,11 @@ var CAP_VOCABULARY_BY_NAME = {
14887
15163
  it: "Fai lavorare la pompa di {device} a ciclo acceso/spento"
14888
15164
  },
14889
15165
  icon: "timer",
14890
- args: { on: true }
15166
+ args: { on: true },
15167
+ effect: {
15168
+ field: "enabled",
15169
+ value: true
15170
+ }
14891
15171
  },
14892
15172
  {
14893
15173
  id: "pumpCycle.off",
@@ -14901,7 +15181,11 @@ var CAP_VOCABULARY_BY_NAME = {
14901
15181
  it: "Fai lavorare la pompa di {device} in continuo"
14902
15182
  },
14903
15183
  icon: "timer-off",
14904
- args: { on: false }
15184
+ args: { on: false },
15185
+ effect: {
15186
+ field: "enabled",
15187
+ value: false
15188
+ }
14905
15189
  },
14906
15190
  {
14907
15191
  id: "pumpCycle.onMinutes",
@@ -14927,7 +15211,12 @@ var CAP_VOCABULARY_BY_NAME = {
14927
15211
  step: 1,
14928
15212
  unit: "min"
14929
15213
  }
14930
- }]
15214
+ }],
15215
+ effect: {
15216
+ field: "onTime",
15217
+ fromArg: "minutes",
15218
+ scale: 60
15219
+ }
14931
15220
  },
14932
15221
  {
14933
15222
  id: "pumpCycle.offMinutes",
@@ -14953,7 +15242,12 @@ var CAP_VOCABULARY_BY_NAME = {
14953
15242
  step: 1,
14954
15243
  unit: "min"
14955
15244
  }
14956
- }]
15245
+ }],
15246
+ effect: {
15247
+ field: "offTime",
15248
+ fromArg: "minutes",
15249
+ scale: 60
15250
+ }
14957
15251
  }
14958
15252
  ],
14959
15253
  state: [{
@@ -15070,7 +15364,11 @@ var CAP_VOCABULARY_BY_NAME = {
15070
15364
  en: "Play on {device}",
15071
15365
  it: "Avvia la riproduzione su {device}"
15072
15366
  },
15073
- icon: "play"
15367
+ icon: "play",
15368
+ effect: {
15369
+ field: "state",
15370
+ value: "playing"
15371
+ }
15074
15372
  },
15075
15373
  {
15076
15374
  id: "media.pause",
@@ -15083,7 +15381,11 @@ var CAP_VOCABULARY_BY_NAME = {
15083
15381
  en: "Pause {device}",
15084
15382
  it: "Metti in pausa {device}"
15085
15383
  },
15086
- icon: "pause"
15384
+ icon: "pause",
15385
+ effect: {
15386
+ field: "state",
15387
+ value: "paused"
15388
+ }
15087
15389
  },
15088
15390
  {
15089
15391
  id: "media.stop",
@@ -15149,7 +15451,11 @@ var CAP_VOCABULARY_BY_NAME = {
15149
15451
  step: 1,
15150
15452
  unit: "%"
15151
15453
  }
15152
- }]
15454
+ }],
15455
+ effect: {
15456
+ field: "volumeLevel",
15457
+ fromArg: "volumeLevel"
15458
+ }
15153
15459
  },
15154
15460
  {
15155
15461
  id: "media.mute",
@@ -15163,7 +15469,11 @@ var CAP_VOCABULARY_BY_NAME = {
15163
15469
  it: "Silenzia {device}"
15164
15470
  },
15165
15471
  icon: "volume-x",
15166
- args: { muted: true }
15472
+ args: { muted: true },
15473
+ effect: {
15474
+ field: "isMuted",
15475
+ value: true
15476
+ }
15167
15477
  },
15168
15478
  {
15169
15479
  id: "media.unmute",
@@ -15177,7 +15487,11 @@ var CAP_VOCABULARY_BY_NAME = {
15177
15487
  it: "Riattiva l’audio di {device}"
15178
15488
  },
15179
15489
  icon: "volume-2",
15180
- args: { muted: false }
15490
+ args: { muted: false },
15491
+ effect: {
15492
+ field: "isMuted",
15493
+ value: false
15494
+ }
15181
15495
  },
15182
15496
  {
15183
15497
  id: "media.shuffleOn",
@@ -15191,7 +15505,11 @@ var CAP_VOCABULARY_BY_NAME = {
15191
15505
  it: "Attiva la riproduzione casuale su {device}"
15192
15506
  },
15193
15507
  icon: "shuffle",
15194
- args: { shuffle: true }
15508
+ args: { shuffle: true },
15509
+ effect: {
15510
+ field: "shuffle",
15511
+ value: true
15512
+ }
15195
15513
  },
15196
15514
  {
15197
15515
  id: "media.shuffleOff",
@@ -15205,7 +15523,11 @@ var CAP_VOCABULARY_BY_NAME = {
15205
15523
  it: "Disattiva la riproduzione casuale su {device}"
15206
15524
  },
15207
15525
  icon: "shuffle",
15208
- args: { shuffle: false }
15526
+ args: { shuffle: false },
15527
+ effect: {
15528
+ field: "shuffle",
15529
+ value: false
15530
+ }
15209
15531
  },
15210
15532
  {
15211
15533
  id: "media.repeat",
@@ -15251,7 +15573,11 @@ var CAP_VOCABULARY_BY_NAME = {
15251
15573
  }
15252
15574
  ]
15253
15575
  }
15254
- }]
15576
+ }],
15577
+ effect: {
15578
+ field: "repeat",
15579
+ fromArg: "repeat"
15580
+ }
15255
15581
  },
15256
15582
  {
15257
15583
  id: "media.source",
@@ -15276,7 +15602,11 @@ var CAP_VOCABULARY_BY_NAME = {
15276
15602
  from: "status",
15277
15603
  field: "availableSources"
15278
15604
  }
15279
- }]
15605
+ }],
15606
+ effect: {
15607
+ field: "source",
15608
+ fromArg: "source"
15609
+ }
15280
15610
  },
15281
15611
  {
15282
15612
  id: "media.seek",
@@ -15816,7 +16146,14 @@ var CAP_VOCABULARY_BY_NAME = {
15816
16146
  en: "Run {device}",
15817
16147
  it: "Esegui {device}"
15818
16148
  },
15819
- icon: "scroll-text"
16149
+ icon: "scroll-text",
16150
+ hold: {
16151
+ effects: [{
16152
+ field: "isRunning",
16153
+ value: true
16154
+ }],
16155
+ holdMs: 1e4
16156
+ }
15820
16157
  }, {
15821
16158
  id: "script.stop",
15822
16159
  method: "stop",
@@ -15828,7 +16165,11 @@ var CAP_VOCABULARY_BY_NAME = {
15828
16165
  en: "Stop {device}",
15829
16166
  it: "Ferma {device}"
15830
16167
  },
15831
- icon: "square"
16168
+ icon: "square",
16169
+ effect: {
16170
+ field: "isRunning",
16171
+ value: false
16172
+ }
15832
16173
  }],
15833
16174
  state: [{
15834
16175
  kind: "boolean",
@@ -15866,7 +16207,11 @@ var CAP_VOCABULARY_BY_NAME = {
15866
16207
  en: "Enable {device}",
15867
16208
  it: "Abilita {device}"
15868
16209
  },
15869
- icon: "toggle-right"
16210
+ icon: "toggle-right",
16211
+ effect: {
16212
+ field: "enabled",
16213
+ value: true
16214
+ }
15870
16215
  },
15871
16216
  {
15872
16217
  id: "haAutomation.disable",
@@ -15879,7 +16224,11 @@ var CAP_VOCABULARY_BY_NAME = {
15879
16224
  en: "Disable {device}",
15880
16225
  it: "Disabilita {device}"
15881
16226
  },
15882
- icon: "toggle-left"
16227
+ icon: "toggle-left",
16228
+ effect: {
16229
+ field: "enabled",
16230
+ value: false
16231
+ }
15883
16232
  },
15884
16233
  {
15885
16234
  id: "haAutomation.trigger",
@@ -17481,6 +17830,17 @@ var CAP_VOCABULARY_BY_NAME = {
17481
17830
  },
17482
17831
  notOperatorFacing: { resync: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action" }
17483
17832
  },
17833
+ "device-state-refresh": {
17834
+ scope: "device",
17835
+ noun: {
17836
+ en: "State refresh",
17837
+ it: "Aggiornamento dello stato"
17838
+ },
17839
+ notOperatorFacing: {
17840
+ refresh: "the core schedules state refreshes itself; an operator never asks for one",
17841
+ resubscribe: "the core schedules state refreshes itself; an operator never asks for one"
17842
+ }
17843
+ },
17484
17844
  "recording": {
17485
17845
  scope: "device",
17486
17846
  noun: {
@@ -20475,6 +20835,7 @@ var CAP_NAMES = Object.freeze([
20475
20835
  "device-removal-hook",
20476
20836
  "device-runs",
20477
20837
  "device-state",
20838
+ "device-state-refresh",
20478
20839
  "device-status",
20479
20840
  "device-transitions",
20480
20841
  "dishwasher",
@@ -22115,6 +22476,10 @@ Object.freeze({
22115
22476
  "path": "power",
22116
22477
  "valueType": "number"
22117
22478
  },
22479
+ {
22480
+ "path": "deliveredPower",
22481
+ "valueType": "number"
22482
+ },
22118
22483
  {
22119
22484
  "path": "energy",
22120
22485
  "valueType": "number"
@@ -22933,7 +23298,7 @@ Object.freeze({
22933
23298
  }
22934
23299
  });
22935
23300
  //#endregion
22936
- //#region ../types/dist/implemented-methods-k3KProJd.mjs
23301
+ //#region ../types/dist/implemented-methods-BUBqZ2a0.mjs
22937
23302
  /**
22938
23303
  * The ffmpeg build every CamStack node downloads, per platform and arch.
22939
23304
  *
@@ -24093,6 +24458,8 @@ var CompositionItemEntrySchema = object({
24093
24458
  */
24094
24459
  reset: CompositionForwardCommandSchema.optional()
24095
24460
  });
24461
+ /** Which identity link added a feature (D1063). */
24462
+ var CompositionContributedBySchema = object({ linkId: string().min(1) });
24096
24463
  var CompositionFeatureSchema = discriminatedUnion("kind", [object({
24097
24464
  kind: literal("fields"),
24098
24465
  cap: string().min(1),
@@ -24104,7 +24471,14 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
24104
24471
  */
24105
24472
  items: record$1(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
24106
24473
  /** Method name → what serves it. Only a BUILT capability takes commands (D967). */
24107
- commands: record$1(string().min(1), CompositionCommandTargetSchema).optional()
24474
+ commands: record$1(string().min(1), CompositionCommandTargetSchema).optional(),
24475
+ /**
24476
+ * Provenance only (D1063): the identity link that added this feature. The
24477
+ * source ref stays in `fields`; `enabled` stays the operator's switch. An
24478
+ * operator edit of the source drops the stamp and the feature becomes the
24479
+ * operator's; a lost link removes only stamped features.
24480
+ */
24481
+ contributedBy: CompositionContributedBySchema.optional()
24108
24482
  }), object({
24109
24483
  kind: literal("passthrough"),
24110
24484
  cap: string().min(1),
@@ -25532,10 +25906,16 @@ looseObject({
25532
25906
  TargetSchema.omit({ id: true });
25533
25907
  var EncodeProfileSchema = object({
25534
25908
  video: object({
25909
+ /**
25910
+ * `h264` / `h265` re-encode into that codec; `source` re-encodes in whatever
25911
+ * codec the source speaks (a resize that keeps the codec); `copy` remuxes
25912
+ * with no encode at all (so no resize either).
25913
+ */
25535
25914
  codec: _enum([
25536
25915
  "h264",
25537
25916
  "h265",
25538
- "copy"
25917
+ "copy",
25918
+ "source"
25539
25919
  ]),
25540
25920
  profile: _enum([
25541
25921
  "baseline",
@@ -25587,12 +25967,14 @@ var EncodeProfileSchema = object({
25587
25967
  singleSlicePerFrame: boolean().optional()
25588
25968
  }),
25589
25969
  audio: union([literal("passthrough"), object({
25970
+ /** `none` drops the audio track (`-an`); `copy` carries the source's. */
25590
25971
  codec: _enum([
25591
25972
  "opus",
25592
25973
  "aac",
25593
25974
  "pcmu",
25594
25975
  "pcma",
25595
- "copy"
25976
+ "copy",
25977
+ "none"
25596
25978
  ]),
25597
25979
  bitrateKbps: number$1().int().positive().optional(),
25598
25980
  sampleRateHz: number$1().int().positive().optional(),
@@ -53377,6 +53759,14 @@ var alarmPanelCapability = {
53377
53759
  field: "state",
53378
53760
  value: "disarmed"
53379
53761
  },
53762
+ hold: { effects: [{
53763
+ field: "state",
53764
+ value: "disarming",
53765
+ when: {
53766
+ field: "state",
53767
+ notIn: ["disarmed"]
53768
+ }
53769
+ }] },
53380
53770
  openArgs: [{
53381
53771
  key: "code",
53382
53772
  label: t("PIN code", "Codice PIN"),
@@ -53407,6 +53797,14 @@ var alarmPanelCapability = {
53407
53797
  field: "state",
53408
53798
  value: "armed_home"
53409
53799
  },
53800
+ hold: { effects: [{
53801
+ field: "state",
53802
+ value: "arming",
53803
+ when: {
53804
+ field: "state",
53805
+ notIn: ["armed_home"]
53806
+ }
53807
+ }] },
53410
53808
  args: { mode: "home" },
53411
53809
  openArgs: [{
53412
53810
  key: "code",
@@ -53427,6 +53825,14 @@ var alarmPanelCapability = {
53427
53825
  field: "state",
53428
53826
  value: "armed_away"
53429
53827
  },
53828
+ hold: { effects: [{
53829
+ field: "state",
53830
+ value: "arming",
53831
+ when: {
53832
+ field: "state",
53833
+ notIn: ["armed_away"]
53834
+ }
53835
+ }] },
53430
53836
  args: { mode: "away" },
53431
53837
  openArgs: [{
53432
53838
  key: "code",
@@ -53447,6 +53853,14 @@ var alarmPanelCapability = {
53447
53853
  field: "state",
53448
53854
  value: "armed_night"
53449
53855
  },
53856
+ hold: { effects: [{
53857
+ field: "state",
53858
+ value: "arming",
53859
+ when: {
53860
+ field: "state",
53861
+ notIn: ["armed_night"]
53862
+ }
53863
+ }] },
53450
53864
  args: { mode: "night" },
53451
53865
  openArgs: [{
53452
53866
  key: "code",
@@ -53467,6 +53881,14 @@ var alarmPanelCapability = {
53467
53881
  field: "state",
53468
53882
  value: "armed_vacation"
53469
53883
  },
53884
+ hold: { effects: [{
53885
+ field: "state",
53886
+ value: "arming",
53887
+ when: {
53888
+ field: "state",
53889
+ notIn: ["armed_vacation"]
53890
+ }
53891
+ }] },
53470
53892
  args: { mode: "vacation" },
53471
53893
  openArgs: [{
53472
53894
  key: "code",
@@ -53487,6 +53909,14 @@ var alarmPanelCapability = {
53487
53909
  field: "state",
53488
53910
  value: "armed_custom_bypass"
53489
53911
  },
53912
+ hold: { effects: [{
53913
+ field: "state",
53914
+ value: "arming",
53915
+ when: {
53916
+ field: "state",
53917
+ notIn: ["armed_custom_bypass"]
53918
+ }
53919
+ }] },
53490
53920
  args: { mode: "custom_bypass" },
53491
53921
  openArgs: [{
53492
53922
  key: "code",
@@ -54170,6 +54600,10 @@ var automationControlCapability = {
54170
54600
  auth: "admin",
54171
54601
  actions: [{
54172
54602
  id: "haAutomation.enable",
54603
+ effect: {
54604
+ field: "enabled",
54605
+ value: true
54606
+ },
54173
54607
  label: t("Enable automation", "Abilita l’automazione"),
54174
54608
  phrase: t("Enable {device}", "Abilita {device}"),
54175
54609
  icon: "toggle-right"
@@ -54180,6 +54614,10 @@ var automationControlCapability = {
54180
54614
  auth: "admin",
54181
54615
  actions: [{
54182
54616
  id: "haAutomation.disable",
54617
+ effect: {
54618
+ field: "enabled",
54619
+ value: false
54620
+ },
54183
54621
  label: t("Disable automation", "Disabilita l’automazione"),
54184
54622
  phrase: t("Disable {device}", "Disabilita {device}"),
54185
54623
  icon: "toggle-left"
@@ -56258,7 +56696,11 @@ method(object({
56258
56696
  }).nullable(), {
56259
56697
  kind: "mutation",
56260
56698
  auth: "admin"
56261
- }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
56699
+ }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({
56700
+ deviceId: number$1().int().nonnegative(),
56701
+ profile: EncodeProfileSchema,
56702
+ source: DerivedSourceRefSchema.optional()
56703
+ }), PreviewDerivedEncodeResultSchema), method(object({ brokerId: string() }), object({
56262
56704
  probed: boolean(),
56263
56705
  summary: string()
56264
56706
  }), {
@@ -56990,6 +57432,14 @@ var climateControlCapability = {
56990
57432
  label: t("Set temperature range", "Imposta l’intervallo di temperatura"),
56991
57433
  phrase: t("Keep {device} between {targetLow} and {targetHigh}", "Mantieni {device} tra {targetLow} e {targetHigh}"),
56992
57434
  icon: "thermometer",
57435
+ effect: {
57436
+ field: "targetLow",
57437
+ fromArg: "targetLow"
57438
+ },
57439
+ sideEffects: [{
57440
+ field: "targetHigh",
57441
+ fromArg: "targetHigh"
57442
+ }],
56993
57443
  openArgs: [{
56994
57444
  key: "targetLow",
56995
57445
  label: t("Lowest", "Minima"),
@@ -57048,6 +57498,10 @@ var climateControlCapability = {
57048
57498
  label: t("Set fan mode", "Imposta la ventilazione"),
57049
57499
  phrase: t("Set the fan of {device} to {fanMode}", "Imposta la ventilazione di {device} su {fanMode}"),
57050
57500
  icon: "fan",
57501
+ effect: {
57502
+ field: "fanMode",
57503
+ fromArg: "fanMode"
57504
+ },
57051
57505
  openArgs: [{
57052
57506
  key: "fanMode",
57053
57507
  label: t("Fan mode", "Ventilazione"),
@@ -57070,6 +57524,10 @@ var climateControlCapability = {
57070
57524
  label: t("Set preset", "Imposta il preset"),
57071
57525
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
57072
57526
  icon: "list",
57527
+ effect: {
57528
+ field: "preset",
57529
+ fromArg: "preset"
57530
+ },
57073
57531
  openArgs: [{
57074
57532
  key: "preset",
57075
57533
  label: t("Preset", "Preset"),
@@ -57657,7 +58115,8 @@ var CompositionProblemSchema = object({
57657
58115
  "command-source-unknown",
57658
58116
  "command-input-unknown",
57659
58117
  "command-input-missing",
57660
- "power-source-is-actuator"
58118
+ "power-source-is-actuator",
58119
+ "link-contribution-removed"
57661
58120
  ]),
57662
58121
  path: string(),
57663
58122
  message: string()
@@ -59084,6 +59543,10 @@ var mediaPlayerCapability = {
59084
59543
  auth: "protected",
59085
59544
  actions: [{
59086
59545
  id: "media.play",
59546
+ effect: {
59547
+ field: "state",
59548
+ value: "playing"
59549
+ },
59087
59550
  label: t("Play", "Riproduci"),
59088
59551
  phrase: t("Play on {device}", "Avvia la riproduzione su {device}"),
59089
59552
  icon: "play"
@@ -59094,6 +59557,10 @@ var mediaPlayerCapability = {
59094
59557
  auth: "protected",
59095
59558
  actions: [{
59096
59559
  id: "media.pause",
59560
+ effect: {
59561
+ field: "state",
59562
+ value: "paused"
59563
+ },
59097
59564
  label: t("Pause media", "Metti in pausa"),
59098
59565
  phrase: t("Pause {device}", "Metti in pausa {device}"),
59099
59566
  icon: "pause"
@@ -59137,6 +59604,10 @@ var mediaPlayerCapability = {
59137
59604
  auth: "protected",
59138
59605
  actions: [{
59139
59606
  id: "media.volume",
59607
+ effect: {
59608
+ field: "volumeLevel",
59609
+ fromArg: "volumeLevel"
59610
+ },
59140
59611
  label: t("Set volume", "Imposta il volume"),
59141
59612
  phrase: t("Set the volume of {device} to {volumeLevel}", "Imposta il volume di {device} al {volumeLevel}"),
59142
59613
  icon: "volume-2",
@@ -59161,12 +59632,20 @@ var mediaPlayerCapability = {
59161
59632
  auth: "protected",
59162
59633
  actions: [{
59163
59634
  id: "media.mute",
59635
+ effect: {
59636
+ field: "isMuted",
59637
+ value: true
59638
+ },
59164
59639
  label: t("Mute", "Silenzia"),
59165
59640
  phrase: t("Mute {device}", "Silenzia {device}"),
59166
59641
  icon: "volume-x",
59167
59642
  args: { muted: true }
59168
59643
  }, {
59169
59644
  id: "media.unmute",
59645
+ effect: {
59646
+ field: "isMuted",
59647
+ value: false
59648
+ },
59170
59649
  label: t("Unmute", "Riattiva l’audio"),
59171
59650
  phrase: t("Unmute {device}", "Riattiva l’audio di {device}"),
59172
59651
  icon: "volume-2",
@@ -59181,12 +59660,20 @@ var mediaPlayerCapability = {
59181
59660
  auth: "protected",
59182
59661
  actions: [{
59183
59662
  id: "media.shuffleOn",
59663
+ effect: {
59664
+ field: "shuffle",
59665
+ value: true
59666
+ },
59184
59667
  label: t("Shuffle on", "Riproduzione casuale attiva"),
59185
59668
  phrase: t("Turn on shuffle on {device}", "Attiva la riproduzione casuale su {device}"),
59186
59669
  icon: "shuffle",
59187
59670
  args: { shuffle: true }
59188
59671
  }, {
59189
59672
  id: "media.shuffleOff",
59673
+ effect: {
59674
+ field: "shuffle",
59675
+ value: false
59676
+ },
59190
59677
  label: t("Shuffle off", "Riproduzione casuale spenta"),
59191
59678
  phrase: t("Turn off shuffle on {device}", "Disattiva la riproduzione casuale su {device}"),
59192
59679
  icon: "shuffle",
@@ -59201,6 +59688,10 @@ var mediaPlayerCapability = {
59201
59688
  auth: "protected",
59202
59689
  actions: [{
59203
59690
  id: "media.repeat",
59691
+ effect: {
59692
+ field: "repeat",
59693
+ fromArg: "repeat"
59694
+ },
59204
59695
  label: t("Set repeat", "Imposta la ripetizione"),
59205
59696
  phrase: t("Set repeat on {device} to {repeat}", "Imposta la ripetizione di {device} su {repeat}"),
59206
59697
  icon: "repeat",
@@ -59235,6 +59726,10 @@ var mediaPlayerCapability = {
59235
59726
  auth: "protected",
59236
59727
  actions: [{
59237
59728
  id: "media.source",
59729
+ effect: {
59730
+ field: "source",
59731
+ fromArg: "source"
59732
+ },
59238
59733
  label: t("Select source", "Scegli la sorgente"),
59239
59734
  phrase: t("Switch {device} to {source}", "Passa {device} alla sorgente {source}"),
59240
59735
  icon: "cast",
@@ -59403,7 +59898,7 @@ var mediaPlayerCapability = {
59403
59898
  ]
59404
59899
  }
59405
59900
  };
59406
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Climate, DeviceType.Climate, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation;
59901
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Climate, DeviceType.Climate, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation;
59407
59902
  var NUMBER = {
59408
59903
  kind: "fixed",
59409
59904
  result: ["number"]
@@ -59895,7 +60390,9 @@ var PowerSourceRefusalReasonSchema = _enum([
59895
60390
  "switch-call-failed",
59896
60391
  "switch-options-unreadable",
59897
60392
  "not-settable",
59898
- "switch-is-actuator"
60393
+ "switch-is-actuator",
60394
+ "link-lost",
60395
+ "link-unknown"
59899
60396
  ]);
59900
60397
  var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
59901
60398
  accepted: literal(false),
@@ -61982,6 +62479,79 @@ var IdentityCandidatesSchema = discriminatedUnion("status", [object({
61982
62479
  pairs: array(IdentityCandidatePairSchema).readonly(),
61983
62480
  undeclaredDeviceIds: array(number$1().int()).readonly()
61984
62481
  })]);
62482
+ var IdentityLinkKindSchema = _enum(["same-device", "poe-power"]);
62483
+ /**
62484
+ * - `proposed` — one strong key matched: waits for the operator;
62485
+ * - `linked` — confirmed by the operator, or auto-linked on strong evidence;
62486
+ * - `dismissed` — the operator said no (or unlinked): sticky, never re-proposed.
62487
+ */
62488
+ var IdentityLinkStateSchema = _enum([
62489
+ "proposed",
62490
+ "linked",
62491
+ "dismissed"
62492
+ ]);
62493
+ /** Who decided the current state: the matcher (`auto`) or the operator. */
62494
+ var IdentityLinkOriginSchema = _enum(["auto", "operator"]);
62495
+ /** One side: the device ref that survives re-registration, plus its current numeric id. */
62496
+ var IdentityLinkSideSchema = object({
62497
+ addonId: string().min(1),
62498
+ stableId: string().min(1),
62499
+ deviceId: number$1().int()
62500
+ });
62501
+ var IdentityLinkSchema = object({
62502
+ kind: IdentityLinkKindSchema,
62503
+ a: IdentityLinkSideSchema,
62504
+ b: IdentityLinkSideSchema,
62505
+ state: IdentityLinkStateSchema,
62506
+ origin: IdentityLinkOriginSchema,
62507
+ /** The identifiers that matched when the link was last evaluated, ordered by key then value. */
62508
+ evidence: array(IdentityMatchedKeySchema).readonly(),
62509
+ /** An operator-confirmed link whose evidence no longer matches: kept, flagged. */
62510
+ evidenceGone: literal(true).optional(),
62511
+ createdAt: number$1().int().nonnegative(),
62512
+ decidedAt: number$1().int().nonnegative().optional()
62513
+ }).extend({ id: string().min(1) });
62514
+ DeviceRole.PoePort;
62515
+ /**
62516
+ * The answer of `device-manager.listIdentityLinks`. `not-loaded` until the
62517
+ * links have been read — never an empty list (D315).
62518
+ */
62519
+ var IdentityLinksReadSchema = discriminatedUnion("status", [object({
62520
+ status: literal("not-loaded"),
62521
+ reason: string()
62522
+ }), object({
62523
+ status: literal("answered"),
62524
+ links: array(IdentityLinkSchema).readonly()
62525
+ })]);
62526
+ /** Why an operator decision on a link was refused. */
62527
+ var IdentityLinkDecisionRefusalSchema = _enum([
62528
+ "not-loaded",
62529
+ "unknown-link",
62530
+ "wrong-state"
62531
+ ]);
62532
+ /** The answer of `confirmIdentityLink` / `dismissIdentityLink` / `unlinkIdentity`. */
62533
+ var IdentityLinkDecisionSchema = discriminatedUnion("ok", [object({
62534
+ ok: literal(true),
62535
+ link: IdentityLinkSchema
62536
+ }), object({
62537
+ ok: literal(false),
62538
+ reason: IdentityLinkDecisionRefusalSchema,
62539
+ message: string()
62540
+ })]);
62541
+ /** Why a link was lost. */
62542
+ var IdentityLinkLostReasonSchema = _enum([
62543
+ "evidence-gone",
62544
+ "device-removed",
62545
+ "operator-unlinked"
62546
+ ]);
62547
+ object({
62548
+ linkId: string(),
62549
+ kind: IdentityLinkKindSchema,
62550
+ aDeviceId: number$1().int(),
62551
+ bDeviceId: number$1().int(),
62552
+ origin: IdentityLinkOriginSchema,
62553
+ reason: IdentityLinkLostReasonSchema.optional()
62554
+ });
61985
62555
  var DeviceSearchRequiresSchema = object({
61986
62556
  /** Capability names the field wants a value of. Absent when the field wants actions only. */
61987
62557
  caps: array(string()).readonly().optional(),
@@ -62548,6 +63118,11 @@ var DeviceInfoSchema = object({
62548
63118
  * the owning provider via `setIdentifiers`; read-only for the operator.
62549
63119
  * Absent ⇒ the provider declared none. */
62550
63120
  identifiers: DeviceIdentifiersSchema.optional(),
63121
+ /** The identity of the device at the far end of this device's physical
63122
+ * link (D1059 amended by D1063) — a PoE port's wired client. Written only by
63123
+ * the owning provider via `setAttachedIdentifiers`; it never makes the two
63124
+ * devices the same device. Absent ⇒ none declared. */
63125
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
62551
63126
  /** Optional upstream-system identity + rendering envelope. See
62552
63127
  * `SourceInfo` in `packages/types/src/device/source-info.ts`. */
62553
63128
  sourceInfo: SourceInfoSchema.optional(),
@@ -62701,6 +63276,8 @@ var DeviceMetaSchema = object({
62701
63276
  metadata: record$1(string(), unknown()).nullable().optional(),
62702
63277
  /** Provider-declared identifiers (D1059). See `DeviceMeta.identifiers`. */
62703
63278
  identifiers: DeviceIdentifiersSchema.optional(),
63279
+ /** The far end of the device's physical link (D1063). See `DeviceMeta.attachedIdentifiers`. */
63280
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
62704
63281
  /** Optional upstream-system identity + rendering envelope. See
62705
63282
  * `SourceInfo`. Present when the device has been persisted with a
62706
63283
  * non-synthetic source identifier (HA entities, vendor MAC, …);
@@ -63025,6 +63602,26 @@ method(object({
63025
63602
  }), method(object({}), IdentityCandidatesSchema, {
63026
63603
  kind: "query",
63027
63604
  auth: "admin"
63605
+ }), method(object({
63606
+ deviceId: number$1(),
63607
+ identifiers: DeviceIdentifiersSchema.nullable(),
63608
+ /** Kinds the provider tried to read and could not: their stored value is kept. */
63609
+ unread: array(DeviceIdentifierKeySchema).optional()
63610
+ }), _void(), {
63611
+ kind: "mutation",
63612
+ auth: "admin"
63613
+ }), method(object({ deviceId: number$1().int().optional() }), IdentityLinksReadSchema, {
63614
+ kind: "query",
63615
+ auth: "admin"
63616
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
63617
+ kind: "mutation",
63618
+ auth: "admin"
63619
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
63620
+ kind: "mutation",
63621
+ auth: "admin"
63622
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
63623
+ kind: "mutation",
63624
+ auth: "admin"
63028
63625
  }), method(_void(), array(string())), method(object({ name: string() }), _void(), {
63029
63626
  kind: "mutation",
63030
63627
  auth: "admin"
@@ -63975,8 +64572,12 @@ var ClaimsListingSchema = discriminatedUnion("state", [object({
63975
64572
  })]);
63976
64573
  method(object({ deviceId: number$1() }), record$1(string(), record$1(string(), unknown()))), method(object({
63977
64574
  deviceId: number$1(),
63978
- capName: string()
63979
- }), record$1(string(), unknown()).nullable()), method(object({}), record$1(string(), record$1(string(), record$1(string(), unknown())))), method(object({
64575
+ capName: string(),
64576
+ /** The slice the device CONFIRMED, without a held command (D1061) — history and automations. */
64577
+ confirmed: boolean().optional()
64578
+ }), record$1(string(), unknown()).nullable()), method(object({
64579
+ /** The slices the devices CONFIRMED, without held commands (D1061). */
64580
+ confirmed: boolean().optional() }), record$1(string(), record$1(string(), record$1(string(), unknown())))), method(object({
63980
64581
  deviceId: number$1(),
63981
64582
  capName: string(),
63982
64583
  slice: record$1(string(), unknown())
@@ -64014,6 +64615,88 @@ method(object({ deviceId: number$1() }), record$1(string(), record$1(string(), u
64014
64615
  slice: record$1(string(), unknown())
64015
64616
  }));
64016
64617
  /**
64618
+ * Server-driven device state refresh (D1062): the core decides WHEN a device is
64619
+ * re-read, the integration only knows HOW.
64620
+ *
64621
+ * A provider states its policy where it registers the device's
64622
+ * `device-state-refresh` cap (`ctx.registerNativeCap(cap, provider, {
64623
+ * stateRefresh })`). It reaches the hub by the road the command-hold options
64624
+ * take (D1061): written directly in-process, carried on a forked child's cap
64625
+ * descriptors otherwise. Plain data, wire-safe.
64626
+ */
64627
+ /** Why the core asks for a refresh. */
64628
+ var StateRefreshReasonSchema = _enum([
64629
+ "schedule",
64630
+ "command",
64631
+ "burst"
64632
+ ]);
64633
+ /**
64634
+ * What arrives without asking: `none` (everything is read), `partial` (some
64635
+ * fields arrive by push, the rest is read on the schedule), `full` (everything
64636
+ * arrives by push — never read on a schedule).
64637
+ */
64638
+ var StateRefreshPushSchema = _enum([
64639
+ "none",
64640
+ "partial",
64641
+ "full"
64642
+ ]);
64643
+ object({
64644
+ /**
64645
+ * The integration instance the device belongs to. Devices of one instance
64646
+ * share one schedule group: a batching provider is asked once for all of
64647
+ * them, and the heartbeat is judged across them.
64648
+ */
64649
+ integrationId: string().min(1),
64650
+ /** The fastest interval the integration can afford for its devices. The core polls at it by default. */
64651
+ minIntervalMs: number$1().int().min(1e3),
64652
+ /**
64653
+ * The operator's per-integration setting, when there is one. It can only SLOW
64654
+ * the cadence: the core polls at `max(minIntervalMs, intervalMs)`.
64655
+ */
64656
+ intervalMs: number$1().int().positive().optional(),
64657
+ /** One `refresh` call can read every device of the integration at once. */
64658
+ batch: boolean(),
64659
+ push: StateRefreshPushSchema,
64660
+ /** Longest silence a push integration may keep before the core re-reads it and asks it to resubscribe. */
64661
+ heartbeatMs: number$1().int().positive().optional(),
64662
+ /**
64663
+ * Bumped by the provider each time its push subscription reconnected on its
64664
+ * own. A change makes the core re-read every device of the integration
64665
+ * (pushes lost while it was down; events may be dropped, D8).
64666
+ */
64667
+ connectionEpoch: number$1().int().nonnegative().optional()
64668
+ });
64669
+ /**
64670
+ * device-state-refresh — the HOW of a device's state refresh, called by the
64671
+ * core, which owns the WHEN (D1062).
64672
+ *
64673
+ * The provider registers it per device with its policy
64674
+ * (`registerNativeCap(cap, provider, { stateRefresh })`). The hub's scheduler
64675
+ * calls `refresh` on the schedule, after a command and in the burst that
64676
+ * follows it, and `resubscribe` when a push integration fell silent. The
64677
+ * provider re-reads and writes the slices it already writes; nothing is
64678
+ * returned but completion.
64679
+ */
64680
+ var DeviceStateRefreshInputSchema = object({
64681
+ /** The device the call is routed by (one of `deviceIds`). */
64682
+ deviceId: number$1().int().nonnegative(),
64683
+ /** Every device to re-read: one, or the integration's whole set when the provider batches. */
64684
+ deviceIds: array(number$1().int().nonnegative()).min(1),
64685
+ reason: StateRefreshReasonSchema
64686
+ });
64687
+ var DeviceStateResubscribeInputSchema = object({ deviceId: number$1().int().nonnegative() });
64688
+ var DeviceStateRefreshResultSchema = object({ ok: literal(true) });
64689
+ var NOT_OPERATOR_FACING = "the core schedules state refreshes itself; an operator never asks for one";
64690
+ method(DeviceStateRefreshInputSchema, DeviceStateRefreshResultSchema, {
64691
+ kind: "mutation",
64692
+ auth: "admin",
64693
+ notOperatorFacing: NOT_OPERATOR_FACING
64694
+ }), method(DeviceStateResubscribeInputSchema, DeviceStateRefreshResultSchema, {
64695
+ kind: "mutation",
64696
+ auth: "admin",
64697
+ notOperatorFacing: NOT_OPERATOR_FACING
64698
+ });
64699
+ /**
64017
64700
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
64018
64701
  * for every device, regardless of provider — the kernel needs a uniform
64019
64702
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -66423,7 +67106,15 @@ var fanControlCapability = {
66423
67106
  field: "speed",
66424
67107
  value: 100
66425
67108
  },
66426
- args: { speed: 100 }
67109
+ args: { speed: 100 },
67110
+ sideEffects: [{
67111
+ field: "preset",
67112
+ value: "",
67113
+ when: {
67114
+ field: "preset",
67115
+ notIn: [""]
67116
+ }
67117
+ }]
66427
67118
  },
66428
67119
  {
66429
67120
  id: "fan.speed",
@@ -66434,6 +67125,14 @@ var fanControlCapability = {
66434
67125
  field: "speed",
66435
67126
  fromArg: "speed"
66436
67127
  },
67128
+ sideEffects: [{
67129
+ field: "preset",
67130
+ value: "",
67131
+ when: {
67132
+ field: "preset",
67133
+ notIn: [""]
67134
+ }
67135
+ }],
66437
67136
  openArgs: [{
66438
67137
  key: "speed",
66439
67138
  label: t("Speed", "Velocità"),
@@ -66459,6 +67158,10 @@ var fanControlCapability = {
66459
67158
  label: t("Set preset", "Imposta il preset"),
66460
67159
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
66461
67160
  icon: "list",
67161
+ effect: {
67162
+ field: "preset",
67163
+ fromArg: "preset"
67164
+ },
66462
67165
  openArgs: [{
66463
67166
  key: "preset",
66464
67167
  label: t("Preset", "Preset"),
@@ -68189,7 +68892,7 @@ var HeroSceneSchema = object({
68189
68892
  level: number$1().min(0).max(1).nullable()
68190
68893
  });
68191
68894
  DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
68192
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
68895
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host, DeviceRole.Ups;
68193
68896
  var HeroRowIdSchema = _enum([
68194
68897
  "progress",
68195
68898
  "run-for",
@@ -69461,6 +70164,16 @@ var IntegrationInstanceStatusSchema = object({
69461
70164
  /** A short human word for the state ("Signed in", "Token expired"); shown instead of `state`. */
69462
70165
  label: string().optional()
69463
70166
  });
70167
+ /**
70168
+ * What "Add device" inside ONE instance offers, decided per instance by its provider. `scan`: the
70169
+ * LAN scan finds devices this instance holds; `children`: only the instance's own children, via
70170
+ * adoption (a scan would offer other hosts, which are new integrations); `none`: manual add only.
70171
+ */
70172
+ var IntegrationInstanceAddDeviceSchema = _enum([
70173
+ "scan",
70174
+ "children",
70175
+ "none"
70176
+ ]);
69464
70177
  var IntegrationInstanceSchema = object({
69465
70178
  id: IntegrationInstanceIdSchema,
69466
70179
  name: string(),
@@ -69478,7 +70191,9 @@ var IntegrationInstanceSchema = object({
69478
70191
  formValues: record$1(string(), unknown()),
69479
70192
  status: IntegrationInstanceStatusSchema.optional(),
69480
70193
  /** Epoch ms of the last probe of the remote that produced `status`; absent when never checked. */
69481
- lastCheckedAt: number$1().optional()
70194
+ lastCheckedAt: number$1().optional(),
70195
+ /** What "Add device" inside this instance offers; see {@link IntegrationInstanceAddDeviceSchema}. Absent means the caller derives it from `describe().discovery` with `defaultAddDeviceMode` (lan → scan, account → children, else none). */
70196
+ addDevice: IntegrationInstanceAddDeviceSchema.optional()
69482
70197
  });
69483
70198
  var IntegrationInstancePatchSchema = object({
69484
70199
  id: IntegrationInstanceIdSchema,
@@ -71629,6 +72344,14 @@ var lockControlCapability = {
71629
72344
  field: "state",
71630
72345
  value: "locked"
71631
72346
  },
72347
+ hold: { effects: [{
72348
+ field: "state",
72349
+ value: "locking",
72350
+ when: {
72351
+ field: "state",
72352
+ notIn: ["locked"]
72353
+ }
72354
+ }] },
71632
72355
  openArgs: [{
71633
72356
  key: "code",
71634
72357
  label: t("PIN code", "Codice PIN"),
@@ -71662,6 +72385,14 @@ var lockControlCapability = {
71662
72385
  field: "state",
71663
72386
  value: "unlocked"
71664
72387
  },
72388
+ hold: { effects: [{
72389
+ field: "state",
72390
+ value: "unlocking",
72391
+ when: {
72392
+ field: "state",
72393
+ notIn: ["unlocked"]
72394
+ }
72395
+ }] },
71665
72396
  openArgs: [{
71666
72397
  key: "code",
71667
72398
  label: t("PIN code", "Codice PIN"),
@@ -76051,6 +76782,16 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
76051
76782
  timestamp: number$1()
76052
76783
  }), EventCategory.PipelineAnalyticsDetectionEvent, EventCategory.PipelineAnalyticsPackageDelivered, EventCategory.PipelineAnalyticsPackagePickedUp;
76053
76784
  /**
76785
+ * A rectangle as a fraction of a frame, `[0, 1]` on both axes — the wire shape
76786
+ * of `NormalizedRect` (which is derived from it).
76787
+ */
76788
+ var NormalizedRectSchema = object({
76789
+ x: number$1(),
76790
+ y: number$1(),
76791
+ w: number$1(),
76792
+ h: number$1()
76793
+ });
76794
+ /**
76054
76795
  * A root model's boxes standing in for one crop-kind step's own inference
76055
76796
  * (D730) — see `runPipeline.suppliedRoot`.
76056
76797
  */
@@ -76351,7 +77092,13 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
76351
77092
  /** Pool deaths inside the current window. */
76352
77093
  deaths: number$1(),
76353
77094
  /** The last death's message. */
76354
- lastError: string()
77095
+ lastError: string(),
77096
+ /**
77097
+ * Present when the device is ABSENT rather than dead: the runtime
77098
+ * itself enumerates no such device (`no-gpu-device` — OpenVINO sees
77099
+ * no supported GPU; driver/runtime does not support this iGPU).
77100
+ */
77101
+ absentReason: _enum(["no-gpu-device"]).optional()
76355
77102
  })).readonly() })), method(object({
76356
77103
  nodeId: string(),
76357
77104
  deviceKey: string()
@@ -76443,7 +77190,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
76443
77190
  * reader) run on them through their own crop policy. Boxes are in the
76444
77191
  * PIXELS of the image this call carries. Absent ⇒ the root step runs.
76445
77192
  */
76446
- suppliedRoot: SuppliedRootOutputSchema.optional()
77193
+ suppliedRoot: SuppliedRootOutputSchema.optional(),
77194
+ /**
77195
+ * The motion analyzer's merged subjects (D394) for this camera, fresh,
77196
+ * normalised to the frame (0..1). Feeds the motion-guided root crop
77197
+ * (D1060): the executor picks per frame whether the object-detection
77198
+ * root runs on the full frame or on a crop around them. Honoured only
77199
+ * on the live `frame` plane with a `frameRef`. Absent or empty ⇒ no
77200
+ * motion known ⇒ full frame.
77201
+ */
77202
+ motionRegions: array(NormalizedRectSchema).optional()
76447
77203
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
76448
77204
  steps: array(PipelineStepInputSchema).min(1),
76449
77205
  frames: array(FrameInputSchema).min(1).max(255),
@@ -77236,7 +77992,8 @@ var StatelessStepRefusalSchema = _enum([
77236
77992
  "unknown-step",
77237
77993
  "model-not-servable",
77238
77994
  "unreadable-frame",
77239
- "execution-failed"
77995
+ "execution-failed",
77996
+ "no-eligible-device"
77240
77997
  ]);
77241
77998
  /**
77242
77999
  * Answer to `runStatelessStep` — a discriminated union rather than a nullable
@@ -77535,7 +78292,15 @@ var RunnerInferenceDeviceSchema = object({
77535
78292
  * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
77536
78293
  * the elected device's provisioning, as before.
77537
78294
  */
77538
- steps: record$1(string(), RunnerJumpStepProvisioningSchema).optional()
78295
+ steps: record$1(string(), RunnerJumpStepProvisioningSchema).optional(),
78296
+ /**
78297
+ * Steps switched OFF on this device (D1065, `inferenceDevices[key].steps[s]
78298
+ * .enabled === false`). The runner never runs a subtree containing one of
78299
+ * them here: it auto-jumps it to an allowed device, and when none can take
78300
+ * it the subtree is skipped (`disabled-on-device`), never run here anyway.
78301
+ * Absent ⇒ none (an orchestrator that predates D1065).
78302
+ */
78303
+ disabledSteps: array(string()).readonly().optional()
77539
78304
  });
77540
78305
  /**
77541
78306
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -83179,6 +83944,14 @@ method(object({ deviceId: number$1().int() }), object({
83179
83944
  auth: "admin"
83180
83945
  }), NOT_A_DEVICE.PIPELINE;
83181
83946
  /**
83947
+ * Hold limits a cap's vocabulary may declare on an action (D1061).
83948
+ *
83949
+ * A one-shot command (feed, run a script) has no lasting state to confirm; it
83950
+ * holds its in-progress flag just long enough that a second tap, before the
83951
+ * device reports, is seen as "already running" and refused.
83952
+ */
83953
+ var ONE_SHOT_HOLD_MS = 1e4;
83954
+ /**
83182
83955
  * Feeder connectivity / power status — mirrors the HA petkit device-status
83183
83956
  * enum: `normal` (online, mains), `offline` (not reaching PetKit cloud),
83184
83957
  * `on_batteries` (running on battery backup). `null` until first reported.
@@ -83296,6 +84069,13 @@ var petFeederCapability = {
83296
84069
  label: t("Feed", "Dai da mangiare"),
83297
84070
  phrase: t("Dispense {grams} from {device}", "Eroga {grams} da {device}"),
83298
84071
  icon: "paw-print",
84072
+ hold: {
84073
+ effects: [{
84074
+ field: "feeding",
84075
+ value: true
84076
+ }],
84077
+ holdMs: ONE_SHOT_HOLD_MS
84078
+ },
83299
84079
  openArgs: [{
83300
84080
  key: "grams",
83301
84081
  label: t("Grams", "Grammi"),
@@ -83314,6 +84094,13 @@ var petFeederCapability = {
83314
84094
  label: t("Feed from both hoppers", "Eroga da entrambi i serbatoi"),
83315
84095
  phrase: t("Dispense {hopper1} and {hopper2} from {device}", "Eroga {hopper1} e {hopper2} da {device}"),
83316
84096
  icon: "paw-print",
84097
+ hold: {
84098
+ effects: [{
84099
+ field: "feeding",
84100
+ value: true
84101
+ }],
84102
+ holdMs: ONE_SHOT_HOLD_MS
84103
+ },
83317
84104
  openArgs: [{
83318
84105
  key: "hopper1",
83319
84106
  label: t("Hopper 1", "Serbatoio 1"),
@@ -83419,12 +84206,20 @@ var petFeederCapability = {
83419
84206
  auth: "protected",
83420
84207
  actions: [{
83421
84208
  id: "petFeeder.childLockOn",
84209
+ effect: {
84210
+ field: "childLock",
84211
+ value: true
84212
+ },
83422
84213
  label: t("Child lock on", "Blocco bambini attivo"),
83423
84214
  phrase: t("Turn on the child lock of {device}", "Attiva il blocco bambini di {device}"),
83424
84215
  icon: "lock",
83425
84216
  args: { on: true }
83426
84217
  }, {
83427
84218
  id: "petFeeder.childLockOff",
84219
+ effect: {
84220
+ field: "childLock",
84221
+ value: false
84222
+ },
83428
84223
  label: t("Child lock off", "Blocco bambini spento"),
83429
84224
  phrase: t("Turn off the child lock of {device}", "Disattiva il blocco bambini di {device}"),
83430
84225
  icon: "lock-open",
@@ -83440,12 +84235,20 @@ var petFeederCapability = {
83440
84235
  auth: "protected",
83441
84236
  actions: [{
83442
84237
  id: "petFeeder.lightOn",
84238
+ effect: {
84239
+ field: "indicatorLight",
84240
+ value: true
84241
+ },
83443
84242
  label: t("Indicator light on", "Spia accesa"),
83444
84243
  phrase: t("Turn on the indicator light of {device}", "Accendi la spia di {device}"),
83445
84244
  icon: "lightbulb",
83446
84245
  args: { on: true }
83447
84246
  }, {
83448
84247
  id: "petFeeder.lightOff",
84248
+ effect: {
84249
+ field: "indicatorLight",
84250
+ value: false
84251
+ },
83449
84252
  label: t("Indicator light off", "Spia spenta"),
83450
84253
  phrase: t("Turn off the indicator light of {device}", "Spegni la spia di {device}"),
83451
84254
  icon: "lightbulb-off",
@@ -83461,12 +84264,20 @@ var petFeederCapability = {
83461
84264
  auth: "protected",
83462
84265
  actions: [{
83463
84266
  id: "petFeeder.feedSoundOn",
84267
+ effect: {
84268
+ field: "feedSound",
84269
+ value: true
84270
+ },
83464
84271
  label: t("Feeding sound on", "Suono di erogazione attivo"),
83465
84272
  phrase: t("Turn on the feeding sound of {device}", "Attiva il suono di erogazione di {device}"),
83466
84273
  icon: "volume-2",
83467
84274
  args: { on: true }
83468
84275
  }, {
83469
84276
  id: "petFeeder.feedSoundOff",
84277
+ effect: {
84278
+ field: "feedSound",
84279
+ value: false
84280
+ },
83470
84281
  label: t("Feeding sound off", "Suono di erogazione spento"),
83471
84282
  phrase: t("Turn off the feeding sound of {device}", "Disattiva il suono di erogazione di {device}"),
83472
84283
  icon: "volume-x",
@@ -83482,6 +84293,10 @@ var petFeederCapability = {
83482
84293
  auth: "protected",
83483
84294
  actions: [{
83484
84295
  id: "petFeeder.volume",
84296
+ effect: {
84297
+ field: "volume",
84298
+ fromArg: "level"
84299
+ },
83485
84300
  label: t("Set volume", "Imposta il volume"),
83486
84301
  phrase: t("Set the volume of {device} to {level}", "Imposta il volume di {device} a {level}"),
83487
84302
  icon: "volume-2",
@@ -83627,12 +84442,20 @@ setPump: method(object({
83627
84442
  auth: "protected",
83628
84443
  actions: [{
83629
84444
  id: "petFountain.pumpOn",
84445
+ effect: {
84446
+ field: "pumpRunning",
84447
+ value: true
84448
+ },
83630
84449
  label: t("Pump on", "Pompa accesa"),
83631
84450
  phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
83632
84451
  icon: "play",
83633
84452
  args: { on: true }
83634
84453
  }, {
83635
84454
  id: "petFountain.pumpOff",
84455
+ effect: {
84456
+ field: "pumpRunning",
84457
+ value: false
84458
+ },
83636
84459
  label: t("Pump off", "Pompa spenta"),
83637
84460
  phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
83638
84461
  icon: "square",
@@ -84179,7 +85002,15 @@ var DeviceStepConfigSchema = object({
84179
85002
  * at a disabled/absent device on that node at save time. Absent ⇒ the runner
84180
85003
  * auto-jumps only when the effective device's format cannot run the step.
84181
85004
  */
84182
- jumpDeviceKey: string().optional()
85005
+ jumpDeviceKey: string().optional(),
85006
+ /**
85007
+ * DEVICE switch for this step (D1065). `false` = the step is never
85008
+ * provisioned on this accelerator: a detail step jumps to another enabled
85009
+ * device of the node where it is allowed, else it is skipped with reason
85010
+ * `disabled-on-device`; a root is skipped. Absent = inherit (on). Written by
85011
+ * `setDeviceStepEnabled`.
85012
+ */
85013
+ enabled: boolean().optional()
84183
85014
  });
84184
85015
  var AgentPipelineSettingsSchema = object({
84185
85016
  maxCameras: number$1().int().nonnegative().nullable().default(null),
@@ -84223,6 +85054,12 @@ var AgentPipelineSettingsSchema = object({
84223
85054
  */
84224
85055
  stepSettings: record$1(string(), record$1(string(), unknown()).readonly()).optional(),
84225
85056
  /**
85057
+ * NODE switch per step (D1065): `stepId → enabled`. `false` = the step never
85058
+ * runs on a camera whose pipeline runs on this node (skip reason
85059
+ * `disabled-on-node`). Absent = inherit. Written by `setNodeStepEnabled`.
85060
+ */
85061
+ stepEnabled: record$1(string(), boolean()).optional(),
85062
+ /**
84226
85063
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
84227
85064
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
84228
85065
  * accelerator (safe default); two+ enabled ⇒ the dispatcher balances
@@ -84544,7 +85381,9 @@ var InferenceDeviceExclusionReasonSchema = _enum([
84544
85381
  "disabled",
84545
85382
  "unavailable",
84546
85383
  "cannot-host-camera-root",
84547
- "accelerator-preferred"
85384
+ "accelerator-preferred",
85385
+ "root-switched-off",
85386
+ "no-gpu-device"
84548
85387
  ]);
84549
85388
  var NodeInferenceDeviceSchema = object({
84550
85389
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
@@ -84577,7 +85416,13 @@ var NodeInferenceDeviceSchema = object({
84577
85416
  enabled: boolean(),
84578
85417
  /** Relative balancer weight for the enabled device (default 1). */
84579
85418
  weight: number$1(),
84580
- /** Per-device concurrent-session cap; null = unlimited (multi-device C4). */
85419
+ /**
85420
+ * Per-device concurrent-session cap; null = unlimited (multi-device C4). A
85421
+ * limit: a camera no device can take within its cap stays on the node's
85422
+ * default pool — EXCEPT when that default pool is an excluded device
85423
+ * (`defaultPoolExcluded`), where it goes over the cap on the least-loaded
85424
+ * eligible device instead (#610).
85425
+ */
84581
85426
  maxSessions: number$1().nullable(),
84582
85427
  /** Object-detection model the executor defaults to for this deviceKey. */
84583
85428
  defaultModelId: string(),
@@ -84627,8 +85472,85 @@ var NodeInferenceDevicesSchema = object({
84627
85472
  nodeId: string(),
84628
85473
  /** False when the node's platform-probe was unreachable (no live device set). */
84629
85474
  reachable: boolean(),
84630
- devices: array(NodeInferenceDeviceSchema).readonly()
85475
+ devices: array(NodeInferenceDeviceSchema).readonly(),
85476
+ /**
85477
+ * The election left NO device and one was excluded because the operator
85478
+ * turned it off or it is not functional (#610): the runner's default pool is
85479
+ * that device, so work with no explicit device (a stateless step, a bench with
85480
+ * no `deviceKey`) is refused rather than run there. Absent = an orchestrator
85481
+ * older than the field, or an unreachable node: nothing is claimed (D315).
85482
+ */
85483
+ defaultPoolExcluded: boolean().optional()
85484
+ });
85485
+ /**
85486
+ * The CLUSTER switch of one pipeline step (D1065):
85487
+ * - `off` — hard off: no camera, node or device can turn it on;
85488
+ * - `on` — on by default; a camera may turn it off (`stepToggles`);
85489
+ * - `opt-in` — off by default; a camera turns it on (`stepToggles`).
85490
+ * Absent = the catalog's `enabledByDefault` (`true` → `on`, `false` → `opt-in`).
85491
+ */
85492
+ var StepClusterModeSchema = _enum([
85493
+ "off",
85494
+ "on",
85495
+ "opt-in"
85496
+ ]);
85497
+ /**
85498
+ * What one step does on one (node, device) — computed by the orchestrator with
85499
+ * the SAME placement function the attach path runs (`pipeline-resolver.ts`),
85500
+ * so a client never re-derives it. Precedence: cluster off > camera toggle
85501
+ * (else the cluster default) > node off > device off / jump.
85502
+ */
85503
+ var StepSwitchCellSchema = discriminatedUnion("kind", [
85504
+ object({ kind: literal("on") }),
85505
+ object({ kind: literal("off-cluster") }),
85506
+ object({ kind: literal("off-node") }),
85507
+ object({ kind: literal("off-device") }),
85508
+ object({
85509
+ kind: literal("jump"),
85510
+ toDeviceKey: string()
85511
+ }),
85512
+ object({
85513
+ kind: literal("skip"),
85514
+ reason: _enum(["no-compatible-model", "root-not-runnable-on-elected-device"])
85515
+ }),
85516
+ object({ kind: literal("zone-driven") }),
85517
+ object({
85518
+ kind: literal("supplied-by-root"),
85519
+ rootModelId: string()
85520
+ }),
85521
+ object({ kind: literal("opt-in-unused") })
85522
+ ]);
85523
+ var StepSwitchDeviceSchema = object({
85524
+ deviceKey: string(),
85525
+ format: _enum(MODEL_FORMATS),
85526
+ /** The device switch as stored (`inferenceDevices[key].steps[step].enabled`); `null` = inherit. */
85527
+ stepEnabled: boolean().nullable(),
85528
+ /** Whether the device is in the node's dispatch roster (enabled, available, not excluded). */
85529
+ eligible: boolean(),
85530
+ cell: StepSwitchCellSchema
84631
85531
  });
85532
+ var StepSwitchNodeSchema = object({
85533
+ nodeId: string(),
85534
+ /** False when the node's catalog or device probe did not answer — no cells are claimed. */
85535
+ reachable: boolean(),
85536
+ /** The node switch as stored (`stepEnabled[step]`); `null` = inherit. */
85537
+ stepEnabled: boolean().nullable(),
85538
+ devices: array(StepSwitchDeviceSchema).readonly()
85539
+ });
85540
+ var StepSwitchMatrixSchema = object({ steps: array(object({
85541
+ stepId: string(),
85542
+ name: string(),
85543
+ slot: string(),
85544
+ /** The stored cluster mode; `null` = the catalog default applies. */
85545
+ clusterMode: StepClusterModeSchema.nullable(),
85546
+ /** The mode in force (stored, else derived from `enabledByDefault`). */
85547
+ effectiveMode: StepClusterModeSchema,
85548
+ /** Cameras whose `stepToggles[step]` is `true`. */
85549
+ camerasEnabling: number$1().int().nonnegative(),
85550
+ /** Cameras whose `stepToggles[step]` is `false`. */
85551
+ camerasDisabling: number$1().int().nonnegative(),
85552
+ nodes: array(StepSwitchNodeSchema).readonly()
85553
+ })).readonly() });
84632
85554
  /**
84633
85555
  * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
84634
85556
  *
@@ -84800,7 +85722,28 @@ method(object({
84800
85722
  }), object({ success: literal(true) }), {
84801
85723
  kind: "mutation",
84802
85724
  auth: "admin"
84803
- }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
85725
+ }), method(object({
85726
+ stepId: string(),
85727
+ mode: StepClusterModeSchema.nullable()
85728
+ }), object({ success: literal(true) }), {
85729
+ kind: "mutation",
85730
+ auth: "admin"
85731
+ }), method(object({
85732
+ agentNodeId: string(),
85733
+ stepId: string(),
85734
+ enabled: boolean().nullable()
85735
+ }), object({ success: literal(true) }), {
85736
+ kind: "mutation",
85737
+ auth: "admin"
85738
+ }), method(object({
85739
+ agentNodeId: string(),
85740
+ deviceKey: string(),
85741
+ stepId: string(),
85742
+ enabled: boolean().nullable()
85743
+ }), object({ success: literal(true) }), {
85744
+ kind: "mutation",
85745
+ auth: "admin"
85746
+ }), method(_void(), StepSwitchMatrixSchema), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
84804
85747
  agentNodeId: string(),
84805
85748
  deviceKey: string()
84806
85749
  }), object({ success: literal(true) }), {
@@ -85215,6 +86158,16 @@ var CoralInfoSchema = object({
85215
86158
  reason: _enum(["driver-missing", "device-not-accessible"])
85216
86159
  })).readonly().optional()
85217
86160
  });
86161
+ var NvidiaInfoBaseSchema = object({
86162
+ type: literal("nvidia"),
86163
+ name: string(),
86164
+ memoryMB: number$1().optional()
86165
+ });
86166
+ /** An NVIDIA GPU: usable ⇔ the CUDA execution provider exists; otherwise the reason. */
86167
+ var NvidiaInfoSchema = discriminatedUnion("usable", [NvidiaInfoBaseSchema.extend({ usable: literal(true) }), NvidiaInfoBaseSchema.extend({
86168
+ usable: literal(false),
86169
+ reason: _enum(["no-cuda-execution-provider"])
86170
+ })]);
85218
86171
  var HardwareInfoSchema = object({
85219
86172
  platform: HardwarePlatformSchema,
85220
86173
  arch: HardwareArchSchema,
@@ -85225,6 +86178,7 @@ var HardwareInfoSchema = object({
85225
86178
  gpu: GpuInfoSchema.nullable(),
85226
86179
  npu: NpuInfoSchema.nullable(),
85227
86180
  coral: CoralInfoSchema.nullable().optional(),
86181
+ nvidia: NvidiaInfoSchema.nullable().optional(),
85228
86182
  /**
85229
86183
  * Per-accelerator compute (D930). Omitted by a node that has not probed it.
85230
86184
  * `null` fields inside an entry are a failed query, never a zero.
@@ -85312,8 +86266,14 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
85312
86266
  * in real-world devices.
85313
86267
  */
85314
86268
  var PowerMeterStatusSchema = object({
85315
- /** Instantaneous power draw (watts). */
86269
+ /** Instantaneous TOTAL power draw of the device (watts), when known. */
85316
86270
  power: number$1().optional().meta(readingMeta("power", { label: "Power" })),
86271
+ /**
86272
+ * Power the device passes on to downstream loads (watts), e.g. the PoE a switch delivers to
86273
+ * its ports. When `power` is known it already includes this (the own draw is `netPowerOf`);
86274
+ * a device that reports no total (a UniFi switch) carries this field alone.
86275
+ */
86276
+ deliveredPower: number$1().optional().meta(readingMeta("power", { label: "Delivered" })),
85317
86277
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
85318
86278
  energy: number$1().optional().meta(readingMeta("energy", { label: "Energy" })),
85319
86279
  /** Voltage (volts). */
@@ -85348,7 +86308,8 @@ var POWER_METER_DEVICE_TYPES = [
85348
86308
  DeviceType.Dishwasher,
85349
86309
  DeviceType.Vacuum,
85350
86310
  DeviceType.LawnMower,
85351
- DeviceType.PetFeeder
86311
+ DeviceType.PetFeeder,
86312
+ DeviceType.Workload
85352
86313
  ];
85353
86314
  /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
85354
86315
  var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
@@ -86403,12 +87364,20 @@ var pumpCycleCapability = {
86403
87364
  auth: "protected",
86404
87365
  actions: [{
86405
87366
  id: "pumpCycle.on",
87367
+ effect: {
87368
+ field: "enabled",
87369
+ value: true
87370
+ },
86406
87371
  label: t("Pump cycle on", "Ciclo pompa attivo"),
86407
87372
  phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
86408
87373
  icon: "timer",
86409
87374
  args: { on: true }
86410
87375
  }, {
86411
87376
  id: "pumpCycle.off",
87377
+ effect: {
87378
+ field: "enabled",
87379
+ value: false
87380
+ },
86412
87381
  label: t("Pump cycle off", "Ciclo pompa spento"),
86413
87382
  phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
86414
87383
  icon: "timer-off",
@@ -86427,6 +87396,11 @@ var pumpCycleCapability = {
86427
87396
  label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
86428
87397
  phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
86429
87398
  icon: "timer",
87399
+ effect: {
87400
+ field: "onTime",
87401
+ fromArg: "minutes",
87402
+ scale: 60
87403
+ },
86430
87404
  openArgs: [{
86431
87405
  key: "minutes",
86432
87406
  label: t("Minutes", "Minuti"),
@@ -86451,6 +87425,11 @@ var pumpCycleCapability = {
86451
87425
  label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
86452
87426
  phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
86453
87427
  icon: "timer-off",
87428
+ effect: {
87429
+ field: "offTime",
87430
+ fromArg: "minutes",
87431
+ scale: 60
87432
+ },
86454
87433
  openArgs: [{
86455
87434
  key: "minutes",
86456
87435
  label: t("Minutes", "Minuti"),
@@ -89980,7 +90959,14 @@ var scriptRunnerCapability = {
89980
90959
  id: "script.run",
89981
90960
  label: t("Run script", "Esegui lo script"),
89982
90961
  phrase: t("Run {device}", "Esegui {device}"),
89983
- icon: "scroll-text"
90962
+ icon: "scroll-text",
90963
+ hold: {
90964
+ effects: [{
90965
+ field: "isRunning",
90966
+ value: true
90967
+ }],
90968
+ holdMs: ONE_SHOT_HOLD_MS
90969
+ }
89984
90970
  }]
89985
90971
  }),
89986
90972
  /** Cancel a running script. Provider rejects when the script
@@ -89990,6 +90976,10 @@ var scriptRunnerCapability = {
89990
90976
  auth: "admin",
89991
90977
  actions: [{
89992
90978
  id: "script.stop",
90979
+ effect: {
90980
+ field: "isRunning",
90981
+ value: false
90982
+ },
89993
90983
  label: t("Stop script", "Ferma lo script"),
89994
90984
  phrase: t("Stop {device}", "Ferma {device}"),
89995
90985
  icon: "square"
@@ -91848,6 +92838,10 @@ var switchCapability = {
91848
92838
  auth: "protected",
91849
92839
  actions: [{
91850
92840
  id: "switch.toggle",
92841
+ sideEffects: [{
92842
+ field: "on",
92843
+ negate: true
92844
+ }],
91851
92845
  label: t("Toggle", "Commuta"),
91852
92846
  phrase: t("Toggle {device}", "Commuta {device}"),
91853
92847
  icon: "toggle-right",
@@ -98032,6 +99026,20 @@ var BaseDevice = class {
98032
99026
  }, raw, options);
98033
99027
  }
98034
99028
  /**
99029
+ * Declare the identity of the device at the FAR END of this device's physical
99030
+ * link (D1063): a PoE port's wired client. Same normalisation, `unread`
99031
+ * rule and owner check as {@link declareIdentifiers}, written through
99032
+ * `device-manager.setAttachedIdentifiers`. It never makes the two devices the
99033
+ * same device. Best-effort: never throws.
99034
+ */
99035
+ async declareAttachedIdentifiers(raw, options) {
99036
+ return declareDeviceIdentifiers({
99037
+ deviceId: this.id,
99038
+ logger: this.ctx.logger,
99039
+ writer: this.ctx.api.deviceManager?.setAttachedIdentifiers
99040
+ }, raw, options);
99041
+ }
99042
+ /**
98035
99043
  * Re-publish the device's current `features` array to the persisted
98036
99044
  * meta blob. Drivers call this after a probe finishes when the live
98037
99045
  * `features` getter has gained new flags (e.g. `hasIntercom` flips
@@ -99762,23 +100770,56 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
99762
100770
  };
99763
100771
  });
99764
100772
  var minutesOf = (seconds) => Math.max(0, Math.round(seconds / 60));
100773
+ var pumpCycleContribution = contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
100774
+ const enabled = slice?.enabled ?? null;
100775
+ const cycle = slice?.onTime != null && slice.offTime != null ? t(`${minutesOf(slice.onTime)} min on · ${minutesOf(slice.offTime)} min off`, `${minutesOf(slice.onTime)} min acceso · ${minutesOf(slice.offTime)} min spento`) : null;
100776
+ return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
100777
+ kind: "toggle",
100778
+ id: "pump-cycle.enabled",
100779
+ label: t("Pump cycle", "Ciclo pompa"),
100780
+ on: enabled,
100781
+ turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
100782
+ turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
100783
+ }])] };
100784
+ });
100785
+ var WORKLOAD_WORDS = {
100786
+ running: {
100787
+ state: "on",
100788
+ title: t("Running", "In esecuzione")
100789
+ },
100790
+ paused: {
100791
+ state: "standby",
100792
+ title: t("Paused", "In pausa")
100793
+ },
100794
+ stopped: {
100795
+ state: "off",
100796
+ title: t("Stopped", "Fermo")
100797
+ },
100798
+ starting: {
100799
+ state: "running",
100800
+ title: t("Starting", "In avvio")
100801
+ },
100802
+ stopping: {
100803
+ state: "running",
100804
+ title: t("Stopping", "In arresto")
100805
+ },
100806
+ crashed: {
100807
+ state: "alert",
100808
+ title: t("Crashed", "Andato in errore")
100809
+ }
100810
+ };
99765
100811
  var DEVICES_FAMILY_CONTRIBUTIONS = {
99766
100812
  "fan-control": fanContribution,
99767
100813
  "vacuum-control": vacuumContribution,
99768
100814
  "lawn-mower-control": mowerContribution,
99769
100815
  "pet-feeder": feederContribution,
99770
100816
  "pet-fountain": fountainContribution,
99771
- "pump-cycle": contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
99772
- const enabled = slice?.enabled ?? null;
99773
- const cycle = slice?.onTime != null && slice.offTime != null ? t(`${minutesOf(slice.onTime)} min on · ${minutesOf(slice.offTime)} min off`, `${minutesOf(slice.onTime)} min acceso · ${minutesOf(slice.offTime)} min spento`) : null;
99774
- return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
99775
- kind: "toggle",
99776
- id: "pump-cycle.enabled",
99777
- label: t("Pump cycle", "Ciclo pompa"),
99778
- on: enabled,
99779
- turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
99780
- turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
99781
- }])] };
100817
+ "pump-cycle": pumpCycleContribution,
100818
+ workload: contribution("workload", WorkloadStatusSchema, (slice) => {
100819
+ const state = slice?.state ?? null;
100820
+ if (state === null) return { reading: reading$1("workload", "unknown") };
100821
+ const words = WORKLOAD_WORDS[state];
100822
+ return { reading: reading$1("workload", words.state, false, words.title) };
99782
100823
  })
99783
100824
  };
99784
100825
  /**
@@ -101793,7 +102834,7 @@ lookOf({
101793
102834
  });
101794
102835
  DeviceType.Climate;
101795
102836
  DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
101796
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
102837
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host, DeviceRole.Ups;
101797
102838
  Object.freeze({
101798
102839
  "accessories.getStatus": {
101799
102840
  capName: "accessories",
@@ -103993,6 +105034,13 @@ Object.freeze({
103993
105034
  access: "create",
103994
105035
  role: "admin"
103995
105036
  },
105037
+ "deviceManager.confirmIdentityLink": {
105038
+ capName: "device-manager",
105039
+ capScope: "system",
105040
+ addonId: null,
105041
+ access: "create",
105042
+ role: "admin"
105043
+ },
103996
105044
  "deviceManager.createDevice": {
103997
105045
  capName: "device-manager",
103998
105046
  capScope: "system",
@@ -104042,6 +105090,13 @@ Object.freeze({
104042
105090
  access: "create",
104043
105091
  role: "admin"
104044
105092
  },
105093
+ "deviceManager.dismissIdentityLink": {
105094
+ capName: "device-manager",
105095
+ capScope: "system",
105096
+ addonId: null,
105097
+ access: "create",
105098
+ role: "admin"
105099
+ },
104045
105100
  "deviceManager.enable": {
104046
105101
  capName: "device-manager",
104047
105102
  capScope: "system",
@@ -104238,6 +105293,13 @@ Object.freeze({
104238
105293
  access: "view",
104239
105294
  role: "admin"
104240
105295
  },
105296
+ "deviceManager.listIdentityLinks": {
105297
+ capName: "device-manager",
105298
+ capScope: "system",
105299
+ addonId: null,
105300
+ access: "view",
105301
+ role: "admin"
105302
+ },
104241
105303
  "deviceManager.listLocationDescriptions": {
104242
105304
  capName: "device-manager",
104243
105305
  capScope: "system",
@@ -104434,6 +105496,13 @@ Object.freeze({
104434
105496
  access: "create",
104435
105497
  role: "admin"
104436
105498
  },
105499
+ "deviceManager.setAttachedIdentifiers": {
105500
+ capName: "device-manager",
105501
+ capScope: "system",
105502
+ addonId: null,
105503
+ access: "create",
105504
+ role: "admin"
105505
+ },
104437
105506
  "deviceManager.setChildLayout": {
104438
105507
  capName: "device-manager",
104439
105508
  capScope: "system",
@@ -104595,6 +105664,13 @@ Object.freeze({
104595
105664
  access: "create",
104596
105665
  role: "admin"
104597
105666
  },
105667
+ "deviceManager.unlinkIdentity": {
105668
+ capName: "device-manager",
105669
+ capScope: "system",
105670
+ addonId: null,
105671
+ access: "delete",
105672
+ role: "admin"
105673
+ },
104598
105674
  "deviceManager.updateConfig": {
104599
105675
  capName: "device-manager",
104600
105676
  capScope: "system",
@@ -104875,6 +105951,20 @@ Object.freeze({
104875
105951
  access: "create",
104876
105952
  role: "admin"
104877
105953
  },
105954
+ "deviceStateRefresh.refresh": {
105955
+ capName: "device-state-refresh",
105956
+ capScope: "device",
105957
+ addonId: null,
105958
+ access: "create",
105959
+ role: "admin"
105960
+ },
105961
+ "deviceStateRefresh.resubscribe": {
105962
+ capName: "device-state-refresh",
105963
+ capScope: "device",
105964
+ addonId: null,
105965
+ access: "create",
105966
+ role: "admin"
105967
+ },
104878
105968
  "deviceStatus.getStatus": {
104879
105969
  capName: "device-status",
104880
105970
  capScope: "device",
@@ -108746,6 +109836,13 @@ Object.freeze({
108746
109836
  access: "view",
108747
109837
  role: "admin"
108748
109838
  },
109839
+ "pipelineOrchestrator.getStepSwitches": {
109840
+ capName: "pipeline-orchestrator",
109841
+ capScope: "system",
109842
+ addonId: null,
109843
+ access: "view",
109844
+ role: "admin"
109845
+ },
108749
109846
  "pipelineOrchestrator.listAgentSettings": {
108750
109847
  capName: "pipeline-orchestrator",
108751
109848
  capScope: "system",
@@ -108900,6 +109997,20 @@ Object.freeze({
108900
109997
  access: "create",
108901
109998
  role: "admin"
108902
109999
  },
110000
+ "pipelineOrchestrator.setClusterStepMode": {
110001
+ capName: "pipeline-orchestrator",
110002
+ capScope: "system",
110003
+ addonId: null,
110004
+ access: "create",
110005
+ role: "admin"
110006
+ },
110007
+ "pipelineOrchestrator.setDeviceStepEnabled": {
110008
+ capName: "pipeline-orchestrator",
110009
+ capScope: "system",
110010
+ addonId: null,
110011
+ access: "create",
110012
+ role: "admin"
110013
+ },
108903
110014
  "pipelineOrchestrator.setLoadBalancingShares": {
108904
110015
  capName: "pipeline-orchestrator",
108905
110016
  capScope: "system",
@@ -108907,6 +110018,13 @@ Object.freeze({
108907
110018
  access: "create",
108908
110019
  role: "admin"
108909
110020
  },
110021
+ "pipelineOrchestrator.setNodeStepEnabled": {
110022
+ capName: "pipeline-orchestrator",
110023
+ capScope: "system",
110024
+ addonId: null,
110025
+ access: "create",
110026
+ role: "admin"
110027
+ },
108910
110028
  "pipelineOrchestrator.setNodeStepSettings": {
108911
110029
  capName: "pipeline-orchestrator",
108912
110030
  capScope: "system",
@@ -111063,6 +112181,13 @@ Object.freeze({
111063
112181
  access: "view",
111064
112182
  role: "admin"
111065
112183
  },
112184
+ "streamBroker.previewDerivedEncode": {
112185
+ capName: "stream-broker",
112186
+ capScope: "system",
112187
+ addonId: null,
112188
+ access: "view",
112189
+ role: "admin"
112190
+ },
111066
112191
  "streamBroker.probeStream": {
111067
112192
  capName: "stream-broker",
111068
112193
  capScope: "system",
@@ -112509,7 +113634,7 @@ function offered(received) {
112509
113634
  }
112510
113635
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
112511
113636
  DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
112512
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
113637
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host, DeviceRole.Ups;
112513
113638
  new Set(Object.values(DeviceType));
112514
113639
  new Set(Object.values(DeviceRole));
112515
113640
  var PowerSwitchRefusedError = class extends Error {
@@ -113284,6 +114409,11 @@ Object.freeze({
113284
114409
  form: "array",
113285
114410
  optional: true
113286
114411
  }],
114412
+ "deviceManager.listIdentityLinks": [{
114413
+ name: "deviceId",
114414
+ form: "single",
114415
+ optional: true
114416
+ }],
113287
114417
  "deviceManager.loadConfig": [{
113288
114418
  name: "deviceId",
113289
114419
  form: "single",
@@ -113334,6 +114464,11 @@ Object.freeze({
113334
114464
  form: "single",
113335
114465
  optional: false
113336
114466
  }],
114467
+ "deviceManager.setAttachedIdentifiers": [{
114468
+ name: "deviceId",
114469
+ form: "single",
114470
+ optional: false
114471
+ }],
113337
114472
  "deviceManager.setChildLayout": [{
113338
114473
  name: "deviceId",
113339
114474
  form: "single",
@@ -113528,6 +114663,20 @@ Object.freeze({
113528
114663
  form: "single",
113529
114664
  optional: false
113530
114665
  }],
114666
+ "deviceStateRefresh.refresh": [{
114667
+ name: "deviceId",
114668
+ form: "single",
114669
+ optional: false
114670
+ }, {
114671
+ name: "deviceIds",
114672
+ form: "array",
114673
+ optional: false
114674
+ }],
114675
+ "deviceStateRefresh.resubscribe": [{
114676
+ name: "deviceId",
114677
+ form: "single",
114678
+ optional: false
114679
+ }],
113531
114680
  "deviceStatus.getStatus": [{
113532
114681
  name: "deviceId",
113533
114682
  form: "single",
@@ -115485,6 +116634,11 @@ Object.freeze({
115485
116634
  form: "single",
115486
116635
  optional: false
115487
116636
  }],
116637
+ "streamBroker.previewDerivedEncode": [{
116638
+ name: "deviceId",
116639
+ form: "single",
116640
+ optional: false
116641
+ }],
115488
116642
  "streamBroker.produceEventMedia": [{
115489
116643
  name: "deviceId",
115490
116644
  form: "single",
@@ -118460,12 +119614,38 @@ function toCcuDeviceRow(device) {
118460
119614
  }))
118461
119615
  };
118462
119616
  }
119617
+ /** Per live facade: a reconnect builds a new facade, whose names were just read. */
119618
+ var states = /* @__PURE__ */ new WeakMap();
119619
+ /**
119620
+ * Serve-and-revalidate for the CCU names a page shows: the caller answers from
119621
+ * the names the facade holds now, and when they are older than the window one
119622
+ * background re-read starts, so the next read shows the new names. No timer:
119623
+ * only a read starts it, and a read never waits for it.
119624
+ */
119625
+ function revalidateCcuNames(deps, integrationId, facade, now = Date.now()) {
119626
+ const state = states.get(facade);
119627
+ if (state !== void 0 && (state.inFlight || now - state.startedAt < 6e4)) return;
119628
+ const next = {
119629
+ startedAt: now,
119630
+ inFlight: true
119631
+ };
119632
+ states.set(facade, next);
119633
+ facade.refreshNames().catch((err) => {
119634
+ deps.logger.warn("Homematic: CCU names could not be re-read, keeping the ones shown", { meta: {
119635
+ integrationId,
119636
+ error: errorText(err)
119637
+ } });
119638
+ }).finally(() => {
119639
+ next.inFlight = false;
119640
+ });
119641
+ }
118463
119642
  //#endregion
118464
119643
  //#region src/ccu/ccu-devices-actions.ts
118465
119644
  /** The CCU device list: every device the CCU knows, with its radio and maintenance health. */
118466
119645
  function buildCcuDevicesHandlers(deps) {
118467
119646
  return { listCcuDevices: async (input) => {
118468
119647
  const facade = requireFacade(deps, input.integrationId);
119648
+ revalidateCcuNames(deps, input.integrationId, facade);
118469
119649
  const adopted = await deps.adoptedAddresses(input.integrationId);
118470
119650
  return { devices: await Promise.all(facade.devices().map(async (device) => {
118471
119651
  const links = await keyChannelsForDevice(deps, input.integrationId, device, adopted);
@@ -118945,8 +120125,15 @@ var SetValueInputSchema = IntegrationRefSchema.extend({
118945
120125
  });
118946
120126
  //#endregion
118947
120127
  //#region src/ccu/ccu-heating-actions.ts
118948
- /** Channel types that can sit in a heating group (HmIP and HomeMatic thermostats, wall thermostats, radiator valves). */
118949
- var HEATING_CHANNEL = /THERMOSTAT|CLIMATECONTROL|THERMALCONTROL/i;
120128
+ /**
120129
+ * Channel types the CCU accepts as heating-group members: the climate channel
120130
+ * that both reports and is commanded (`*_TRANSCEIVER`: HmIP thermostats and
120131
+ * radiator valves `:1`, floor-heating actuators, the HomeMatic RT thermostat),
120132
+ * and the classic wall thermostat's `THERMALCONTROL_TRANSMIT`. The device's other
120133
+ * climate channels (`*_RECEIVER`, `*_TRANSMITTER`: link endpoints for the
120134
+ * shutter contact, key, floor sensor, boiler demand) are not members.
120135
+ */
120136
+ var HEATING_GROUP_MEMBER = /^(?:HEATING_)?CLIMATECONTROL_(?:RT_|FLOOR_)?TRANSCEIVER$|^THERMALCONTROL_TRANSMIT$/;
118950
120137
  function deviceAddressOf$1(channelAddress) {
118951
120138
  const colon = channelAddress.indexOf(":");
118952
120139
  return colon === -1 ? channelAddress : channelAddress.slice(0, colon);
@@ -118968,7 +120155,7 @@ function toGroup$1(group, names) {
118968
120155
  }
118969
120156
  function candidatesOf(devices) {
118970
120157
  const out = [];
118971
- for (const device of devices) for (const channel of device.channels) if (channel.type !== void 0 && HEATING_CHANNEL.test(channel.type)) out.push({
120158
+ for (const device of devices) for (const channel of device.channels) if (channel.type !== void 0 && HEATING_GROUP_MEMBER.test(channel.type)) out.push({
118972
120159
  address: channel.address,
118973
120160
  type: channel.type,
118974
120161
  deviceName: device.name ?? null
@@ -118989,6 +120176,7 @@ function buildCcuHeatingHandlers(deps) {
118989
120176
  return {
118990
120177
  listHeatingGroups: async (input) => {
118991
120178
  const facade = requireFacade(deps, input.integrationId);
120179
+ revalidateCcuNames(deps, input.integrationId, facade);
118992
120180
  const devices = facade.devices();
118993
120181
  const names = new Map(devices.map((device) => [device.address, device.name ?? null]));
118994
120182
  let groups = [];
@@ -141424,6 +142612,16 @@ var CentralUnit = class {
141424
142612
  }
141425
142613
  }
141426
142614
  /**
142615
+ * Re-read the WebUI names, rooms and functions and keep them for later
142616
+ * discoveries. Resolves `undefined` (and keeps the previous snapshot) when
142617
+ * there is no WebUI login or the read failed.
142618
+ */
142619
+ async refreshDetails() {
142620
+ const fresh = await this.fetchDetails();
142621
+ if (fresh !== void 0) this.details = fresh;
142622
+ return fresh;
142623
+ }
142624
+ /**
141427
142625
  * Incrementally (re-)discover a set of device addresses on an interface. Used
141428
142626
  * by `newDevices` / `replaceDevice` / `readdedDevice`. Re-runs the full
141429
142627
  * interface discovery (idempotent: the caches dedup) and re-emits the touched
@@ -141432,6 +142630,7 @@ var CentralUnit = class {
141432
142630
  async discoverAddresses(interfaceId2, addresses, publish) {
141433
142631
  const runtime = this.runtimes.get(interfaceId2);
141434
142632
  if (runtime === void 0) return;
142633
+ if (publish) await this.refreshDetails();
141435
142634
  const nodes = await discoverInterface({
141436
142635
  source: runtime.client,
141437
142636
  deviceCache: this.deviceCache,
@@ -143181,6 +144380,17 @@ var Homematic = class {
143181
144380
  devices() {
143182
144381
  return [...this.#devicesByAddress.values()].map((device) => toHmDevice(device, this.#roomsByDevice.get(device.address), this.#functionsByDevice.get(device.address), this.#renamedNames));
143183
144382
  }
144383
+ /**
144384
+ * Re-read device and channel names from the CCU WebUI, so a rename made on
144385
+ * the CCU (or a name given after pairing) shows in `devices()`. Keeps the
144386
+ * names it has when there are no WebUI credentials or the read fails.
144387
+ */
144388
+ async refreshNames() {
144389
+ const details = await this.#central.refreshDetails();
144390
+ if (details === void 0) return;
144391
+ this.#renamedNames.clear();
144392
+ for (const [address, name2] of details.nameByAddress) this.#renamedNames.set(address, name2);
144393
+ }
143184
144394
  /** Current value of a data point (resolving the ref). */
143185
144395
  getValue(ref) {
143186
144396
  return this.#resolveDataPoint(ref).value;
@@ -149119,6 +150329,7 @@ function buildHomematicInstances(records, deps) {
149119
150329
  },
149120
150330
  formSchema: () => buildConnectionFormSchema(),
149121
150331
  initialBody: (name) => ({ name }),
150332
+ addDevice: () => "children",
149122
150333
  configured: (body) => (body.host ?? "").trim().length > 0,
149123
150334
  onChanged: () => deps.onChanged(),
149124
150335
  test: async ({ id, values }) => {