@camstack/addon-provider-homematic 1.2.205 → 1.2.207

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 +12 -0
  2. package/dist/_stub.js +658 -658
  3. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-BBYiqZ5h.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-6DzqqZ3i.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-DR952fPS.mjs +26 -0
  5. package/dist/addon-provider-homematic.css +1 -1
  6. package/dist/addon.js +1483 -159
  7. package/dist/addon.mjs +1483 -159
  8. package/dist/{hostInit-nT-RhOBP.mjs → hostInit-CZgDBnHg.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-BI01xl_h.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-ZgMsVU2w.mjs} +1 -1
  11. package/dist/widgets/_stub.js +138 -138
  12. package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-B0ssCAy7.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-CtPGHIKn.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-7hqlX2gW.mjs +26 -0
  14. package/dist/widgets/{hostInit-phYEFIYx.mjs → hostInit-Cy3RS8VW.mjs} +2 -2
  15. package/dist/widgets/remoteEntry.js +1 -1
  16. package/package.json +3 -3
  17. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Civ5HlCQ.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-De1hiEmR.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-Hwx_JSCU.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";
@@ -508,7 +522,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
508
522
  */
509
523
  EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
510
524
  /**
511
- * Emitted by the battery cap provider WHEN `wakeForStream` enters the
525
+ * Emitted by the battery cap provider WHEN `wakeUp` enters the
512
526
  * "wake in progress" window — between the Baichuan wake-up issue and
513
527
  * the camera's first dialed-back RTP packet. The stream-broker
514
528
  * manager subscribes to flip the per-broker placeholder reason to
@@ -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-BBL71oUQ.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.
@@ -979,12 +993,19 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
979
993
  return DeviceType;
980
994
  }({});
981
995
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
996
+ /** The device reports a battery reading (the `battery` cap). Says nothing about sleep. */
982
997
  DeviceFeature["BatteryOperated"] = "battery-operated";
998
+ /**
999
+ * The device goes into low-power sleep and must be WOKEN before it streams
1000
+ * (the `low-power-sleep` cap, `wakeUp`). A battery reading alone is
1001
+ * not this: a battery sensor reports charge and never sleeps (#459, Q2).
1002
+ */
1003
+ DeviceFeature["Sleeps"] = "sleeps";
983
1004
  DeviceFeature["Rebootable"] = "rebootable";
984
1005
  /**
985
1006
  * Device supports an on-demand re-sync of its derived spec with its
986
- * upstream source — drives the generic Re-sync button. The owning
987
- * provider implements the action via the `device-adoption.resync` cap.
1007
+ * upstream source — drives the generic Re-sync button. Present when the
1008
+ * device has the `resync` cap bound (#459, Q6).
988
1009
  */
989
1010
  DeviceFeature["Resyncable"] = "resyncable";
990
1011
  DeviceFeature["NativeSnapshot"] = "native-snapshot";
@@ -1068,9 +1089,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
1068
1089
  DeviceFeature["FanDirection"] = "fan-direction";
1069
1090
  /** Fan exposes an oscillation toggle. */
1070
1091
  DeviceFeature["FanOscillating"] = "fan-oscillating";
1071
- /** Lock requires a PIN code on lock/unlock. Gates the code-entry
1072
- * field on the UI lock-controls panel. */
1073
- DeviceFeature["LockPinRequired"] = "lock-pin-required";
1074
1092
  /** Lock supports a latch-release ("open door") action distinct from
1075
1093
  * unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
1076
1094
  * `supported_features`. Gates the Open Door button in the UI. */
@@ -1101,8 +1119,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
1101
1119
  DeviceFeature["MediaPlayerChannelStep"] = "media-player-channel-step";
1102
1120
  /** Media player exposes power on / off. */
1103
1121
  DeviceFeature["MediaPlayerPower"] = "media-player-power";
1104
- /** Alarm panel requires a PIN code on arm/disarm. */
1105
- DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
1106
1122
  /** Presence device carries GPS coordinates (lat/lng/accuracy) in
1107
1123
  * addition to a textual location. */
1108
1124
  DeviceFeature["PresenceGps"] = "presence-gps";
@@ -1122,15 +1138,9 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
1122
1138
  /** Automation `trigger` accepts a skipCondition flag — fires the
1123
1139
  * automation's actions while bypassing its condition block. */
1124
1140
  DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
1125
- /** Robot vacuum exposes a live cleaning map (image child). Gates the
1126
- * map tile in the vacuum UI. */
1127
- DeviceFeature["VacuumHasMap"] = "vacuum-has-map";
1128
1141
  /** Robot vacuum exposes AI obstacle-detection toggles. Gates the AI
1129
1142
  * switches group. */
1130
1143
  DeviceFeature["VacuumHasAi"] = "vacuum-has-ai";
1131
- /** Robot mower exposes a live mowing map (SVG image child). Gates the
1132
- * mower map tile. */
1133
- DeviceFeature["MowerHasMap"] = "mower-has-map";
1134
1144
  /** Robot mower exposes targeted mowing (all-area / zones / edges /
1135
1145
  * spots) — gates the Mow action + map selectors. */
1136
1146
  DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
@@ -1292,6 +1302,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1292
1302
  /** A machine that runs workloads or is an appliance with its own OS: a
1293
1303
  * server, a hypervisor, a gateway console, a CCU. */
1294
1304
  DeviceRole["Host"] = "host";
1305
+ /** An uninterruptible power supply: battery charge, mains status and load. A
1306
+ * `DeviceType.Sensor` device. */
1307
+ DeviceRole["Ups"] = "ups";
1295
1308
  return DeviceRole;
1296
1309
  }({});
1297
1310
  /**
@@ -6118,7 +6131,7 @@ var ZodIssueCode = {
6118
6131
  var ZodFirstPartyTypeKind;
6119
6132
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6120
6133
  //#endregion
6121
- //#region ../types/dist/sleep-D6Pih0Qt.mjs
6134
+ //#region ../types/dist/runtime-capabilities-qX7BpOYT.mjs
6122
6135
  /**
6123
6136
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6124
6137
  * window to float samples (D455).
@@ -7327,6 +7340,18 @@ function isInstanceEnabled(body) {
7327
7340
  }
7328
7341
  /** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
7329
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
+ }
7330
7355
  /** The keys of the kind's secret fields that sit at the top level of the body. */
7331
7356
  function topLevelSecretKeys(paths) {
7332
7357
  return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
@@ -7429,6 +7454,7 @@ var RecordIntegrationInstances = class {
7429
7454
  enabled: isInstanceEnabled(record.data),
7430
7455
  formValues: shown,
7431
7456
  kind,
7457
+ addDevice: this.hooks.addDevice?.(record.data) ?? defaultAddDeviceMode(this.hooks.description),
7432
7458
  ...health?.status !== void 0 ? { status: health.status } : {},
7433
7459
  ...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
7434
7460
  };
@@ -10860,6 +10886,10 @@ var CAP_VOCABULARY_BY_NAME = {
10860
10886
  it: "Commuta {device}"
10861
10887
  },
10862
10888
  icon: "toggle-right",
10889
+ sideEffects: [{
10890
+ field: "on",
10891
+ negate: true
10892
+ }],
10863
10893
  offeredWhen: {
10864
10894
  method: "getOptions",
10865
10895
  field: "supportsSetState"
@@ -11974,7 +12004,15 @@ var CAP_VOCABULARY_BY_NAME = {
11974
12004
  effect: {
11975
12005
  field: "state",
11976
12006
  value: "locked"
11977
- }
12007
+ },
12008
+ hold: { effects: [{
12009
+ field: "state",
12010
+ value: "locking",
12011
+ when: {
12012
+ field: "state",
12013
+ notIn: ["locked"]
12014
+ }
12015
+ }] }
11978
12016
  },
11979
12017
  {
11980
12018
  id: "lock.unlock",
@@ -12003,7 +12041,15 @@ var CAP_VOCABULARY_BY_NAME = {
12003
12041
  effect: {
12004
12042
  field: "state",
12005
12043
  value: "unlocked"
12006
- }
12044
+ },
12045
+ hold: { effects: [{
12046
+ field: "state",
12047
+ value: "unlocking",
12048
+ when: {
12049
+ field: "state",
12050
+ notIn: ["unlocked"]
12051
+ }
12052
+ }] }
12007
12053
  },
12008
12054
  {
12009
12055
  id: "lock.open",
@@ -12317,6 +12363,14 @@ var CAP_VOCABULARY_BY_NAME = {
12317
12363
  step: .5,
12318
12364
  unit: "°C"
12319
12365
  }
12366
+ }],
12367
+ effect: {
12368
+ field: "targetLow",
12369
+ fromArg: "targetLow"
12370
+ },
12371
+ sideEffects: [{
12372
+ field: "targetHigh",
12373
+ fromArg: "targetHigh"
12320
12374
  }]
12321
12375
  },
12322
12376
  {
@@ -12373,7 +12427,11 @@ var CAP_VOCABULARY_BY_NAME = {
12373
12427
  from: "status",
12374
12428
  field: "availableFanModes"
12375
12429
  }
12376
- }]
12430
+ }],
12431
+ effect: {
12432
+ field: "fanMode",
12433
+ fromArg: "fanMode"
12434
+ }
12377
12435
  },
12378
12436
  {
12379
12437
  id: "climate.preset",
@@ -12398,7 +12456,11 @@ var CAP_VOCABULARY_BY_NAME = {
12398
12456
  from: "status",
12399
12457
  field: "availablePresets"
12400
12458
  }
12401
- }]
12459
+ }],
12460
+ effect: {
12461
+ field: "preset",
12462
+ fromArg: "preset"
12463
+ }
12402
12464
  },
12403
12465
  {
12404
12466
  id: "climate.swingVerticalOn",
@@ -12631,7 +12693,15 @@ var CAP_VOCABULARY_BY_NAME = {
12631
12693
  effect: {
12632
12694
  field: "speed",
12633
12695
  value: 100
12634
- }
12696
+ },
12697
+ sideEffects: [{
12698
+ field: "preset",
12699
+ value: "",
12700
+ when: {
12701
+ field: "preset",
12702
+ notIn: [""]
12703
+ }
12704
+ }]
12635
12705
  },
12636
12706
  {
12637
12707
  id: "fan.speed",
@@ -12662,7 +12732,15 @@ var CAP_VOCABULARY_BY_NAME = {
12662
12732
  effect: {
12663
12733
  field: "speed",
12664
12734
  fromArg: "speed"
12665
- }
12735
+ },
12736
+ sideEffects: [{
12737
+ field: "preset",
12738
+ value: "",
12739
+ when: {
12740
+ field: "preset",
12741
+ notIn: [""]
12742
+ }
12743
+ }]
12666
12744
  },
12667
12745
  {
12668
12746
  id: "fan.preset",
@@ -12687,7 +12765,11 @@ var CAP_VOCABULARY_BY_NAME = {
12687
12765
  from: "status",
12688
12766
  field: "availablePresets"
12689
12767
  }
12690
- }]
12768
+ }],
12769
+ effect: {
12770
+ field: "preset",
12771
+ fromArg: "preset"
12772
+ }
12691
12773
  },
12692
12774
  {
12693
12775
  id: "fan.forward",
@@ -13232,7 +13314,15 @@ var CAP_VOCABULARY_BY_NAME = {
13232
13314
  effect: {
13233
13315
  field: "state",
13234
13316
  value: "disarmed"
13235
- }
13317
+ },
13318
+ hold: { effects: [{
13319
+ field: "state",
13320
+ value: "disarming",
13321
+ when: {
13322
+ field: "state",
13323
+ notIn: ["disarmed"]
13324
+ }
13325
+ }] }
13236
13326
  },
13237
13327
  {
13238
13328
  id: "alarm.arm.home",
@@ -13262,7 +13352,15 @@ var CAP_VOCABULARY_BY_NAME = {
13262
13352
  effect: {
13263
13353
  field: "state",
13264
13354
  value: "armed_home"
13265
- }
13355
+ },
13356
+ hold: { effects: [{
13357
+ field: "state",
13358
+ value: "arming",
13359
+ when: {
13360
+ field: "state",
13361
+ notIn: ["armed_home"]
13362
+ }
13363
+ }] }
13266
13364
  },
13267
13365
  {
13268
13366
  id: "alarm.arm.away",
@@ -13292,7 +13390,15 @@ var CAP_VOCABULARY_BY_NAME = {
13292
13390
  effect: {
13293
13391
  field: "state",
13294
13392
  value: "armed_away"
13295
- }
13393
+ },
13394
+ hold: { effects: [{
13395
+ field: "state",
13396
+ value: "arming",
13397
+ when: {
13398
+ field: "state",
13399
+ notIn: ["armed_away"]
13400
+ }
13401
+ }] }
13296
13402
  },
13297
13403
  {
13298
13404
  id: "alarm.arm.night",
@@ -13322,7 +13428,15 @@ var CAP_VOCABULARY_BY_NAME = {
13322
13428
  effect: {
13323
13429
  field: "state",
13324
13430
  value: "armed_night"
13325
- }
13431
+ },
13432
+ hold: { effects: [{
13433
+ field: "state",
13434
+ value: "arming",
13435
+ when: {
13436
+ field: "state",
13437
+ notIn: ["armed_night"]
13438
+ }
13439
+ }] }
13326
13440
  },
13327
13441
  {
13328
13442
  id: "alarm.arm.vacation",
@@ -13352,7 +13466,15 @@ var CAP_VOCABULARY_BY_NAME = {
13352
13466
  effect: {
13353
13467
  field: "state",
13354
13468
  value: "armed_vacation"
13355
- }
13469
+ },
13470
+ hold: { effects: [{
13471
+ field: "state",
13472
+ value: "arming",
13473
+ when: {
13474
+ field: "state",
13475
+ notIn: ["armed_vacation"]
13476
+ }
13477
+ }] }
13356
13478
  },
13357
13479
  {
13358
13480
  id: "alarm.arm.custom_bypass",
@@ -13382,7 +13504,15 @@ var CAP_VOCABULARY_BY_NAME = {
13382
13504
  effect: {
13383
13505
  field: "state",
13384
13506
  value: "armed_custom_bypass"
13385
- }
13507
+ },
13508
+ hold: { effects: [{
13509
+ field: "state",
13510
+ value: "arming",
13511
+ when: {
13512
+ field: "state",
13513
+ notIn: ["armed_custom_bypass"]
13514
+ }
13515
+ }] }
13386
13516
  }
13387
13517
  ],
13388
13518
  state: [{
@@ -14524,7 +14654,14 @@ var CAP_VOCABULARY_BY_NAME = {
14524
14654
  quantity: "mass"
14525
14655
  },
14526
14656
  optional: true
14527
- }]
14657
+ }],
14658
+ hold: {
14659
+ effects: [{
14660
+ field: "feeding",
14661
+ value: true
14662
+ }],
14663
+ holdMs: 1e4
14664
+ }
14528
14665
  },
14529
14666
  {
14530
14667
  id: "petFeeder.feedHoppers",
@@ -14568,7 +14705,14 @@ var CAP_VOCABULARY_BY_NAME = {
14568
14705
  quantity: "mass"
14569
14706
  },
14570
14707
  optional: true
14571
- }]
14708
+ }],
14709
+ hold: {
14710
+ effects: [{
14711
+ field: "feeding",
14712
+ value: true
14713
+ }],
14714
+ holdMs: 1e4
14715
+ }
14572
14716
  },
14573
14717
  {
14574
14718
  id: "petFeeder.cancelFeed",
@@ -14659,7 +14803,11 @@ var CAP_VOCABULARY_BY_NAME = {
14659
14803
  it: "Attiva il blocco bambini di {device}"
14660
14804
  },
14661
14805
  icon: "lock",
14662
- args: { on: true }
14806
+ args: { on: true },
14807
+ effect: {
14808
+ field: "childLock",
14809
+ value: true
14810
+ }
14663
14811
  },
