@camstack/addon-admin-ui 1.2.643 → 1.2.645

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/dist/assets/Addons-CWDe2ysB.js +5 -0
  3. package/dist/assets/{AdminPage-BZvFoK-C.js → AdminPage-CgQxV6oS.js} +1 -1
  4. package/dist/assets/{AdminSectionedPage-C6F2XhY_.js → AdminSectionedPage-CSjSmB74.js} +1 -1
  5. package/dist/assets/AiProfiles-DnluoNPk.js +3 -0
  6. package/dist/assets/{BootstrapSettingsForm-ChlI6gkO.js → BootstrapSettingsForm-BoEmD1zV.js} +1 -1
  7. package/dist/assets/Build-DMVoPRyS.js +40 -0
  8. package/dist/assets/{Calendars-DJZwEA_T.js → Calendars-DJwzxqLu.js} +1 -1
  9. package/dist/assets/{CameraGrids-Mx13QcCo.js → CameraGrids-BgccN5Pj.js} +1 -1
  10. package/dist/assets/{Cluster-BoaxEKbX.js → Cluster-BsENeR0i.js} +1 -1
  11. package/dist/assets/CompositionBlockEditor-DudbSZVo.js +2 -0
  12. package/dist/assets/{CompositionEditorPage-BzcNLyXz.js → CompositionEditorPage-TUBCxwY3.js} +1 -1
  13. package/dist/assets/Data-DOpOAfYo.js +2 -0
  14. package/dist/assets/DeviceDetail-CIRWTBj8.js +2 -0
  15. package/dist/assets/{Devices-CFiT4SEp.js → Devices-RQLZEgPY.js} +1 -1
  16. package/dist/assets/EmbedDevicePage-ZLq8d2iA.js +1 -0
  17. package/dist/assets/{EmbedPlayerPage-Dw6ZuDJq.js → EmbedPlayerPage-CAIQaXj7.js} +1 -1
  18. package/dist/assets/{History-q6klNCf4.js → History-y3xgB62I.js} +1 -1
  19. package/dist/assets/Identity-Dfwm4Ys2.js +1 -0
  20. package/dist/assets/InstancesTable-DB74t0Si.js +1 -0
  21. package/dist/assets/{IntegrationDetail-CdDEVjrn.js → IntegrationDetail-Bg4fgH_7.js} +1 -1
  22. package/dist/assets/{IntegrationWizard-CJzJK4X4.js → IntegrationWizard-B_hF-vL9.js} +1 -1
  23. package/dist/assets/Integrations-BzHSRaCH.js +1 -0
  24. package/dist/assets/{Integrations-CRISOUeT.js → Integrations-uNKI4ENy.js} +2 -2
  25. package/dist/assets/Library-IqKySZef.js +1 -0
  26. package/dist/assets/Locations-BzytI3mX.js +3 -0
  27. package/dist/assets/{Logs-C_hIQLbk.js → Logs-BQWbxkE0.js} +1 -1
  28. package/dist/assets/{MaskShapeCanvas-dpTYLn-I.js → MaskShapeCanvas-B3zP9xT5.js} +1 -1
  29. package/dist/assets/{MotionZonesSettings-BeZ8c48s.js → MotionZonesSettings-DKBKT9aJ.js} +1 -1
  30. package/dist/assets/{MyAccess-CkleYUFw.js → MyAccess-t_EwSJ61.js} +1 -1
  31. package/dist/assets/{Network-8M-uJ8XE.js → Network-w5dWUXr3.js} +1 -1
  32. package/dist/assets/{NodeAddonsSettingsPanel-CzinR980.js → NodeAddonsSettingsPanel-Bd8yv-Cb.js} +1 -1
  33. package/dist/assets/Notifications-BZPoCLb7.js +1 -0
  34. package/dist/assets/Pipeline-AOTD3jWE.js +1 -0
  35. package/dist/assets/{PrivacyMaskSettings-ufaM81lx.js → PrivacyMaskSettings-CK9hqTRF.js} +1 -1
  36. package/dist/assets/{Recordings-qUFS33dH.js → Recordings-Ck1Xvyur.js} +1 -1
  37. package/dist/assets/{RemoteGrid-mhCQPrw4.js → RemoteGrid-i8wKPofF.js} +1 -1
  38. package/dist/assets/{ScanSubnetEditor-ByUeuUPH.js → ScanSubnetEditor-DgQG14u4.js} +1 -1
  39. package/dist/assets/{SceneMonitorEditor-_WrCw9Qm.js → SceneMonitorEditor-C7BzyuY3.js} +1 -1
  40. package/dist/assets/{SessionsList-WLJF11Gk.js → SessionsList-Cg0IcV2U.js} +2 -2
  41. package/dist/assets/{Showroom-NE9QetSE.js → Showroom-v5DKHm7R.js} +1 -1
  42. package/dist/assets/{StorageLocationsTable-DY-jybRD.js → StorageLocationsTable-Bs0wRBcX.js} +1 -1
  43. package/dist/assets/{System-Dhsni5ue.js → System-jjlBGk9U.js} +1 -1
  44. package/dist/assets/{Templates-BSzdR4Qf.js → Templates-DKBo80nE.js} +1 -1
  45. package/dist/assets/{Terminal-7LrKBjd7.js → Terminal-CFo4OCRV.js} +3 -3
  46. package/dist/assets/{TrainingProviders-CSWf7FWS.js → TrainingProviders-LmHCsEEc.js} +1 -1
  47. package/dist/assets/{Viewer-g8Ina8Au.js → Viewer-KhrX-QoU.js} +1 -1
  48. package/dist/assets/{__vite-browser-external-BCAtXlNQ.js → __vite-browser-external-B6QEsNSJ.js} +1 -1
  49. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DP55Xu7L.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BPtmPLBq.js} +1 -1
  50. package/dist/assets/{action-draft-B8uc37EO.js → action-draft-Ct8_GVdJ.js} +1 -1
  51. package/dist/assets/{ai-page.helpers-Dib89wmm.js → ai-page.helpers-3SnxNBNh.js} +1 -1
  52. package/dist/assets/{assignment-candidates-B6Lh-6_J.js → assignment-candidates-CMQomrma.js} +1 -1
  53. package/dist/assets/{authed-media-C3W-vMO8.js → authed-media-CS1SYJIb.js} +1 -1
  54. package/dist/assets/{board-model-D3Kg5nIR.js → board-model-COvoDWAk.js} +1 -1
  55. package/dist/assets/client-BkrADwlo.js +951 -0
  56. package/dist/assets/create-composition-B8m0P0Ka.js +1 -0
  57. package/dist/assets/{device-detail-C-OoPQkZ.js → device-detail-G-NTu_Fh.js} +1 -1
  58. package/dist/assets/{device-integration-icon-BdKyz1yq.js → device-integration-icon-dOu9Eloe.js} +1 -1
  59. package/dist/assets/device-picker-model-Crk-zo39.js +1 -0
  60. package/dist/assets/{dist-DZjvZVe0.js → dist-BSIDIvPv.js} +1 -1
  61. package/dist/assets/dist-DD36UXJv.js +951 -0
  62. package/dist/assets/{format-7WsDyBWf.js → format-CnAMMCKO.js} +1 -1
  63. package/dist/assets/{hostInit-CgEEuJPE.js → hostInit-5hZWUgB1.js} +1 -1
  64. package/dist/assets/i18n-BArP6ThS.js +1 -0
  65. package/dist/assets/icons-2IlNe3Rh.js +1 -0
  66. package/dist/assets/index-B5lClYc_.js +4 -0
  67. package/dist/assets/{linked-devices-model-CyoKmlf1.js → linked-devices-model-C9-KwysR.js} +1 -1
  68. package/dist/assets/{mf-entry-bootstrap-0-571f562d.js → mf-entry-bootstrap-0-da7ca43d.js} +2 -2
  69. package/dist/assets/mount-Crk-zo39.js +1 -0
  70. package/dist/assets/{notification-rule-status-CnuKK1z9.js → notification-rule-status-CXntp3K9.js} +1 -1
  71. package/dist/assets/player-overlays-BGlMiuNC.js +1 -0
  72. package/dist/assets/remoteEntry-Oo10s4gX.js +1 -0
  73. package/dist/assets/src-BNDWAXGm.js +230 -0
  74. package/dist/assets/{step-inspector-model-BN-6Ysky.js → step-inspector-model-DXIzeAZ0.js} +1 -1
  75. package/dist/assets/{use-scenes-feed-Cr8kNEzV.js → use-scenes-feed-BoR1Y-VE.js} +1 -1
  76. package/dist/assets/{use-stationary-objects-Befc4ui9.js → use-stationary-objects-DkXKafj7.js} +1 -1
  77. package/dist/assets/{useAdminDeviceRemoval-CSXgA4m4.js → useAdminDeviceRemoval-DkVpT6r5.js} +1 -1
  78. package/dist/assets/useEventInvalidation-Crk-zo39.js +1 -0
  79. package/dist/assets/{useNodeUrlSelection-DlX-xEsy.js → useNodeUrlSelection--lZvqvct.js} +1 -1
  80. package/dist/assets/useTemplateSave-NBDCe0sx.js +1 -0
  81. package/dist/assets/variable-Cy0obf0C.js +1 -0
  82. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CqjtgsPE.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-T6WBMt1q.js} +2 -2
  83. package/dist/index.html +8 -8
  84. package/dist/server/addon.js +490 -134
  85. package/package.json +2 -2
  86. package/dist/assets/Addons-CmKKSYT6.js +0 -5
  87. package/dist/assets/AiProfiles-BRZy6Fa4.js +0 -3
  88. package/dist/assets/Build-BW2OslEd.js +0 -39
  89. package/dist/assets/CompositionBlockEditor-BYf4xPq-.js +0 -2
  90. package/dist/assets/Data-C2hKzrIe.js +0 -2
  91. package/dist/assets/DeviceDetail-DHrVifn8.js +0 -2
  92. package/dist/assets/EmbedDevicePage-r-cr6Bk-.js +0 -1
  93. package/dist/assets/Identity-B2BZy6Xv.js +0 -1
  94. package/dist/assets/InstancesTable-6rM7NsAl.js +0 -1
  95. package/dist/assets/Integrations-D9ZIdQ-k.js +0 -1
  96. package/dist/assets/Library-BOLcGUpc.js +0 -1
  97. package/dist/assets/Locations-BamYML3K.js +0 -3
  98. package/dist/assets/Notifications-DvuuxOT6.js +0 -1
  99. package/dist/assets/Pipeline-Dpe6Ot41.js +0 -1
  100. package/dist/assets/client-BsGn43se.js +0 -921
  101. package/dist/assets/create-composition-BmMT1YBQ.js +0 -2
  102. package/dist/assets/device-picker-model-ChgpoWnb.js +0 -1
  103. package/dist/assets/dist-Zu7rz3zb.js +0 -921
  104. package/dist/assets/i18n-CEvnkGPR.js +0 -1
  105. package/dist/assets/icons-pVM3dlwn.js +0 -1
  106. package/dist/assets/index-BLPWUlRi.js +0 -4
  107. package/dist/assets/mount-ChgpoWnb.js +0 -1
  108. package/dist/assets/player-overlays-BHFWIcWp.js +0 -1
  109. package/dist/assets/remoteEntry-x4q7yukG.js +0 -1
  110. package/dist/assets/src-5RckhTPX.js +0 -230
  111. package/dist/assets/ungroup-BlQtUKBm.js +0 -1
  112. package/dist/assets/useEventInvalidation-ChgpoWnb.js +0 -1
  113. package/dist/assets/useTemplateSave-B5WJqsrS.js +0 -1
  114. package/dist/assets/variable-IcIR23WN.js +0 -1
