@camstack/addon-admin-ui 1.2.644 → 1.2.646
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/assets/Addons-XDq92kO2.js +5 -0
- package/dist/assets/{AdminPage-DBIlGQcg.js → AdminPage-Bdna98Ou.js} +1 -1
- package/dist/assets/AdminSectionedPage-BReYGJXb.js +1 -0
- package/dist/assets/AiProfiles-Bw8hGoO0.js +3 -0
- package/dist/assets/{BootstrapSettingsForm-B4JdtXuz.js → BootstrapSettingsForm-c18LdxYs.js} +1 -1
- package/dist/assets/Build-48zeU1Yw.js +40 -0
- package/dist/assets/{Calendars-C7qfbr7A.js → Calendars-B2Wez_3o.js} +1 -1
- package/dist/assets/{CameraGrids-mWpZKvQ5.js → CameraGrids-BpGte0K0.js} +1 -1
- package/dist/assets/Cluster-CAB19PAX.js +1 -0
- package/dist/assets/CompositionBlockEditor-BN5J817G.js +2 -0
- package/dist/assets/{CompositionEditorPage-D2-woXyS.js → CompositionEditorPage-7ta40LxI.js} +1 -1
- package/dist/assets/Data-C_ebBdlu.js +2 -0
- package/dist/assets/DeviceDetail-GEBcTe6R.js +2 -0
- package/dist/assets/{Devices-CWvTKpnT.js → Devices-C42wiSOq.js} +1 -1
- package/dist/assets/{EmbedDevicePage-CvbzEbvN.js → EmbedDevicePage-SFb5MyT-.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-MuC48n-_.js → EmbedPlayerPage-DUcN1y4L.js} +1 -1
- package/dist/assets/History-B1fPhKG2.js +1 -0
- package/dist/assets/Identity-Bp3HGCWd.js +1 -0
- package/dist/assets/InstancesTable-BGtfLCCP.js +1 -0
- package/dist/assets/IntegrationDetail-CMMQieRt.js +1 -0
- package/dist/assets/IntegrationWizard-BaM2i4NA.js +1 -0
- package/dist/assets/Integrations-Cx2N6swv.js +2 -0
- package/dist/assets/Integrations-GPlT8cKN.js +1 -0
- package/dist/assets/Library-Bz4-Eas4.js +1 -0
- package/dist/assets/Locations-DmfVYXMw.js +3 -0
- package/dist/assets/Logs-CIvaD3Yw.js +1 -0
- package/dist/assets/{MaskShapeCanvas-j1uA0PkL.js → MaskShapeCanvas-niZe5zHf.js} +1 -1
- package/dist/assets/{MotionZonesSettings-0iA5mYRg.js → MotionZonesSettings-Dsi2Uff2.js} +1 -1
- package/dist/assets/MyAccess-D7pNURUg.js +2 -0
- package/dist/assets/Network-B7ImKtCW.js +1 -0
- package/dist/assets/NodeAddonsSettingsPanel-B1FzoINc.js +2 -0
- package/dist/assets/Notifications-BHBA5V_j.js +1 -0
- package/dist/assets/Pipeline-DIMjhsfr.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-BLOdiPL9.js → PrivacyMaskSettings-CwxOqudr.js} +1 -1
- package/dist/assets/Recordings-DULk3APi.js +1 -0
- package/dist/assets/{RemoteGrid-DdvsdB_y.js → RemoteGrid-B9MFH8gq.js} +1 -1
- package/dist/assets/{ScanSubnetEditor-BCfqLZIA.js → ScanSubnetEditor-ChB1ff9j.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-Cy11U5pJ.js → SceneMonitorEditor-DjbQscIc.js} +1 -1
- package/dist/assets/SessionsList-GQ9o6e6I.js +2 -0
- package/dist/assets/{Showroom-CDNZCmQ9.js → Showroom-B4IQCR63.js} +1 -1
- package/dist/assets/StorageLocationsTable-51VLoqz4.js +1 -0
- package/dist/assets/{System-CKbbRmxa.js → System-DMGCcspI.js} +1 -1
- package/dist/assets/{Templates-BQW0A24V.js → Templates-DWije3Aq.js} +1 -1
- package/dist/assets/{Terminal-CflJDBLw.js → Terminal-D20GDY9B.js} +5 -5
- package/dist/assets/{TrainingProviders--io-U4Mx.js → TrainingProviders-BHjFCr-v.js} +1 -1
- package/dist/assets/{Viewer-z_gjByXA.js → Viewer-DBUCXKwT.js} +1 -1
- package/dist/assets/{__vite-browser-external-BCAtXlNQ.js → __vite-browser-external-B6QEsNSJ.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CMJDSqwo.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CgTKovwO.js} +1 -1
- package/dist/assets/{action-draft-Dg61GkLS.js → action-draft-BGdFoh4X.js} +1 -1
- package/dist/assets/{ai-page.helpers-QIeUykiQ.js → ai-page.helpers-WItq2Zfb.js} +1 -1
- package/dist/assets/{assignment-candidates-CwKJ2Z54.js → assignment-candidates-BP248h74.js} +1 -1
- package/dist/assets/{authed-media-BkzUgfxS.js → authed-media-BbpEDtXm.js} +1 -1
- package/dist/assets/{board-model-K39WWIgs.js → board-model-v3Qi2ADW.js} +1 -1
- package/dist/assets/client-CqZcg6J1.js +1057 -0
- package/dist/assets/command-vocab-kJ1oxCcS.js +1 -0
- package/dist/assets/create-composition-fA2f0nzR.js +1 -0
- package/dist/assets/device-detail-9hSNMll_.js +1 -0
- package/dist/assets/{device-integration-icon-TWc3Gi9v.js → device-integration-icon-Cyu0nfTA.js} +1 -1
- package/dist/assets/device-picker-model-CtTFN_cS.js +1 -0
- package/dist/assets/{dist-B8qwp9-f.js → dist-C25WO9pF.js} +1 -1
- package/dist/assets/dist-CYAeZRwB.js +1057 -0
- package/dist/assets/{format-hVW7RBVv.js → format-D-8gnxE4.js} +1 -1
- package/dist/assets/{hostInit-CWx4j9gp.js → hostInit-Bi8yQqpB.js} +1 -1
- package/dist/assets/i18n-jsJQRNVP.js +1 -0
- package/dist/assets/icons-DMftZDY6.js +1 -0
- package/dist/assets/index-56F3KEmN.js +4 -0
- package/dist/assets/index-DcUA-A3F.css +2 -0
- package/dist/assets/{linked-devices-model-h00bTRRT.js → linked-devices-model-BHQYp9mv.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-58e92d28.js → mf-entry-bootstrap-0-3894ac98.js} +2 -2
- package/dist/assets/mount-CtTFN_cS.js +1 -0
- package/dist/assets/{notification-rule-status-B-P-wl_0.js → notification-rule-status-OMG9AAuW.js} +1 -1
- package/dist/assets/player-overlays-COha2Q7D.js +1 -0
- package/dist/assets/remoteEntry-D7QWxsvZ.js +1 -0
- package/dist/assets/src-COXDtqhI.js +253 -0
- package/dist/assets/step-inspector-model-B2KsfsAh.js +1 -0
- package/dist/assets/{use-scenes-feed-CpY0pBjC.js → use-scenes-feed-BUwlMJxG.js} +1 -1
- package/dist/assets/{use-stationary-objects-BACQuMo9.js → use-stationary-objects-BadkNxb8.js} +1 -1
- package/dist/assets/{useAdminDeviceRemoval-8_UQkuQg.js → useAdminDeviceRemoval-B63tTVbh.js} +1 -1
- package/dist/assets/useEventInvalidation-CtTFN_cS.js +1 -0
- package/dist/assets/{useNodeUrlSelection-gHQAfZml.js → useNodeUrlSelection-CWhY2Xjn.js} +1 -1
- package/dist/assets/useTemplateSave-BHO2U-WX.js +1 -0
- package/dist/assets/variable-Cy0obf0C.js +1 -0
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-hv9stH43.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BMXyrASR.js} +2 -2
- package/dist/index.html +9 -9
- package/dist/server/addon.js +715 -167
- package/package.json +2 -2
- package/dist/assets/Addons-ShOLWXd0.js +0 -5
- package/dist/assets/AdminSectionedPage-BZZVpePX.js +0 -1
- package/dist/assets/AiProfiles-0WnsACbl.js +0 -3
- package/dist/assets/Build-9NCzkPDG.js +0 -39
- package/dist/assets/Cluster-DZcoj2rP.js +0 -1
- package/dist/assets/CompositionBlockEditor-C76eQ7Js.js +0 -2
- package/dist/assets/Data-DKNCfvhH.js +0 -2
- package/dist/assets/DeviceDetail-DHep5JCp.js +0 -2
- package/dist/assets/History-EJImyfJF.js +0 -1
- package/dist/assets/Identity-Bp-Zr3O5.js +0 -1
- package/dist/assets/InstancesTable-CvfpkEKd.js +0 -1
- package/dist/assets/IntegrationDetail-D8rUMymg.js +0 -1
- package/dist/assets/IntegrationWizard-CUcCjYQD.js +0 -1
- package/dist/assets/Integrations-2NtF5fL7.js +0 -2
- package/dist/assets/Integrations-DsjUFK8h.js +0 -1
- package/dist/assets/Library-Dxr2Pajp.js +0 -1
- package/dist/assets/Locations-rnb6AjY3.js +0 -3
- package/dist/assets/Logs-CoJh-c0a.js +0 -1
- package/dist/assets/MyAccess-DHgBU4Se.js +0 -2
- package/dist/assets/Network-DzqpooQx.js +0 -1
- package/dist/assets/NodeAddonsSettingsPanel-CieUBerm.js +0 -2
- package/dist/assets/Notifications-DIrApxQt.js +0 -1
- package/dist/assets/Pipeline-CXIrhlea.js +0 -1
- package/dist/assets/Recordings-D_GHaGDS.js +0 -1
- package/dist/assets/SessionsList-CFVXs0eU.js +0 -2
- package/dist/assets/StorageLocationsTable-C2jWCBaP.js +0 -1
- package/dist/assets/client-B60QT14E.js +0 -951
- package/dist/assets/command-vocab-_m2oGZgY.js +0 -1
- package/dist/assets/create-composition-B7qf5-qP.js +0 -2
- package/dist/assets/device-detail-CJ8-lleI.js +0 -1
- package/dist/assets/device-picker-model-CsHVNi49.js +0 -1
- package/dist/assets/dist-DXms20e9.js +0 -951
- package/dist/assets/i18n-CvWKDmFM.js +0 -1
- package/dist/assets/icons-Di72eW9A.js +0 -1
- package/dist/assets/index-0ukvsxX5.css +0 -2
- package/dist/assets/index-CxPpnulu.js +0 -4
- package/dist/assets/mount-CsHVNi49.js +0 -1
- package/dist/assets/player-overlays-D-63t-DL.js +0 -1
- package/dist/assets/remoteEntry-Bz4Zdkwj.js +0 -1
- package/dist/assets/src-g2TJby3U.js +0 -230
- package/dist/assets/step-inspector-model-De5uJK-p.js +0 -1
- package/dist/assets/ungroup-BlQtUKBm.js +0 -1
- package/dist/assets/useEventInvalidation-CsHVNi49.js +0 -1
- package/dist/assets/useTemplateSave-DxkUWI5Q.js +0 -1
- package/dist/assets/variable-IcIR23WN.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -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-
|
|
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
|
-
|
|
826
|
-
|
|
827
|
-
* `climate-control`
|
|
828
|
-
*
|
|
829
|
-
*
|
|
830
|
-
*
|
|
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-
|
|
5915
|
+
//#region ../types/dist/sleep-D0roI_CZ.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: [{
|
|
@@ -15235,6 +15296,10 @@ Object.freeze({
|
|
|
15235
15296
|
"path": "lastEvent.eventType",
|
|
15236
15297
|
"valueType": "string"
|
|
15237
15298
|
},
|
|
15299
|
+
{
|
|
15300
|
+
"path": "lastEvent.sourceId",
|
|
15301
|
+
"valueType": "string"
|
|
15302
|
+
},
|
|
15238
15303
|
{
|
|
15239
15304
|
"path": "lastEvent.timestamp",
|
|
15240
15305
|
"valueType": "number"
|
|
@@ -16498,7 +16563,7 @@ Object.freeze({
|
|
|
16498
16563
|
}
|
|
16499
16564
|
});
|
|
16500
16565
|
//#endregion
|
|
16501
|
-
//#region ../types/dist/implemented-methods-
|
|
16566
|
+
//#region ../types/dist/implemented-methods-5YMDeE3f.mjs
|
|
16502
16567
|
/**
|
|
16503
16568
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
16504
16569
|
*
|
|
@@ -43520,9 +43585,12 @@ function convertLegacyWhen(half) {
|
|
|
43520
43585
|
* every caller — automations, Actions, and the notification centre, which runs
|
|
43521
43586
|
* only Actions (planning#473).
|
|
43522
43587
|
*/
|
|
43588
|
+
/** The longest one `wait` step lasts. It is cut by a restart of the run and does not survive a hub restart. */
|
|
43589
|
+
var WAIT_MAX_SECONDS = 3600;
|
|
43590
|
+
var WAIT_TOO_LONG = `a wait is at most one hour (${WAIT_MAX_SECONDS} s)`;
|
|
43523
43591
|
var AutomationWaitStepSchema = object({
|
|
43524
43592
|
kind: literal("wait"),
|
|
43525
|
-
seconds: number$1().min(0).max(
|
|
43593
|
+
seconds: number$1().min(0).max(WAIT_MAX_SECONDS, WAIT_TOO_LONG)
|
|
43526
43594
|
});
|
|
43527
43595
|
/** The legacy `deviceId` of a cap step: still READ, never written (D983). */
|
|
43528
43596
|
var LegacyStepDeviceSchema = union([
|
|
@@ -43592,39 +43660,227 @@ var elseNeedsIf = {
|
|
|
43592
43660
|
path: ["else"]
|
|
43593
43661
|
};
|
|
43594
43662
|
var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
43595
|
-
var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
43596
|
-
message: "a cap step needs a target",
|
|
43597
|
-
path: ["target"]
|
|
43598
|
-
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
43599
|
-
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
43600
|
-
path: ["actionId"]
|
|
43601
|
-
}).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
43602
43663
|
/**
|
|
43603
43664
|
* A step of a STANDALONE list (an action, a scheduler point, a preset): the
|
|
43604
43665
|
* same two step kinds an automation runs, minus a guard that reads the
|
|
43605
43666
|
* automation's trigger, which such a list does not have.
|
|
43606
43667
|
*/
|
|
43607
|
-
var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema,
|
|
43668
|
+
var ActionStepSchema = discriminatedUnion("kind", [GuardedWaitStepSchema, AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
43669
|
+
message: "a cap step needs a target",
|
|
43670
|
+
path: ["target"]
|
|
43671
|
+
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
43672
|
+
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
43673
|
+
path: ["actionId"]
|
|
43674
|
+
}).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf)]).superRefine((step, ctx) => {
|
|
43608
43675
|
if (step.if !== void 0 && hasTriggeredByLeaves(step.if)) ctx.addIssue({
|
|
43609
43676
|
code: "custom",
|
|
43610
43677
|
message: TRIGGERED_BY_NEEDS_AUTOMATION,
|
|
43611
43678
|
path: ["if"]
|
|
43612
43679
|
});
|
|
43613
43680
|
});
|
|
43681
|
+
/**
|
|
43682
|
+
* Flow control of an AUTOMATION's list (#500). A standalone list (an action, a
|
|
43683
|
+
* scheduler point, a preset) stays `wait` and `cap`: it has no run of its own
|
|
43684
|
+
* to end and no variable bag to write.
|
|
43685
|
+
*/
|
|
43686
|
+
var continueOnErrorShape = {
|
|
43687
|
+
/** A failure of this step is traced `failed-continued` and the next step runs. */
|
|
43688
|
+
continueOnError: literal(true).optional() };
|
|
43689
|
+
/** An automation's cap step: the shared guarded cap step, plus `continueOnError`. */
|
|
43690
|
+
var AutomationGuardedCapStepSchema = AutomationCapStepBaseSchema.extend({
|
|
43691
|
+
...stepGuardShape,
|
|
43692
|
+
...continueOnErrorShape
|
|
43693
|
+
}).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
43694
|
+
message: "a cap step needs a target",
|
|
43695
|
+
path: ["target"]
|
|
43696
|
+
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
43697
|
+
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
43698
|
+
path: ["actionId"]
|
|
43699
|
+
}).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
|
|
43700
|
+
/** End the run here, on purpose. `reason` may carry `{{vars.x}}` slots. */
|
|
43701
|
+
var AutomationStopStepSchema = object({
|
|
43702
|
+
kind: literal("stop"),
|
|
43703
|
+
reason: string().min(1, "a stop needs a reason: it is what the run trace shows").max(200),
|
|
43704
|
+
/** `ok`: the run ends as a success. `failed`: it ends as a failure, with the reason. */
|
|
43705
|
+
outcome: _enum(["ok", "failed"]),
|
|
43706
|
+
/** Stop only when this reads true; false or unknown does not stop. */
|
|
43707
|
+
if: AutomationWhenSchema.optional()
|
|
43708
|
+
});
|
|
43709
|
+
var SET_VAR_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]{0,39}$/;
|
|
43710
|
+
/** Names the run itself writes and reads (`leaf` is what `triggered-by` judges): a step may not overwrite them. */
|
|
43711
|
+
var RESERVED_RUN_VARS = [
|
|
43712
|
+
"kind",
|
|
43713
|
+
"leaf",
|
|
43714
|
+
"at"
|
|
43715
|
+
];
|
|
43716
|
+
/**
|
|
43717
|
+
* Write variables into the run's bag, for the steps after it. SUBSTITUTION
|
|
43718
|
+
* only, never evaluation: a text value may carry `{{vars.x}}` slots.
|
|
43719
|
+
*/
|
|
43720
|
+
var AutomationSetStepSchema = object({
|
|
43721
|
+
kind: literal("set"),
|
|
43722
|
+
vars: record(string(), union([
|
|
43723
|
+
string().max(500),
|
|
43724
|
+
number$1(),
|
|
43725
|
+
boolean()
|
|
43726
|
+
])).refine((vars) => Object.keys(vars).every((name) => SET_VAR_NAME_RE.test(name)), { message: "a variable name is letters, digits and _, not starting with a digit (max 40)" }).refine((vars) => Object.keys(vars).length >= 1, { message: "set needs at least one variable" }).refine((vars) => Object.keys(vars).length <= 20, { message: `set holds at most 20 variables` }).refine((vars) => Object.keys(vars).every((name) => !RESERVED_RUN_VARS.includes(name)), { message: `the names ${RESERVED_RUN_VARS.join(", ")} belong to the run and cannot be set` }),
|
|
43727
|
+
/** Set only when this reads true; false or unknown leaves the bag as it is. */
|
|
43728
|
+
if: AutomationWhenSchema.optional()
|
|
43729
|
+
});
|
|
43730
|
+
var AutomationRunActionStepSchema = object({
|
|
43731
|
+
kind: literal("action"),
|
|
43732
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
43733
|
+
actionId: string().min(1),
|
|
43734
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
43735
|
+
variables: record(string(), union([
|
|
43736
|
+
string(),
|
|
43737
|
+
number$1(),
|
|
43738
|
+
boolean()
|
|
43739
|
+
])).optional(),
|
|
43740
|
+
...continueOnErrorShape
|
|
43741
|
+
});
|
|
43742
|
+
/**
|
|
43743
|
+
* A step INSIDE a branch of a `choose`: a flow step with no condition of its
|
|
43744
|
+
* own (the branch is the condition) and no block inside it. Strict, so an `if`
|
|
43745
|
+
* written on such a step is refused rather than dropped.
|
|
43746
|
+
*/
|
|
43747
|
+
/** The longest a `wait-until` may wait: six hours. */
|
|
43748
|
+
var WAIT_UNTIL_TIMEOUT_MAX_S = 21600;
|
|
43749
|
+
/**
|
|
43750
|
+
* Pause the run until a condition is true (#500). The timeout is mandatory: a
|
|
43751
|
+
* run never waits without an end. `onTimeout` says what a wait that ran out
|
|
43752
|
+
* does: `continue` goes on to the next step, `stop` ends the run as a failure.
|
|
43753
|
+
* A condition that cannot be read is not "true": the wait goes on (D49).
|
|
43754
|
+
*/
|
|
43755
|
+
var AutomationWaitUntilStepSchema = object({
|
|
43756
|
+
kind: literal("wait-until"),
|
|
43757
|
+
when: AutomationWhenSchema,
|
|
43758
|
+
timeoutS: number$1().int().min(1, "a wait needs a timeout of at least one second").max(WAIT_UNTIL_TIMEOUT_MAX_S, `a wait for a condition is at most six hours (${WAIT_UNTIL_TIMEOUT_MAX_S} s)`),
|
|
43759
|
+
onTimeout: _enum(["continue", "stop"])
|
|
43760
|
+
}).strict();
|
|
43761
|
+
/** The step kinds that hold steps of their own, or pause on a condition: they nest two levels at most. */
|
|
43762
|
+
var BLOCK_STEP_KINDS = [
|
|
43763
|
+
"choose",
|
|
43764
|
+
"repeat",
|
|
43765
|
+
"parallel",
|
|
43766
|
+
"wait-until"
|
|
43767
|
+
];
|
|
43768
|
+
var NEST_TOO_DEEP = `steps nest two levels at most: a step inside a nested choose or repeat can be a plain step only`;
|
|
43769
|
+
function kindOf(input) {
|
|
43770
|
+
return typeof input === "object" && input !== null ? Reflect.get(input, "kind") : void 0;
|
|
43771
|
+
}
|
|
43772
|
+
/** Where the nesting ends, a block step is refused in words rather than as an unknown kind. */
|
|
43773
|
+
function nestTooDeep(issue) {
|
|
43774
|
+
const kind = kindOf(issue.input);
|
|
43775
|
+
return typeof kind === "string" && BLOCK_STEP_KINDS.includes(kind) ? NEST_TOO_DEEP : void 0;
|
|
43776
|
+
}
|
|
43777
|
+
var plainStepSchemas = [
|
|
43778
|
+
AutomationWaitStepSchema.strict(),
|
|
43779
|
+
AutomationCapStepBaseSchema.extend(continueOnErrorShape).strict().refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
|
|
43780
|
+
message: "a cap step needs a target",
|
|
43781
|
+
path: ["target"]
|
|
43782
|
+
}).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
|
|
43783
|
+
message: "a domain target needs the vocabulary action it applies to (actionId)",
|
|
43784
|
+
path: ["actionId"]
|
|
43785
|
+
}),
|
|
43786
|
+
AutomationStopStepSchema.omit({ if: true }).strict(),
|
|
43787
|
+
AutomationSetStepSchema.omit({ if: true }).strict(),
|
|
43788
|
+
AutomationRunActionStepSchema.strict()
|
|
43789
|
+
];
|
|
43790
|
+
/**
|
|
43791
|
+
* A plain step: a flow step with no condition of its own and no step inside
|
|
43792
|
+
* it. The second (last) level of nesting holds these only.
|
|
43793
|
+
*/
|
|
43794
|
+
var AutomationBranchStepSchema = discriminatedUnion("kind", plainStepSchemas, { error: nestTooDeep });
|
|
43795
|
+
/** A step that can run beside others: it writes no variable and does not end the run. */
|
|
43796
|
+
var AutomationParallelMemberSchema = AutomationBranchStepSchema.refine((step) => step.kind === "cap" || step.kind === "action" || step.kind === "wait", "a parallel holds device commands, actions and waits only: a set or a stop beside other steps has no order");
|
|
43797
|
+
/**
|
|
43798
|
+
* Several steps at once (#500): all are started together and all are awaited.
|
|
43799
|
+
* A failure fails the run once the others finished, as in a sequence; a member
|
|
43800
|
+
* marked "continue if this fails" does not.
|
|
43801
|
+
*/
|
|
43802
|
+
var AutomationParallelStepSchema = object({
|
|
43803
|
+
kind: literal("parallel"),
|
|
43804
|
+
steps: array(AutomationParallelMemberSchema).min(2, "a parallel needs at least two steps").max(5, `a parallel takes at most 5 steps`)
|
|
43805
|
+
}).strict();
|
|
43806
|
+
var REPEAT_NEEDS_MAX = "a repeat on a condition needs a maximum number of iterations";
|
|
43807
|
+
/** A loop on a condition: the bound is mandatory, so a run never loops without an end. */
|
|
43808
|
+
var repeatConditionShape = {
|
|
43809
|
+
when: AutomationWhenSchema,
|
|
43810
|
+
maxIterations: number$1({ error: REPEAT_NEEDS_MAX }).int().min(1, REPEAT_NEEDS_MAX).max(50, `a repeat on a condition runs at most 50 times`),
|
|
43811
|
+
/** A pause between two iterations, never after the last. */
|
|
43812
|
+
waitS: number$1().int().min(1).max(WAIT_MAX_SECONDS, WAIT_TOO_LONG).optional()
|
|
43813
|
+
};
|
|
43814
|
+
/** What decides how many times a `repeat` runs. */
|
|
43815
|
+
var AutomationRepeatLoopSchema = discriminatedUnion("by", [
|
|
43816
|
+
object({
|
|
43817
|
+
by: literal("count"),
|
|
43818
|
+
count: number$1().int().min(1).max(20, `a repeat runs at most 20 times`)
|
|
43819
|
+
}).strict(),
|
|
43820
|
+
object({
|
|
43821
|
+
by: literal("while"),
|
|
43822
|
+
...repeatConditionShape
|
|
43823
|
+
}).strict(),
|
|
43824
|
+
object({
|
|
43825
|
+
by: literal("until"),
|
|
43826
|
+
...repeatConditionShape
|
|
43827
|
+
}).strict(),
|
|
43828
|
+
object({
|
|
43829
|
+
by: literal("forEach"),
|
|
43830
|
+
target: object({
|
|
43831
|
+
kind: literal("devices"),
|
|
43832
|
+
ids: array(number$1().int()).min(1, "a repeat over devices needs at least one device").max(50, `a repeat over devices takes at most 50 devices`)
|
|
43833
|
+
}).strict()
|
|
43834
|
+
}).strict()
|
|
43835
|
+
]);
|
|
43836
|
+
/**
|
|
43837
|
+
* The same steps several times (#500). Every form is bounded at save, so a
|
|
43838
|
+
* run cannot loop without an end. A failure or a `stop` in the steps ends the
|
|
43839
|
+
* loop and the run, as in a sequence.
|
|
43840
|
+
*/
|
|
43841
|
+
function repeatSchemaOf(step) {
|
|
43842
|
+
return object({
|
|
43843
|
+
kind: literal("repeat"),
|
|
43844
|
+
loop: AutomationRepeatLoopSchema,
|
|
43845
|
+
steps: array(step).min(1, "a repeat needs at least one step").max(10, `a repeat takes at most 10 steps`)
|
|
43846
|
+
}).strict();
|
|
43847
|
+
}
|
|
43848
|
+
/**
|
|
43849
|
+
* One step, several ways (#500): the branches are read in order and the FIRST
|
|
43850
|
+
* whose condition is true runs; `else` runs when every branch is false. A
|
|
43851
|
+
* branch that cannot be read ends the choice: nothing runs, not the branches
|
|
43852
|
+
* after it and not the else (D49). The #472 `if` / `else` of a wait or cap
|
|
43853
|
+
* step is the one-branch case and stays as it is stored.
|
|
43854
|
+
*/
|
|
43855
|
+
function chooseSchemaOf(step) {
|
|
43856
|
+
const steps = array(step).max(10);
|
|
43857
|
+
return object({
|
|
43858
|
+
kind: literal("choose"),
|
|
43859
|
+
branches: array(object({
|
|
43860
|
+
if: AutomationWhenSchema,
|
|
43861
|
+
steps: steps.min(1, "a branch needs at least one step")
|
|
43862
|
+
})).min(1, "a choose needs at least one branch").max(6, `a choose takes at most 6 branches`),
|
|
43863
|
+
else: steps.optional()
|
|
43864
|
+
});
|
|
43865
|
+
}
|
|
43866
|
+
var AutomationBodyStepSchema = discriminatedUnion("kind", [
|
|
43867
|
+
...plainStepSchemas,
|
|
43868
|
+
AutomationWaitUntilStepSchema,
|
|
43869
|
+
AutomationParallelStepSchema,
|
|
43870
|
+
chooseSchemaOf(AutomationBranchStepSchema),
|
|
43871
|
+
repeatSchemaOf(AutomationBranchStepSchema)
|
|
43872
|
+
]);
|
|
43873
|
+
var AutomationRepeatStepSchema = repeatSchemaOf(AutomationBodyStepSchema);
|
|
43614
43874
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
43615
43875
|
GuardedWaitStepSchema,
|
|
43616
|
-
|
|
43617
|
-
|
|
43618
|
-
|
|
43619
|
-
|
|
43620
|
-
|
|
43621
|
-
|
|
43622
|
-
|
|
43623
|
-
|
|
43624
|
-
number$1(),
|
|
43625
|
-
boolean()
|
|
43626
|
-
])).optional()
|
|
43627
|
-
}),
|
|
43876
|
+
AutomationGuardedCapStepSchema,
|
|
43877
|
+
AutomationStopStepSchema,
|
|
43878
|
+
AutomationSetStepSchema,
|
|
43879
|
+
chooseSchemaOf(AutomationBodyStepSchema),
|
|
43880
|
+
AutomationWaitUntilStepSchema,
|
|
43881
|
+
AutomationParallelStepSchema,
|
|
43882
|
+
AutomationRepeatStepSchema,
|
|
43883
|
+
AutomationRunActionStepSchema,
|
|
43628
43884
|
object({
|
|
43629
43885
|
kind: literal("code"),
|
|
43630
43886
|
/** Compiled into the automation's OWN block by esbuild — not a third
|
|
@@ -43687,11 +43943,6 @@ function convertLegacyRecipe(legacy) {
|
|
|
43687
43943
|
...rest
|
|
43688
43944
|
};
|
|
43689
43945
|
}
|
|
43690
|
-
/**
|
|
43691
|
-
* Where recipes are PARSED (the core-blocks cap, the MCP tool, the literal a
|
|
43692
|
-
* saved block carries): the new shape as it is, or the old shape converted to
|
|
43693
|
-
* it. The output type is always the new one.
|
|
43694
|
-
*/
|
|
43695
43946
|
var AutomationRecipeSchema = union([CurrentAutomationRecipeSchema, LegacyAutomationRecipeSchema.transform(convertLegacyRecipe)]);
|
|
43696
43947
|
var DETECTION_DESCRIPTIONS = {
|
|
43697
43948
|
deviceId: "the camera that saw it",
|
|
@@ -43776,12 +44027,16 @@ var HoldOverrideSchema = discriminatedUnion("mode", [object({ mode: literal("res
|
|
|
43776
44027
|
})]);
|
|
43777
44028
|
/** A missed edge up to this late still runs. */
|
|
43778
44029
|
var DEFAULT_MAX_LATE_MS = 10 * 6e4;
|
|
44030
|
+
var SchedulerStepSchema = ActionStepSchema.refine((step) => step.kind !== "wait" || step.seconds <= 300, {
|
|
44031
|
+
message: `a scheduler point waits at most five minutes (300 s); put a longer wait in an action`,
|
|
44032
|
+
path: ["seconds"]
|
|
44033
|
+
});
|
|
43779
44034
|
var SchedulerPointSchema = object({
|
|
43780
44035
|
id: string().min(1).max(64),
|
|
43781
44036
|
at: SchedulerTimeSpecSchema,
|
|
43782
44037
|
mode: SchedulerPointModeSchema,
|
|
43783
44038
|
/** The actions of an `edge` or `hold`; a `release` has none. */
|
|
43784
|
-
steps: array(
|
|
44039
|
+
steps: array(SchedulerStepSchema).max(20).default([]),
|
|
43785
44040
|
/** Checked when the point runs (an edge) or is applied (a hold). */
|
|
43786
44041
|
conditions: SchedulerStateTreeSchema.optional(),
|
|
43787
44042
|
/** Hold only; absent means `respect`. */
|
|
@@ -44049,18 +44304,46 @@ var StepTraceBaseSchema = object({
|
|
|
44049
44304
|
]).optional(),
|
|
44050
44305
|
/** Why the condition read what it read, in the evaluator's own words. */
|
|
44051
44306
|
conditionReason: string().optional(),
|
|
44052
|
-
/** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. */
|
|
44307
|
+
/** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. `failed-continued`: it failed and was marked to be passed over (#500). */
|
|
44053
44308
|
outcome: _enum([
|
|
44054
44309
|
"ok",
|
|
44055
44310
|
"error",
|
|
44056
44311
|
"not-run",
|
|
44057
44312
|
"empty",
|
|
44058
|
-
"skipped"
|
|
44313
|
+
"skipped",
|
|
44314
|
+
"failed-continued",
|
|
44315
|
+
"timed-out"
|
|
44059
44316
|
]),
|
|
44060
44317
|
message: string().optional()
|
|
44061
44318
|
});
|
|
44319
|
+
/** What a block step adds to its row: which list ran, what each branch read, how many rounds. */
|
|
44320
|
+
var blockTraceShape = {
|
|
44321
|
+
/** A `choose` step (#500): the list that ran, `branches.<n>` or `else`. Absent when none did. */
|
|
44322
|
+
branch: string().optional(),
|
|
44323
|
+
/** A `choose` step: what each branch read, in order, up to the one that decided. */
|
|
44324
|
+
branchChecks: array(object({
|
|
44325
|
+
condition: _enum([
|
|
44326
|
+
"true",
|
|
44327
|
+
"false",
|
|
44328
|
+
"unknown"
|
|
44329
|
+
]),
|
|
44330
|
+
conditionReason: string().optional()
|
|
44331
|
+
})).optional(),
|
|
44332
|
+
/** A `repeat` step (#500): how many times its steps ran. */
|
|
44333
|
+
iterations: number$1().int().optional()
|
|
44334
|
+
};
|
|
44335
|
+
/** A step one level down: it may be a block step itself, whose own steps are plain rows (the nesting ends there). */
|
|
44336
|
+
var NestedStepTraceSchema = StepTraceBaseSchema.extend({
|
|
44337
|
+
...blockTraceShape,
|
|
44338
|
+
steps: array(StepTraceBaseSchema).optional()
|
|
44339
|
+
});
|
|
44062
44340
|
/** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
|
|
44063
|
-
var AutomationStepTraceSchema = StepTraceBaseSchema.extend({
|
|
44341
|
+
var AutomationStepTraceSchema = StepTraceBaseSchema.extend({
|
|
44342
|
+
else: array(StepTraceBaseSchema).optional(),
|
|
44343
|
+
...blockTraceShape,
|
|
44344
|
+
/** A `choose` step: the steps of the list that ran. A `parallel`: its members. A `repeat`: the LAST iteration. */
|
|
44345
|
+
steps: array(NestedStepTraceSchema).optional()
|
|
44346
|
+
});
|
|
44064
44347
|
var AutomationRunTraceSchema = object({
|
|
44065
44348
|
runId: string().min(1),
|
|
44066
44349
|
startedAt: number$1(),
|
|
@@ -44310,7 +44593,7 @@ object({
|
|
|
44310
44593
|
* is irrelevant; the array is treated as a set by consumers. */
|
|
44311
44594
|
hiddenChildIds: array(number$1()).readonly()
|
|
44312
44595
|
});
|
|
44313
|
-
DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.
|
|
44596
|
+
DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, DeviceType.Climate, DeviceType.Cover, DeviceType.Lock, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Generic, method(object({
|
|
44314
44597
|
deviceId: number$1().int().nonnegative(),
|
|
44315
44598
|
childDeviceId: number$1().int().nonnegative(),
|
|
44316
44599
|
hidden: boolean()
|
|
@@ -44467,7 +44750,9 @@ var AddonHttpRouteSchema = object({
|
|
|
44467
44750
|
]).optional(),
|
|
44468
44751
|
description: string().optional(),
|
|
44469
44752
|
/** The hub limits this route per client address before the handler runs. */
|
|
44470
|
-
rateLimit: _enum(["auth"]).optional()
|
|
44753
|
+
rateLimit: _enum(["auth"]).optional(),
|
|
44754
|
+
/** Served once per integration instance; the handler reads `instanceId`. */
|
|
44755
|
+
perInstance: boolean().optional()
|
|
44471
44756
|
});
|
|
44472
44757
|
/**
|
|
44473
44758
|
* Cross-process route invocation envelope. The hub captures the
|
|
@@ -44484,6 +44769,8 @@ var InvokeRequestSchema = object({
|
|
|
44484
44769
|
query: record(string(), string()),
|
|
44485
44770
|
body: unknown(),
|
|
44486
44771
|
headers: record(string(), string()),
|
|
44772
|
+
/** The instance the hub resolved for a `perInstance` route. */
|
|
44773
|
+
instanceId: string().optional(),
|
|
44487
44774
|
user: object({
|
|
44488
44775
|
id: string(),
|
|
44489
44776
|
username: string(),
|
|
@@ -46402,7 +46689,7 @@ var BatteryStatusSchema = object({
|
|
|
46402
46689
|
*/
|
|
46403
46690
|
binary: boolean().optional().meta({ label: "Binary indicator" })
|
|
46404
46691
|
});
|
|
46405
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.
|
|
46692
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter;
|
|
46406
46693
|
method(object({
|
|
46407
46694
|
deviceId: number$1(),
|
|
46408
46695
|
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
@@ -47825,7 +48112,7 @@ var ClimateControlStatusSchema = object({
|
|
|
47825
48112
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
47826
48113
|
lastFetchedAt: number$1()
|
|
47827
48114
|
});
|
|
47828
|
-
DeviceType.
|
|
48115
|
+
DeviceType.Climate, method(object({
|
|
47829
48116
|
deviceId: number$1().int().nonnegative(),
|
|
47830
48117
|
mode: HvacModeSchema
|
|
47831
48118
|
}), _void(), {
|
|
@@ -48116,6 +48403,7 @@ var CompositionProblemSchema = object({
|
|
|
48116
48403
|
"nested-field",
|
|
48117
48404
|
"missing-field",
|
|
48118
48405
|
"kind-mismatch",
|
|
48406
|
+
"source-kind-mismatch",
|
|
48119
48407
|
"may-be-null",
|
|
48120
48408
|
"source-missing",
|
|
48121
48409
|
"source-unreadable",
|
|
@@ -48137,7 +48425,8 @@ var CompositionProblemSchema = object({
|
|
|
48137
48425
|
"command-method-unknown",
|
|
48138
48426
|
"command-source-unknown",
|
|
48139
48427
|
"command-input-unknown",
|
|
48140
|
-
"command-input-missing"
|
|
48428
|
+
"command-input-missing",
|
|
48429
|
+
"power-source-is-actuator"
|
|
48141
48430
|
]),
|
|
48142
48431
|
path: string(),
|
|
48143
48432
|
message: string()
|
|
@@ -48948,7 +49237,7 @@ DeviceType.MediaPlayer, optionalMethod(deviceOnly, _void(), {
|
|
|
48948
49237
|
kind: "mutation",
|
|
48949
49238
|
auth: "protected"
|
|
48950
49239
|
});
|
|
48951
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.
|
|
49240
|
+
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;
|
|
48952
49241
|
var NUMBER = {
|
|
48953
49242
|
kind: "fixed",
|
|
48954
49243
|
result: ["number"]
|
|
@@ -49031,7 +49320,7 @@ function numeric(input) {
|
|
|
49031
49320
|
}, ...alsoFrom === void 0 ? [] : [alsoFrom.accept]]
|
|
49032
49321
|
};
|
|
49033
49322
|
}
|
|
49034
|
-
var CLIMATE_DEVICES = [DeviceType.
|
|
49323
|
+
var CLIMATE_DEVICES = [DeviceType.Climate];
|
|
49035
49324
|
function binary(input) {
|
|
49036
49325
|
return {
|
|
49037
49326
|
...input,
|
|
@@ -49353,8 +49642,8 @@ var GROUP_TEMPLATES = [
|
|
|
49353
49642
|
actuator({
|
|
49354
49643
|
id: "climate",
|
|
49355
49644
|
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.",
|
|
49356
|
-
deviceType: DeviceType.
|
|
49357
|
-
memberDeviceTypes: [DeviceType.
|
|
49645
|
+
deviceType: DeviceType.Climate,
|
|
49646
|
+
memberDeviceTypes: [DeviceType.Climate],
|
|
49358
49647
|
outputCap: "group-active",
|
|
49359
49648
|
outputField: "active",
|
|
49360
49649
|
member: {
|
|
@@ -49397,6 +49686,50 @@ function actuator(input) {
|
|
|
49397
49686
|
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
49398
49687
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
49399
49688
|
DeviceType.Camera;
|
|
49689
|
+
var PowerSourceRefusalReasonSchema = _enum([
|
|
49690
|
+
"no-power-source",
|
|
49691
|
+
"switch-missing",
|
|
49692
|
+
"switch-offline",
|
|
49693
|
+
"switch-unknown",
|
|
49694
|
+
"restart-in-progress",
|
|
49695
|
+
"switch-call-failed",
|
|
49696
|
+
"switch-is-actuator"
|
|
49697
|
+
]);
|
|
49698
|
+
var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
|
|
49699
|
+
accepted: literal(false),
|
|
49700
|
+
reason: PowerSourceRefusalReasonSchema,
|
|
49701
|
+
/** One line for the operator, naming the switch. */
|
|
49702
|
+
message: string()
|
|
49703
|
+
})]);
|
|
49704
|
+
var PowerSourceInfoSchema = object({
|
|
49705
|
+
/** False when the device has no power source linked; the rest is then empty. */
|
|
49706
|
+
linked: boolean(),
|
|
49707
|
+
switchDeviceId: number$1().nullable(),
|
|
49708
|
+
switchName: string().nullable(),
|
|
49709
|
+
/** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
|
|
49710
|
+
switchOn: boolean().nullable(),
|
|
49711
|
+
switchOnline: boolean().nullable(),
|
|
49712
|
+
restartInProgress: boolean(),
|
|
49713
|
+
offSeconds: number$1().int()
|
|
49714
|
+
});
|
|
49715
|
+
object({
|
|
49716
|
+
/** Null while the switch has not reported: unknown is never `false` (D393). */
|
|
49717
|
+
switchOn: boolean().nullable(),
|
|
49718
|
+
offSeconds: number$1().int(),
|
|
49719
|
+
lastFetchedAt: number$1()
|
|
49720
|
+
});
|
|
49721
|
+
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;
|
|
49722
|
+
var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
|
|
49723
|
+
systemMethod(deviceInput$2, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
|
|
49724
|
+
kind: "mutation",
|
|
49725
|
+
auth: "protected"
|
|
49726
|
+
}), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
|
|
49727
|
+
kind: "mutation",
|
|
49728
|
+
auth: "protected"
|
|
49729
|
+
}), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
|
|
49730
|
+
kind: "mutation",
|
|
49731
|
+
auth: "protected"
|
|
49732
|
+
});
|
|
49400
49733
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
49401
49734
|
/**
|
|
49402
49735
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -51742,8 +52075,14 @@ method(object({
|
|
|
51742
52075
|
"string",
|
|
51743
52076
|
"number",
|
|
51744
52077
|
"boolean",
|
|
51745
|
-
"enum"
|
|
52078
|
+
"enum",
|
|
52079
|
+
"union"
|
|
51746
52080
|
]),
|
|
52081
|
+
unionMembers: array(_enum([
|
|
52082
|
+
"string",
|
|
52083
|
+
"number",
|
|
52084
|
+
"boolean"
|
|
52085
|
+
])).optional(),
|
|
51747
52086
|
enumValues: array(string()).optional(),
|
|
51748
52087
|
item: boolean().optional(),
|
|
51749
52088
|
quantity: ReadingQuantitySchema.optional()
|
|
@@ -53609,25 +53948,71 @@ var EnumSensorStatusSchema = object({
|
|
|
53609
53948
|
lastFetchedAt: number$1()
|
|
53610
53949
|
});
|
|
53611
53950
|
DeviceType.Sensor;
|
|
53951
|
+
var EventVocabularyKindSchema = _enum([
|
|
53952
|
+
"press",
|
|
53953
|
+
"long-press",
|
|
53954
|
+
"long-press-start",
|
|
53955
|
+
"release",
|
|
53956
|
+
"repeat",
|
|
53957
|
+
"double-press",
|
|
53958
|
+
"other"
|
|
53959
|
+
]);
|
|
53960
|
+
/** The part of the device an event comes from: a button, a channel. */
|
|
53961
|
+
var EventVocabularySourceSchema = object({
|
|
53962
|
+
id: string().min(1),
|
|
53963
|
+
label: string().min(1)
|
|
53964
|
+
});
|
|
53965
|
+
/** One scalar field of an event's `data`, by dotted path. */
|
|
53966
|
+
var EventVocabularyFieldSchema = object({
|
|
53967
|
+
path: string().min(1),
|
|
53968
|
+
kind: _enum([
|
|
53969
|
+
"string",
|
|
53970
|
+
"number",
|
|
53971
|
+
"boolean",
|
|
53972
|
+
"enum"
|
|
53973
|
+
]),
|
|
53974
|
+
enumValues: array(string()).optional(),
|
|
53975
|
+
label: string().min(1).optional()
|
|
53976
|
+
});
|
|
53977
|
+
var EventVocabularyEntrySchema = object({
|
|
53978
|
+
/** The native token, verbatim. */
|
|
53979
|
+
id: string().min(1),
|
|
53980
|
+
source: EventVocabularySourceSchema.optional(),
|
|
53981
|
+
label: string().min(1),
|
|
53982
|
+
description: string().optional(),
|
|
53983
|
+
kind: EventVocabularyKindSchema.optional(),
|
|
53984
|
+
payload: array(EventVocabularyFieldSchema).optional()
|
|
53985
|
+
});
|
|
53612
53986
|
/**
|
|
53613
53987
|
* Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
|
|
53614
53988
|
* device. Carries the device's EXACT declared event vocabulary verbatim
|
|
53615
53989
|
* (NO normalization). Two shapes:
|
|
53616
|
-
* - structured source (HA `event.*` entity) → `
|
|
53617
|
-
* declared
|
|
53618
|
-
* - generic/legacy source (HA bus events, e.g. zha_event) → `
|
|
53990
|
+
* - structured source (HA `event.*` entity) → `vocabulary` is the fixed
|
|
53991
|
+
* declared set (e.g. press_short, press_long, …).
|
|
53992
|
+
* - generic/legacy source (HA bus events, e.g. zha_event) → `vocabulary`
|
|
53619
53993
|
* is [] (open) and `lastEvent.data` carries the complex payload.
|
|
53994
|
+
* `vocabulary` (D1044) names each event for a person and types it for a
|
|
53995
|
+
* rule; `eventTypes` is its list of native tokens, kept for older readers.
|
|
53996
|
+
* A fire names the part of the device it came from in `sourceId` when the
|
|
53997
|
+
* vocabulary declares sources (a remote's buttons).
|
|
53620
53998
|
* `seq` is monotonic so two identical events still produce distinct slice writes.
|
|
53621
53999
|
*/
|
|
53622
54000
|
var EventFireSchema = object({
|
|
53623
54001
|
deviceId: number$1(),
|
|
53624
54002
|
eventType: string(),
|
|
54003
|
+
sourceId: string().optional(),
|
|
53625
54004
|
data: record(string(), unknown()).nullable(),
|
|
53626
54005
|
timestamp: number$1().meta(readingMeta("none")),
|
|
53627
54006
|
seq: number$1().meta(readingMeta("count"))
|
|
53628
54007
|
});
|
|
53629
54008
|
var EventEmitterStatusSchema = object({
|
|
53630
54009
|
eventTypes: array(string()),
|
|
54010
|
+
/**
|
|
54011
|
+
* Required of a provider by the type. A status written before the field
|
|
54012
|
+
* existed still parses, as an empty vocabulary: read it through
|
|
54013
|
+
* `readEventVocabulary`, which then answers with the plain tokens.
|
|
54014
|
+
*/
|
|
54015
|
+
vocabulary: array(EventVocabularyEntrySchema).default([]),
|
|
53631
54016
|
lastEvent: EventFireSchema.nullable(),
|
|
53632
54017
|
eventCountSinceStart: number$1().meta(readingMeta("count"))
|
|
53633
54018
|
});
|
|
@@ -54121,8 +54506,85 @@ method(_void(), array(FailureContributionSchema).readonly());
|
|
|
54121
54506
|
* - `FanPreset` — preset selector
|
|
54122
54507
|
* - `FanDirection` — direction toggle (ceiling fans)
|
|
54123
54508
|
* - `FanOscillating` — oscillation toggle
|
|
54509
|
+
*
|
|
54510
|
+
* Per-axis oscillation (`oscillationAxes`, `setOscillationAxis`, D1034): an air
|
|
54511
|
+
* circulator sweeps horizontally and vertically, each axis with its own
|
|
54512
|
+
* switch, fixed angle, sweep bounds and limits. A provider may report them
|
|
54513
|
+
* natively; otherwise the OPERATOR links sibling devices to each field in
|
|
54514
|
+
* Customize (a `replace` over the fields listed in `overridable` — nothing is
|
|
54515
|
+
* linked or inferred by itself), and a write to a linked field is forwarded to
|
|
54516
|
+
* its source. `oscillating` stays the single summary flag: when axes exist it
|
|
54517
|
+
* means "any axis oscillates" (`anyAxisOscillating`).
|
|
54124
54518
|
*/
|
|
54125
54519
|
var FanDirectionSchema = _enum(["forward", "reverse"]);
|
|
54520
|
+
var FAN_OSCILLATION_AXES = ["horizontal", "vertical"];
|
|
54521
|
+
var FanOscillationAxisNameSchema = _enum(FAN_OSCILLATION_AXES);
|
|
54522
|
+
var FanOscillationAxisFieldSchema = _enum([
|
|
54523
|
+
"oscillating",
|
|
54524
|
+
"angle",
|
|
54525
|
+
"sweepFrom",
|
|
54526
|
+
"sweepTo"
|
|
54527
|
+
]);
|
|
54528
|
+
/** The limits of one axis, read from the source that serves its angle. */
|
|
54529
|
+
var FAN_OSCILLATION_AXIS_LIMITS = [
|
|
54530
|
+
"min",
|
|
54531
|
+
"max",
|
|
54532
|
+
"step"
|
|
54533
|
+
];
|
|
54534
|
+
/**
|
|
54535
|
+
* One oscillation axis. Every reading the device has not reported is `null`,
|
|
54536
|
+
* never `0` (D393): `0°` is a real position. Each leaf defaults to `null`, so
|
|
54537
|
+
* a slice that names only the leaves it knows (a Customize link of one field)
|
|
54538
|
+
* is still a whole axis.
|
|
54539
|
+
*/
|
|
54540
|
+
var FanOscillationAxisSchema = object({
|
|
54541
|
+
/** Whether the axis sweeps. */
|
|
54542
|
+
oscillating: boolean().nullable().default(null),
|
|
54543
|
+
/** The fixed position (degrees) the axis holds when it does not sweep. */
|
|
54544
|
+
angle: number$1().nullable().default(null),
|
|
54545
|
+
/** The sweep bounds (degrees): left → right, bottom → top. */
|
|
54546
|
+
sweepFrom: number$1().nullable().default(null),
|
|
54547
|
+
sweepTo: number$1().nullable().default(null),
|
|
54548
|
+
/** The angles the axis accepts. Null when the device states none. */
|
|
54549
|
+
min: number$1().nullable().default(null),
|
|
54550
|
+
max: number$1().nullable().default(null),
|
|
54551
|
+
step: number$1().nullable().default(null)
|
|
54552
|
+
});
|
|
54553
|
+
/** Both axes; an axis the device does not have is `null`. */
|
|
54554
|
+
var FanOscillationAxesSchema = object({
|
|
54555
|
+
horizontal: FanOscillationAxisSchema.nullable().default(null),
|
|
54556
|
+
vertical: FanOscillationAxisSchema.nullable().default(null)
|
|
54557
|
+
});
|
|
54558
|
+
var FanOscillationAxisRefusalSchema = _enum([
|
|
54559
|
+
"nothing-to-set",
|
|
54560
|
+
"axis-not-linked",
|
|
54561
|
+
"out-of-range",
|
|
54562
|
+
"source-gone",
|
|
54563
|
+
"source-unknown",
|
|
54564
|
+
"source-call-failed"
|
|
54565
|
+
]);
|
|
54566
|
+
var FanOscillationAxisResultSchema = discriminatedUnion("status", [object({ status: literal("applied") }), object({
|
|
54567
|
+
status: literal("refused"),
|
|
54568
|
+
reason: FanOscillationAxisRefusalSchema,
|
|
54569
|
+
/** The field at fault, when one is. */
|
|
54570
|
+
field: FanOscillationAxisFieldSchema.optional(),
|
|
54571
|
+
/** One line for the operator, naming the axis, the field and the source. */
|
|
54572
|
+
detail: string(),
|
|
54573
|
+
/** Fields that DID land before the refusal (writes run in order, stop at the first failure). */
|
|
54574
|
+
applied: array(FanOscillationAxisFieldSchema)
|
|
54575
|
+
})]);
|
|
54576
|
+
var SetOscillationAxisInputSchema = object({
|
|
54577
|
+
deviceId: number$1().int().nonnegative(),
|
|
54578
|
+
axis: FanOscillationAxisNameSchema,
|
|
54579
|
+
oscillating: boolean().optional(),
|
|
54580
|
+
angle: number$1().optional(),
|
|
54581
|
+
sweepFrom: number$1().optional(),
|
|
54582
|
+
sweepTo: number$1().optional()
|
|
54583
|
+
});
|
|
54584
|
+
/** The state path of one axis field: `oscillationAxes.<axis>.<field>`. */
|
|
54585
|
+
function fanAxisPath(axis, field) {
|
|
54586
|
+
return `oscillationAxes.${axis}.${field}`;
|
|
54587
|
+
}
|
|
54126
54588
|
var FanControlStatusSchema = object({
|
|
54127
54589
|
/** Active speed as 0..100 inclusive. Null when the device has no
|
|
54128
54590
|
* speed surface (single-speed fan). */
|
|
@@ -54141,9 +54603,91 @@ var FanControlStatusSchema = object({
|
|
|
54141
54603
|
/** Oscillation toggle. Null when the device has no oscillation
|
|
54142
54604
|
* surface. */
|
|
54143
54605
|
oscillating: boolean().nullable(),
|
|
54606
|
+
/**
|
|
54607
|
+
* Per-axis oscillation (air circulators). Absent when the device has no
|
|
54608
|
+
* per-axis surface and nothing is linked in Customize.
|
|
54609
|
+
*/
|
|
54610
|
+
oscillationAxes: FanOscillationAxesSchema.optional(),
|
|
54144
54611
|
/** Ms epoch when the slice was last updated. */
|
|
54145
54612
|
lastChangedAt: number$1()
|
|
54146
54613
|
});
|
|
54614
|
+
var FAN_CUSTOMIZE_DEVICE_TYPES = [DeviceType.Fan];
|
|
54615
|
+
/** The Customize section the axis targets are listed under. */
|
|
54616
|
+
var AXES_SECTION = "oscillation-axes";
|
|
54617
|
+
function axisOscillatingTarget(axis) {
|
|
54618
|
+
return {
|
|
54619
|
+
id: `${axis}-oscillating`,
|
|
54620
|
+
cardinality: "scalar",
|
|
54621
|
+
vocabulary: {
|
|
54622
|
+
cap: "fan-control",
|
|
54623
|
+
stateField: "oscillating"
|
|
54624
|
+
},
|
|
54625
|
+
deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
|
|
54626
|
+
apply: "replace",
|
|
54627
|
+
section: AXES_SECTION,
|
|
54628
|
+
path: fanAxisPath(axis, "oscillating"),
|
|
54629
|
+
sources: [{
|
|
54630
|
+
kind: "switch",
|
|
54631
|
+
transforms: [{ kind: "identity" }]
|
|
54632
|
+
}],
|
|
54633
|
+
sourceReport: { status: "assignment-status" }
|
|
54634
|
+
};
|
|
54635
|
+
}
|
|
54636
|
+
/**
|
|
54637
|
+
* A numeric axis field. The `angle` link also carries the axis limits, read
|
|
54638
|
+
* from the SAME linked control's own range (`min`/`max`/`step`), so the limits
|
|
54639
|
+
* are the source's, never guessed.
|
|
54640
|
+
*/
|
|
54641
|
+
function axisNumericTarget(axis, field) {
|
|
54642
|
+
const base = {
|
|
54643
|
+
id: `${axis}-${field}`,
|
|
54644
|
+
cardinality: "scalar",
|
|
54645
|
+
vocabulary: { cap: "fan-control" },
|
|
54646
|
+
deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
|
|
54647
|
+
apply: "replace",
|
|
54648
|
+
section: AXES_SECTION,
|
|
54649
|
+
path: fanAxisPath(axis, field),
|
|
54650
|
+
sources: [{
|
|
54651
|
+
kind: "numeric",
|
|
54652
|
+
transforms: [{ kind: "identity" }]
|
|
54653
|
+
}],
|
|
54654
|
+
sourceReport: { status: "assignment-status" }
|
|
54655
|
+
};
|
|
54656
|
+
if (field !== "angle") return base;
|
|
54657
|
+
return {
|
|
54658
|
+
...base,
|
|
54659
|
+
companions: FAN_OSCILLATION_AXIS_LIMITS.map((limit) => ({
|
|
54660
|
+
kind: "source-field",
|
|
54661
|
+
path: fanAxisPath(axis, limit),
|
|
54662
|
+
field: limit
|
|
54663
|
+
}))
|
|
54664
|
+
};
|
|
54665
|
+
}
|
|
54666
|
+
var AXIS_TARGETS = FAN_OSCILLATION_AXES.flatMap((axis) => [
|
|
54667
|
+
axisOscillatingTarget(axis),
|
|
54668
|
+
axisNumericTarget(axis, "angle"),
|
|
54669
|
+
axisNumericTarget(axis, "sweepFrom"),
|
|
54670
|
+
axisNumericTarget(axis, "sweepTo")
|
|
54671
|
+
]);
|
|
54672
|
+
/** A select (an enum control) the operator links to the fan's `preset`. */
|
|
54673
|
+
var PRESET_TARGET = {
|
|
54674
|
+
id: "preset",
|
|
54675
|
+
cardinality: "scalar",
|
|
54676
|
+
vocabulary: { cap: "fan-control" },
|
|
54677
|
+
deviceTypes: FAN_CUSTOMIZE_DEVICE_TYPES,
|
|
54678
|
+
apply: "replace",
|
|
54679
|
+
path: "preset",
|
|
54680
|
+
sources: [{
|
|
54681
|
+
kind: "field",
|
|
54682
|
+
valueKinds: ["string"],
|
|
54683
|
+
transforms: [{ kind: "identity" }]
|
|
54684
|
+
}],
|
|
54685
|
+
sourceReport: { status: "assignment-status" }
|
|
54686
|
+
};
|
|
54687
|
+
[...AXIS_TARGETS, PRESET_TARGET].map((target) => ({
|
|
54688
|
+
path: target.path,
|
|
54689
|
+
by: target.id
|
|
54690
|
+
}));
|
|
54147
54691
|
DeviceType.Fan, optionalMethod(object({
|
|
54148
54692
|
deviceId: number$1().int().nonnegative(),
|
|
54149
54693
|
speed: number$1().min(0).max(100)
|
|
@@ -54168,17 +54712,37 @@ DeviceType.Fan, optionalMethod(object({
|
|
|
54168
54712
|
}), _void(), {
|
|
54169
54713
|
kind: "mutation",
|
|
54170
54714
|
auth: "protected"
|
|
54715
|
+
}), optionalMethod(SetOscillationAxisInputSchema, FanOscillationAxisResultSchema, {
|
|
54716
|
+
kind: "mutation",
|
|
54717
|
+
auth: "protected"
|
|
54718
|
+
});
|
|
54719
|
+
/** One axis as a preset wants it; an absent field is left as it is. */
|
|
54720
|
+
var FanPresetAxisSchema = object({
|
|
54721
|
+
oscillating: boolean().optional(),
|
|
54722
|
+
angle: number$1().optional(),
|
|
54723
|
+
sweepFrom: number$1().optional(),
|
|
54724
|
+
sweepTo: number$1().optional()
|
|
54725
|
+
});
|
|
54726
|
+
/** The fan-control state a preset sets; an absent field is left as it is. */
|
|
54727
|
+
var FanPresetStateSchema = object({
|
|
54728
|
+
speed: number$1().min(0).max(100).optional(),
|
|
54729
|
+
/** The fan's own preset mode (or the linked select's option). */
|
|
54730
|
+
preset: string().min(1).optional(),
|
|
54731
|
+
direction: FanDirectionSchema.optional(),
|
|
54732
|
+
oscillationAxes: object({
|
|
54733
|
+
horizontal: FanPresetAxisSchema.optional(),
|
|
54734
|
+
vertical: FanPresetAxisSchema.optional()
|
|
54735
|
+
}).optional()
|
|
54171
54736
|
});
|
|
54172
54737
|
var FanPresetSchema = object({
|
|
54173
54738
|
/** Stable key; never reused after a delete within one device's list. */
|
|
54174
54739
|
id: string().min(1).max(64),
|
|
54175
54740
|
/** What the operator and a voice assistant call it. */
|
|
54176
54741
|
name: string().trim().min(1).max(40),
|
|
54177
|
-
|
|
54742
|
+
state: FanPresetStateSchema
|
|
54178
54743
|
});
|
|
54179
54744
|
var FanPresetsRefusalSchema = _enum([
|
|
54180
|
-
"
|
|
54181
|
-
"bad-target",
|
|
54745
|
+
"empty-state",
|
|
54182
54746
|
"duplicate-name",
|
|
54183
54747
|
"duplicate-id",
|
|
54184
54748
|
"too-many",
|
|
@@ -54190,72 +54754,55 @@ var FanPresetsSetResultSchema = discriminatedUnion("status", [object({
|
|
|
54190
54754
|
}), object({
|
|
54191
54755
|
status: literal("refused"),
|
|
54192
54756
|
reason: FanPresetsRefusalSchema,
|
|
54193
|
-
/** Names the preset
|
|
54757
|
+
/** Names the preset at fault. */
|
|
54194
54758
|
detail: string()
|
|
54195
54759
|
})]);
|
|
54196
|
-
var
|
|
54197
|
-
|
|
54760
|
+
var FanPresetFieldResultSchema = object({
|
|
54761
|
+
/** The state path: `speed`, `preset`, `direction`, `oscillationAxes.horizontal.angle`. */
|
|
54762
|
+
field: string(),
|
|
54198
54763
|
outcome: _enum([
|
|
54199
54764
|
"applied",
|
|
54200
54765
|
"failed",
|
|
54201
54766
|
"not-run",
|
|
54202
54767
|
"refused"
|
|
54203
54768
|
]),
|
|
54204
|
-
deviceId: number$1().int().nonnegative().optional(),
|
|
54205
|
-
cap: string().optional(),
|
|
54206
|
-
method: string().optional(),
|
|
54207
54769
|
/** The cause, for every outcome but `applied`. */
|
|
54208
54770
|
message: string().optional()
|
|
54209
54771
|
});
|
|
54210
54772
|
var FanPresetApplyResultSchema = object({
|
|
54211
|
-
/** `applied`: every
|
|
54773
|
+
/** `applied`: every field landed. `partial`: some did, one did not. `refused`: nothing ran. */
|
|
54212
54774
|
status: _enum([
|
|
54213
54775
|
"applied",
|
|
54214
54776
|
"partial",
|
|
54215
54777
|
"refused"
|
|
54216
54778
|
]),
|
|
54217
|
-
|
|
54779
|
+
fields: array(FanPresetFieldResultSchema)
|
|
54218
54780
|
});
|
|
54219
54781
|
var FanCaptureFieldSchema = _enum([
|
|
54220
54782
|
"speed",
|
|
54221
|
-
"oscillating",
|
|
54222
54783
|
"direction",
|
|
54223
|
-
"preset"
|
|
54784
|
+
"preset",
|
|
54785
|
+
"oscillationAxes"
|
|
54224
54786
|
]);
|
|
54225
|
-
var FanCaptureOmissionSchema = object({
|
|
54226
|
-
/** A fan field (`speed`) or `step <n>` for a sibling step. */
|
|
54227
|
-
what: string(),
|
|
54228
|
-
/** Why no value was taken: unknown reading (never stored as 0, D393), or a step that cannot be read. */
|
|
54229
|
-
reason: string()
|
|
54230
|
-
});
|
|
54231
|
-
var FanCaptureItemSchema = object({
|
|
54232
|
-
group: _enum([
|
|
54233
|
-
"fan",
|
|
54234
|
-
"oscillation",
|
|
54235
|
-
"angles"
|
|
54236
|
-
]),
|
|
54237
|
-
/** What the step sets, in the operator's words (a device name, a fan field). */
|
|
54238
|
-
label: string()
|
|
54239
|
-
});
|
|
54240
54787
|
var FanPresetCaptureResultSchema = object({
|
|
54241
|
-
/** The
|
|
54242
|
-
|
|
54243
|
-
|
|
54244
|
-
|
|
54245
|
-
|
|
54788
|
+
/** The fan's CURRENT fan-control state, as a preset; NOT saved. */
|
|
54789
|
+
state: FanPresetStateSchema,
|
|
54790
|
+
omitted: array(object({
|
|
54791
|
+
/** A state path (`speed`, `oscillationAxes.vertical.angle`). */
|
|
54792
|
+
what: string(),
|
|
54793
|
+
/** Why no value was taken: an unknown reading is never stored as 0 (D393). */
|
|
54794
|
+
reason: string()
|
|
54795
|
+
}))
|
|
54246
54796
|
});
|
|
54247
|
-
var deviceInput$
|
|
54797
|
+
var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
|
|
54248
54798
|
DeviceType.Fan;
|
|
54249
|
-
method(deviceInput$
|
|
54799
|
+
method(deviceInput$1, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$1.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
|
|
54250
54800
|
kind: "mutation",
|
|
54251
54801
|
auth: "admin"
|
|
54252
|
-
}), method(deviceInput$
|
|
54802
|
+
}), method(deviceInput$1.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
|
|
54253
54803
|
kind: "mutation",
|
|
54254
54804
|
auth: "protected"
|
|
54255
|
-
}), method(deviceInput$
|
|
54256
|
-
fields: array(FanCaptureFieldSchema).optional(),
|
|
54257
|
-
steps: array(ActionStepSchema).max(20).default([])
|
|
54258
|
-
}), FanPresetCaptureResultSchema, { auth: "protected" });
|
|
54805
|
+
}), method(deviceInput$1.extend({ fields: array(FanCaptureFieldSchema).optional() }), FanPresetCaptureResultSchema, { auth: "protected" });
|
|
54259
54806
|
/**
|
|
54260
54807
|
* Per-device feature/identity probe slice. Holds the runtime-resolved
|
|
54261
54808
|
* truth about what a device CAN do — which the kernel uses to:
|
|
@@ -54379,7 +54926,7 @@ var GroupActiveSchema = object({
|
|
|
54379
54926
|
/** Ms epoch when the slice was last updated. */
|
|
54380
54927
|
lastChangedAt: number$1()
|
|
54381
54928
|
});
|
|
54382
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate
|
|
54929
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
|
|
54383
54930
|
var GroupCommandsSchema = object({
|
|
54384
54931
|
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
54385
54932
|
results: array(object({
|
|
@@ -54391,7 +54938,7 @@ results: array(object({
|
|
|
54391
54938
|
/** Ms epoch of the attempt. */
|
|
54392
54939
|
at: number$1()
|
|
54393
54940
|
})) });
|
|
54394
|
-
DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.
|
|
54941
|
+
DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
|
|
54395
54942
|
/**
|
|
54396
54943
|
* How many members of a helper group answered (D944). Counts are integers,
|
|
54397
54944
|
* not measurements: zero included is a real count, never a stand-in reading.
|
|
@@ -54415,7 +54962,7 @@ var GroupStatusSchema = object({
|
|
|
54415
54962
|
label: "Members"
|
|
54416
54963
|
}))
|
|
54417
54964
|
});
|
|
54418
|
-
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.
|
|
54965
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Cover, DeviceType.Valve, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.Climate;
|
|
54419
54966
|
/**
|
|
54420
54967
|
* Heat pump settable surface (D1026): one typed method per parameter, never a
|
|
54421
54968
|
* generic `set(key, value)`. The values a mode takes and the limits of a number
|
|
@@ -54623,7 +55170,7 @@ var HeatingValveStatusSchema = object({
|
|
|
54623
55170
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
54624
55171
|
lastFetchedAt: number$1()
|
|
54625
55172
|
});
|
|
54626
|
-
DeviceType.
|
|
55173
|
+
DeviceType.Climate;
|
|
54627
55174
|
/**
|
|
54628
55175
|
* timed-run - run a device for a chosen time, then stop it (D993).
|
|
54629
55176
|
*
|
|
@@ -54639,13 +55186,13 @@ DeviceType.Thermostat;
|
|
|
54639
55186
|
* retried in a loop - D49); a future one is re-armed.
|
|
54640
55187
|
*
|
|
54641
55188
|
* What a device may be run for, and for how long at most, is per device type
|
|
54642
|
-
* ({@link
|
|
55189
|
+
* and role ({@link timedRunLimitOf}): the maximum is a safety bound, not a preference,
|
|
54643
55190
|
* so a request above it is REFUSED with a typed reason, never clamped.
|
|
54644
55191
|
*/
|
|
54645
55192
|
var TimedRunUnitSchema = _enum(["s", "min"]);
|
|
54646
55193
|
_enum(["switch", "pet-fountain"]);
|
|
54647
|
-
DeviceType.
|
|
54648
|
-
DeviceType.
|
|
55194
|
+
DeviceType.Switch, DeviceType.PetFountain;
|
|
55195
|
+
DeviceType.Switch, DeviceRole.SwitchHeater;
|
|
54649
55196
|
/** One duration, as the one-tap run asks for it. */
|
|
54650
55197
|
var TimedRunQuickRunSchema = object({
|
|
54651
55198
|
duration: number$1().positive().finite(),
|
|
@@ -54817,8 +55364,8 @@ var HeroSceneSchema = object({
|
|
|
54817
55364
|
/** 0..1: volume, cover position, cycle progress. */
|
|
54818
55365
|
level: number$1().min(0).max(1).nullable()
|
|
54819
55366
|
});
|
|
54820
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.
|
|
54821
|
-
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;
|
|
55367
|
+
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;
|
|
55368
|
+
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;
|
|
54822
55369
|
/** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
|
|
54823
55370
|
var HeroTextSchema = object({
|
|
54824
55371
|
en: string(),
|
|
@@ -55203,8 +55750,8 @@ var HeroRowModelSchema = object({
|
|
|
55203
55750
|
extras: array(HeroControlSchema).max(2).optional(),
|
|
55204
55751
|
trailing: HeroFactSchema.nullable()
|
|
55205
55752
|
});
|
|
55206
|
-
DeviceType.Climate
|
|
55207
|
-
DeviceType.Climate, DeviceType.
|
|
55753
|
+
DeviceType.Climate;
|
|
55754
|
+
DeviceType.Climate, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer;
|
|
55208
55755
|
/**
|
|
55209
55756
|
* hero-layout — what a device's hero says (D1023). Read-only: the FIXED
|
|
55210
55757
|
* layouts live in `@camstack/types` and nothing here stores or edits one.
|
|
@@ -55236,7 +55783,10 @@ method(heroInput, HeroModelSchema.nullable(), {
|
|
|
55236
55783
|
}), method(rowModelsInput, array(HeroRowModelSchema.nullable()), {
|
|
55237
55784
|
auth: "protected",
|
|
55238
55785
|
role: "viewer"
|
|
55239
|
-
}), method(object({
|
|
55786
|
+
}), method(object({
|
|
55787
|
+
deviceType: string(),
|
|
55788
|
+
role: string().nullable().optional()
|
|
55789
|
+
}), HeroLayoutRowsSchema, {
|
|
55240
55790
|
auth: "protected",
|
|
55241
55791
|
role: "viewer"
|
|
55242
55792
|
});
|
|
@@ -55313,7 +55863,7 @@ var HumiditySensorStatusSchema = object({
|
|
|
55313
55863
|
/** Ms epoch when the slice was last updated. */
|
|
55314
55864
|
lastFetchedAt: number$1()
|
|
55315
55865
|
});
|
|
55316
|
-
DeviceType.Sensor, DeviceType.
|
|
55866
|
+
DeviceType.Sensor, DeviceType.Climate;
|
|
55317
55867
|
/**
|
|
55318
55868
|
* Image display cap. Models a single still image exposed by an integration —
|
|
55319
55869
|
* a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
|
|
@@ -67621,7 +68171,18 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
67621
68171
|
* The value is baked into the authorization code at `/authorize` and travels
|
|
67622
68172
|
* on the tokens, so editing this field changes FUTURE links only.
|
|
67623
68173
|
*/
|
|
67624
|
-
refreshTokenTtlSec: union([number$1().int().positive(), literal("never")]).optional()
|
|
68174
|
+
refreshTokenTtlSec: union([number$1().int().positive(), literal("never")]).optional(),
|
|
68175
|
+
/**
|
|
68176
|
+
* The integration instances an account can be linked to (planning#415),
|
|
68177
|
+
* beside the default one. `/api/oauth2/authorize?instance=<id>` is accepted
|
|
68178
|
+
* only for an id listed here; with no `instance=` the link is made to the
|
|
68179
|
+
* default instance, which is never listed and always accepted — it is the
|
|
68180
|
+
* address third parties already hold. Omit for a single-instance integration.
|
|
68181
|
+
*/
|
|
68182
|
+
instances: array(object({
|
|
68183
|
+
id: string(),
|
|
68184
|
+
displayName: string()
|
|
68185
|
+
})).optional()
|
|
67625
68186
|
});
|
|
67626
68187
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
67627
68188
|
/**
|
|
@@ -69555,7 +70116,6 @@ object({
|
|
|
69555
70116
|
DeviceType.Light,
|
|
69556
70117
|
DeviceType.Fan,
|
|
69557
70118
|
DeviceType.Climate,
|
|
69558
|
-
DeviceType.Thermostat,
|
|
69559
70119
|
DeviceType.Humidifier,
|
|
69560
70120
|
DeviceType.WaterHeater,
|
|
69561
70121
|
DeviceType.MediaPlayer,
|
|
@@ -69564,52 +70124,8 @@ object({
|
|
|
69564
70124
|
DeviceType.Dishwasher,
|
|
69565
70125
|
DeviceType.Vacuum,
|
|
69566
70126
|
DeviceType.LawnMower,
|
|
69567
|
-
DeviceType.PetFeeder
|
|
69568
|
-
DeviceType.Heater
|
|
70127
|
+
DeviceType.PetFeeder
|
|
69569
70128
|
].filter((type) => type !== DeviceType.Sensor);
|
|
69570
|
-
var PowerSourceRefusalReasonSchema = _enum([
|
|
69571
|
-
"no-power-source",
|
|
69572
|
-
"switch-missing",
|
|
69573
|
-
"switch-offline",
|
|
69574
|
-
"switch-unknown",
|
|
69575
|
-
"restart-in-progress",
|
|
69576
|
-
"switch-call-failed"
|
|
69577
|
-
]);
|
|
69578
|
-
var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
|
|
69579
|
-
accepted: literal(false),
|
|
69580
|
-
reason: PowerSourceRefusalReasonSchema,
|
|
69581
|
-
/** One line for the operator, naming the switch. */
|
|
69582
|
-
message: string()
|
|
69583
|
-
})]);
|
|
69584
|
-
var PowerSourceInfoSchema = object({
|
|
69585
|
-
/** False when the device has no power source linked; the rest is then empty. */
|
|
69586
|
-
linked: boolean(),
|
|
69587
|
-
switchDeviceId: number$1().nullable(),
|
|
69588
|
-
switchName: string().nullable(),
|
|
69589
|
-
/** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
|
|
69590
|
-
switchOn: boolean().nullable(),
|
|
69591
|
-
switchOnline: boolean().nullable(),
|
|
69592
|
-
restartInProgress: boolean(),
|
|
69593
|
-
offSeconds: number$1().int()
|
|
69594
|
-
});
|
|
69595
|
-
object({
|
|
69596
|
-
/** Null while the switch has not reported: unknown is never `false` (D393). */
|
|
69597
|
-
switchOn: boolean().nullable(),
|
|
69598
|
-
offSeconds: number$1().int(),
|
|
69599
|
-
lastFetchedAt: number$1()
|
|
69600
|
-
});
|
|
69601
|
-
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;
|
|
69602
|
-
var deviceInput$1 = object({ deviceId: number$1().int().nonnegative() });
|
|
69603
|
-
systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "protected" }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
|
|
69604
|
-
kind: "mutation",
|
|
69605
|
-
auth: "protected"
|
|
69606
|
-
}), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
|
|
69607
|
-
kind: "mutation",
|
|
69608
|
-
auth: "protected"
|
|
69609
|
-
}), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
|
|
69610
|
-
kind: "mutation",
|
|
69611
|
-
auth: "protected"
|
|
69612
|
-
});
|
|
69613
70129
|
/**
|
|
69614
70130
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
69615
70131
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -72737,7 +73253,7 @@ object({
|
|
|
72737
73253
|
phase: string().nullable()
|
|
72738
73254
|
});
|
|
72739
73255
|
Object.values(DeviceType);
|
|
72740
|
-
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.
|
|
73256
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder;
|
|
72741
73257
|
/**
|
|
72742
73258
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
72743
73259
|
* a rect ROI on a camera frame and names one or more states; the engine
|
|
@@ -73795,6 +74311,13 @@ var SsoBridgeClaimsSchema = object({
|
|
|
73795
74311
|
/** OAuth authorization-code binding — set only on `oauth-code` tokens. */
|
|
73796
74312
|
redirectUri: string().optional(),
|
|
73797
74313
|
integrationId: string().optional(),
|
|
74314
|
+
/**
|
|
74315
|
+
* The integration INSTANCE an OAuth link was made for (planning#415). Set on
|
|
74316
|
+
* `oauth-code`, `oauth-access` and `oauth-refresh` tokens of a link made
|
|
74317
|
+
* with `instance=`; absent on a link to the default instance. A cloud relay
|
|
74318
|
+
* reads it off the access token to route; the hub answers from the session.
|
|
74319
|
+
*/
|
|
74320
|
+
instanceId: string().optional(),
|
|
73798
74321
|
/** JWT ID — unique per issued code; consumed-set enforces single-use. */
|
|
73799
74322
|
jti: string().optional(),
|
|
73800
74323
|
/** PKCE S256 challenge — set only on `oauth-code` tokens issued to a public
|
|
@@ -74431,7 +74954,7 @@ object({
|
|
|
74431
74954
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
74432
74955
|
lastChangedAt: number$1()
|
|
74433
74956
|
});
|
|
74434
|
-
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan,
|
|
74957
|
+
DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, method(object({
|
|
74435
74958
|
deviceId: number$1(),
|
|
74436
74959
|
on: boolean()
|
|
74437
74960
|
}), _void(), {
|
|
@@ -75056,7 +75579,7 @@ var TemperatureSensorStatusSchema = object({
|
|
|
75056
75579
|
/** Ms epoch when the slice was last updated (push or poll). */
|
|
75057
75580
|
lastFetchedAt: number$1()
|
|
75058
75581
|
});
|
|
75059
|
-
DeviceType.Sensor, DeviceType.
|
|
75582
|
+
DeviceType.Sensor, DeviceType.Climate;
|
|
75060
75583
|
var TemplateKindSchema = _enum(["remote"]);
|
|
75061
75584
|
/**
|
|
75062
75585
|
* template — the generic store of reusable, named operator data (D963). A
|
|
@@ -75876,6 +76399,8 @@ var OauthSessionSummarySchema = object({
|
|
|
75876
76399
|
userId: string(),
|
|
75877
76400
|
username: string(),
|
|
75878
76401
|
integrationId: string(),
|
|
76402
|
+
/** The instance the link was made for; `null` = the default instance. */
|
|
76403
|
+
instanceId: string().nullable().optional(),
|
|
75879
76404
|
scopes: array(TokenScopeSchema),
|
|
75880
76405
|
createdAt: number$1(),
|
|
75881
76406
|
lastUsedAt: number$1(),
|
|
@@ -75975,6 +76500,9 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(_void(), ob
|
|
|
75975
76500
|
access: "view"
|
|
75976
76501
|
}), method(object({
|
|
75977
76502
|
integrationId: string(),
|
|
76503
|
+
/** The integration instance the link is for. Omit for the default
|
|
76504
|
+
* instance — never pass the addon id to mean it. */
|
|
76505
|
+
instanceId: string().optional(),
|
|
75978
76506
|
userId: string(),
|
|
75979
76507
|
username: string(),
|
|
75980
76508
|
scopes: array(TokenScopeSchema),
|
|
@@ -76013,7 +76541,13 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(_void(), ob
|
|
|
76013
76541
|
}), method(object({ token: string() }), object({
|
|
76014
76542
|
userId: string(),
|
|
76015
76543
|
username: string(),
|
|
76016
|
-
scopes: array(TokenScopeSchema)
|
|
76544
|
+
scopes: array(TokenScopeSchema),
|
|
76545
|
+
/** The instance the link was made for, read from the SESSION.
|
|
76546
|
+
* Absent = the default instance. `oauthLinkServesInstance` is the
|
|
76547
|
+
* helper a per-instance route calls to compare it with the instance
|
|
76548
|
+
* of its path; no route declares `perInstance` yet (the Alexa
|
|
76549
|
+
* per-instance route, T3, is the first consumer). */
|
|
76550
|
+
instanceId: string().optional()
|
|
76017
76551
|
}).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
|
|
76018
76552
|
userId: string(),
|
|
76019
76553
|
issuer: string()
|
|
@@ -77613,7 +78147,9 @@ var AccessoryKind = {
|
|
|
77613
78147
|
};
|
|
77614
78148
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
77615
78149
|
DeviceType.HeatPump;
|
|
77616
|
-
DeviceType.
|
|
78150
|
+
DeviceType.Climate;
|
|
78151
|
+
DeviceRole.ClimateThermostat, DeviceRole.ClimateAc, DeviceRole.ClimateRadiator, DeviceRole.ClimateFloor, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit;
|
|
78152
|
+
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;
|
|
77617
78153
|
new Set(Object.values(DeviceType));
|
|
77618
78154
|
/** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
|
|
77619
78155
|
function contribution(cap, schema, build) {
|
|
@@ -79619,7 +80155,7 @@ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pu
|
|
|
79619
80155
|
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
|
|
79620
80156
|
...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
|
|
79621
80157
|
];
|
|
79622
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.
|
|
80158
|
+
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;
|
|
79623
80159
|
/**
|
|
79624
80160
|
* Who looks like what (D1023). One look per {@link DeviceType}, refined by a
|
|
79625
80161
|
* {@link DeviceRole} where the role changes how the device reads (a leak
|
|
@@ -80263,9 +80799,9 @@ lookOf({
|
|
|
80263
80799
|
idle: INFO,
|
|
80264
80800
|
standby: MUTED
|
|
80265
80801
|
});
|
|
80266
|
-
DeviceType.Climate
|
|
80267
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.
|
|
80268
|
-
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;
|
|
80802
|
+
DeviceType.Climate;
|
|
80803
|
+
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;
|
|
80804
|
+
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;
|
|
80269
80805
|
Object.freeze({
|
|
80270
80806
|
"accessories.getStatus": {
|
|
80271
80807
|
capName: "accessories",
|
|
@@ -83662,6 +84198,13 @@ Object.freeze({
|
|
|
83662
84198
|
access: "create",
|
|
83663
84199
|
role: "viewer"
|
|
83664
84200
|
},
|
|
84201
|
+
"fanControl.setOscillationAxis": {
|
|
84202
|
+
capName: "fan-control",
|
|
84203
|
+
capScope: "device",
|
|
84204
|
+
addonId: null,
|
|
84205
|
+
access: "create",
|
|
84206
|
+
role: "viewer"
|
|
84207
|
+
},
|
|
83665
84208
|
"fanControl.setPercentage": {
|
|
83666
84209
|
capName: "fan-control",
|
|
83667
84210
|
capScope: "device",
|
|
@@ -90683,7 +91226,7 @@ function projectAction(cap, action) {
|
|
|
90683
91226
|
};
|
|
90684
91227
|
}
|
|
90685
91228
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
90686
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.
|
|
91229
|
+
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;
|
|
90687
91230
|
DeviceFeature.BatteryOperated;
|
|
90688
91231
|
function bound(cap, methods = [], authority = "reported") {
|
|
90689
91232
|
return {
|
|
@@ -91735,6 +92278,11 @@ Object.freeze({
|
|
|
91735
92278
|
form: "single",
|
|
91736
92279
|
optional: false
|
|
91737
92280
|
}],
|
|
92281
|
+
"fanControl.setOscillationAxis": [{
|
|
92282
|
+
name: "deviceId",
|
|
92283
|
+
form: "single",
|
|
92284
|
+
optional: false
|
|
92285
|
+
}],
|
|
91738
92286
|
"fanControl.setPercentage": [{
|
|
91739
92287
|
name: "deviceId",
|
|
91740
92288
|
form: "single",
|
|
@@ -95196,7 +95744,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
95196
95744
|
capability: adminUiCapability,
|
|
95197
95745
|
provider: {
|
|
95198
95746
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
95199
|
-
getVersion: async () => ({ version: "1.2.
|
|
95747
|
+
getVersion: async () => ({ version: "1.2.646" })
|
|
95200
95748
|
}
|
|
95201
95749
|
}];
|
|
95202
95750
|
}
|