14664
14812
  {
14665
14813
  id: "petFeeder.childLockOff",
@@ -14673,7 +14821,11 @@ var CAP_VOCABULARY_BY_NAME = {
14673
14821
  it: "Disattiva il blocco bambini di {device}"
14674
14822
  },
14675
14823
  icon: "lock-open",
14676
- args: { on: false }
14824
+ args: { on: false },
14825
+ effect: {
14826
+ field: "childLock",
14827
+ value: false
14828
+ }
14677
14829
  },
14678
14830
  {
14679
14831
  id: "petFeeder.lightOn",
@@ -14687,7 +14839,11 @@ var CAP_VOCABULARY_BY_NAME = {
14687
14839
  it: "Accendi la spia di {device}"
14688
14840
  },
14689
14841
  icon: "lightbulb",
14690
- args: { on: true }
14842
+ args: { on: true },
14843
+ effect: {
14844
+ field: "indicatorLight",
14845
+ value: true
14846
+ }
14691
14847
  },
14692
14848
  {
14693
14849
  id: "petFeeder.lightOff",
@@ -14701,7 +14857,11 @@ var CAP_VOCABULARY_BY_NAME = {
14701
14857
  it: "Spegni la spia di {device}"
14702
14858
  },
14703
14859
  icon: "lightbulb-off",
14704
- args: { on: false }
14860
+ args: { on: false },
14861
+ effect: {
14862
+ field: "indicatorLight",
14863
+ value: false
14864
+ }
14705
14865
  },
14706
14866
  {
14707
14867
  id: "petFeeder.feedSoundOn",
@@ -14715,7 +14875,11 @@ var CAP_VOCABULARY_BY_NAME = {
14715
14875
  it: "Attiva il suono di erogazione di {device}"
14716
14876
  },
14717
14877
  icon: "volume-2",
14718
- args: { on: true }
14878
+ args: { on: true },
14879
+ effect: {
14880
+ field: "feedSound",
14881
+ value: true
14882
+ }
14719
14883
  },
14720
14884
  {
14721
14885
  id: "petFeeder.feedSoundOff",
@@ -14729,7 +14893,11 @@ var CAP_VOCABULARY_BY_NAME = {
14729
14893
  it: "Disattiva il suono di erogazione di {device}"
14730
14894
  },
14731
14895
  icon: "volume-x",
14732
- args: { on: false }
14896
+ args: { on: false },
14897
+ effect: {
14898
+ field: "feedSound",
14899
+ value: false
14900
+ }
14733
14901
  },
14734
14902
  {
14735
14903
  id: "petFeeder.volume",
@@ -14754,7 +14922,11 @@ var CAP_VOCABULARY_BY_NAME = {
14754
14922
  min: 0,
14755
14923
  step: 1
14756
14924
  }
14757
- }]
14925
+ }],
14926
+ effect: {
14927
+ field: "volume",
14928
+ fromArg: "level"
14929
+ }
14758
14930
  }
14759
14931
  ],
14760
14932
  state: [
@@ -14826,7 +14998,11 @@ var CAP_VOCABULARY_BY_NAME = {
14826
14998
  it: "Avvia la pompa di {device}"
14827
14999
  },
14828
15000
  icon: "play",
14829
- args: { on: true }
15001
+ args: { on: true },
15002
+ effect: {
15003
+ field: "pumpRunning",
15004
+ value: true
15005
+ }
14830
15006
  }, {
14831
15007
  id: "petFountain.pumpOff",
14832
15008
  method: "setPump",
@@ -14839,7 +15015,11 @@ var CAP_VOCABULARY_BY_NAME = {
14839
15015
  it: "Ferma la pompa di {device}"
14840
15016
  },
14841
15017
  icon: "square",
14842
- args: { on: false }
15018
+ args: { on: false },
15019
+ effect: {
15020
+ field: "pumpRunning",
15021
+ value: false
15022
+ }
14843
15023
  }],
14844
15024
  state: [{
14845
15025
  kind: "boolean",
@@ -14891,7 +15071,11 @@ var CAP_VOCABULARY_BY_NAME = {
14891
15071
  it: "Fai lavorare la pompa di {device} a ciclo acceso/spento"
14892
15072
  },
14893
15073
  icon: "timer",
14894
- args: { on: true }
15074
+ args: { on: true },
15075
+ effect: {
15076
+ field: "enabled",
15077
+ value: true
15078
+ }
14895
15079
  },
14896
15080
  {
14897
15081
  id: "pumpCycle.off",
@@ -14905,7 +15089,11 @@ var CAP_VOCABULARY_BY_NAME = {
14905
15089
  it: "Fai lavorare la pompa di {device} in continuo"
14906
15090
  },
14907
15091
  icon: "timer-off",
14908
- args: { on: false }
15092
+ args: { on: false },
15093
+ effect: {
15094
+ field: "enabled",
15095
+ value: false
15096
+ }
14909
15097
  },
14910
15098
  {
14911
15099
  id: "pumpCycle.onMinutes",
@@ -14931,7 +15119,12 @@ var CAP_VOCABULARY_BY_NAME = {
14931
15119
  step: 1,
14932
15120
  unit: "min"
14933
15121
  }
14934
- }]
15122
+ }],
15123
+ effect: {
15124
+ field: "onTime",
15125
+ fromArg: "minutes",
15126
+ scale: 60
15127
+ }
14935
15128
  },
14936
15129
  {
14937
15130
  id: "pumpCycle.offMinutes",
@@ -14957,7 +15150,12 @@ var CAP_VOCABULARY_BY_NAME = {
14957
15150
  step: 1,
14958
15151
  unit: "min"
14959
15152
  }
14960
- }]
15153
+ }],
15154
+ effect: {
15155
+ field: "offTime",
15156
+ fromArg: "minutes",
15157
+ scale: 60
15158
+ }
14961
15159
  }
14962
15160
  ],
14963
15161
  state: [{
@@ -15074,7 +15272,11 @@ var CAP_VOCABULARY_BY_NAME = {
15074
15272
  en: "Play on {device}",
15075
15273
  it: "Avvia la riproduzione su {device}"
15076
15274
  },
15077
- icon: "play"
15275
+ icon: "play",
15276
+ effect: {
15277
+ field: "state",
15278
+ value: "playing"
15279
+ }
15078
15280
  },
15079
15281
  {
15080
15282
  id: "media.pause",
@@ -15087,7 +15289,11 @@ var CAP_VOCABULARY_BY_NAME = {
15087
15289
  en: "Pause {device}",
15088
15290
  it: "Metti in pausa {device}"
15089
15291
  },
15090
- icon: "pause"
15292
+ icon: "pause",
15293
+ effect: {
15294
+ field: "state",
15295
+ value: "paused"
15296
+ }
15091
15297
  },
15092
15298
  {
15093
15299
  id: "media.stop",
@@ -15153,7 +15359,11 @@ var CAP_VOCABULARY_BY_NAME = {
15153
15359
  step: 1,
15154
15360
  unit: "%"
15155
15361
  }
15156
- }]
15362
+ }],
15363
+ effect: {
15364
+ field: "volumeLevel",
15365
+ fromArg: "volumeLevel"
15366
+ }
15157
15367
  },
15158
15368
  {
15159
15369
  id: "media.mute",
@@ -15167,7 +15377,11 @@ var CAP_VOCABULARY_BY_NAME = {
15167
15377
  it: "Silenzia {device}"
15168
15378
  },
15169
15379
  icon: "volume-x",
15170
- args: { muted: true }
15380
+ args: { muted: true },
15381
+ effect: {
15382
+ field: "isMuted",
15383
+ value: true
15384
+ }
15171
15385
  },
15172
15386
  {
15173
15387
  id: "media.unmute",
@@ -15181,7 +15395,11 @@ var CAP_VOCABULARY_BY_NAME = {
15181
15395
  it: "Riattiva l’audio di {device}"
15182
15396
  },
15183
15397
  icon: "volume-2",
15184
- args: { muted: false }
15398
+ args: { muted: false },
15399
+ effect: {
15400
+ field: "isMuted",
15401
+ value: false
15402
+ }
15185
15403
  },
15186
15404
  {
15187
15405
  id: "media.shuffleOn",
@@ -15195,7 +15413,11 @@ var CAP_VOCABULARY_BY_NAME = {
15195
15413
  it: "Attiva la riproduzione casuale su {device}"
15196
15414
  },
15197
15415
  icon: "shuffle",
15198
- args: { shuffle: true }
15416
+ args: { shuffle: true },
15417
+ effect: {
15418
+ field: "shuffle",
15419
+ value: true
15420
+ }
15199
15421
  },
15200
15422
  {
15201
15423
  id: "media.shuffleOff",
@@ -15209,7 +15431,11 @@ var CAP_VOCABULARY_BY_NAME = {
15209
15431
  it: "Disattiva la riproduzione casuale su {device}"
15210
15432
  },
15211
15433
  icon: "shuffle",
15212
- args: { shuffle: false }
15434
+ args: { shuffle: false },
15435
+ effect: {
15436
+ field: "shuffle",
15437
+ value: false
15438
+ }
15213
15439
  },
15214
15440
  {
15215
15441
  id: "media.repeat",
@@ -15255,7 +15481,11 @@ var CAP_VOCABULARY_BY_NAME = {
15255
15481
  }
15256
15482
  ]
15257
15483
  }
15258
- }]
15484
+ }],
15485
+ effect: {
15486
+ field: "repeat",
15487
+ fromArg: "repeat"
15488
+ }
15259
15489
  },
15260
15490
  {
15261
15491
  id: "media.source",
@@ -15280,7 +15510,11 @@ var CAP_VOCABULARY_BY_NAME = {
15280
15510
  from: "status",
15281
15511
  field: "availableSources"
15282
15512
  }
15283
- }]
15513
+ }],
15514
+ effect: {
15515
+ field: "source",
15516
+ fromArg: "source"
15517
+ }
15284
15518
  },
15285
15519
  {
15286
15520
  id: "media.seek",
@@ -15820,7 +16054,14 @@ var CAP_VOCABULARY_BY_NAME = {
15820
16054
  en: "Run {device}",
15821
16055
  it: "Esegui {device}"
15822
16056
  },
15823
- icon: "scroll-text"
16057
+ icon: "scroll-text",
16058
+ hold: {
16059
+ effects: [{
16060
+ field: "isRunning",
16061
+ value: true
16062
+ }],
16063
+ holdMs: 1e4
16064
+ }
15824
16065
  }, {
15825
16066
  id: "script.stop",
15826
16067
  method: "stop",
@@ -15832,7 +16073,11 @@ var CAP_VOCABULARY_BY_NAME = {
15832
16073
  en: "Stop {device}",
15833
16074
  it: "Ferma {device}"
15834
16075
  },
15835
- icon: "square"
16076
+ icon: "square",
16077
+ effect: {
16078
+ field: "isRunning",
16079
+ value: false
16080
+ }
15836
16081
  }],
15837
16082
  state: [{
15838
16083
  kind: "boolean",
@@ -15870,7 +16115,11 @@ var CAP_VOCABULARY_BY_NAME = {
15870
16115
  en: "Enable {device}",
15871
16116
  it: "Abilita {device}"
15872
16117
  },
15873
- icon: "toggle-right"
16118
+ icon: "toggle-right",
16119
+ effect: {
16120
+ field: "enabled",
16121
+ value: true
16122
+ }
15874
16123
  },
15875
16124
  {
15876
16125
  id: "haAutomation.disable",
@@ -15883,7 +16132,11 @@ var CAP_VOCABULARY_BY_NAME = {
15883
16132
  en: "Disable {device}",
15884
16133
  it: "Disabilita {device}"
15885
16134
  },
15886
- icon: "toggle-left"
16135
+ icon: "toggle-left",
16136
+ effect: {
16137
+ field: "enabled",
16138
+ value: false
16139
+ }
15887
16140
  },
15888
16141
  {
15889
16142
  id: "haAutomation.trigger",
@@ -17477,6 +17730,25 @@ var CAP_VOCABULARY_BY_NAME = {
17477
17730
  icon: "refresh-cw"
17478
17731
  }]
17479
17732
  },