@@ -803,7 +803,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
803
803
  return EventCategory;
804
804
  }({});
805
805
  //#endregion
806
- //#region ../types/dist/composed-stable-id-DFNyOFzz.mjs
806
+ //#region ../types/dist/composed-stable-id-CPp3votu.mjs
807
807
  /**
808
808
  import { errMsg } from '@camstack/types'
809
809
  * Extract a human-readable message from an unknown error value.
@@ -822,12 +822,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
822
822
  DeviceType["Siren"] = "siren";
823
823
  DeviceType["Switch"] = "switch";
824
824
  DeviceType["Sensor"] = "sensor";
825
- DeviceType["Thermostat"] = "thermostat";
826
- /** Air-conditioner / heat-pump climate device (HVAC) — shares the
827
- * `climate-control` cap surface with `Thermostat` but renders a
828
- * dedicated AC-appropriate control UI (mode chips, fan speed,
829
- * independent vertical/horizontal swing). Sources: native Gree, and
830
- * reusable by other AC integrations. */
825
+ /** Every climate device: an air conditioner, a room thermostat, a radiator
826
+ * valve, a floor-heating zone, a heat-pump circuit. They share one set of
827
+ * controls (`climate-control`), so they are one type; WHICH kind of climate
828
+ * device it is is its {@link DeviceRole} (`climate-*`), which the UI and the
829
+ * exports branch on. The retired `thermostat` type is read as this one
830
+ * (`canonicalStoredDeviceType`). */
831
831
  DeviceType["Climate"] = "climate";
832
832
  DeviceType["Button"] = "button";
833
833
  /** Generic stateless event emitter — carries a device's EXACT declared
@@ -918,10 +918,6 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
918
918
  /** Washing machine. A plug-built one is running while its power stays
919
919
  * above a threshold. No program cap — that surface is the dishwasher's. */
920
920
  DeviceType["Washer"] = "washer";
921
- /** A dumb plug-in stove or heater: a switch (and, with a meter, a power
922
- * reading) that only runs while the plug is on. Built from a smart plug;
923
- * the `timed-run` cap switches it off again after a chosen time. */
924
- DeviceType["Heater"] = "heater";
925
921
  /** Tumble dryer. Same plug-built running surface as {@link Washer}. */
926
922
  DeviceType["Dryer"] = "dryer";
927
923
  /** The physical bridge box of a vendor ecosystem (Velux KLF-200, and later
@@ -1141,6 +1137,27 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1141
1137
  /** A smart plug: a `switch` whose source says it is an outlet (HA
1142
1138
  * `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
1143
1139
  DeviceRole["Outlet"] = "outlet";
1140
+ /** A dumb plug-in stove or heater behind a switch: it runs only while the
1141
+ * switch is on. Offered `timed-run`, which switches it off again after a
1142
+ * chosen time. */
1143
+ DeviceRole["SwitchHeater"] = "switch-heater";
1144
+ /** A plain fan behind a switch (a smart plug powering it): drawn as a fan,
1145
+ * with the switch's on/off only. Speed or oscillation appear only when the
1146
+ * device also has a fan cap (D1033). */
1147
+ DeviceRole["SwitchFan"] = "switch-fan";
1148
+ /** Air conditioner / split unit: cooling, fan speed, louvres. */
1149
+ DeviceRole["ClimateAc"] = "climate-ac";
1150
+ /** Room thermostat: a setpoint and a room temperature. The default. */
1151
+ DeviceRole["ClimateThermostat"] = "climate-thermostat";
1152
+ /** Floor-heating zone actuator. */
1153
+ DeviceRole["ClimateFloor"] = "climate-floor";
1154
+ /** Radiator valve (thermostatic radiator head). */
1155
+ DeviceRole["ClimateRadiator"] = "climate-radiator";
1156
+ /** A heater with its own thermostat (stove, convector). */
1157
+ DeviceRole["ClimateHeater"] = "climate-heater";
1158
+ /** One heating/cooling circuit of a heat pump: a water loop with comfort /
1159
+ * eco setpoints and a heat/cool mode, no room sensor. */
1160
+ DeviceRole["ClimateHeatPumpCircuit"] = "climate-heat-pump-circuit";
1144
1161
  /** Generic motion / occupancy / moving event source. Distinct from
1145
1162
  * the camera accessory PirSensor role: that one is a camera child;
1146
1163
  * this is a standalone HA / 3rd-party motion sensor. */