17733
+ "resync": {
17734
+ scope: "device",
17735
+ noun: {
17736
+ en: "Re-sync",
17737
+ it: "Risincronizzazione"
17738
+ },
17739
+ notOperatorFacing: { resync: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action" }
17740
+ },
17741
+ "device-state-refresh": {
17742
+ scope: "device",
17743
+ noun: {
17744
+ en: "State refresh",
17745
+ it: "Aggiornamento dello stato"
17746
+ },
17747
+ notOperatorFacing: {
17748
+ refresh: "the core schedules state refreshes itself; an operator never asks for one",
17749
+ resubscribe: "the core schedules state refreshes itself; an operator never asks for one"
17750
+ }
17751
+ },
17480
17752
  "recording": {
17481
17753
  scope: "device",
17482
17754
  noun: {
@@ -19488,7 +19760,6 @@ var CAP_VOCABULARY_BY_NAME = {
19488
19760
  en: "Battery",
19489
19761
  it: "Batteria"
19490
19762
  },
19491
- notOperatorFacing: { wakeForStream: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage" },
19492
19763
  state: [
19493
19764
  {
19494
19765
  kind: "numeric",
@@ -19598,6 +19869,14 @@ var CAP_VOCABULARY_BY_NAME = {
19598
19869
  icon: "moon"
19599
19870
  }]
19600
19871
  },
19872
+ "low-power-sleep": {
19873
+ scope: "device",
19874
+ noun: {
19875
+ en: "Low-power sleep",
19876
+ it: "Sospensione a basso consumo"
19877
+ },
19878
+ notOperatorFacing: { wakeUp: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage" }
19879
+ },
19601
19880
  "network-link": {
19602
19881
  scope: "device",
19603
19882
  noun: {
@@ -20464,6 +20743,7 @@ var CAP_NAMES = Object.freeze([
20464
20743
  "device-removal-hook",
20465
20744
  "device-runs",
20466
20745
  "device-state",
20746
+ "device-state-refresh",
20467
20747
  "device-status",
20468
20748
  "device-transitions",
20469
20749
  "dishwasher",
@@ -20509,6 +20789,7 @@ var CAP_NAMES = Object.freeze([
20509
20789
  "log-channels",
20510
20790
  "log-destination",
20511
20791
  "login-method",
20792
+ "low-power-sleep",
20512
20793
  "media-player",
20513
20794
  "mesh-network",
20514
20795
  "meter",
@@ -20562,6 +20843,7 @@ var CAP_NAMES = Object.freeze([
20562
20843
  "records",
20563
20844
  "remote",
20564
20845
  "remote-layout-components",
20846
+ "resync",
20565
20847
  "running-state",
20566
20848
  "scene-monitor",
20567
20849
  "schedulers",
@@ -20665,7 +20947,7 @@ Object.freeze({
20665
20947
  ]
20666
20948
  },
20667
20949
  {
20668
- "path": "requiresCode",
20950
+ "path": "codeRequired",
20669
20951
  "valueType": "boolean"
20670
20952
  }
20671
20953
  ],
@@ -21733,7 +22015,24 @@ Object.freeze({
21733
22015
  "jammed",
21734
22016
  "door-open"
21735
22017
  ]
22018
+ }, {
22019
+ "path": "codeRequired",
22020
+ "valueType": "boolean"
21736
22021
  }],
22022
+ "low-power-sleep": [
22023
+ {
22024
+ "path": "sleeping",
22025
+ "valueType": "boolean"
22026
+ },
22027
+ {
22028
+ "path": "lastContactAt",
22029
+ "valueType": "number"
22030
+ },
22031
+ {
22032
+ "path": "lastUpdated",
22033
+ "valueType": "number"
22034
+ }
22035
+ ],
21737
22036
  "media-player": [
21738
22037
  {
21739
22038
  "path": "state",
@@ -22085,6 +22384,10 @@ Object.freeze({
22085
22384
  "path": "power",
22086
22385
  "valueType": "number"
22087
22386
  },
22387
+ {
22388
+ "path": "deliveredPower",
22389
+ "valueType": "number"
22390
+ },
22088
22391
  {
22089
22392
  "path": "energy",
22090
22393
  "valueType": "number"
@@ -22903,7 +23206,7 @@ Object.freeze({
22903
23206
  }
22904
23207
  });
22905
23208
  //#endregion
22906
- //#region ../types/dist/implemented-methods-u7ddjc-_.mjs
23209
+ //#region ../types/dist/implemented-methods-wFScvZ40.mjs
22907
23210
  /**
22908
23211
  * The ffmpeg build every CamStack node downloads, per platform and arch.
22909
23212
  *
@@ -24063,6 +24366,8 @@ var CompositionItemEntrySchema = object({
24063
24366
  */
24064
24367
  reset: CompositionForwardCommandSchema.optional()
24065
24368
  });
24369
+ /** Which identity link added a feature (D1063). */
24370
+ var CompositionContributedBySchema = object({ linkId: string().min(1) });
24066
24371
  var CompositionFeatureSchema = discriminatedUnion("kind", [object({
24067
24372
  kind: literal("fields"),
24068
24373
  cap: string().min(1),
@@ -24074,7 +24379,14 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
24074
24379
  */
24075
24380
  items: record$1(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
24076
24381
  /** Method name → what serves it. Only a BUILT capability takes commands (D967). */
24077
- commands: record$1(string().min(1), CompositionCommandTargetSchema).optional()
24382
+ commands: record$1(string().min(1), CompositionCommandTargetSchema).optional(),
24383
+ /**
24384
+ * Provenance only (D1063): the identity link that added this feature. The
24385
+ * source ref stays in `fields`; `enabled` stays the operator's switch. An
24386
+ * operator edit of the source drops the stamp and the feature becomes the
24387
+ * operator's; a lost link removes only stamped features.
24388
+ */
24389
+ contributedBy: CompositionContributedBySchema.optional()
24078
24390
  }), object({
24079
24391
  kind: literal("passthrough"),
24080
24392
  cap: string().min(1),
@@ -49339,6 +49651,67 @@ object({
49339
49651
  /** Namespaces the client listed that no longer exist. */
49340
49652
  deleted: array(PreferenceNamespaceSchema)
49341
49653
  });
49654
+ /**
49655
+ * The wire shapes of `apiCatalog.*` — the API explorer's data (planning#595).
49656
+ *
49657
+ * One entry per tRPC method the hub serves, capability and core routes alike,
49658
+ * read off the live router by the hub (never a hand-written list).
49659
+ */
49660
+ var ApiProcedureKindSchema = _enum([
49661
+ "query",
49662
+ "mutation",
49663
+ "subscription"
49664
+ ]);
49665
+ /** The gate a method runs behind. */
49666
+ var ApiProcedureTierSchema = _enum([
49667
+ "public",
49668
+ "protected",
49669
+ "admin"
49670
+ ]);
49671
+ /** The token scope a capability route is matched against (its `METHOD_ACCESS_MAP` row). */
49672
+ var ApiCatalogScopeSchema = object({
49673
+ capName: string(),
49674
+ capScope: _enum(["device", "system"]),
49675
+ access: _enum([
49676
+ "view",
49677
+ "create",
49678
+ "delete"
49679
+ ]),
49680
+ role: string()
49681
+ });
49682
+ var ApiCatalogEntrySchema = object({
49683
+ /** `<router>.<method>` — the tRPC path. */
49684
+ path: string(),
49685
+ router: string(),
49686
+ method: string(),
49687
+ kind: ApiProcedureKindSchema,
49688
+ tier: ApiProcedureTierSchema,
49689
+ source: _enum(["capability", "core"]),
49690
+ /** `null` on a core route: it needs authentication only (plus admin where its tier says so). */
49691
+ scope: ApiCatalogScopeSchema.nullable(),
49692
+ hasInput: boolean()
49693
+ });
49694
+ /**
49695
+ * May the CALLER call a method. The list has no input, so a method reached
49696
+ * only through a device grant is `per-device`: the real call is allowed or
49697
+ * refused on the device its input names.
49698
+ */
49699
+ var ApiCallableSchema = _enum([
49700
+ "yes",
49701
+ "no",
49702
+ "per-device"
49703
+ ]);
49704
+ object({ methods: array(ApiCatalogEntrySchema.extend({ callable: ApiCallableSchema })) });
49705
+ /** A JSON Schema document, as the explorer receives it. */
49706
+ var JsonSchemaDocumentSchema = record$1(string(), unknown());
49707
+ object({
49708
+ path: string(),
49709
+ hasInput: boolean(),
49710
+ /** The INPUT JSON schema (what the caller sends); `null` without input or when it could not be produced. */
49711
+ schema: JsonSchemaDocumentSchema.nullable(),
49712
+ /** Why no schema could be produced (a non-Zod parser, an unrepresentable type). */
49713
+ error: string().nullable()
49714
+ });
49342
49715
  _enum(["new-session", "step-up"]);
49343
49716
  /** The languages the hub's app landing pages are written in (D858). */
49344
49717
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -53197,9 +53570,8 @@ var airQualitySensorCapability = {
53197
53570
  * Many panels require a PIN code on arm / disarm — the optional
53198
53571
  * `code` field on the methods passes it through to the upstream
53199
53572
  * service; it's NEVER persisted in the runtime slice or any event
53200
- * payload. The presence of a required code is signalled by
53201
- * `DeviceFeature.AlarmPinRequired` so the UI gates a code-entry
53202
- * field without a slice fetch.
53573
+ * payload. Whether a code is required is the slice's `codeRequired`
53574
+ * (#459): `null` when the provider cannot tell (D393).
53203
53575
  *
53204
53576
  * `availableModes` mirrors HA's `supported_features`-derived arm
53205
53577
  * mode list — the UI renders only the buttons the panel accepts.
@@ -53238,9 +53610,13 @@ var AlarmPanelStatusSchema = object({
53238
53610
  /** Subset of arm modes the panel accepts. UI renders one button per
53239
53611
  * mode in this list. */
53240
53612
  availableModes: array(AlarmArmModeSchema),
53241
- /** Whether the panel requires a PIN on arm / disarm. Mirrors
53242
- * `DeviceFeature.AlarmPinRequired` for slice consumers. */
53243
- requiresCode: boolean(),
53613
+ /**
53614
+ * Whether the panel requires a PIN on arm / disarm (#459; the field was
53615
+ * `requiresCode`, and the `alarm-pin-required` device feature is gone).
53616
+ * `null` = the provider cannot tell (D393), never `false`. A slice restored
53617
+ * from before the rename is upgraded at boot by `restoredFieldRenames`.
53618
+ */
53619
+ codeRequired: boolean().nullable(),
53244
53620
  /** Ms epoch when the slice was last updated. */
53245
53621
  lastChangedAt: number$1()
53246
53622
  });
@@ -53283,6 +53659,14 @@ var alarmPanelCapability = {
53283
53659
  field: "state",
53284
53660
  value: "disarmed"
53285
53661
  },
53662
+ hold: { effects: [{
53663
+ field: "state",
53664
+ value: "disarming",
53665
+ when: {
53666
+ field: "state",
53667
+ notIn: ["disarmed"]
53668
+ }
53669
+ }] },
53286
53670
  openArgs: [{
53287
53671
  key: "code",
53288
53672
  label: t("PIN code", "Codice PIN"),
@@ -53297,7 +53681,7 @@ var alarmPanelCapability = {
53297
53681
  arm: method(object({
53298
53682
  deviceId: number$1().int().nonnegative(),
53299
53683
  mode: AlarmArmModeSchema,
53300
- /** Optional PIN code. Required when `requiresCode === true`.
53684
+ /** Optional PIN code. Required when `codeRequired === true`.
53301
53685
  * Passed through to the upstream service; never persisted. */
53302
53686
  code: string().min(1).optional()
53303
53687
  }), _void(), {
@@ -53313,6 +53697,14 @@ var alarmPanelCapability = {
53313
53697
  field: "state",
53314
53698
  value: "armed_home"
53315
53699
  },
53700
+ hold: { effects: [{
53701
+ field: "state",
53702
+ value: "arming",
53703
+ when: {
53704
+ field: "state",
53705
+ notIn: ["armed_home"]
53706
+ }
53707
+ }] },
53316
53708
  args: { mode: "home" },
53317
53709
  openArgs: [{
53318
53710
  key: "code",
@@ -53333,6 +53725,14 @@ var alarmPanelCapability = {
53333
53725
  field: "state",
53334
53726
  value: "armed_away"
53335
53727
  },
53728
+ hold: { effects: [{
53729
+ field: "state",
53730
+ value: "arming",
53731
+ when: {
53732
+ field: "state",
53733
+ notIn: ["armed_away"]
53734
+ }
53735
+ }] },
53336
53736
  args: { mode: "away" },
53337
53737
  openArgs: [{
53338
53738
  key: "code",
@@ -53353,6 +53753,14 @@ var alarmPanelCapability = {
53353
53753
  field: "state",
53354
53754
  value: "armed_night"
53355
53755
  },
53756
+ hold: { effects: [{
53757
+ field: "state",
53758
+ value: "arming",
53759
+ when: {
53760
+ field: "state",
53761
+ notIn: ["armed_night"]
53762
+ }
53763
+ }] },
53356
53764
  args: { mode: "night" },
53357
53765
  openArgs: [{
53358
53766
  key: "code",
@@ -53373,6 +53781,14 @@ var alarmPanelCapability = {
53373
53781
  field: "state",
53374
53782
  value: "armed_vacation"
53375
53783
  },
53784
+ hold: { effects: [{
53785
+ field: "state",
53786
+ value: "arming",
53787
+ when: {
53788
+ field: "state",
53789
+ notIn: ["armed_vacation"]
53790
+ }
53791
+ }] },
53376
53792
  args: { mode: "vacation" },
53377
53793
  openArgs: [{
53378
53794
  key: "code",
@@ -53393,6 +53809,14 @@ var alarmPanelCapability = {
53393
53809
  field: "state",
53394
53810
  value: "armed_custom_bypass"
53395
53811
  },
53812
+ hold: { effects: [{
53813
+ field: "state",
53814
+ value: "arming",
53815
+ when: {
53816
+ field: "state",
53817
+ notIn: ["armed_custom_bypass"]
53818
+ }
53819
+ }] },
53396
53820
  args: { mode: "custom_bypass" },
53397
53821
  openArgs: [{
53398
53822
  key: "code",
@@ -53414,7 +53838,7 @@ var alarmPanelCapability = {
53414
53838
  /**
53415
53839
  * Runtime-state slice — mirrored by the kernel. UI panel reads the
53416
53840
  * full slice; renders an arm button per `availableModes` entry and
53417
- * a PIN field iff `requiresCode === true`.
53841
+ * a PIN field iff `codeRequired === true`.
53418
53842
  */
53419
53843
  runtimeState: AlarmPanelStatusSchema,
53420
53844
  /**
@@ -53425,6 +53849,13 @@ var alarmPanelCapability = {
53425
53849
  */
53426
53850
  durability: "restored",
53427
53851
  /**
53852
+ * A slice persisted before #459 carries `requiresCode`; the boot seed reads it
53853
+ * once into `codeRequired` (`restoredPart`), so no reader meets the old key,
53854
+ * and rewrites the row once without it (`seedMirrorFromRow`) — so this entry
53855
+ * can be dropped after every node has booted once on a release that has it.
53856
+ */
53857
+ restoredFieldRenames: { requiresCode: "codeRequired" },
53858
+ /**
53428
53859
  * History (D850): the panel's lifecycle state as an `enum` series —
53429
53860
  * change-only, no floor, so an `arming -> pending -> triggered` sequence of a
53430
53861
  * few seconds keeps every step. Who armed it stays in the events ledger.
@@ -54069,6 +54500,10 @@ var automationControlCapability = {
54069
54500
  auth: "admin",
54070
54501
  actions: [{
54071
54502
  id: "haAutomation.enable",
54503
+ effect: {
54504
+ field: "enabled",
54505
+ value: true
54506
+ },
54072
54507
  label: t("Enable automation", "Abilita l’automazione"),
54073
54508
  phrase: t("Enable {device}", "Abilita {device}"),
54074
54509
  icon: "toggle-right"
@@ -54079,6 +54514,10 @@ var automationControlCapability = {
54079
54514
  auth: "admin",
54080
54515
  actions: [{
54081
54516
  id: "haAutomation.disable",
54517
+ effect: {
54518
+ field: "enabled",
54519
+ value: false
54520
+ },
54082
54521
  label: t("Disable automation", "Disabilita l’automazione"),
54083
54522
  phrase: t("Disable {device}", "Disabilita {device}"),
54084
54523
  icon: "toggle-left"
@@ -54622,9 +55061,9 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
54622
55061
  auth: "admin"
54623
55062
  });
54624
55063
  /**
54625
- * Battery status snapshot. Emitted by providers whose device is
54626
- * battery-operated (cameras with `DeviceFeature.BatteryOperated`,
54627
- * future sensor/button accessories). Consumers build their own "low
55064
+ * Battery status snapshot. Emitted by providers whose device reports a
55065
+ * battery (`DeviceFeature.BatteryOperated`): battery cameras, sensors,
55066
+ * buttons. Whether the device SLEEPS is `low-power-sleep`, not this cap. Consumers build their own "low
54628
55067
  * battery" alerting on top — the cap deliberately does NOT enforce a
54629
55068
  * threshold.
54630
55069
  */
@@ -54781,47 +55220,12 @@ var batteryCapability = {
54781
55220
  deviceNative: true,
54782
55221
  mode: "singleton",
54783
55222
  deviceTypes: BATTERY_DEVICE_TYPES,
54784
- methods: {
54785
- /**
54786
- * Explicitly wake the camera from low-power sleep ahead of a
54787
- * streaming session start. Consumers that initiate a stream
54788
- * against a sleeping battery cam (HomeKit Secure Video, Alexa
54789
- * RTCSession, snapshot wrappers) call this with a short timeout
54790
- * before establishing the media pipeline — the broker's own
54791
- * passive wake-on-dial works but adds 5–7 seconds to first-frame,
54792
- * during which the consumer renders a black screen. Pre-waking
54793
- * compresses that gap.
54794
- *
54795
- * Returns `awoke: true` when the firmware acknowledged the wake
54796
- * before `timeoutMs`. Returns `awoke: false` when it timed out OR
54797
- * the cap surface is unavailable (no Baichuan / firmware
54798
- * channel); the caller should still attempt the stream — the
54799
- * passive broker wake remains as fallback.
54800
- */
54801
- wakeForStream: method(object({
54802
- deviceId: number$1(),
54803
- /** Bound on the wait. Sensible range 3000–10000ms. */
54804
- timeoutMs: number$1().int().min(500).max(3e4).default(8e3)
54805
- }), object({
54806
- awoke: boolean(),
54807
- durationMs: number$1()
54808
- }), {
54809
- kind: "mutation",
54810
- notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
54811
- }) },
54812
55223
  /**
54813
- * A composed provider (battery ADDED to a pet feeder or container that has
54814
- * no wake surface) answers `wakeForStream` with the same "unavailable"
54815
- * result the contract already defines above: "Returns `awoke: false` when
54816
- * … the cap surface is unavailable." (D663).
55224
+ * No methods: waking a sleeping camera is `low-power-sleep.wakeUp`
55225
+ * (#459, Q2). A battery reading says nothing about sleep — a battery sensor
55226
+ * reports charge and never needs waking.
54817
55227
  */
54818
- composedMethods: { wakeForStream: {
54819
- kind: "answer",
54820
- value: {
54821
- awoke: false,
54822
- durationMs: 0
54823
- }
54824
- } },
55228
+ methods: {},
54825
55229
  events: {
54826
55230
  /**
54827
55231
  * Emitted whenever the cached status changes (firmware push OR
@@ -56924,6 +57328,14 @@ var climateControlCapability = {
56924
57328
  label: t("Set temperature range", "Imposta l’intervallo di temperatura"),
56925
57329
  phrase: t("Keep {device} between {targetLow} and {targetHigh}", "Mantieni {device} tra {targetLow} e {targetHigh}"),
56926
57330
  icon: "thermometer",
57331
+ effect: {
57332
+ field: "targetLow",
57333
+ fromArg: "targetLow"
57334
+ },
57335
+ sideEffects: [{
57336
+ field: "targetHigh",
57337
+ fromArg: "targetHigh"
57338
+ }],
56927
57339
  openArgs: [{
56928
57340
  key: "targetLow",
56929
57341
  label: t("Lowest", "Minima"),
@@ -56982,6 +57394,10 @@ var climateControlCapability = {
56982
57394
  label: t("Set fan mode", "Imposta la ventilazione"),
56983
57395
  phrase: t("Set the fan of {device} to {fanMode}", "Imposta la ventilazione di {device} su {fanMode}"),
56984
57396
  icon: "fan",
57397
+ effect: {
57398
+ field: "fanMode",
57399
+ fromArg: "fanMode"
57400
+ },
56985
57401
  openArgs: [{
56986
57402
  key: "fanMode",
56987
57403
  label: t("Fan mode", "Ventilazione"),
@@ -57004,6 +57420,10 @@ var climateControlCapability = {
57004
57420
  label: t("Set preset", "Imposta il preset"),
57005
57421
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
57006
57422
  icon: "list",
57423
+ effect: {
57424
+ field: "preset",
57425
+ fromArg: "preset"
57426
+ },
57007
57427
  openArgs: [{
57008
57428
  key: "preset",
57009
57429
  label: t("Preset", "Preset"),
@@ -57591,7 +58011,8 @@ var CompositionProblemSchema = object({
57591
58011
  "command-source-unknown",
57592
58012
  "command-input-unknown",
57593
58013
  "command-input-missing",
57594
- "power-source-is-actuator"
58014
+ "power-source-is-actuator",
58015
+ "link-contribution-removed"
57595
58016
  ]),
57596
58017
  path: string(),
57597
58018
  message: string()
@@ -59018,6 +59439,10 @@ var mediaPlayerCapability = {
59018
59439
  auth: "protected",
59019
59440
  actions: [{
59020
59441
  id: "media.play",
59442
+ effect: {
59443
+ field: "state",
59444
+ value: "playing"
59445
+ },
59021
59446
  label: t("Play", "Riproduci"),
59022
59447
  phrase: t("Play on {device}", "Avvia la riproduzione su {device}"),
59023
59448
  icon: "play"
@@ -59028,6 +59453,10 @@ var mediaPlayerCapability = {
59028
59453
  auth: "protected",
59029
59454
  actions: [{
59030
59455
  id: "media.pause",
59456
+ effect: {
59457
+ field: "state",
59458
+ value: "paused"
59459
+ },
59031
59460
  label: t("Pause media", "Metti in pausa"),
59032
59461
  phrase: t("Pause {device}", "Metti in pausa {device}"),
59033
59462
  icon: "pause"
@@ -59071,6 +59500,10 @@ var mediaPlayerCapability = {
59071
59500
  auth: "protected",
59072
59501
  actions: [{
59073
59502
  id: "media.volume",
59503
+ effect: {
59504
+ field: "volumeLevel",
59505
+ fromArg: "volumeLevel"
59506
+ },
59074
59507
  label: t("Set volume", "Imposta il volume"),
59075
59508
  phrase: t("Set the volume of {device} to {volumeLevel}", "Imposta il volume di {device} al {volumeLevel}"),
59076
59509
  icon: "volume-2",
@@ -59095,12 +59528,20 @@ var mediaPlayerCapability = {
59095
59528
  auth: "protected",
59096
59529
  actions: [{
59097
59530
  id: "media.mute",
59531
+ effect: {
59532
+ field: "isMuted",
59533
+ value: true
59534
+ },
59098
59535
  label: t("Mute", "Silenzia"),
59099
59536
  phrase: t("Mute {device}", "Silenzia {device}"),
59100
59537
  icon: "volume-x",
59101
59538
  args: { muted: true }
59102
59539
  }, {
59103
59540
  id: "media.unmute",
59541
+ effect: {
59542
+ field: "isMuted",
59543
+ value: false
59544
+ },
59104
59545
  label: t("Unmute", "Riattiva l’audio"),
59105
59546
  phrase: t("Unmute {device}", "Riattiva l’audio di {device}"),
59106
59547
  icon: "volume-2",
@@ -59115,12 +59556,20 @@ var mediaPlayerCapability = {
59115
59556
  auth: "protected",
59116
59557
  actions: [{
59117
59558
  id: "media.shuffleOn",
59559
+ effect: {
59560
+ field: "shuffle",
59561
+ value: true
59562
+ },
59118
59563
  label: t("Shuffle on", "Riproduzione casuale attiva"),
59119
59564
  phrase: t("Turn on shuffle on {device}", "Attiva la riproduzione casuale su {device}"),
59120
59565
  icon: "shuffle",
59121
59566
  args: { shuffle: true }
59122
59567
  }, {
59123
59568
  id: "media.shuffleOff",
59569
+ effect: {
59570
+ field: "shuffle",
59571
+ value: false
59572
+ },
59124
59573
  label: t("Shuffle off", "Riproduzione casuale spenta"),
59125
59574
  phrase: t("Turn off shuffle on {device}", "Disattiva la riproduzione casuale su {device}"),
59126
59575
  icon: "shuffle",
@@ -59135,6 +59584,10 @@ var mediaPlayerCapability = {
59135
59584
  auth: "protected",
59136
59585
  actions: [{
59137
59586
  id: "media.repeat",
59587
+ effect: {
59588
+ field: "repeat",
59589
+ fromArg: "repeat"
59590
+ },
59138
59591
  label: t("Set repeat", "Imposta la ripetizione"),
59139
59592
  phrase: t("Set repeat on {device} to {repeat}", "Imposta la ripetizione di {device} su {repeat}"),
59140
59593
  icon: "repeat",
@@ -59169,6 +59622,10 @@ var mediaPlayerCapability = {
59169
59622
  auth: "protected",
59170
59623
  actions: [{
59171
59624
  id: "media.source",
59625
+ effect: {
59626
+ field: "source",
59627
+ fromArg: "source"
59628
+ },
59172
59629
  label: t("Select source", "Scegli la sorgente"),
59173
59630
  phrase: t("Switch {device} to {source}", "Passa {device} alla sorgente {source}"),
59174
59631
  icon: "cast",
@@ -59337,7 +59794,7 @@ var mediaPlayerCapability = {
59337
59794
  ]
59338
59795
  }
59339
59796
  };
59340
- 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;
59797
+ 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;
59341
59798
  var NUMBER = {
59342
59799
  kind: "fixed",
59343
59800
  result: ["number"]
@@ -59829,7 +60286,9 @@ var PowerSourceRefusalReasonSchema = _enum([
59829
60286
  "switch-call-failed",
59830
60287
  "switch-options-unreadable",
59831
60288
  "not-settable",
59832
- "switch-is-actuator"
60289
+ "switch-is-actuator",
60290
+ "link-lost",
60291
+ "link-unknown"
59833
60292
  ]);
59834
60293
  var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
59835
60294
  accepted: literal(false),
@@ -61853,6 +62312,142 @@ function normaliseIdentifiers(raw, options = {}) {
61853
62312
  rejected: refused
61854
62313
  };
61855
62314
  }
62315
+ /**
62316
+ * Cross-integration identity candidates (planning#593, step 2 of D1059's epic).
62317
+ *
62318
+ * Two devices brought by DIFFERENT integrations that share provider-declared
62319
+ * identifiers ({@link DeviceIdentifiers}) are candidates for being the same
62320
+ * physical object. This module holds the answer's shape; the device-manager
62321
+ * keeps the index that finds the pairs and the ONE rule that grades a match
62322
+ * (`classifyIdentityMatch`, `device-identity-index.ts`).
62323
+ *
62324
+ * The rule (operator, planning#590):
62325
+ *
62326
+ * | Matched keys | Confidence |
62327
+ * | ---------------------------------------------- | ----------- |
62328
+ * | two strong KINDS (e.g. `mac` + `serial`) | `auto` |
62329
+ * | `mac` + `ip` | `auto` |
62330
+ * | exactly one strong kind | `proposal` |
62331
+ * | weak keys only (`hostname`, `ip`) | no candidate|
62332
+ *
62333
+ * Strength counts distinct KINDS, not values: two MACs of one device matching
62334
+ * the other's two MACs are still one kind of evidence, so a proposal. In doubt,
62335
+ * no match.
62336
+ *
62337
+ * Read-only: a candidate is NOT a link. Links are step 3.
62338
+ */
62339
+ var IdentityConfidenceSchema = _enum(["auto", "proposal"]);
62340
+ /** One identifier both devices declared, with the same normalised value. */
62341
+ var IdentityMatchedKeySchema = object({
62342
+ key: DeviceIdentifierKeySchema,
62343
+ value: string()
62344
+ });
62345
+ /** One side of a pair: the device and the integration that brought it. */
62346
+ var IdentityCandidateDeviceSchema = object({
62347
+ deviceId: number$1().int(),
62348
+ addonId: string(),
62349
+ /** The integration instance (`int_NNNN`) that adopted it; `null` when none was stamped. */
62350
+ integrationId: string().nullable()
62351
+ });
62352
+ /** Two devices of different integrations sharing at least one strong identifier. `a.deviceId < b.deviceId`. */
62353
+ var IdentityCandidatePairSchema = object({
62354
+ a: IdentityCandidateDeviceSchema,
62355
+ b: IdentityCandidateDeviceSchema,
62356
+ /** Every identifier the two share, weak ones included, ordered by key then value. */
62357
+ keys: array(IdentityMatchedKeySchema).readonly(),
62358
+ confidence: IdentityConfidenceSchema
62359
+ });
62360
+ /**
62361
+ * The answer of `device-manager.listIdentityCandidates`.
62362
+ *
62363
+ * - `unknown` — the index has not loaded yet: nothing can be said, and it is
62364
+ * NOT an empty list (D315).
62365
+ * - `answered` — `pairs` holds every candidate. `undeclaredDeviceIds` are the
62366
+ * devices with no identifiers on record: whether they match anything is
62367
+ * UNKNOWN, never "no match" (D393). A device absent from both lists declared
62368
+ * identifiers and matched nobody.
62369
+ */
62370
+ var IdentityCandidatesSchema = discriminatedUnion("status", [object({
62371
+ status: literal("unknown"),
62372
+ reason: string()
62373
+ }), object({
62374
+ status: literal("answered"),
62375
+ pairs: array(IdentityCandidatePairSchema).readonly(),
62376
+ undeclaredDeviceIds: array(number$1().int()).readonly()
62377
+ })]);
62378
+ var IdentityLinkKindSchema = _enum(["same-device", "poe-power"]);
62379
+ /**
62380
+ * - `proposed` — one strong key matched: waits for the operator;
62381
+ * - `linked` — confirmed by the operator, or auto-linked on strong evidence;
62382
+ * - `dismissed` — the operator said no (or unlinked): sticky, never re-proposed.
62383
+ */
62384
+ var IdentityLinkStateSchema = _enum([
62385
+ "proposed",
62386
+ "linked",
62387
+ "dismissed"
62388
+ ]);
62389
+ /** Who decided the current state: the matcher (`auto`) or the operator. */
62390
+ var IdentityLinkOriginSchema = _enum(["auto", "operator"]);
62391
+ /** One side: the device ref that survives re-registration, plus its current numeric id. */
62392
+ var IdentityLinkSideSchema = object({
62393
+ addonId: string().min(1),
62394
+ stableId: string().min(1),
62395
+ deviceId: number$1().int()
62396
+ });
62397
+ var IdentityLinkSchema = object({
62398
+ kind: IdentityLinkKindSchema,
62399
+ a: IdentityLinkSideSchema,
62400
+ b: IdentityLinkSideSchema,
62401
+ state: IdentityLinkStateSchema,
62402
+ origin: IdentityLinkOriginSchema,
62403
+ /** The identifiers that matched when the link was last evaluated, ordered by key then value. */
62404
+ evidence: array(IdentityMatchedKeySchema).readonly(),
62405
+ /** An operator-confirmed link whose evidence no longer matches: kept, flagged. */
62406
+ evidenceGone: literal(true).optional(),
62407
+ createdAt: number$1().int().nonnegative(),
62408
+ decidedAt: number$1().int().nonnegative().optional()
62409
+ }).extend({ id: string().min(1) });
62410
+ DeviceRole.PoePort;
62411
+ /**
62412
+ * The answer of `device-manager.listIdentityLinks`. `not-loaded` until the
62413
+ * links have been read — never an empty list (D315).
62414
+ */
62415
+ var IdentityLinksReadSchema = discriminatedUnion("status", [object({
62416
+ status: literal("not-loaded"),
62417
+ reason: string()
62418
+ }), object({
62419
+ status: literal("answered"),
62420
+ links: array(IdentityLinkSchema).readonly()
62421
+ })]);
62422
+ /** Why an operator decision on a link was refused. */
62423
+ var IdentityLinkDecisionRefusalSchema = _enum([
62424
+ "not-loaded",
62425
+ "unknown-link",
62426
+ "wrong-state"
62427
+ ]);
62428
+ /** The answer of `confirmIdentityLink` / `dismissIdentityLink` / `unlinkIdentity`. */
62429
+ var IdentityLinkDecisionSchema = discriminatedUnion("ok", [object({
62430
+ ok: literal(true),
62431
+ link: IdentityLinkSchema
62432
+ }), object({
62433
+ ok: literal(false),
62434
+ reason: IdentityLinkDecisionRefusalSchema,
62435
+ message: string()
62436
+ })]);
62437
+ /** Why a link was lost. */
62438
+ var IdentityLinkLostReasonSchema = _enum([
62439
+ "evidence-gone",
62440
+ "device-removed",
62441
+ "operator-unlinked"
62442
+ ]);
62443
+ object({
62444
+ linkId: string(),
62445
+ kind: IdentityLinkKindSchema,
62446
+ aDeviceId: number$1().int(),
62447
+ bDeviceId: number$1().int(),
62448
+ origin: IdentityLinkOriginSchema,
62449
+ reason: IdentityLinkLostReasonSchema.optional()
62450
+ });
61856
62451
  var DeviceSearchRequiresSchema = object({
61857
62452
  /** Capability names the field wants a value of. Absent when the field wants actions only. */
61858
62453
  caps: array(string()).readonly().optional(),
@@ -62419,6 +63014,11 @@ var DeviceInfoSchema = object({
62419
63014
  * the owning provider via `setIdentifiers`; read-only for the operator.
62420
63015
  * Absent ⇒ the provider declared none. */
62421
63016
  identifiers: DeviceIdentifiersSchema.optional(),
63017
+ /** The identity of the device at the far end of this device's physical
63018
+ * link (D1059 amended by D1063) — a PoE port's wired client. Written only by
63019
+ * the owning provider via `setAttachedIdentifiers`; it never makes the two
63020
+ * devices the same device. Absent ⇒ none declared. */
63021
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
62422
63022
  /** Optional upstream-system identity + rendering envelope. See
62423
63023
  * `SourceInfo` in `packages/types/src/device/source-info.ts`. */
62424
63024
  sourceInfo: SourceInfoSchema.optional(),
@@ -62572,6 +63172,8 @@ var DeviceMetaSchema = object({
62572
63172
  metadata: record$1(string(), unknown()).nullable().optional(),
62573
63173
  /** Provider-declared identifiers (D1059). See `DeviceMeta.identifiers`. */
62574
63174
  identifiers: DeviceIdentifiersSchema.optional(),
63175
+ /** The far end of the device's physical link (D1063). See `DeviceMeta.attachedIdentifiers`. */
63176
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
62575
63177
  /** Optional upstream-system identity + rendering envelope. See
62576
63178
  * `SourceInfo`. Present when the device has been persisted with a
62577
63179
  * non-synthetic source identifier (HA entities, vendor MAC, …);
@@ -62893,6 +63495,29 @@ method(object({
62893
63495
  }), _void(), {
62894
63496
  kind: "mutation",
62895
63497
  auth: "admin"
63498
+ }), method(object({}), IdentityCandidatesSchema, {
63499
+ kind: "query",
63500
+ auth: "admin"
63501
+ }), method(object({
63502
+ deviceId: number$1(),
63503
+ identifiers: DeviceIdentifiersSchema.nullable(),
63504
+ /** Kinds the provider tried to read and could not: their stored value is kept. */
63505
+ unread: array(DeviceIdentifierKeySchema).optional()
63506
+ }), _void(), {
63507
+ kind: "mutation",
63508
+ auth: "admin"
63509
+ }), method(object({ deviceId: number$1().int().optional() }), IdentityLinksReadSchema, {
63510
+ kind: "query",
63511
+ auth: "admin"
63512
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
63513
+ kind: "mutation",
63514
+ auth: "admin"
63515
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
63516
+ kind: "mutation",
63517
+ auth: "admin"
63518
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
63519
+ kind: "mutation",
63520
+ auth: "admin"
62896
63521
  }), method(_void(), array(string())), method(object({ name: string() }), _void(), {
62897
63522
  kind: "mutation",
62898
63523
  auth: "admin"
@@ -63843,8 +64468,12 @@ var ClaimsListingSchema = discriminatedUnion("state", [object({
63843
64468
  })]);
63844
64469
  method(object({ deviceId: number$1() }), record$1(string(), record$1(string(), unknown()))), method(object({
63845
64470
  deviceId: number$1(),
63846
- capName: string()
63847
- }), record$1(string(), unknown()).nullable()), method(object({}), record$1(string(), record$1(string(), record$1(string(), unknown())))), method(object({
64471
+ capName: string(),
64472
+ /** The slice the device CONFIRMED, without a held command (D1061) — history and automations. */
64473
+ confirmed: boolean().optional()
64474
+ }), record$1(string(), unknown()).nullable()), method(object({
64475
+ /** The slices the devices CONFIRMED, without held commands (D1061). */
64476
+ confirmed: boolean().optional() }), record$1(string(), record$1(string(), record$1(string(), unknown())))), method(object({
63848
64477
  deviceId: number$1(),
63849
64478
  capName: string(),
63850
64479
  slice: record$1(string(), unknown())
@@ -63882,6 +64511,88 @@ method(object({ deviceId: number$1() }), record$1(string(), record$1(string(), u
63882
64511
  slice: record$1(string(), unknown())
63883
64512
  }));
63884
64513
  /**
64514
+ * Server-driven device state refresh (D1062): the core decides WHEN a device is
64515
+ * re-read, the integration only knows HOW.
64516
+ *
64517
+ * A provider states its policy where it registers the device's
64518
+ * `device-state-refresh` cap (`ctx.registerNativeCap(cap, provider, {
64519
+ * stateRefresh })`). It reaches the hub by the road the command-hold options
64520
+ * take (D1061): written directly in-process, carried on a forked child's cap
64521
+ * descriptors otherwise. Plain data, wire-safe.
64522
+ */
64523
+ /** Why the core asks for a refresh. */
64524
+ var StateRefreshReasonSchema = _enum([
64525
+ "schedule",
64526
+ "command",
64527
+ "burst"
64528
+ ]);
64529
+ /**
64530
+ * What arrives without asking: `none` (everything is read), `partial` (some
64531
+ * fields arrive by push, the rest is read on the schedule), `full` (everything
64532
+ * arrives by push — never read on a schedule).
64533
+ */
64534
+ var StateRefreshPushSchema = _enum([
64535
+ "none",
64536
+ "partial",
64537
+ "full"
64538
+ ]);
64539
+ object({
64540
+ /**
64541
+ * The integration instance the device belongs to. Devices of one instance
64542
+ * share one schedule group: a batching provider is asked once for all of
64543
+ * them, and the heartbeat is judged across them.
64544
+ */
64545
+ integrationId: string().min(1),
64546
+ /** The fastest interval the integration can afford for its devices. The core polls at it by default. */
64547
+ minIntervalMs: number$1().int().min(1e3),
64548
+ /**
64549
+ * The operator's per-integration setting, when there is one. It can only SLOW
64550
+ * the cadence: the core polls at `max(minIntervalMs, intervalMs)`.
64551
+ */
64552
+ intervalMs: number$1().int().positive().optional(),
64553
+ /** One `refresh` call can read every device of the integration at once. */
64554
+ batch: boolean(),
64555
+ push: StateRefreshPushSchema,
64556
+ /** Longest silence a push integration may keep before the core re-reads it and asks it to resubscribe. */
64557
+ heartbeatMs: number$1().int().positive().optional(),
64558
+ /**
64559
+ * Bumped by the provider each time its push subscription reconnected on its
64560
+ * own. A change makes the core re-read every device of the integration
64561
+ * (pushes lost while it was down; events may be dropped, D8).
64562
+ */
64563
+ connectionEpoch: number$1().int().nonnegative().optional()
64564
+ });
64565
+ /**
64566
+ * device-state-refresh — the HOW of a device's state refresh, called by the
64567
+ * core, which owns the WHEN (D1062).
64568
+ *
64569
+ * The provider registers it per device with its policy
64570
+ * (`registerNativeCap(cap, provider, { stateRefresh })`). The hub's scheduler
64571
+ * calls `refresh` on the schedule, after a command and in the burst that
64572
+ * follows it, and `resubscribe` when a push integration fell silent. The
64573
+ * provider re-reads and writes the slices it already writes; nothing is
64574
+ * returned but completion.
64575
+ */
64576
+ var DeviceStateRefreshInputSchema = object({
64577
+ /** The device the call is routed by (one of `deviceIds`). */
64578
+ deviceId: number$1().int().nonnegative(),
64579
+ /** Every device to re-read: one, or the integration's whole set when the provider batches. */
64580
+ deviceIds: array(number$1().int().nonnegative()).min(1),
64581
+ reason: StateRefreshReasonSchema
64582
+ });
64583
+ var DeviceStateResubscribeInputSchema = object({ deviceId: number$1().int().nonnegative() });
64584
+ var DeviceStateRefreshResultSchema = object({ ok: literal(true) });
64585
+ var NOT_OPERATOR_FACING = "the core schedules state refreshes itself; an operator never asks for one";
64586
+ method(DeviceStateRefreshInputSchema, DeviceStateRefreshResultSchema, {
64587
+ kind: "mutation",
64588
+ auth: "admin",
64589
+ notOperatorFacing: NOT_OPERATOR_FACING
64590
+ }), method(DeviceStateResubscribeInputSchema, DeviceStateRefreshResultSchema, {
64591
+ kind: "mutation",
64592
+ auth: "admin",
64593
+ notOperatorFacing: NOT_OPERATOR_FACING
64594
+ });
64595
+ /**
63885
64596
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
63886
64597
  * for every device, regardless of provider — the kernel needs a uniform
63887
64598
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -66291,7 +67002,15 @@ var fanControlCapability = {
66291
67002
  field: "speed",
66292
67003
  value: 100
66293
67004
  },
66294
- args: { speed: 100 }
67005
+ args: { speed: 100 },
67006
+ sideEffects: [{
67007
+ field: "preset",
67008
+ value: "",
67009
+ when: {
67010
+ field: "preset",
67011
+ notIn: [""]
67012
+ }
67013
+ }]
66295
67014
  },
66296
67015
  {
66297
67016
  id: "fan.speed",
@@ -66302,6 +67021,14 @@ var fanControlCapability = {
66302
67021
  field: "speed",
66303
67022
  fromArg: "speed"
66304
67023
  },
67024
+ sideEffects: [{
67025
+ field: "preset",
67026
+ value: "",
67027
+ when: {
67028
+ field: "preset",
67029
+ notIn: [""]
67030
+ }
67031
+ }],
66305
67032
  openArgs: [{
66306
67033
  key: "speed",
66307
67034
  label: t("Speed", "Velocità"),
@@ -66327,6 +67054,10 @@ var fanControlCapability = {
66327
67054
  label: t("Set preset", "Imposta il preset"),
66328
67055
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
66329
67056
  icon: "list",
67057
+ effect: {
67058
+ field: "preset",
67059
+ fromArg: "preset"
67060
+ },
66330
67061
  openArgs: [{
66331
67062
  key: "preset",
66332
67063
  label: t("Preset", "Preset"),
@@ -68057,7 +68788,7 @@ var HeroSceneSchema = object({
68057
68788
  level: number$1().min(0).max(1).nullable()
68058
68789
  });
68059
68790
  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;
68060
- 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;
68791
+ 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;
68061
68792
  var HeroRowIdSchema = _enum([
68062
68793
  "progress",
68063
68794
  "run-for",
@@ -69329,6 +70060,16 @@ var IntegrationInstanceStatusSchema = object({
69329
70060
  /** A short human word for the state ("Signed in", "Token expired"); shown instead of `state`. */
69330
70061
  label: string().optional()
69331
70062
  });
70063
+ /**
70064
+ * What "Add device" inside ONE instance offers, decided per instance by its provider. `scan`: the
70065
+ * LAN scan finds devices this instance holds; `children`: only the instance's own children, via
70066
+ * adoption (a scan would offer other hosts, which are new integrations); `none`: manual add only.
70067
+ */
70068
+ var IntegrationInstanceAddDeviceSchema = _enum([
70069
+ "scan",
70070
+ "children",
70071
+ "none"
70072
+ ]);
69332
70073
  var IntegrationInstanceSchema = object({
69333
70074
  id: IntegrationInstanceIdSchema,
69334
70075
  name: string(),
@@ -69346,7 +70087,9 @@ var IntegrationInstanceSchema = object({
69346
70087
  formValues: record$1(string(), unknown()),
69347
70088
  status: IntegrationInstanceStatusSchema.optional(),
69348
70089
  /** Epoch ms of the last probe of the remote that produced `status`; absent when never checked. */
69349
- lastCheckedAt: number$1().optional()
70090
+ lastCheckedAt: number$1().optional(),
70091
+ /** 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). */
70092
+ addDevice: IntegrationInstanceAddDeviceSchema.optional()
69350
70093
  });
69351
70094
  var IntegrationInstancePatchSchema = object({
69352
70095
  id: IntegrationInstanceIdSchema,
@@ -71431,6 +72174,13 @@ var LockControlStatusSchema = object({
71431
72174
  "jammed",
71432
72175
  "door-open"
71433
72176
  ]),
72177
+ /**
72178
+ * Whether lock / unlock need a PIN `code` (#459, replaces the
72179
+ * `lock-pin-required` device feature). `null` = the provider cannot tell
72180
+ * (D393) — never `false`. `.optional()` so a restored slice written before
72181
+ * the field still parses; readers treat absent exactly like `null`.
72182
+ */
72183
+ codeRequired: boolean().nullable().optional(),
71434
72184
  /** Ms epoch when the slice was last updated. */
71435
72185
  lastChangedAt: number$1()
71436
72186
  });
@@ -71490,6 +72240,14 @@ var lockControlCapability = {
71490
72240
  field: "state",
71491
72241
  value: "locked"
71492
72242
  },
72243
+ hold: { effects: [{
72244
+ field: "state",
72245
+ value: "locking",
72246
+ when: {
72247
+ field: "state",
72248
+ notIn: ["locked"]
72249
+ }
72250
+ }] },
71493
72251
  openArgs: [{
71494
72252
  key: "code",
71495
72253
  label: t("PIN code", "Codice PIN"),
@@ -71523,6 +72281,14 @@ var lockControlCapability = {
71523
72281
  field: "state",
71524
72282
  value: "unlocked"
71525
72283
  },
72284
+ hold: { effects: [{
72285
+ field: "state",
72286
+ value: "unlocking",
72287
+ when: {
72288
+ field: "state",
72289
+ notIn: ["unlocked"]
72290
+ }
72291
+ }] },
71526
72292
  openArgs: [{
71527
72293
  key: "code",
71528
72294
  label: t("PIN code", "Codice PIN"),
@@ -71888,6 +72654,90 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
71888
72654
  ]);
71889
72655
  method(_void(), array(LoginMethodContributionSchema).readonly()), NOT_A_DEVICE.IDENTITY;
71890
72656
  /**
72657
+ * low-power-sleep — a device that goes into low-power sleep and must be WOKEN
72658
+ * before it streams (#459, Q2). A battery camera (Reolink Argus, a robot's
72659
+ * on-board camera) is one; a battery SENSOR is not: it reports charge on the
72660
+ * `battery` cap and never sleeps. The two meanings used to share
72661
+ * `DeviceFeature.BatteryOperated`; this cap is the one that answers "sleeps",
72662
+ * and `DeviceFeature.Sleeps` is derived from it being bound with
72663
+ * `wakeUp` implemented.
72664
+ *
72665
+ * The state is the sleep inputs (`deriveBatteryPresence`): whether the device
72666
+ * is asleep, and the last time it PROVED it was reachable. Read from this slice
72667
+ * by the stream broker (`readBatterySleepFacts`), the recorder
72668
+ * (`recordingWakeDeps`) and the snapshot builtin. The broker's per-device
72669
+ * mirror is still also fed by `BatteryOnStatusChanged` events.
72670
+ */
72671
+ var LowPowerSleepStatusSchema = object({
72672
+ /**
72673
+ * True while the firmware is in low-power mode. A provider MUST avoid polling
72674
+ * during sleep — a read wakes the device and drains charge.
72675
+ */
72676
+ sleeping: boolean().meta({ label: "Sleeping" }),
72677
+ /**
72678
+ * Ms epoch of the last time the device proved it was reachable, from
72679
+ * PASSIVE signals only (a completed round-trip, an observed wake, a push).
72680
+ * Absent = never since this slice was born. The only input that separates
72681
+ * "asleep" from "gone".
72682
+ */
72683
+ lastContactAt: number$1().optional(),
72684
+ /** Ms epoch of the last observation. */
72685
+ lastUpdated: number$1().meta(readingMeta("none"))
72686
+ });
72687
+ var lowPowerSleepCapability = {
72688
+ name: "low-power-sleep",
72689
+ scope: "device",
72690
+ deviceNative: true,
72691
+ mode: "singleton",
72692
+ deviceTypes: [DeviceType.Camera],
72693
+ methods: {
72694
+ /**
72695
+ * Explicitly wake the device from low-power sleep ahead of a streaming
72696
+ * session start. Consumers that initiate a stream against a sleeping
72697
+ * camera (wake-on-play, the recorder, HomeKit, Alexa, snapshot wrappers)
72698
+ * call this with a short timeout before establishing the media pipeline —
72699
+ * the broker's own passive wake-on-dial works but adds 5–7 seconds to
72700
+ * first-frame. Pre-waking compresses that gap.
72701
+ *
72702
+ * Returns `awoke: true` when the firmware acknowledged the wake before
72703
+ * `timeoutMs`, `awoke: false` when it timed out; the caller should still
72704
+ * attempt the stream — the passive broker wake remains as fallback.
72705
+ */
72706
+ wakeUp: method(object({
72707
+ deviceId: number$1(),
72708
+ /** Bound on the wait. Sensible range 3000–10000ms. */
72709
+ timeoutMs: number$1().int().min(500).max(3e4).default(8e3)
72710
+ }), object({
72711
+ awoke: boolean(),
72712
+ durationMs: number$1()
72713
+ }), {
72714
+ kind: "mutation",
72715
+ notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
72716
+ }) },
72717
+ status: {
72718
+ schema: LowPowerSleepStatusSchema,
72719
+ kind: "push",
72720
+ empty: {
72721
+ sleeping: false,
72722
+ lastUpdated: 0
72723
+ }
72724
+ },
72725
+ runtimeState: LowPowerSleepStatusSchema,
72726
+ /**
72727
+ * Runtime-state durability: **restored** — a sleeping camera may not report
72728
+ * for hours; the restored sleep inputs are the only thing the sleep gate and
72729
+ * the presence derivation have (the same argument as `battery`).
72730
+ */
72731
+ durability: "restored",
72732
+ /** History (D850): none — battery never recorded a sleep series either. */
72733
+ history: "none",
72734
+ volatileStateFields: ["lastUpdated"],
72735
+ vocabulary: {
72736
+ noun: t("Low-power sleep", "Sospensione a basso consumo"),
72737
+ order: 5245
72738
+ }
72739
+ };
72740
+ /**
71891
72741
  * mesh-network — collection cap for mesh-VPN providers.
71892
72742
  *
71893
72743
  * Different shape from `network-access` (public tunnels):
@@ -75828,6 +76678,16 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
75828
76678
  timestamp: number$1()
75829
76679
  }), EventCategory.PipelineAnalyticsDetectionEvent, EventCategory.PipelineAnalyticsPackageDelivered, EventCategory.PipelineAnalyticsPackagePickedUp;
75830
76680
  /**
76681
+ * A rectangle as a fraction of a frame, `[0, 1]` on both axes — the wire shape
76682
+ * of `NormalizedRect` (which is derived from it).
76683
+ */
76684
+ var NormalizedRectSchema = object({
76685
+ x: number$1(),
76686
+ y: number$1(),
76687
+ w: number$1(),
76688
+ h: number$1()
76689
+ });
76690
+ /**
75831
76691
  * A root model's boxes standing in for one crop-kind step's own inference
75832
76692
  * (D730) — see `runPipeline.suppliedRoot`.
75833
76693
  */
@@ -76220,7 +77080,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
76220
77080
  * reader) run on them through their own crop policy. Boxes are in the
76221
77081
  * PIXELS of the image this call carries. Absent ⇒ the root step runs.
76222
77082
  */
76223
- suppliedRoot: SuppliedRootOutputSchema.optional()
77083
+ suppliedRoot: SuppliedRootOutputSchema.optional(),
77084
+ /**
77085
+ * The motion analyzer's merged subjects (D394) for this camera, fresh,
77086
+ * normalised to the frame (0..1). Feeds the motion-guided root crop
77087
+ * (D1060): the executor picks per frame whether the object-detection
77088
+ * root runs on the full frame or on a crop around them. Honoured only
77089
+ * on the live `frame` plane with a `frameRef`. Absent or empty ⇒ no
77090
+ * motion known ⇒ full frame.
77091
+ */
77092
+ motionRegions: array(NormalizedRectSchema).optional()
76224
77093
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
76225
77094
  steps: array(PipelineStepInputSchema).min(1),
76226
77095
  frames: array(FrameInputSchema).min(1).max(255),
@@ -77312,7 +78181,15 @@ var RunnerInferenceDeviceSchema = object({
77312
78181
  * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
77313
78182
  * the elected device's provisioning, as before.
77314
78183
  */
77315
- steps: record$1(string(), RunnerJumpStepProvisioningSchema).optional()
78184
+ steps: record$1(string(), RunnerJumpStepProvisioningSchema).optional(),
78185
+ /**
78186
+ * Steps switched OFF on this device (D1065, `inferenceDevices[key].steps[s]
78187
+ * .enabled === false`). The runner never runs a subtree containing one of
78188
+ * them here: it auto-jumps it to an allowed device, and when none can take
78189
+ * it the subtree is skipped (`disabled-on-device`), never run here anyway.
78190
+ * Absent ⇒ none (an orchestrator that predates D1065).
78191
+ */
78192
+ disabledSteps: array(string()).readonly().optional()
77316
78193
  });
77317
78194
  /**
77318
78195
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -82956,6 +83833,14 @@ method(object({ deviceId: number$1().int() }), object({
82956
83833
  auth: "admin"
82957
83834
  }), NOT_A_DEVICE.PIPELINE;
82958
83835
  /**
83836
+ * Hold limits a cap's vocabulary may declare on an action (D1061).
83837
+ *
83838
+ * A one-shot command (feed, run a script) has no lasting state to confirm; it
83839
+ * holds its in-progress flag just long enough that a second tap, before the
83840
+ * device reports, is seen as "already running" and refused.
83841
+ */
83842
+ var ONE_SHOT_HOLD_MS = 1e4;
83843
+ /**
82959
83844
  * Feeder connectivity / power status — mirrors the HA petkit device-status
82960
83845
  * enum: `normal` (online, mains), `offline` (not reaching PetKit cloud),
82961
83846
  * `on_batteries` (running on battery backup). `null` until first reported.
@@ -83073,6 +83958,13 @@ var petFeederCapability = {
83073
83958
  label: t("Feed", "Dai da mangiare"),
83074
83959
  phrase: t("Dispense {grams} from {device}", "Eroga {grams} da {device}"),
83075
83960
  icon: "paw-print",
83961
+ hold: {
83962
+ effects: [{
83963
+ field: "feeding",
83964
+ value: true
83965
+ }],
83966
+ holdMs: ONE_SHOT_HOLD_MS
83967
+ },
83076
83968
  openArgs: [{
83077
83969
  key: "grams",
83078
83970
  label: t("Grams", "Grammi"),
@@ -83091,6 +83983,13 @@ var petFeederCapability = {
83091
83983
  label: t("Feed from both hoppers", "Eroga da entrambi i serbatoi"),
83092
83984
  phrase: t("Dispense {hopper1} and {hopper2} from {device}", "Eroga {hopper1} e {hopper2} da {device}"),
83093
83985
  icon: "paw-print",
83986
+ hold: {
83987
+ effects: [{
83988
+ field: "feeding",
83989
+ value: true
83990
+ }],
83991
+ holdMs: ONE_SHOT_HOLD_MS
83992
+ },
83094
83993
  openArgs: [{
83095
83994
  key: "hopper1",
83096
83995
  label: t("Hopper 1", "Serbatoio 1"),
@@ -83196,12 +84095,20 @@ var petFeederCapability = {
83196
84095
  auth: "protected",
83197
84096
  actions: [{
83198
84097
  id: "petFeeder.childLockOn",
84098
+ effect: {
84099
+ field: "childLock",
84100
+ value: true
84101
+ },
83199
84102
  label: t("Child lock on", "Blocco bambini attivo"),
83200
84103
  phrase: t("Turn on the child lock of {device}", "Attiva il blocco bambini di {device}"),
83201
84104
  icon: "lock",
83202
84105
  args: { on: true }
83203
84106
  }, {
83204
84107
  id: "petFeeder.childLockOff",
84108
+ effect: {
84109
+ field: "childLock",
84110
+ value: false
84111
+ },
83205
84112
  label: t("Child lock off", "Blocco bambini spento"),
83206
84113
  phrase: t("Turn off the child lock of {device}", "Disattiva il blocco bambini di {device}"),
83207
84114
  icon: "lock-open",
@@ -83217,12 +84124,20 @@ var petFeederCapability = {
83217
84124
  auth: "protected",
83218
84125
  actions: [{
83219
84126
  id: "petFeeder.lightOn",
84127
+ effect: {
84128
+ field: "indicatorLight",
84129
+ value: true
84130
+ },
83220
84131
  label: t("Indicator light on", "Spia accesa"),
83221
84132
  phrase: t("Turn on the indicator light of {device}", "Accendi la spia di {device}"),
83222
84133
  icon: "lightbulb",
83223
84134
  args: { on: true }
83224
84135
  }, {
83225
84136
  id: "petFeeder.lightOff",
84137
+ effect: {
84138
+ field: "indicatorLight",
84139
+ value: false
84140
+ },
83226
84141
  label: t("Indicator light off", "Spia spenta"),
83227
84142
  phrase: t("Turn off the indicator light of {device}", "Spegni la spia di {device}"),
83228
84143
  icon: "lightbulb-off",
@@ -83238,12 +84153,20 @@ var petFeederCapability = {
83238
84153
  auth: "protected",
83239
84154
  actions: [{
83240
84155
  id: "petFeeder.feedSoundOn",
84156
+ effect: {
84157
+ field: "feedSound",
84158
+ value: true
84159
+ },
83241
84160
  label: t("Feeding sound on", "Suono di erogazione attivo"),
83242
84161
  phrase: t("Turn on the feeding sound of {device}", "Attiva il suono di erogazione di {device}"),
83243
84162
  icon: "volume-2",
83244
84163
  args: { on: true }
83245
84164
  }, {
83246
84165
  id: "petFeeder.feedSoundOff",
84166
+ effect: {
84167
+ field: "feedSound",
84168
+ value: false
84169
+ },
83247
84170
  label: t("Feeding sound off", "Suono di erogazione spento"),
83248
84171
  phrase: t("Turn off the feeding sound of {device}", "Disattiva il suono di erogazione di {device}"),
83249
84172
  icon: "volume-x",
@@ -83259,6 +84182,10 @@ var petFeederCapability = {
83259
84182
  auth: "protected",
83260
84183
  actions: [{
83261
84184
  id: "petFeeder.volume",
84185
+ effect: {
84186
+ field: "volume",
84187
+ fromArg: "level"
84188
+ },
83262
84189
  label: t("Set volume", "Imposta il volume"),
83263
84190
  phrase: t("Set the volume of {device} to {level}", "Imposta il volume di {device} a {level}"),
83264
84191
  icon: "volume-2",
@@ -83404,12 +84331,20 @@ setPump: method(object({
83404
84331
  auth: "protected",
83405
84332
  actions: [{
83406
84333
  id: "petFountain.pumpOn",
84334
+ effect: {
84335
+ field: "pumpRunning",
84336
+ value: true
84337
+ },
83407
84338
  label: t("Pump on", "Pompa accesa"),
83408
84339
  phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
83409
84340
  icon: "play",
83410
84341
  args: { on: true }
83411
84342
  }, {
83412
84343
  id: "petFountain.pumpOff",
84344
+ effect: {
84345
+ field: "pumpRunning",
84346
+ value: false
84347
+ },
83413
84348
  label: t("Pump off", "Pompa spenta"),
83414
84349
  phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
83415
84350
  icon: "square",
@@ -83956,7 +84891,15 @@ var DeviceStepConfigSchema = object({
83956
84891
  * at a disabled/absent device on that node at save time. Absent ⇒ the runner
83957
84892
  * auto-jumps only when the effective device's format cannot run the step.
83958
84893
  */
83959
- jumpDeviceKey: string().optional()
84894
+ jumpDeviceKey: string().optional(),
84895
+ /**
84896
+ * DEVICE switch for this step (D1065). `false` = the step is never
84897
+ * provisioned on this accelerator: a detail step jumps to another enabled
84898
+ * device of the node where it is allowed, else it is skipped with reason
84899
+ * `disabled-on-device`; a root is skipped. Absent = inherit (on). Written by
84900
+ * `setDeviceStepEnabled`.
84901
+ */
84902
+ enabled: boolean().optional()
83960
84903
  });
83961
84904
  var AgentPipelineSettingsSchema = object({
83962
84905
  maxCameras: number$1().int().nonnegative().nullable().default(null),
@@ -84000,6 +84943,12 @@ var AgentPipelineSettingsSchema = object({
84000
84943
  */
84001
84944
  stepSettings: record$1(string(), record$1(string(), unknown()).readonly()).optional(),
84002
84945
  /**
84946
+ * NODE switch per step (D1065): `stepId → enabled`. `false` = the step never
84947
+ * runs on a camera whose pipeline runs on this node (skip reason
84948
+ * `disabled-on-node`). Absent = inherit. Written by `setNodeStepEnabled`.
84949
+ */
84950
+ stepEnabled: record$1(string(), boolean()).optional(),
84951
+ /**
84003
84952
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
84004
84953
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
84005
84954
  * accelerator (safe default); two+ enabled ⇒ the dispatcher balances
@@ -84321,7 +85270,8 @@ var InferenceDeviceExclusionReasonSchema = _enum([
84321
85270
  "disabled",
84322
85271
  "unavailable",
84323
85272
  "cannot-host-camera-root",
84324
- "accelerator-preferred"
85273
+ "accelerator-preferred",
85274
+ "root-switched-off"
84325
85275
  ]);
84326
85276
  var NodeInferenceDeviceSchema = object({
84327
85277
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
@@ -84407,6 +85357,75 @@ var NodeInferenceDevicesSchema = object({
84407
85357
  devices: array(NodeInferenceDeviceSchema).readonly()
84408
85358
  });
84409
85359
  /**
85360
+ * The CLUSTER switch of one pipeline step (D1065):
85361
+ * - `off` — hard off: no camera, node or device can turn it on;
85362
+ * - `on` — on by default; a camera may turn it off (`stepToggles`);
85363
+ * - `opt-in` — off by default; a camera turns it on (`stepToggles`).
85364
+ * Absent = the catalog's `enabledByDefault` (`true` → `on`, `false` → `opt-in`).
85365
+ */
85366
+ var StepClusterModeSchema = _enum([
85367
+ "off",
85368
+ "on",
85369
+ "opt-in"
85370
+ ]);
85371
+ /**
85372
+ * What one step does on one (node, device) — computed by the orchestrator with
85373
+ * the SAME placement function the attach path runs (`pipeline-resolver.ts`),
85374
+ * so a client never re-derives it. Precedence: cluster off > camera toggle
85375
+ * (else the cluster default) > node off > device off / jump.
85376
+ */
85377
+ var StepSwitchCellSchema = discriminatedUnion("kind", [
85378
+ object({ kind: literal("on") }),
85379
+ object({ kind: literal("off-cluster") }),
85380
+ object({ kind: literal("off-node") }),
85381
+ object({ kind: literal("off-device") }),
85382
+ object({
85383
+ kind: literal("jump"),
85384
+ toDeviceKey: string()
85385
+ }),
85386
+ object({
85387
+ kind: literal("skip"),
85388
+ reason: _enum(["no-compatible-model", "root-not-runnable-on-elected-device"])
85389
+ }),
85390
+ object({ kind: literal("zone-driven") }),
85391
+ object({
85392
+ kind: literal("supplied-by-root"),
85393
+ rootModelId: string()
85394
+ }),
85395
+ object({ kind: literal("opt-in-unused") })
85396
+ ]);
85397
+ var StepSwitchDeviceSchema = object({
85398
+ deviceKey: string(),
85399
+ format: _enum(MODEL_FORMATS),
85400
+ /** The device switch as stored (`inferenceDevices[key].steps[step].enabled`); `null` = inherit. */
85401
+ stepEnabled: boolean().nullable(),
85402
+ /** Whether the device is in the node's dispatch roster (enabled, available, not excluded). */
85403
+ eligible: boolean(),
85404
+ cell: StepSwitchCellSchema
85405
+ });
85406
+ var StepSwitchNodeSchema = object({
85407
+ nodeId: string(),
85408
+ /** False when the node's catalog or device probe did not answer — no cells are claimed. */
85409
+ reachable: boolean(),
85410
+ /** The node switch as stored (`stepEnabled[step]`); `null` = inherit. */
85411
+ stepEnabled: boolean().nullable(),
85412
+ devices: array(StepSwitchDeviceSchema).readonly()
85413
+ });
85414
+ var StepSwitchMatrixSchema = object({ steps: array(object({
85415
+ stepId: string(),
85416
+ name: string(),
85417
+ slot: string(),
85418
+ /** The stored cluster mode; `null` = the catalog default applies. */
85419
+ clusterMode: StepClusterModeSchema.nullable(),
85420
+ /** The mode in force (stored, else derived from `enabledByDefault`). */
85421
+ effectiveMode: StepClusterModeSchema,
85422
+ /** Cameras whose `stepToggles[step]` is `true`. */
85423
+ camerasEnabling: number$1().int().nonnegative(),
85424
+ /** Cameras whose `stepToggles[step]` is `false`. */
85425
+ camerasDisabling: number$1().int().nonnegative(),
85426
+ nodes: array(StepSwitchNodeSchema).readonly()
85427
+ })).readonly() });
85428
+ /**
84410
85429
  * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
84411
85430
  *
84412
85431
  * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
@@ -84577,7 +85596,28 @@ method(object({
84577
85596
  }), object({ success: literal(true) }), {
84578
85597
  kind: "mutation",
84579
85598
  auth: "admin"
84580
- }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
85599
+ }), method(object({
85600
+ stepId: string(),
85601
+ mode: StepClusterModeSchema.nullable()
85602
+ }), object({ success: literal(true) }), {
85603
+ kind: "mutation",
85604
+ auth: "admin"
85605
+ }), method(object({
85606
+ agentNodeId: string(),
85607
+ stepId: string(),
85608
+ enabled: boolean().nullable()
85609
+ }), object({ success: literal(true) }), {
85610
+ kind: "mutation",
85611
+ auth: "admin"
85612
+ }), method(object({
85613
+ agentNodeId: string(),
85614
+ deviceKey: string(),
85615
+ stepId: string(),
85616
+ enabled: boolean().nullable()
85617
+ }), object({ success: literal(true) }), {
85618
+ kind: "mutation",
85619
+ auth: "admin"
85620
+ }), method(_void(), StepSwitchMatrixSchema), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
84581
85621
  agentNodeId: string(),
84582
85622
  deviceKey: string()
84583
85623
  }), object({ success: literal(true) }), {
@@ -84992,6 +86032,16 @@ var CoralInfoSchema = object({
84992
86032
  reason: _enum(["driver-missing", "device-not-accessible"])
84993
86033
  })).readonly().optional()
84994
86034
  });
86035
+ var NvidiaInfoBaseSchema = object({
86036
+ type: literal("nvidia"),
86037
+ name: string(),
86038
+ memoryMB: number$1().optional()
86039
+ });
86040
+ /** An NVIDIA GPU: usable ⇔ the CUDA execution provider exists; otherwise the reason. */
86041
+ var NvidiaInfoSchema = discriminatedUnion("usable", [NvidiaInfoBaseSchema.extend({ usable: literal(true) }), NvidiaInfoBaseSchema.extend({
86042
+ usable: literal(false),
86043
+ reason: _enum(["no-cuda-execution-provider"])
86044
+ })]);
84995
86045
  var HardwareInfoSchema = object({
84996
86046
  platform: HardwarePlatformSchema,
84997
86047
  arch: HardwareArchSchema,
@@ -85002,6 +86052,7 @@ var HardwareInfoSchema = object({
85002
86052
  gpu: GpuInfoSchema.nullable(),
85003
86053
  npu: NpuInfoSchema.nullable(),
85004
86054
  coral: CoralInfoSchema.nullable().optional(),
86055
+ nvidia: NvidiaInfoSchema.nullable().optional(),
85005
86056
  /**
85006
86057
  * Per-accelerator compute (D930). Omitted by a node that has not probed it.
85007
86058
  * `null` fields inside an entry are a failed query, never a zero.
@@ -85089,8 +86140,14 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
85089
86140
  * in real-world devices.
85090
86141
  */
85091
86142
  var PowerMeterStatusSchema = object({
85092
- /** Instantaneous power draw (watts). */
86143
+ /** Instantaneous TOTAL power draw of the device (watts), when known. */
85093
86144
  power: number$1().optional().meta(readingMeta("power", { label: "Power" })),
86145
+ /**
86146
+ * Power the device passes on to downstream loads (watts), e.g. the PoE a switch delivers to
86147
+ * its ports. When `power` is known it already includes this (the own draw is `netPowerOf`);
86148
+ * a device that reports no total (a UniFi switch) carries this field alone.
86149
+ */
86150
+ deliveredPower: number$1().optional().meta(readingMeta("power", { label: "Delivered" })),
85094
86151
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
85095
86152
  energy: number$1().optional().meta(readingMeta("energy", { label: "Energy" })),
85096
86153
  /** Voltage (volts). */
@@ -85125,7 +86182,8 @@ var POWER_METER_DEVICE_TYPES = [
85125
86182
  DeviceType.Dishwasher,
85126
86183
  DeviceType.Vacuum,
85127
86184
  DeviceType.LawnMower,
85128
- DeviceType.PetFeeder
86185
+ DeviceType.PetFeeder,
86186
+ DeviceType.Workload
85129
86187
  ];
85130
86188
  /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
85131
86189
  var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
@@ -86180,12 +87238,20 @@ var pumpCycleCapability = {
86180
87238
  auth: "protected",
86181
87239
  actions: [{
86182
87240
  id: "pumpCycle.on",
87241
+ effect: {
87242
+ field: "enabled",
87243
+ value: true
87244
+ },
86183
87245
  label: t("Pump cycle on", "Ciclo pompa attivo"),
86184
87246
  phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
86185
87247
  icon: "timer",
86186
87248
  args: { on: true }
86187
87249
  }, {
86188
87250
  id: "pumpCycle.off",
87251
+ effect: {
87252
+ field: "enabled",
87253
+ value: false
87254
+ },
86189
87255
  label: t("Pump cycle off", "Ciclo pompa spento"),
86190
87256
  phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
86191
87257
  icon: "timer-off",
@@ -86204,6 +87270,11 @@ var pumpCycleCapability = {
86204
87270
  label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
86205
87271
  phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
86206
87272
  icon: "timer",
87273
+ effect: {
87274
+ field: "onTime",
87275
+ fromArg: "minutes",
87276
+ scale: 60
87277
+ },
86207
87278
  openArgs: [{
86208
87279
  key: "minutes",
86209
87280
  label: t("Minutes", "Minuti"),
@@ -86228,6 +87299,11 @@ var pumpCycleCapability = {
86228
87299
  label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
86229
87300
  phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
86230
87301
  icon: "timer-off",
87302
+ effect: {
87303
+ field: "offTime",
87304
+ fromArg: "minutes",
87305
+ scale: 60
87306
+ },
86231
87307
  openArgs: [{
86232
87308
  key: "minutes",
86233
87309
  label: t("Minutes", "Minuti"),
@@ -89040,6 +90116,42 @@ var RemoteLayoutComponentSchema = object({
89040
90116
  });
89041
90117
  });
89042
90118
  method(object({}), array(RemoteLayoutComponentSchema), { auth: "protected" });
90119
+ /**
90120
+ * resync — a device whose derived spec can be re-aligned on demand with its
90121
+ * upstream source (#459, Q6). Registered by the containers an integration
90122
+ * adopted; `DeviceFeature.Resyncable` (the generic Re-sync button) is derived
90123
+ * from it being bound with `resync` implemented.
90124
+ *
90125
+ * The work itself stays where it is: the owning addon's `device-adoption`
90126
+ * provider, reached through `deviceManager.adoptionResync` (which also owns
90127
+ * the "resync from zero" child purge). A provider answers this method by
90128
+ * asking for exactly that — see `resyncThroughAdoption`.
90129
+ */
90130
+ var ResyncDeviceInputSchema = object({
90131
+ deviceId: number$1().int().nonnegative(),
90132
+ /** "Resync from zero": purge the accessory children before re-deriving. */
90133
+ resetToSource: boolean().optional()
90134
+ });
90135
+ var resyncCapability = {
90136
+ name: "resync",
90137
+ scope: "device",
90138
+ deviceNative: true,
90139
+ mode: "singleton",
90140
+ deviceTypes: [
90141
+ DeviceType.Container,
90142
+ DeviceType.Workload,
90143
+ DeviceType.WeatherStation
90144
+ ],
90145
+ methods: { resync: method(ResyncDeviceInputSchema, ResyncResultSchema, {
90146
+ kind: "mutation",
90147
+ auth: "admin",
90148
+ notOperatorFacing: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action"
90149
+ }) },
90150
+ vocabulary: {
90151
+ noun: t("Re-sync", "Risincronizzazione"),
90152
+ order: 3245
90153
+ }
90154
+ };
89043
90155
  var RUNNING_POWER_START_DELAY_MS = 3e4;
89044
90156
  var RUNNING_POWER_STOP_DELAY_MS = 18e4;
89045
90157
  /**
@@ -89721,7 +90833,14 @@ var scriptRunnerCapability = {
89721
90833
  id: "script.run",
89722
90834
  label: t("Run script", "Esegui lo script"),
89723
90835
  phrase: t("Run {device}", "Esegui {device}"),
89724
- icon: "scroll-text"
90836
+ icon: "scroll-text",
90837
+ hold: {
90838
+ effects: [{
90839
+ field: "isRunning",
90840
+ value: true
90841
+ }],
90842
+ holdMs: ONE_SHOT_HOLD_MS
90843
+ }
89725
90844
  }]
89726
90845
  }),
89727
90846
  /** Cancel a running script. Provider rejects when the script
@@ -89731,6 +90850,10 @@ var scriptRunnerCapability = {
89731
90850
  auth: "admin",
89732
90851
  actions: [{
89733
90852
  id: "script.stop",
90853
+ effect: {
90854
+ field: "isRunning",
90855
+ value: false
90856
+ },
89734
90857
  label: t("Stop script", "Ferma lo script"),
89735
90858
  phrase: t("Stop {device}", "Ferma {device}"),
89736
90859
  icon: "square"
@@ -91589,6 +92712,10 @@ var switchCapability = {
91589
92712
  auth: "protected",
91590
92713
  actions: [{
91591
92714
  id: "switch.toggle",
92715
+ sideEffects: [{
92716
+ field: "on",
92717
+ negate: true
92718
+ }],
91592
92719
  label: t("Toggle", "Commuta"),
91593
92720
  phrase: t("Toggle {device}", "Commuta {device}"),
91594
92721
  icon: "toggle-right",
@@ -97337,6 +98464,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
97337
98464
  irTransmitter: irTransmitterCapability,
97338
98465
  lawnMowerControl: lawnMowerControlCapability,
97339
98466
  lockControl: lockControlCapability,
98467
+ lowPowerSleep: lowPowerSleepCapability,
97340
98468
  mediaPlayer: mediaPlayerCapability,
97341
98469
  meter: meterCapability,
97342
98470
  motion: motionCapability,
@@ -97772,6 +98900,20 @@ var BaseDevice = class {
97772
98900
  }, raw, options);
97773
98901
  }
97774
98902
  /**
98903
+ * Declare the identity of the device at the FAR END of this device's physical
98904
+ * link (D1063): a PoE port's wired client. Same normalisation, `unread`
98905
+ * rule and owner check as {@link declareIdentifiers}, written through
98906
+ * `device-manager.setAttachedIdentifiers`. It never makes the two devices the
98907
+ * same device. Best-effort: never throws.
98908
+ */
98909
+ async declareAttachedIdentifiers(raw, options) {
98910
+ return declareDeviceIdentifiers({
98911
+ deviceId: this.id,
98912
+ logger: this.ctx.logger,
98913
+ writer: this.ctx.api.deviceManager?.setAttachedIdentifiers
98914
+ }, raw, options);
98915
+ }
98916
+ /**
97775
98917
  * Re-publish the device's current `features` array to the persisted
97776
98918
  * meta blob. Drivers call this after a probe finishes when the live
97777
98919
  * `features` getter has gained new flags (e.g. `hasIntercom` flips
@@ -98816,6 +99958,21 @@ var BaseDeviceProvider = class extends BaseAddon {
98816
99958
  return toDeviceSummary(device, this.addonId);
98817
99959
  }
98818
99960
  };
99961
+ /**
99962
+ * The `resync` provider of an adopted container (#459, Q6): the work is the
99963
+ * owning addon's `device-adoption.resync`, reached through
99964
+ * `deviceManager.adoptionResync`, which also owns the "resync from zero" child
99965
+ * purge. Registering this is what makes `DeviceFeature.Resyncable` true.
99966
+ */
99967
+ function resyncThroughAdoption(deviceManager, ownDeviceId) {
99968
+ return { resync: async ({ deviceId, resetToSource }) => {
99969
+ if (deviceId !== ownDeviceId) throw new Error(`resync: deviceId mismatch, expected ${ownDeviceId}, got ${deviceId}`);
99970
+ return deviceManager.adoptionResync.mutate({
99971
+ camDeviceId: deviceId,
99972
+ ...resetToSource !== void 0 ? { resetToSource } : {}
99973
+ });
99974
+ } };
99975
+ }
98819
99976
  DeviceType.HeatPump;
98820
99977
  DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Camera, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, 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;
98821
99978
  new Set(Object.values(DeviceType));
@@ -99026,8 +100183,8 @@ var ALARM_MODES = [
99026
100183
  "vacation",
99027
100184
  "custom_bypass"
99028
100185
  ];
99029
- function alarmControls(state, modes, requiresCode) {
99030
- if (requiresCode) return [];
100186
+ function alarmControls(state, modes, codeRequired) {
100187
+ if (codeRequired) return [];
99031
100188
  const disarm = asAction(action("alarm.disarm", t("Disarm", "Disinserisci"), "shield-off", "alarm-panel", "disarm", {}, "primary"));
99032
100189
  const arm = (primaryFirst) => modes.map((mode, i) => asAction(action(`alarm.arm.${mode}`, ARM_LABELS[mode], "shield-check", "alarm-panel", "arm", { mode }, primaryFirst && i === 0 ? "primary" : "normal")));
99033
100190
  switch (state) {
@@ -99047,7 +100204,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
99047
100204
  const modes = slice === void 0 ? ALARM_MODES : slice.availableModes;
99048
100205
  return {
99049
100206
  reading: reading$1("alarm-panel", words?.state ?? "unknown", false, words?.title),
99050
- rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? NOT_REPORTED, since]), alarmControls(state, modes, slice?.requiresCode ?? false))],
100207
+ rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? NOT_REPORTED, since]), alarmControls(state, modes, slice?.codeRequired !== false))],
99051
100208
  ...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
99052
100209
  ...words === null ? {} : { tiles: {
99053
100210
  left: [{
@@ -99487,23 +100644,56 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
99487
100644
  };
99488
100645
  });
99489
100646
  var minutesOf = (seconds) => Math.max(0, Math.round(seconds / 60));
100647
+ var pumpCycleContribution = contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
100648
+ const enabled = slice?.enabled ?? null;
100649
+ 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;
100650
+ return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
100651
+ kind: "toggle",
100652
+ id: "pump-cycle.enabled",
100653
+ label: t("Pump cycle", "Ciclo pompa"),
100654
+ on: enabled,
100655
+ turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
100656
+ turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
100657
+ }])] };
100658
+ });
100659
+ var WORKLOAD_WORDS = {
100660
+ running: {
100661
+ state: "on",
100662
+ title: t("Running", "In esecuzione")
100663
+ },
100664
+ paused: {
100665
+ state: "standby",
100666
+ title: t("Paused", "In pausa")
100667
+ },
100668
+ stopped: {
100669
+ state: "off",
100670
+ title: t("Stopped", "Fermo")
100671
+ },
100672
+ starting: {
100673
+ state: "running",
100674
+ title: t("Starting", "In avvio")
100675
+ },
100676
+ stopping: {
100677
+ state: "running",
100678
+ title: t("Stopping", "In arresto")
100679
+ },
100680
+ crashed: {
100681
+ state: "alert",
100682
+ title: t("Crashed", "Andato in errore")
100683
+ }
100684
+ };
99490
100685
  var DEVICES_FAMILY_CONTRIBUTIONS = {
99491
100686
  "fan-control": fanContribution,
99492
100687
  "vacuum-control": vacuumContribution,
99493
100688
  "lawn-mower-control": mowerContribution,
99494
100689
  "pet-feeder": feederContribution,
99495
100690
  "pet-fountain": fountainContribution,
99496
- "pump-cycle": contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
99497
- const enabled = slice?.enabled ?? null;
99498
- 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;
99499
- return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
99500
- kind: "toggle",
99501
- id: "pump-cycle.enabled",
99502
- label: t("Pump cycle", "Ciclo pompa"),
99503
- on: enabled,
99504
- turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
99505
- turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
99506
- }])] };
100691
+ "pump-cycle": pumpCycleContribution,
100692
+ workload: contribution("workload", WorkloadStatusSchema, (slice) => {
100693
+ const state = slice?.state ?? null;
100694
+ if (state === null) return { reading: reading$1("workload", "unknown") };
100695
+ const words = WORKLOAD_WORDS[state];
100696
+ return { reading: reading$1("workload", words.state, false, words.title) };
99507
100697
  })
99508
100698
  };
99509
100699
  /**
@@ -101518,7 +102708,7 @@ lookOf({
101518
102708
  });
101519
102709
  DeviceType.Climate;
101520
102710
  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;
101521
- 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;
102711
+ 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;
101522
102712
  Object.freeze({
101523
102713
  "accessories.getStatus": {
101524
102714
  capName: "accessories",
@@ -102430,13 +103620,6 @@ Object.freeze({
102430
103620
  access: "view",
102431
103621
  role: "viewer"
102432
103622
  },
102433
- "battery.wakeForStream": {
102434
- capName: "battery",
102435
- capScope: "device",
102436
- addonId: null,
102437
- access: "create",
102438
- role: "viewer"
102439
- },
102440
103623
  "binary.getStatus": {
102441
103624
  capName: "binary",
102442
103625
  capScope: "device",
@@ -103725,6 +104908,13 @@ Object.freeze({
103725
104908
  access: "create",
103726
104909
  role: "admin"
103727
104910
  },
104911
+ "deviceManager.confirmIdentityLink": {
104912
+ capName: "device-manager",
104913
+ capScope: "system",
104914
+ addonId: null,
104915
+ access: "create",
104916
+ role: "admin"
104917
+ },
103728
104918
  "deviceManager.createDevice": {
103729
104919
  capName: "device-manager",
103730
104920
  capScope: "system",
@@ -103774,6 +104964,13 @@ Object.freeze({
103774
104964
  access: "create",
103775
104965
  role: "admin"
103776
104966
  },
104967
+ "deviceManager.dismissIdentityLink": {
104968
+ capName: "device-manager",
104969
+ capScope: "system",
104970
+ addonId: null,
104971
+ access: "create",
104972
+ role: "admin"
104973
+ },
103777
104974
  "deviceManager.enable": {
103778
104975
  capName: "device-manager",
103779
104976
  capScope: "system",
@@ -103963,6 +105160,20 @@ Object.freeze({
103963
105160
  access: "view",
103964
105161
  role: "admin"
103965
105162
  },
105163
+ "deviceManager.listIdentityCandidates": {
105164
+ capName: "device-manager",
105165
+ capScope: "system",
105166
+ addonId: null,
105167
+ access: "view",
105168
+ role: "admin"
105169
+ },
105170
+ "deviceManager.listIdentityLinks": {
105171
+ capName: "device-manager",
105172
+ capScope: "system",
105173
+ addonId: null,
105174
+ access: "view",
105175
+ role: "admin"
105176
+ },
103966
105177
  "deviceManager.listLocationDescriptions": {
103967
105178
  capName: "device-manager",
103968
105179
  capScope: "system",
@@ -104159,6 +105370,13 @@ Object.freeze({
104159
105370
  access: "create",
104160
105371
  role: "admin"
104161
105372
  },
105373
+ "deviceManager.setAttachedIdentifiers": {
105374
+ capName: "device-manager",
105375
+ capScope: "system",
105376
+ addonId: null,
105377
+ access: "create",
105378
+ role: "admin"
105379
+ },
104162
105380
  "deviceManager.setChildLayout": {
104163
105381
  capName: "device-manager",
104164
105382
  capScope: "system",
@@ -104320,6 +105538,13 @@ Object.freeze({
104320
105538
  access: "create",
104321
105539
  role: "admin"
104322
105540
  },
105541
+ "deviceManager.unlinkIdentity": {
105542
+ capName: "device-manager",
105543
+ capScope: "system",
105544
+ addonId: null,
105545
+ access: "delete",
105546
+ role: "admin"
105547
+ },
104323
105548
  "deviceManager.updateConfig": {
104324
105549
  capName: "device-manager",
104325
105550
  capScope: "system",
@@ -104600,6 +105825,20 @@ Object.freeze({
104600
105825
  access: "create",
104601
105826
  role: "admin"
104602
105827
  },
105828
+ "deviceStateRefresh.refresh": {
105829
+ capName: "device-state-refresh",
105830
+ capScope: "device",
105831
+ addonId: null,
105832
+ access: "create",
105833
+ role: "admin"
105834
+ },
105835
+ "deviceStateRefresh.resubscribe": {
105836
+ capName: "device-state-refresh",
105837
+ capScope: "device",
105838
+ addonId: null,
105839
+ access: "create",
105840
+ role: "admin"
105841
+ },
104603
105842
  "deviceStatus.getStatus": {
104604
105843
  capName: "device-status",
104605
105844
  capScope: "device",
@@ -106084,6 +107323,20 @@ Object.freeze({
106084
107323
  access: "view",
106085
107324
  role: "admin"
106086
107325
  },
107326
+ "lowPowerSleep.getStatus": {
107327
+ capName: "low-power-sleep",
107328
+ capScope: "device",
107329
+ addonId: null,
107330
+ access: "view",
107331
+ role: "viewer"
107332
+ },
107333
+ "lowPowerSleep.wakeUp": {
107334
+ capName: "low-power-sleep",
107335
+ capScope: "device",
107336
+ addonId: null,
107337
+ access: "create",
107338
+ role: "viewer"
107339
+ },
106087
107340
  "mediaPlayer.channelDown": {
106088
107341
  capName: "media-player",
106089
107342
  capScope: "device",
@@ -108457,6 +109710,13 @@ Object.freeze({
108457
109710
  access: "view",
108458
109711
  role: "admin"
108459
109712
  },
109713
+ "pipelineOrchestrator.getStepSwitches": {
109714
+ capName: "pipeline-orchestrator",
109715
+ capScope: "system",
109716
+ addonId: null,
109717
+ access: "view",
109718
+ role: "admin"
109719
+ },
108460
109720
  "pipelineOrchestrator.listAgentSettings": {
108461
109721
  capName: "pipeline-orchestrator",
108462
109722
  capScope: "system",
@@ -108611,6 +109871,20 @@ Object.freeze({
108611
109871
  access: "create",
108612
109872
  role: "admin"
108613
109873
  },
109874
+ "pipelineOrchestrator.setClusterStepMode": {
109875
+ capName: "pipeline-orchestrator",
109876
+ capScope: "system",
109877
+ addonId: null,
109878
+ access: "create",
109879
+ role: "admin"
109880
+ },
109881
+ "pipelineOrchestrator.setDeviceStepEnabled": {
109882
+ capName: "pipeline-orchestrator",
109883
+ capScope: "system",
109884
+ addonId: null,
109885
+ access: "create",
109886
+ role: "admin"
109887
+ },
108614
109888
  "pipelineOrchestrator.setLoadBalancingShares": {
108615
109889
  capName: "pipeline-orchestrator",
108616
109890
  capScope: "system",
@@ -108618,6 +109892,13 @@ Object.freeze({
108618
109892
  access: "create",
108619
109893
  role: "admin"
108620
109894
  },
109895
+ "pipelineOrchestrator.setNodeStepEnabled": {
109896
+ capName: "pipeline-orchestrator",
109897
+ capScope: "system",
109898
+ addonId: null,
109899
+ access: "create",
109900
+ role: "admin"
109901
+ },
108621
109902
  "pipelineOrchestrator.setNodeStepSettings": {
108622
109903
  capName: "pipeline-orchestrator",
108623
109904
  capScope: "system",
@@ -109759,6 +111040,13 @@ Object.freeze({
109759
111040
  access: "view",
109760
111041
  role: "admin"
109761
111042
  },
111043
+ "resync.resync": {
111044
+ capName: "resync",
111045
+ capScope: "device",
111046
+ addonId: null,
111047
+ access: "create",
111048
+ role: "admin"
111049
+ },
109762
111050
  "runningState.getStatus": {
109763
111051
  capName: "running-state",
109764
111052
  capScope: "device",
@@ -112154,7 +113442,7 @@ Object.freeze({
112154
113442
  role: "admin"
112155
113443
  }
112156
113444
  });
112157
- DeviceFeature.BatteryOperated;
113445
+ DeviceFeature.Sleeps;
112158
113446
  function bound(cap, methods = [], authority = "reported") {
112159
113447
  return {
112160
113448
  kind: "cap",
@@ -112166,11 +113454,11 @@ function bound(cap, methods = [], authority = "reported") {
112166
113454
  function derived(cap, methods = []) {
112167
113455
  return bound(cap, methods, "derived");
112168
113456
  }
112169
- DeviceFeature.BatteryOperated, DeviceFeature.Rebootable, derived("reboot", ["reboot"]), DeviceFeature.Resyncable, DeviceFeature.NativeSnapshot, DeviceFeature.DoorbellButton, derived("doorbell"), DeviceFeature.TwoWayAudio, derived("intercom", [
113457
+ DeviceFeature.BatteryOperated, DeviceFeature.Sleeps, derived("low-power-sleep", ["wakeUp"]), DeviceFeature.Rebootable, derived("reboot", ["reboot"]), DeviceFeature.Resyncable, derived("resync", ["resync"]), DeviceFeature.NativeSnapshot, DeviceFeature.DoorbellButton, derived("doorbell"), DeviceFeature.TwoWayAudio, derived("intercom", [
112170
113458
  "startTalkSession",
112171
113459
  "pushTalkAudio",
112172
113460
  "endTalkSession"
112173
- ]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockPinRequired, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.AlarmPinRequired, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasMap, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasMap, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
113461
+ ]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
112174
113462
  var ALL_FEATURES = Object.values(DeviceFeature);
112175
113463
  new Set(ALL_FEATURES);
112176
113464
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
@@ -112213,7 +113501,7 @@ function offered(received) {
112213
113501
  }
112214
113502
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
112215
113503
  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;
112216
- 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;
113504
+ 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;
112217
113505
  new Set(Object.values(DeviceType));
112218
113506
  new Set(Object.values(DeviceRole));
112219
113507
  var PowerSwitchRefusedError = class extends Error {
@@ -112509,11 +113797,6 @@ Object.freeze({
112509
113797
  form: "single",
112510
113798
  optional: false
112511
113799
  }],
112512
- "battery.wakeForStream": [{
112513
- name: "deviceId",
112514
- form: "single",
112515
- optional: false
112516
- }],
112517
113800
  "binary.getStatus": [{
112518
113801
  name: "deviceId",
112519
113802
  form: "single",
@@ -112993,6 +114276,11 @@ Object.freeze({
112993
114276
  form: "array",
112994
114277
  optional: true
112995
114278
  }],
114279
+ "deviceManager.listIdentityLinks": [{
114280
+ name: "deviceId",
114281
+ form: "single",
114282
+ optional: true
114283
+ }],
112996
114284
  "deviceManager.loadConfig": [{
112997
114285
  name: "deviceId",
112998
114286
  form: "single",
@@ -113043,6 +114331,11 @@ Object.freeze({
113043
114331
  form: "single",
113044
114332
  optional: false
113045
114333
  }],
114334
+ "deviceManager.setAttachedIdentifiers": [{
114335
+ name: "deviceId",
114336
+ form: "single",
114337
+ optional: false
114338
+ }],
113046
114339
  "deviceManager.setChildLayout": [{
113047
114340
  name: "deviceId",
113048
114341
  form: "single",
@@ -113237,6 +114530,20 @@ Object.freeze({
113237
114530
  form: "single",
113238
114531
  optional: false
113239
114532
  }],
114533
+ "deviceStateRefresh.refresh": [{
114534
+ name: "deviceId",
114535
+ form: "single",
114536
+ optional: false
114537
+ }, {
114538
+ name: "deviceIds",
114539
+ form: "array",
114540
+ optional: false
114541
+ }],
114542
+ "deviceStateRefresh.resubscribe": [{
114543
+ name: "deviceId",
114544
+ form: "single",
114545
+ optional: false
114546
+ }],
113240
114547
  "deviceStatus.getStatus": [{
113241
114548
  name: "deviceId",
113242
114549
  form: "single",
@@ -113697,6 +115004,16 @@ Object.freeze({
113697
115004
  form: "single",
113698
115005
  optional: true
113699
115006
  }],
115007
+ "lowPowerSleep.getStatus": [{
115008
+ name: "deviceId",
115009
+ form: "single",
115010
+ optional: false
115011
+ }],
115012
+ "lowPowerSleep.wakeUp": [{
115013
+ name: "deviceId",
115014
+ form: "single",
115015
+ optional: false
115016
+ }],
113700
115017
  "mediaPlayer.channelDown": [{
113701
115018
  name: "deviceId",
113702
115019
  form: "single",
@@ -114982,6 +116299,11 @@ Object.freeze({
114982
116299
  form: "single",
114983
116300
  optional: false
114984
116301
  }],
116302
+ "resync.resync": [{
116303
+ name: "deviceId",
116304
+ form: "single",
116305
+ optional: false
116306
+ }],
114985
116307
  "runningState.getStatus": [{
114986
116308
  name: "deviceId",
114987
116309
  form: "single",
@@ -146759,6 +148081,7 @@ var HmContainerDevice = class HmContainerDevice extends BaseDevice {
146759
148081
  constructor(ctx) {
146760
148082
  const cfg = hmContainerSchema.parse(ctx.persistedConfig ?? {});
146761
148083
  super(ctx, hmContainerSchema, { type: DeviceType.Container });
148084
+ this.ctx.registerNativeCap(resyncCapability, resyncThroughAdoption(this.ctx.api.deviceManager, this.id));
146762
148085
  this.address = cfg.address;
146763
148086
  this.integrationId = cfg.integrationId;
146764
148087
  const hmDevice = this.resolveHmDevice();
@@ -148812,6 +150135,7 @@ function buildHomematicInstances(records, deps) {
148812
150135
  },
148813
150136
  formSchema: () => buildConnectionFormSchema(),
148814
150137
  initialBody: (name) => ({ name }),
150138
+ addDevice: () => "children",
148815
150139
  configured: (body) => (body.host ?? "").trim().length > 0,
148816
150140
  onChanged: () => deps.onChanged(),
148817
150141
  test: async ({ id, values }) => {