@@ -5895,7 +5912,7 @@ var ZodIssueCode = {
5895
5912
  var ZodFirstPartyTypeKind;
5896
5913
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5897
5914
  //#endregion
5898
- //#region ../types/dist/sleep-D_NpiLFP.mjs
5915
+ //#region ../types/dist/sleep-Bn346wCJ.mjs
5899
5916
  /**
5900
5917
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5901
5918
  * window to float samples (D455).
@@ -10862,6 +10879,50 @@ var ACTUATOR_CAP_VOCABULARY = {
10862
10879
  value: false
10863
10880
  },
10864
10881
  args: { oscillating: false }
10882
+ },
10883
+ {
10884
+ id: "fan.horizontalOscillateOn",
10885
+ method: "setOscillationAxis",
10886
+ label: t("Horizontal oscillation on", "Oscillazione orizzontale attiva"),
10887
+ phrase: t("Start the horizontal oscillation of {device}", "Attiva l’oscillazione orizzontale di {device}"),
10888
+ icon: "move-horizontal",
10889
+ args: {
10890
+ axis: "horizontal",
10891
+ oscillating: true
10892
+ }
10893
+ },
10894
+ {
10895
+ id: "fan.horizontalOscillateOff",
10896
+ method: "setOscillationAxis",
10897
+ label: t("Horizontal oscillation off", "Oscillazione orizzontale spenta"),
10898
+ phrase: t("Stop the horizontal oscillation of {device}", "Ferma l’oscillazione orizzontale di {device}"),
10899
+ icon: "move-horizontal",
10900
+ args: {
10901
+ axis: "horizontal",
10902
+ oscillating: false
10903
+ }
10904
+ },
10905
+ {
10906
+ id: "fan.verticalOscillateOn",
10907
+ method: "setOscillationAxis",
10908
+ label: t("Vertical oscillation on", "Oscillazione verticale attiva"),
10909
+ phrase: t("Start the vertical oscillation of {device}", "Attiva l’oscillazione verticale di {device}"),
10910
+ icon: "move-vertical",
10911
+ args: {
10912
+ axis: "vertical",
10913
+ oscillating: true
10914
+ }
10915
+ },
10916
+ {
10917
+ id: "fan.verticalOscillateOff",
10918
+ method: "setOscillationAxis",
10919
+ label: t("Vertical oscillation off", "Oscillazione verticale spenta"),
10920
+ phrase: t("Stop the vertical oscillation of {device}", "Ferma l’oscillazione verticale di {device}"),
10921
+ icon: "move-vertical",
10922
+ args: {
10923
+ axis: "vertical",
10924
+ oscillating: false
10925
+ }
10865
10926
  }
10866
10927
  ],
10867
10928
  state: [{
@@ -16498,7 +16559,7 @@ Object.freeze({
16498
16559
  }
16499
16560
  });
16500
16561
  //#endregion
16501
- //#region ../types/dist/implemented-methods-M5aguGon.mjs
16562
+ //#region ../types/dist/implemented-methods-5YMDeE3f.mjs
16502
16563
  /**
16503
16564
  * The ffmpeg build every CamStack node downloads, per platform and arch.
16504
16565
  *
@@ -42934,6 +42995,13 @@ var AutomationConditionOperatorSchema = _enum([
42934
42995
  "in"
42935
42996
  ]);
42936
42997
  /**
42998
+ * The stable name of an event leaf. A path (`when.0.1`) moves when a row is
42999
+ * reordered; the id does not, so a `triggered-by` leaf keeps pointing at the
43000
+ * same row. Optional: a leaf nothing refers to needs none.
43001
+ */
43002
+ var EVENT_LEAF_ID_RE = /^[A-Za-z0-9_-]{1,40}$/;
43003
+ var eventLeafId = { id: string().regex(EVENT_LEAF_ID_RE).optional() };
43004
+ /**
42937
43005
  * D8 compliance, and it is the reason a "becomes" leaf is not merely an event
42938
43006
  * subscription: it evaluates against the **state mirror**, which is reconciled,
42939
43007
  * and an event only WAKES the evaluation. A dropped event therefore DELAYS a
@@ -42941,6 +43009,7 @@ var AutomationConditionOperatorSchema = _enum([
42941
43009
  */
42942
43010
  var DeviceBecomesLeafSchema = object({
42943
43011
  kind: literal("device-becomes"),
43012
+ ...eventLeafId,
42944
43013
  deviceId: number$1().int().nonnegative(),
42945
43014
  cap: string().min(1),
42946
43015
  fieldPath: string().min(1),
@@ -42993,6 +43062,7 @@ var DeviceBecomesLeafSchema = object({
42993
43062
  });
42994
43063
  var DeviceEventLeafSchema = object({
42995
43064
  kind: literal("device-event"),
43065
+ ...eventLeafId,
42996
43066
  /** An `EventCategory` value. */
42997
43067
  category: string().min(1),
42998
43068
  deviceId: number$1().int().nonnegative().optional()
@@ -43005,18 +43075,24 @@ var DeviceEventLeafSchema = object({
43005
43075
  */
43006
43076
  var ScheduleLeafSchema = object({
43007
43077
  kind: literal("schedule"),
43078
+ ...eventLeafId,
43008
43079
  at: TimeSpecSchema.optional(),
43009
43080
  days: array(WeekdayKeySchema).min(1).max(7).optional(),
43010
43081
  /** @deprecated legacy cron — new schedules use `at`. */
43011
43082
  cron: string().min(1).max(120).optional()
43012
43083
  }).refine((leaf) => leaf.at === void 0 !== (leaf.cron === void 0), { message: "a schedule names exactly one of `at` (a time spec) and `cron` (legacy)" }).refine((leaf) => leaf.days === void 0 || leaf.at !== void 0, { message: "`days` goes with `at`; a cron expression carries its own days" });
43013
- var ManualLeafSchema = object({ kind: literal("manual") });
43084
+ var ManualLeafSchema = object({
43085
+ kind: literal("manual"),
43086
+ ...eventLeafId
43087
+ });
43014
43088
  var IntervalLeafSchema = object({
43015
43089
  kind: literal("interval"),
43090
+ ...eventLeafId,
43016
43091
  minutes: number$1().int().min(1).max(1440)
43017
43092
  });
43018
43093
  var DetectionLeafSchema = object({
43019
43094
  kind: literal("detection"),
43095
+ ...eventLeafId,
43020
43096
  /** One macro class each, optionally narrowed by a label; a track of any listed subject fires. */
43021
43097
  subjects: array(DetectionSubjectSchema).min(1),
43022
43098
  deviceIds: array(number$1().int().nonnegative()).min(1),
@@ -43027,6 +43103,7 @@ var DetectionLeafSchema = object({
43027
43103
  });
43028
43104
  var StationaryLeafSchema = object({
43029
43105
  kind: literal("stationary"),
43106
+ ...eventLeafId,
43030
43107
  deviceIds: array(number$1().int().nonnegative()).min(1),
43031
43108
  subjects: array(StationarySubjectSchema).min(1).optional(),
43032
43109
  zones: array(string().min(1)).min(1).optional(),
@@ -43072,6 +43149,41 @@ var StationaryPresentLeafSchema = object({
43072
43149
  minCount: number$1().int().positive().optional()
43073
43150
  });
43074
43151
  /**
43152
+ * True while the site-local clock is inside a daily window and/or on one of
43153
+ * the named days. `days` names the local day a window STARTS on, so
43154
+ * 22:00-06:00 on weekdays is still inside at 01:00 Saturday. A one-date spec
43155
+ * (`kind: 'date'`) is refused: only a clock time or a sun event makes a window
43156
+ * that repeats every day.
43157
+ */
43158
+ var TimeIsLeafSchema = object({
43159
+ kind: literal("time-is"),
43160
+ between: object({
43161
+ from: TimeSpecSchema,
43162
+ to: TimeSpecSchema
43163
+ }).optional(),
43164
+ days: array(WeekdayKeySchema).min(1).max(7).optional()
43165
+ }).superRefine((leaf, ctx) => {
43166
+ if (leaf.between === void 0 && leaf.days === void 0) ctx.addIssue({
43167
+ code: "custom",
43168
+ message: "a time-is leaf needs a between window, days, or both"
43169
+ });
43170
+ for (const end of ["from", "to"]) if (leaf.between?.[end].kind === "date") ctx.addIssue({
43171
+ code: "custom",
43172
+ message: "a one-date time cannot bound a daily window: use a clock time or a sun event",
43173
+ path: ["between", end]
43174
+ });
43175
+ });
43176
+ /**
43177
+ * True for the run that one of the named event leaves started. It reads the
43178
+ * run, not a device: in the tree it is judged against the leaf that fired, in
43179
+ * a step guard against the trigger the run carries. A run no event leaf
43180
+ * started (a state-only tree becoming true) is false.
43181
+ */
43182
+ var TriggeredByLeafSchema = object({
43183
+ kind: literal("triggered-by"),
43184
+ leafIds: array(string().regex(EVENT_LEAF_ID_RE)).min(1).max(20)
43185
+ });
43186
+ /**
43075
43187
  * The escape hatch: the bounded expression engine over named device bindings.
43076
43188
  * Declared as a plain object so a discriminated union can read `kind`; the
43077
43189
  * author-time validation is the SAME function `ExpressionSourceSchema` runs.
@@ -43117,7 +43229,9 @@ var AutomationWhenSchema = lazy(() => discriminatedUnion("kind", [
43117
43229
  StationaryLeafSchema,
43118
43230
  DeviceIsLeafSchema,
43119
43231
  StationaryPresentLeafSchema,
43120
- ExpressionLeafSchema
43232
+ ExpressionLeafSchema,
43233
+ TimeIsLeafSchema,
43234
+ TriggeredByLeafSchema
43121
43235
  ]));
43122
43236
  var EVENT_KINDS = new Set([
43123
43237
  "device-becomes",
@@ -43171,6 +43285,28 @@ function hasEventLeaves(node) {
43171
43285
  });
43172
43286
  return found;
43173
43287
  }
43288
+ /** The event leaves of the tree that carry an id, in tree order. */
43289
+ function identifiedEventLeaves(when) {
43290
+ const found = [];
43291
+ forEachLeaf(when, (leaf, path) => {
43292
+ if (isEventLeaf(leaf) && leaf.id !== void 0) found.push({
43293
+ id: leaf.id,
43294
+ path,
43295
+ leaf
43296
+ });
43297
+ });
43298
+ return found;
43299
+ }
43300
+ /** Does the tree hold a `triggered-by` leaf? */
43301
+ function hasTriggeredByLeaves(when) {
43302
+ let found = false;
43303
+ forEachLeaf(when, (leaf) => {
43304
+ if (leaf.kind === "triggered-by") found = true;
43305
+ });
43306
+ return found;
43307
+ }
43308
+ /** Why a `triggered-by` leaf is refused outside an automation: there is no trigger row to name. */
43309
+ var TRIGGERED_BY_NEEDS_AUTOMATION = "\"triggered by\" reads which trigger started an automation — an action or a scheduler has no trigger rows, so it could never be true here";
43174
43310
  function hasEmptyContainer(node) {
43175
43311
  if (isLeaf(node)) return false;
43176
43312
  if (node.kind === "not") return hasEmptyContainer(node.child);
@@ -43229,6 +43365,11 @@ function validateWhenTree(when) {
43229
43365
  if (depth > 4) return `the rules nest ${depth} levels deep — the limit is 4. "not (any of …)" is the same as "all of (not …)", which is one level shallower`;
43230
43366
  const leaves = countWhenLeaves(when);
43231
43367
  if (leaves > 32) return `the rules use ${leaves} rows — the limit is 32`;
43368
+ const seen = /* @__PURE__ */ new Set();
43369
+ for (const entry of identifiedEventLeaves(when)) {
43370
+ if (seen.has(entry.id)) return `two trigger rows share the id "${entry.id}" — an id names one row`;
43371
+ seen.add(entry.id);
43372
+ }
43232
43373
  const need = eventNeed(when, "when", false);
43233
43374
  if ("error" in need) return need.error;
43234
43375
  const [first, second] = need.paths;
@@ -43519,7 +43660,18 @@ var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).re
43519
43660
  message: "a domain target needs the vocabulary action it applies to (actionId)",
43520
43661
  path: ["actionId"]
43521
43662
  }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
43522
- var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
43663
+ /**
43664
+ * A step of a STANDALONE list (an action, a scheduler point, a preset): the
43665
+ * same two step kinds an automation runs, minus a guard that reads the
43666
+ * automation's trigger, which such a list does not have.
43667
+ */
43668
+ var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]).superRefine((step, ctx) => {
43669
+ if (step.if !== void 0 && hasTriggeredByLeaves(step.if)) ctx.addIssue({
43670
+ code: "custom",
43671
+ message: TRIGGERED_BY_NEEDS_AUTOMATION,
43672
+ path: ["if"]
43673
+ });
43674
+ });
43523
43675
  var AutomationActionSchema = discriminatedUnion("kind", [
43524
43676
  GuardedWaitStepSchema,
43525
43677
  GuardedCapStepSchema,
@@ -43616,6 +43768,11 @@ var STATIONARY_DESCRIPTIONS = {
43616
43768
  phase: "appeared or departed",
43617
43769
  entryId: "the stopped object"
43618
43770
  };
43771
+ var BECOMES_DESCRIPTIONS = {
43772
+ deviceId: "the device that changed",
43773
+ from: "the value before the change, empty when it is not known",
43774
+ to: "the value it changed to"
43775
+ };
43619
43776
  function describe$1(descriptions) {
43620
43777
  return Object.entries(descriptions).map(([name, description]) => ({
43621
43778
  name,
@@ -43624,6 +43781,10 @@ function describe$1(descriptions) {
43624
43781
  }
43625
43782
  describe$1(DETECTION_DESCRIPTIONS);
43626
43783
  describe$1(STATIONARY_DESCRIPTIONS);
43784
+ describe$1(BECOMES_DESCRIPTIONS).map((v) => v.name === "deviceId" ? {
43785
+ ...v,
43786
+ hintKey: "becomesDeviceId"
43787
+ } : v);
43627
43788
  new Set(Object.values(COCO_TO_MACRO.mapping));
43628
43789
  /**
43629
43790
  * Schedulers (D983) — an entity that performs actions over the day.
@@ -43648,6 +43809,13 @@ var SchedulerStateTreeSchema = AutomationWhenSchema.superRefine((when, ctx) => {
43648
43809
  });
43649
43810
  return;
43650
43811
  }
43812
+ if (hasTriggeredByLeaves(when)) {
43813
+ ctx.addIssue({
43814
+ code: "custom",
43815
+ message: TRIGGERED_BY_NEEDS_AUTOMATION
43816
+ });
43817
+ return;
43818
+ }
43651
43819
  const problem = validateWhenTree(when);
43652
43820
  if (problem !== null) ctx.addIssue({
43653
43821
  code: "custom",
@@ -43868,6 +44036,8 @@ var AutomationConditionTraceNodeSchema = object({
43868
44036
  "device-is",
43869
44037
  "expression",
43870
44038
  "stationary-present",
44039
+ "time-is",
44040
+ "triggered-by",
43871
44041
  "device-becomes",
43872
44042
  "device-event",
43873
44043
  "schedule",
@@ -44201,7 +44371,7 @@ object({
44201
44371
  * is irrelevant; the array is treated as a set by consumers. */
44202
44372
  hiddenChildIds: array(number$1()).readonly()
44203
44373
  });
44204
- DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
44374
+ DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Climate, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
44205
44375
  deviceId: number$1().int().nonnegative(),
44206
44376
  childDeviceId: number$1().int().nonnegative(),
44207
44377
  hidden: boolean()
@@ -46293,7 +46463,7 @@ var BatteryStatusSchema = object({
46293
46463
  */
46294
46464
  binary: boolean().optional().meta({ label: "Binary indicator" })
46295
46465
  });
46296
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter;
46466
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter;
46297
46467
  method(object({
46298
46468
  deviceId: number$1(),
46299
46469
  /** Bound on the wait. Sensible range 3000–10000ms. */
@@ -47716,7 +47886,7 @@ var ClimateControlStatusSchema = object({
47716
47886
  /** Ms epoch when the slice was last updated (push or command). */
47717
47887
  lastFetchedAt: number$1()
47718
47888
  });
47719
- DeviceType.Thermostat, DeviceType.Climate, method(object({
47889
+ DeviceType.Climate, method(object({
47720
47890
  deviceId: number$1().int().nonnegative(),
47721
47891
  mode: HvacModeSchema
47722
47892
  }), _void(), {
@@ -48007,6 +48177,7 @@ var CompositionProblemSchema = object({
48007
48177
  "nested-field",
48008
48178
  "missing-field",
48009
48179
  "kind-mismatch",
48180
+ "source-kind-mismatch",
48010
48181
  "may-be-null",
48011
48182
  "source-missing",
48012
48183
  "source-unreadable",
@@ -48028,7 +48199,8 @@ var CompositionProblemSchema = object({
48028
48199
  "command-method-unknown",
48029
48200
  "command-source-unknown",
48030
48201
  "command-input-unknown",
48031
- "command-input-missing"
48202
+ "command-input-missing",
48203
+ "power-source-is-actuator"
48032
48204
  ]),
48033
48205
  path: string(),
48034
48206
  message: string()
@@ -48839,7 +49011,7 @@ DeviceType.MediaPlayer, optionalMethod(deviceOnly, _void(), {
48839
49011
  kind: "mutation",
48840
49012
  auth: "protected"
48841
49013
  });
48842
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, 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.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Heater, 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.Thermostat, DeviceType.PetFeeder, DeviceType.Heater, DeviceType.MediaPlayer;
49014
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, 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.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, 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;
48843
49015
  var NUMBER = {
48844
49016
  kind: "fixed",
48845
49017
  result: ["number"]
@@ -48922,7 +49094,7 @@ function numeric(input) {
48922
49094
  }, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
48923
49095
  };
48924
49096
  }
48925
- var CLIMATE_DEVICES = [DeviceType.Thermostat, DeviceType.Climate];
49097
+ var CLIMATE_DEVICES = [DeviceType.Climate];
48926
49098
  function binary(input) {
48927
49099
  return {
48928
49100
  ...input,
@@ -49244,8 +49416,8 @@ var GROUP_TEMPLATES = [
49244
49416
  actuator({
49245
49417
  id: "climate",
49246
49418
  summary: "Running when at least one thermostat or air conditioner is not off, or only when all of them are. Target temperature and fan are offered only when every device has them. A device that reports nothing is left out, never read as off.",
49247
- deviceType: DeviceType.Thermostat,
49248
- memberDeviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
49419
+ deviceType: DeviceType.Climate,
49420
+ memberDeviceTypes: [DeviceType.Climate],
49249
49421
  outputCap: "group-active",
49250
49422
  outputField: "active",
49251
49423
  member: {
@@ -49288,6 +49460,50 @@ function actuator(input) {
49288
49460
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
49289
49461
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
49290
49462
  DeviceType.Camera;
49463
+ var PowerSourceRefusalReasonSchema = _enum([
49464
+ "no-power-source",
49465
+ "switch-missing",
49466
+ "switch-offline",
49467
+ "switch-unknown",
49468
+ "restart-in-progress",
49469
+ "switch-call-failed",
49470
+ "switch-is-actuator"
49471
+ ]);
49472
+ var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
49473
+ accepted: literal(false),
49474
+ reason: PowerSourceRefusalReasonSchema,
49475
+ /** One line for the operator, naming the switch. */
49476
+ message: string()
49477
+ })]);
49478
+ var PowerSourceInfoSchema = object({
49479
+ /** False when the device has no power source linked; the rest is then empty. */
49480
+ linked: boolean(),
49481
+ switchDeviceId: number$1().nullable(),
49482
+ switchName: string().nullable(),
49483
+ /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
49484
+ switchOn: boolean().nullable(),
49485
+ switchOnline: boolean().nullable(),
49486
+ restartInProgress: boolean(),
49487
+ offSeconds: number$1().int()
49488
+ });
49489
+ object({
49490
+ /** Null while the switch has not reported: unknown is never `false` (D393). */
49491
+ switchOn: boolean().nullable(),
49492
+ offSeconds: number$1().int(),
49493
+ lastFetchedAt: number$1()
49494
+ });
49495
+ 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;
49496
+ var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
49497
+ systemMethod(deviceInput$2, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
49498
+ kind: "mutation",
49499
+ auth: "protected"
49500
+ }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
49501
+ kind: "mutation",
49502
+ auth: "protected"
49503
+ }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
49504
+ kind: "mutation",
49505
+ auth: "protected"
49506
+ });
49291
49507
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
49292
49508
  /**
49293
49509
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -51633,8 +51849,14 @@ method(object({
51633
51849
  "string",
51634
51850
  "number",
51635
51851
  "boolean",
51636
- "enum"
51852
+ "enum",
51853
+ "union"
51637
51854
  ]),
51855
+ unionMembers: array(_enum([
51856
+ "string",
51857
+ "number",
51858
+ "boolean"
51859
+ ])).optional(),
51638
51860
  enumValues: array(string()).optional(),
51639
51861
  item: boolean().optional(),
51640
51862
  quantity: ReadingQuantitySchema.optional()
@@ -54012,8 +54234,85 @@ method(_void(), array(FailureContributionSchema).readonly());
54012
54234
  * - `FanPreset` — preset selector
54013
54235
  * - `FanDirection` — direction toggle (ceiling fans)
54014
54236
  * - `FanOscillating` — oscillation toggle
54237
+ *
54238
+ * Per-axis oscillation (`oscillationAxes`, `setOscillationAxis`, D1034): an air
54239
+ * circulator sweeps horizontally and vertically, each axis with its own
54240
+ * switch, fixed angle, sweep bounds and limits. A provider may report them
54241
+ * natively; otherwise the OPERATOR links sibling devices to each field in
54242
+ * Customize (a `replace` over the fields listed in `overridable` — nothing is
54243
+ * linked or inferred by itself), and a write to a linked field is forwarded to
54244
+ * its source. `oscillating` stays the single summary flag: when axes exist it
54245
+ * means "any axis oscillates" (`anyAxisOscillating`).
54015
54246
  */
54016
54247
  var FanDirectionSchema = _enum(["forward", "reverse"]);
54248
+ var FAN_OSCILLATION_AXES = ["horizontal", "vertical"];
54249
+ var FanOscillationAxisNameSchema = _enum(FAN_OSCILLATION_AXES);
54250
+ var FanOscillationAxisFieldSchema = _enum([
54251
+ "oscillating",
54252
+ "angle",
54253
+ "sweepFrom",
54254
+ "sweepTo"
54255
+ ]);
54256
+ /** The limits of one axis, read from the source that serves its angle. */
54257
+ var FAN_OSCILLATION_AXIS_LIMITS = [
54258
+ "min",
54259
+ "max",
54260
+ "step"
54261
+ ];
54262
+ /**
54263
+ * One oscillation axis. Every reading the device has not reported is `null`,
54264
+ * never `0` (D393): `0°` is a real position. Each leaf defaults to `null`, so
54265
+ * a slice that names only the leaves it knows (a Customize link of one field)
54266
+ * is still a whole axis.
54267
+ */
54268
+ var FanOscillationAxisSchema = object({
54269
+ /** Whether the axis sweeps. */
54270
+ oscillating: boolean().nullable().default(null),
54271
+ /** The fixed position (degrees) the axis holds when it does not sweep. */
54272
+ angle: number$1().nullable().default(null),
54273
+ /** The sweep bounds (degrees): left → right, bottom → top. */
54274
+ sweepFrom: number$1().nullable().default(null),
54275
+ sweepTo: number$1().nullable().default(null),
54276
+ /** The angles the axis accepts. Null when the device states none. */
54277
+ min: number$1().nullable().default(null),
54278
+ max: number$1().nullable().default(null),
54279
+ step: number$1().nullable().default(null)
54280
+ });
54281
+ /** Both axes; an axis the device does not have is `null`. */
54282
+ var FanOscillationAxesSchema = object({
54283
+ horizontal: FanOscillationAxisSchema.nullable().default(null),
54284
+ vertical: FanOscillationAxisSchema.nullable().default(null)
54285
+ });
54286
+ var FanOscillationAxisRefusalSchema = _enum([
54287
+ "nothing-to-set",
54288
+ "axis-not-linked",
54289
+ "out-of-range",
54290
+ "source-gone",
54291
+ "source-unknown",
54292
+ "source-call-failed"
54293
+ ]);
54294
+ var FanOscillationAxisResultSchema = discriminatedUnion("status", [object({ status: literal("applied") }), object({
54295
+ status: literal("refused"),
54296
+ reason: FanOscillationAxisRefusalSchema,
54297
+ /** The field at fault, when one is. */
54298
+ field: FanOscillationAxisFieldSchema.optional(),
54299
+ /** One line for the operator, naming the axis, the field and the source. */
54300
+ detail: string(),
54301
+ /** Fields that DID land before the refusal (writes run in order, stop at the first failure). */
54302
+ applied: array(FanOscillationAxisFieldSchema)
54303
+ })]);
54304
+ var SetOscillationAxisInputSchema = object({
54305
+ deviceId: number$1().int().nonnegative(),
54306
+ axis: FanOscillationAxisNameSchema,
54307
+ oscillating: boolean().optional(),
54308
+ angle: number$1().optional(),
54309
+ sweepFrom: number$1().optional(),
54310
+ sweepTo: number$1().optional()
54311
+ });
54312
+ /** The state path of one axis field: `oscillationAxes.<axis>.<field>`. */
54313
+ function fanAxisPath(axis, field) {
54314
+ return `oscillationAxes.${axis}.${field}`;
54315
+ }
54017
54316
  var FanControlStatusSchema = object({
54018
54317
  /** Active speed as 0..100 inclusive. Null when the device has no
54019
54318
  * speed surface (single-speed fan). */
@@ -54032,9 +54331,91 @@ var FanControlStatusSchema = object({
54032
54331
  /** Oscillation toggle. Null when the device has no oscillation
54033
54332
  * surface. */
54034
54333
  oscillating: boolean().nullable(),
54334
+ /**
54335
+ * Per-axis oscillation (air circulators). Absent when the device has no
54336
+ * per-axis surface and nothing is linked in Customize.
54337
+ */
54338
+ oscillationAxes: FanOscillationAxesSchema.optional(),
54035
54339
  /** Ms epoch when the slice was last updated. */
54036
54340
  lastChangedAt: number$1()
54037
54341
  });
54342
+ var FAN_CUSTOMIZE_DEVICE_TYPES = [DeviceType.Fan];
54343
+ /** The Customize section the axis targets are listed under. */
54344
+ var AXES_SECTION = "oscillation-axes";
54345
+ function axisOscillatingTarget(axis) {
54346
+ return {
54347
+ id: `${axis}-oscillating`,
54348
+ cardinality: "scalar",
54349
+ vocabulary: {
54350
+ cap: "fan-control",
54351
+ stateField: "oscillating"
54352
+ },
54353
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
54354
+ apply: "replace",
54355
+ section: AXES_SECTION,
54356
+ path: fanAxisPath(axis, "oscillating"),
54357
+ sources: [{
54358
+ kind: "switch",
54359
+ transforms: [{ kind: "identity" }]
54360
+ }],
54361
+ sourceReport: { status: "assignment-status" }
54362
+ };
54363
+ }
54364
+ /**
54365
+ * A numeric axis field. The `angle` link also carries the axis limits, read
54366
+ * from the SAME linked control's own range (`min`/`max`/`step`), so the limits
54367
+ * are the source's, never guessed.
54368
+ */
54369
+ function axisNumericTarget(axis, field) {
54370
+ const base = {
54371
+ id: `${axis}-${field}`,
54372
+ cardinality: "scalar",
54373
+ vocabulary: { cap: "fan-control" },
54374
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
54375
+ apply: "replace",
54376
+ section: AXES_SECTION,
54377
+ path: fanAxisPath(axis, field),
54378
+ sources: [{
54379
+ kind: "numeric",
54380
+ transforms: [{ kind: "identity" }]
54381
+ }],
54382
+ sourceReport: { status: "assignment-status" }
54383
+ };
54384
+ if (field !== "angle") return base;
54385
+ return {
54386
+ ...base,
54387
+ companions: FAN_OSCILLATION_AXIS_LIMITS.map((limit) => ({
54388
+ kind: "source-field",
54389
+ path: fanAxisPath(axis, limit),
54390
+ field: limit
54391
+ }))
54392
+ };
54393
+ }
54394
+ var AXIS_TARGETS = FAN_OSCILLATION_AXES.flatMap((axis) => [
54395
+ axisOscillatingTarget(axis),
54396
+ axisNumericTarget(axis, "angle"),
54397
+ axisNumericTarget(axis, "sweepFrom"),
54398
+ axisNumericTarget(axis, "sweepTo")
54399
+ ]);
54400
+ /** A select (an enum control) the operator links to the fan's `preset`. */
54401
+ var PRESET_TARGET = {
54402
+ id: "preset",
54403
+ cardinality: "scalar",
54404
+ vocabulary: { cap: "fan-control" },
54405
+ deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
54406
+ apply: "replace",
54407
+ path: "preset",
54408
+ sources: [{
54409
+ kind: "field",
54410
+ valueKinds: ["string"],
54411
+ transforms: [{ kind: "identity" }]
54412
+ }],
54413
+ sourceReport: { status: "assignment-status" }
54414
+ };
54415
+ [...AXIS_TARGETS, PRESET_TARGET].map((target) => ({
54416
+ path: target.path,
54417
+ by: target.id
54418
+ }));
54038
54419
  DeviceType.Fan, optionalMethod(object({
54039
54420
  deviceId: number$1().int().nonnegative(),
54040
54421
  speed: number$1().min(0).max(100)
@@ -54059,17 +54440,37 @@ DeviceType.Fan, optionalMethod(object({
54059
54440
  }), _void(), {
54060
54441
  kind: "mutation",
54061
54442
  auth: "protected"
54443
+ }), optionalMethod(SetOscillationAxisInputSchema, FanOscillationAxisResultSchema, {
54444
+ kind: "mutation",
54445
+ auth: "protected"
54446
+ });
54447
+ /** One axis as a preset wants it; an absent field is left as it is. */
54448
+ var FanPresetAxisSchema = object({
54449
+ oscillating: boolean().optional(),
54450
+ angle: number$1().optional(),
54451
+ sweepFrom: number$1().optional(),
54452
+ sweepTo: number$1().optional()
54453
+ });
54454
+ /** The fan-control state a preset sets; an absent field is left as it is. */
54455
+ var FanPresetStateSchema = object({
54456
+ speed: number$1().min(0).max(100).optional(),
54457
+ /** The fan's own preset mode (or the linked select's option). */
54458
+ preset: string().min(1).optional(),
54459
+ direction: FanDirectionSchema.optional(),
54460
+ oscillationAxes: object({
54461
+ horizontal: FanPresetAxisSchema.optional(),
54462
+ vertical: FanPresetAxisSchema.optional()
54463
+ }).optional()
54062
54464
  });
54063
54465
  var FanPresetSchema = object({
54064
54466
  /** Stable key; never reused after a delete within one device's list. */
54065
54467
  id: string().min(1).max(64),
54066
54468
  /** What the operator and a voice assistant call it. */
54067
54469
  name: string().trim().min(1).max(40),
54068
- steps: array(ActionStepSchema).min(1).max(20)
54470
+ state: FanPresetStateSchema
54069
54471
  });
54070
54472
  var FanPresetsRefusalSchema = _enum([
54071
- "not-sibling",
54072
- "bad-target",
54473
+ "empty-state",
54073
54474
  "duplicate-name",
54074
54475
  "duplicate-id",
54075
54476
  "too-many",
@@ -54081,72 +54482,55 @@ var FanPresetsSetResultSchema = discriminatedUnion("status", [object({
54081
54482
  }), object({
54082
54483
  status: literal("refused"),
54083
54484
  reason: FanPresetsRefusalSchema,
54084
- /** Names the preset and step at fault. */
54485
+ /** Names the preset at fault. */
54085
54486
  detail: string()
54086
54487
  })]);
54087
- var FanPresetStepResultSchema = object({
54088
- index: number$1().int().nonnegative(),
54488
+ var FanPresetFieldResultSchema = object({
54489
+ /** The state path: `speed`, `preset`, `direction`, `oscillationAxes.horizontal.angle`. */
54490
+ field: string(),
54089
54491
  outcome: _enum([
54090
54492
  "applied",
54091
54493
  "failed",
54092
54494
  "not-run",
54093
54495
  "refused"
54094
54496
  ]),
54095
- deviceId: number$1().int().nonnegative().optional(),
54096
- cap: string().optional(),
54097
- method: string().optional(),
54098
54497
  /** The cause, for every outcome but `applied`. */
54099
54498
  message: string().optional()
54100
54499
  });
54101
54500
  var FanPresetApplyResultSchema = object({
54102
- /** `applied`: every step ran. `partial`: some ran, one failed. `refused`: nothing ran. */
54501
+ /** `applied`: every field landed. `partial`: some did, one did not. `refused`: nothing ran. */
54103
54502
  status: _enum([
54104
54503
  "applied",
54105
54504
  "partial",
54106
54505
  "refused"
54107
54506
  ]),
54108
- steps: array(FanPresetStepResultSchema)
54507
+ fields: array(FanPresetFieldResultSchema)
54109
54508
  });
54110
54509
  var FanCaptureFieldSchema = _enum([
54111
54510
  "speed",
54112
- "oscillating",
54113
54511
  "direction",
54114
- "preset"
54512
+ "preset",
54513
+ "oscillationAxes"
54115
54514
  ]);
54116
- var FanCaptureOmissionSchema = object({
54117
- /** A fan field (`speed`) or `step <n>` for a sibling step. */
54118
- what: string(),
54119
- /** Why no value was taken: unknown reading (never stored as 0, D393), or a step that cannot be read. */
54120
- reason: string()
54121
- });
54122
- var FanCaptureItemSchema = object({
54123
- group: _enum([
54124
- "fan",
54125
- "oscillation",
54126
- "angles"
54127
- ]),
54128
- /** What the step sets, in the operator's words (a device name, a fan field). */
54129
- label: string()
54130
- });
54131
54515
  var FanPresetCaptureResultSchema = object({
54132
- /** The steps filled from the device's current values; NOT saved. */
54133
- steps: array(ActionStepSchema),
54134
- /** One entry per step, same order: its review group and label. */
54135
- items: array(FanCaptureItemSchema),
54136
- omitted: array(FanCaptureOmissionSchema)
54516
+ /** The fan's CURRENT fan-control state, as a preset; NOT saved. */
54517
+ state: FanPresetStateSchema,
54518
+ omitted: array(object({
54519
+ /** A state path (`speed`, `oscillationAxes.vertical.angle`). */
54520
+ what: string(),
54521
+ /** Why no value was taken: an unknown reading is never stored as 0 (D393). */
54522
+ reason: string()
54523
+ }))
54137
54524
  });
54138
- var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
54525
+ var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
54139
54526
  DeviceType.Fan;
54140
- method(deviceInput$2, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$2.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
54527
+ method(deviceInput$1, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$1.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
54141
54528
  kind: "mutation",
54142
54529
  auth: "admin"
54143
- }), method(deviceInput$2.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
54530
+ }), method(deviceInput$1.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
54144
54531
  kind: "mutation",
54145
54532
  auth: "protected"
54146
- }), method(deviceInput$2.extend({
54147
- fields: array(FanCaptureFieldSchema).optional(),
54148
- steps: array(ActionStepSchema).max(20).default([])
54149
- }), FanPresetCaptureResultSchema, { auth: "protected" });
54533
+ }), method(deviceInput$1.extend({ fields: array(FanCaptureFieldSchema).optional() }), FanPresetCaptureResultSchema, { auth: "protected" });
54150
54534
  /**
54151
54535
  * Per-device feature/identity probe slice. Holds the runtime-resolved
54152
54536
  * truth about what a device CAN do — which the kernel uses to:
@@ -54270,7 +54654,7 @@ var GroupActiveSchema = object({
54270
54654
  /** Ms epoch when the slice was last updated. */
54271
54655
  lastChangedAt: number$1()
54272
54656
  });
54273
- DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate, DeviceType.Thermostat;
54657
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
54274
54658
  var GroupCommandsSchema = object({
54275
54659
  /** One row per member that has been commanded. A later command replaces that member's row. */
54276
54660
  results: array(object({
@@ -54282,7 +54666,7 @@ results: array(object({
54282
54666
  /** Ms epoch of the attempt. */
54283
54667
  at: number$1()
54284
54668
  })) });
54285
- DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
54669
+ DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
54286
54670
  /**
54287
54671
  * How many members of a helper group answered (D944). Counts are integers,
54288
54672
  * not measurements: zero included is a real count, never a stand-in reading.
@@ -54306,7 +54690,7 @@ var GroupStatusSchema = object({
54306
54690
  label: "Members"
54307
54691
  }))
54308
54692
  });
54309
- DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Thermostat, DeviceType.Climate;
54693
+ DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
54310
54694
  /**
54311
54695
  * Heat pump settable surface (D1026): one typed method per parameter, never a
54312
54696
  * generic `set(key, value)`. The values a mode takes and the limits of a number
@@ -54514,7 +54898,7 @@ var HeatingValveStatusSchema = object({
54514
54898
  /** Ms epoch when the slice was last updated (push or poll). */
54515
54899
  lastFetchedAt: number$1()
54516
54900
  });
54517
- DeviceType.Thermostat;
54901
+ DeviceType.Climate;
54518
54902
  /**
54519
54903
  * timed-run - run a device for a chosen time, then stop it (D993).
54520
54904
  *
@@ -54530,13 +54914,13 @@ DeviceType.Thermostat;
54530
54914
  * retried in a loop - D49); a future one is re-armed.
54531
54915
  *
54532
54916
  * What a device may be run for, and for how long at most, is per device type
54533
- * ({@link TIMED_RUN_LIMITS}): the maximum is a safety bound, not a preference,
54917
+ * and role ({@link timedRunLimitOf}): the maximum is a safety bound, not a preference,
54534
54918
  * so a request above it is REFUSED with a typed reason, never clamped.
54535
54919
  */
54536
54920
  var TimedRunUnitSchema = _enum(["s", "min"]);
54537
54921
  _enum(["switch", "pet-fountain"]);
54538
- DeviceType.Heater, DeviceType.PetFountain;
54539
- DeviceType.Heater, DeviceType.PetFountain;
54922
+ DeviceType.Switch, DeviceType.PetFountain;
54923
+ DeviceType.Switch, DeviceRole.SwitchHeater;
54540
54924
  /** One duration, as the one-tap run asks for it. */
54541
54925
  var TimedRunQuickRunSchema = object({
54542
54926
  duration: number$1().positive().finite(),
@@ -54708,8 +55092,8 @@ var HeroSceneSchema = object({
54708
55092
  /** 0..1: volume, cover position, cycle progress. */
54709
55093
  level: number$1().min(0).max(1).nullable()
54710
55094
  });
54711
- DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
54712
- 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.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;
55095
+ DeviceType.Camera, DeviceType.Hub, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
55096
+ 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.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;
54713
55097
  /** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
54714
55098
  var HeroTextSchema = object({
54715
55099
  en: string(),
@@ -55094,8 +55478,8 @@ var HeroRowModelSchema = object({
55094
55478
  extras: array(HeroControlSchema).max(2).optional(),
55095
55479
  trailing: HeroFactSchema.nullable()
55096
55480
  });
55097
- DeviceType.Climate, DeviceType.Thermostat;
55098
- DeviceType.Climate, DeviceType.Thermostat, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer;
55481
+ DeviceType.Climate;
55482
+ DeviceType.Climate, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer;
55099
55483
  /**
55100
55484
  * hero-layout — what a device's hero says (D1023). Read-only: the FIXED
55101
55485
  * layouts live in `@camstack/types` and nothing here stores or edits one.
@@ -55127,7 +55511,10 @@ method(heroInput, HeroModelSchema.nullable(), {
55127
55511
  }), method(rowModelsInput, array(HeroRowModelSchema.nullable()), {
55128
55512
  auth: "protected",
55129
55513
  role: "viewer"
55130
- }), method(object({ deviceType: string() }), HeroLayoutRowsSchema, {
55514
+ }), method(object({
55515
+ deviceType: string(),
55516
+ role: string().nullable().optional()
55517
+ }), HeroLayoutRowsSchema, {
55131
55518
  auth: "protected",
55132
55519
  role: "viewer"
55133
55520
  });
@@ -55204,7 +55591,7 @@ var HumiditySensorStatusSchema = object({
55204
55591
  /** Ms epoch when the slice was last updated. */
55205
55592
  lastFetchedAt: number$1()
55206
55593
  });
55207
- DeviceType.Sensor, DeviceType.Thermostat;
55594
+ DeviceType.Sensor, DeviceType.Climate;
55208
55595
  /**
55209
55596
  * Image display cap. Models a single still image exposed by an integration —
55210
55597
  * a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
@@ -69446,7 +69833,6 @@ object({
69446
69833
  DeviceType.Light,
69447
69834
  DeviceType.Fan,
69448
69835
  DeviceType.Climate,
69449
- DeviceType.Thermostat,
69450
69836
  DeviceType.Humidifier,
69451
69837
  DeviceType.WaterHeater,
69452
69838
  DeviceType.MediaPlayer,
@@ -69455,52 +69841,8 @@ object({
69455
69841
  DeviceType.Dishwasher,
69456
69842
  DeviceType.Vacuum,
69457
69843
  DeviceType.LawnMower,
69458
- DeviceType.PetFeeder,
69459
- DeviceType.Heater
69844
+ DeviceType.PetFeeder
69460
69845
  ].filter((type) => type !== DeviceType.Sensor);
69461
- var PowerSourceRefusalReasonSchema = _enum([
69462
- "no-power-source",
69463
- "switch-missing",
69464
- "switch-offline",
69465
- "switch-unknown",
69466
- "restart-in-progress",
69467
- "switch-call-failed"
69468
- ]);
69469
- var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
69470
- accepted: literal(false),
69471
- reason: PowerSourceRefusalReasonSchema,
69472
- /** One line for the operator, naming the switch. */
69473
- message: string()
69474
- })]);
69475
- var PowerSourceInfoSchema = object({
69476
- /** False when the device has no power source linked; the rest is then empty. */
69477
- linked: boolean(),
69478
- switchDeviceId: number$1().nullable(),
69479
- switchName: string().nullable(),
69480
- /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
69481
- switchOn: boolean().nullable(),
69482
- switchOnline: boolean().nullable(),
69483
- restartInProgress: boolean(),
69484
- offSeconds: number$1().int()
69485
- });
69486
- object({
69487
- /** Null while the switch has not reported: unknown is never `false` (D393). */
69488
- switchOn: boolean().nullable(),
69489
- offSeconds: number$1().int(),
69490
- lastFetchedAt: number$1()
69491
- });
69492
- 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;
69493
- var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
69494
- systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
69495
- kind: "mutation",
69496
- auth: "protected"
69497
- }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
69498
- kind: "mutation",
69499
- auth: "protected"
69500
- }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
69501
- kind: "mutation",
69502
- auth: "protected"
69503
- });
69504
69846
  /**
69505
69847
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
69506
69848
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -72628,7 +72970,7 @@ object({
72628
72970
  phase: string().nullable()
72629
72971
  });
72630
72972
  Object.values(DeviceType);
72631
- DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder, DeviceType.Heater;
72973
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder;
72632
72974
  /**
72633
72975
  * scene-monitor — device-scoped reference-region state cap. An operator marks
72634
72976
  * a rect ROI on a camera frame and names one or more states; the engine
@@ -74322,7 +74664,7 @@ object({
74322
74664
  /** Ms epoch of the last state change. Useful for UI "X minutes ago". */
74323
74665
  lastChangedAt: number$1()
74324
74666
  });
74325
- DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Heater, method(object({
74667
+ DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
74326
74668
  deviceId: number$1(),
74327
74669
  on: boolean()
74328
74670
  }), _void(), {
@@ -74947,7 +75289,7 @@ var TemperatureSensorStatusSchema = object({
74947
75289
  /** Ms epoch when the slice was last updated (push or poll). */
74948
75290
  lastFetchedAt: number$1()
74949
75291
  });
74950
- DeviceType.Sensor, DeviceType.Thermostat;
75292
+ DeviceType.Sensor, DeviceType.Climate;
74951
75293
  var TemplateKindSchema = _enum(["remote"]);
74952
75294
  /**
74953
75295
  * template — the generic store of reusable, named operator data (D963). A
@@ -77504,7 +77846,9 @@ var AccessoryKind = {
77504
77846
  };
77505
77847
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
77506
77848
  DeviceType.HeatPump;
77507
- DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, 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.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
77849
+ DeviceType.Climate;
77850
+ DeviceRole.ClimateThermostat, DeviceRole.ClimateAc, DeviceRole.ClimateRadiator, DeviceRole.ClimateFloor, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit;
77851
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Camera, DeviceType.Hub, 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.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
77508
77852
  new Set(Object.values(DeviceType));
77509
77853
  /** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
77510
77854
  function contribution(cap, schema, build) {
@@ -79510,7 +79854,7 @@ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pu
79510
79854
  ...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
79511
79855
  ...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
79512
79856
  ];
79513
- DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
79857
+ DeviceType.Camera, DeviceType.Hub, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
79514
79858
  /**
79515
79859
  * Who looks like what (D1023). One look per {@link DeviceType}, refined by a
79516
79860
  * {@link DeviceRole} where the role changes how the device reads (a leak
@@ -80154,9 +80498,9 @@ lookOf({
80154
80498
  idle: INFO,
80155
80499
  standby: MUTED
80156
80500
  });
80157
- DeviceType.Climate, DeviceType.Thermostat;
80158
- DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Heater, DeviceType.Dryer, DeviceType.Gateway;
80159
- 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.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;
80501
+ DeviceType.Climate;
80502
+ DeviceType.Camera, DeviceType.Hub, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
80503
+ 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.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;
80160
80504
  Object.freeze({
80161
80505
  "accessories.getStatus": {
80162
80506
  capName: "accessories",
@@ -83553,6 +83897,13 @@ Object.freeze({
83553
83897
  access: "create",
83554
83898
  role: "viewer"
83555
83899
  },
83900
+ "fanControl.setOscillationAxis": {
83901
+ capName: "fan-control",
83902
+ capScope: "device",
83903
+ addonId: null,
83904
+ access: "create",
83905
+ role: "viewer"
83906
+ },
83556
83907
  "fanControl.setPercentage": {
83557
83908
  capName: "fan-control",
83558
83909
  capScope: "device",
@@ -90574,7 +90925,7 @@ function projectAction(cap, action) {
90574
90925
  };
90575
90926
  }
90576
90927
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
90577
- DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
90928
+ DeviceType.Camera, DeviceType.Hub, 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.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
90578
90929
  DeviceFeature.BatteryOperated;
90579
90930
  function bound(cap, methods = [], authority = "reported") {
90580
90931
  return {
@@ -91626,6 +91977,11 @@ Object.freeze({
91626
91977
  form: "single",
91627
91978
  optional: false
91628
91979
  }],
91980
+ "fanControl.setOscillationAxis": [{
91981
+ name: "deviceId",
91982
+ form: "single",
91983
+ optional: false
91984
+ }],
91629
91985
  "fanControl.setPercentage": [{
91630
91986
  name: "deviceId",
91631
91987
  form: "single",
@@ -95087,7 +95443,7 @@ var AdminUIAddon = class extends BaseAddon {
95087
95443
  capability: adminUiCapability,
95088
95444
  provider: {
95089
95445
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
95090
- getVersion: async () => ({ version: "1.2.643" })
95446
+ getVersion: async () => ({ version: "1.2.645" })
95091
95447
  }
95092
95448
  }];
95093
95449
  }