@camstack/types 1.2.567 → 1.2.569
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 +18 -0
- package/dist/addon.js +15 -5
- package/dist/addon.mjs +15 -5
- package/dist/capabilities/climate-control.cap.d.ts +48 -0
- package/dist/capabilities/control-select-navigation.d.ts +59 -0
- package/dist/capabilities/control.cap.d.ts +32 -0
- package/dist/capabilities/core-blocks.cap.d.ts +11 -0
- package/dist/capabilities/index.d.ts +5 -2
- package/dist/capabilities/notification-rules.cap.d.ts +46 -0
- package/dist/capabilities/osd-manager.cap.d.ts +12 -0
- package/dist/capabilities/weather-station.cap.d.ts +255 -0
- package/dist/client.js +62 -4
- package/dist/client.mjs +62 -4
- package/dist/{composed-stable-id-BzXh1Swk.js → composed-stable-id-C3NfRTj8.js} +3 -0
- package/dist/{composed-stable-id-COP6zOXx.mjs → composed-stable-id-RvQIEpqg.mjs} +3 -0
- package/dist/device/device-icon.d.ts +1 -0
- package/dist/device/device-type.d.ts +3 -0
- package/dist/device/hero/hero-layout.d.ts +1 -0
- package/dist/device/hero/hero-look.d.ts +6 -0
- package/dist/device/hero/hero-scene.d.ts +1 -0
- package/dist/enums/event-category.d.ts +12 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-Dv-Gcv1f.mjs → event-category-Dhcd0TRH.mjs} +12 -0
- package/dist/{event-category-Ps2LC8dN.js → event-category-d9kiqCqC.js} +12 -0
- package/dist/generated/addon-api.d.ts +42 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/cap-vocabulary.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +55 -2
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +3 -0
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/{implemented-methods-0xxMOekw.mjs → implemented-methods-C5FMXLGP.mjs} +1 -1
- package/dist/{implemented-methods-D4F6RWkO.js → implemented-methods-C7ScGvEz.js} +1 -1
- package/dist/index.js +491 -29
- package/dist/index.mjs +487 -30
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-mEzgbYFJ.js → sleep-DR76P1OE.js} +322 -4
- package/dist/{sleep-B5XPl2YP.mjs → sleep-DbhT0DWV.mjs} +322 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
3
|
-
const require_event_category = require("./event-category-
|
|
4
|
-
const require_composed_stable_id = require("./composed-stable-id-
|
|
5
|
-
const require_implemented_methods = require("./implemented-methods-
|
|
2
|
+
const require_sleep = require("./sleep-DR76P1OE.js");
|
|
3
|
+
const require_event_category = require("./event-category-d9kiqCqC.js");
|
|
4
|
+
const require_composed_stable_id = require("./composed-stable-id-C3NfRTj8.js");
|
|
5
|
+
const require_implemented_methods = require("./implemented-methods-C7ScGvEz.js");
|
|
6
6
|
const require_node_color = require("./node-color.js");
|
|
7
7
|
const require_convert = require("./convert-BI8iTXn6.js");
|
|
8
8
|
const require_enums = require("./enums.js");
|
|
@@ -45819,9 +45819,26 @@ var HvacModeSchema = zod.z.enum([
|
|
|
45819
45819
|
"fan_only",
|
|
45820
45820
|
"dry"
|
|
45821
45821
|
]);
|
|
45822
|
+
/**
|
|
45823
|
+
* What the device is DOING right now, as opposed to the mode it is set to
|
|
45824
|
+
* (`mode: 'heat'` with the valve shut is `idle`). Optional and nullable: a
|
|
45825
|
+
* device that does not say leaves it absent or null, and a consumer reads that
|
|
45826
|
+
* as "unknown", never as `idle` (D393).
|
|
45827
|
+
*/
|
|
45828
|
+
var ClimateActionSchema = zod.z.enum([
|
|
45829
|
+
"heating",
|
|
45830
|
+
"cooling",
|
|
45831
|
+
"drying",
|
|
45832
|
+
"fan",
|
|
45833
|
+
"idle",
|
|
45834
|
+
"off"
|
|
45835
|
+
]);
|
|
45822
45836
|
var ClimateControlStatusSchema = zod.z.object({
|
|
45823
45837
|
/** Active HVAC mode. */
|
|
45824
45838
|
mode: HvacModeSchema,
|
|
45839
|
+
/** What the device is doing now (`heating` while the valve is open, `idle`
|
|
45840
|
+
* at setpoint). Absent or null = the device does not say; never a guess (D393). */
|
|
45841
|
+
action: ClimateActionSchema.nullable().optional(),
|
|
45825
45842
|
/** Available HVAC modes the device accepts. Subset of HvacMode. */
|
|
45826
45843
|
availableModes: zod.z.array(HvacModeSchema),
|
|
45827
45844
|
/** Active fan mode (`auto` / `low` / `medium` / `high` / `on` / `off`
|
|
@@ -45875,6 +45892,40 @@ var ClimateControlStatusSchema = zod.z.object({
|
|
|
45875
45892
|
/** Ms epoch when the slice was last updated (push or command). */
|
|
45876
45893
|
lastFetchedAt: zod.z.number()
|
|
45877
45894
|
});
|
|
45895
|
+
/**
|
|
45896
|
+
* Linked room sensor (Customize): the OPERATOR may replace the thermostat's own
|
|
45897
|
+
* `currentTemp` / `currentHumidity` with a sensor in the room. Never linked on
|
|
45898
|
+
* its own (D356). Once linked it ALWAYS replaces the native value, a null
|
|
45899
|
+
* native included — the operator chose the better reading.
|
|
45900
|
+
*/
|
|
45901
|
+
var CLIMATE_CUSTOMIZE_DEVICE_TYPES = [require_composed_stable_id.DeviceType.Climate];
|
|
45902
|
+
function roomSensorTarget(id, path) {
|
|
45903
|
+
return {
|
|
45904
|
+
id,
|
|
45905
|
+
cardinality: "scalar",
|
|
45906
|
+
vocabulary: {
|
|
45907
|
+
cap: "climate-control",
|
|
45908
|
+
stateField: path
|
|
45909
|
+
},
|
|
45910
|
+
deviceTypes: CLIMATE_CUSTOMIZE_DEVICE_TYPES,
|
|
45911
|
+
apply: "replace",
|
|
45912
|
+
path,
|
|
45913
|
+
sources: [{
|
|
45914
|
+
kind: "numeric",
|
|
45915
|
+
transforms: [{ kind: "identity" }]
|
|
45916
|
+
}],
|
|
45917
|
+
sourceReport: { status: "assignment-status" }
|
|
45918
|
+
};
|
|
45919
|
+
}
|
|
45920
|
+
var CLIMATE_CONTROL_TARGETS = [roomSensorTarget("room-temperature", "currentTemp"), roomSensorTarget("room-humidity", "currentHumidity")];
|
|
45921
|
+
var climateControlCustomize = {
|
|
45922
|
+
version: 1,
|
|
45923
|
+
overridable: CLIMATE_CONTROL_TARGETS.map((target) => ({
|
|
45924
|
+
path: target.path,
|
|
45925
|
+
by: target.id
|
|
45926
|
+
})),
|
|
45927
|
+
targets: CLIMATE_CONTROL_TARGETS
|
|
45928
|
+
};
|
|
45878
45929
|
var climateControlCapability = {
|
|
45879
45930
|
name: "climate-control",
|
|
45880
45931
|
scope: "device",
|
|
@@ -46185,6 +46236,7 @@ var climateControlCapability = {
|
|
|
46185
46236
|
* on every push without re-querying the provider.
|
|
46186
46237
|
*/
|
|
46187
46238
|
runtimeState: ClimateControlStatusSchema,
|
|
46239
|
+
customize: climateControlCustomize,
|
|
46188
46240
|
/**
|
|
46189
46241
|
* Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
|
|
46190
46242
|
*
|
|
@@ -47620,20 +47672,95 @@ var ControlSetValueInputSchema = zod.z.discriminatedUnion("kind", [
|
|
|
47620
47672
|
value: zod.z.string().min(1)
|
|
47621
47673
|
})
|
|
47622
47674
|
]);
|
|
47675
|
+
/**
|
|
47676
|
+
* `next` / `previous` input (#544, operator scripts driving a selector).
|
|
47677
|
+
* `cycle` is a TOP-LEVEL default so a direct `ctx.api.control.next` call
|
|
47678
|
+
* (which skips the tRPC router's Zod parse) still gets `true` via
|
|
47679
|
+
* `CAP_INPUT_DEFAULTS` — matching HA's own `select_next` / `select_previous`
|
|
47680
|
+
* default.
|
|
47681
|
+
*/
|
|
47682
|
+
var ControlStepInputSchema = zod.z.object({
|
|
47683
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
47684
|
+
cycle: zod.z.boolean().default(true)
|
|
47685
|
+
});
|
|
47686
|
+
/** `first` / `last` input — no `cycle`, there is no boundary to stop at. */
|
|
47687
|
+
var ControlBoundaryInputSchema = zod.z.object({ deviceId: zod.z.number().int().nonnegative() });
|
|
47623
47688
|
var controlCapability = {
|
|
47624
47689
|
name: "control",
|
|
47625
47690
|
scope: "device",
|
|
47626
47691
|
deviceNative: true,
|
|
47627
47692
|
mode: "singleton",
|
|
47628
47693
|
deviceTypes: [require_composed_stable_id.DeviceType.Control],
|
|
47629
|
-
methods: {
|
|
47630
|
-
|
|
47631
|
-
|
|
47632
|
-
|
|
47633
|
-
|
|
47634
|
-
|
|
47635
|
-
|
|
47636
|
-
|
|
47694
|
+
methods: {
|
|
47695
|
+
setValue: require_sleep.method(zod.z.object({
|
|
47696
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
47697
|
+
control: ControlSetValueInputSchema
|
|
47698
|
+
}), zod.z.void(), {
|
|
47699
|
+
kind: "mutation",
|
|
47700
|
+
auth: "protected",
|
|
47701
|
+
notOperatorFacing: "the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework"
|
|
47702
|
+
}),
|
|
47703
|
+
/**
|
|
47704
|
+
* Select one step forward through `options` (#544). `providerOptional`
|
|
47705
|
+
* (hence `optionalMethod`): only a `kind: 'select'` provider implements
|
|
47706
|
+
* it — the stepping math is NOT re-derived per provider, it is the one
|
|
47707
|
+
* shared helper `selectNavigationMethods` (`control-select-navigation.ts`)
|
|
47708
|
+
* every select-kind driver spreads in.
|
|
47709
|
+
*/
|
|
47710
|
+
next: require_sleep.optionalMethod(ControlStepInputSchema, zod.z.void(), {
|
|
47711
|
+
kind: "mutation",
|
|
47712
|
+
auth: "protected",
|
|
47713
|
+
actions: [{
|
|
47714
|
+
id: "select.next",
|
|
47715
|
+
label: require_sleep.t("Next option", "Opzione successiva"),
|
|
47716
|
+
phrase: require_sleep.t("Select the next option on {device}", "Seleziona l’opzione successiva su {device}"),
|
|
47717
|
+
icon: "skip-forward",
|
|
47718
|
+
openArgs: [{
|
|
47719
|
+
key: "cycle",
|
|
47720
|
+
label: require_sleep.t("Wrap to the first option", "Ricomincia dalla prima opzione"),
|
|
47721
|
+
offer: { kind: "boolean" }
|
|
47722
|
+
}]
|
|
47723
|
+
}]
|
|
47724
|
+
}),
|
|
47725
|
+
/** Select one step backward through `options` (#544) — mirrors `next`. */
|
|
47726
|
+
previous: require_sleep.optionalMethod(ControlStepInputSchema, zod.z.void(), {
|
|
47727
|
+
kind: "mutation",
|
|
47728
|
+
auth: "protected",
|
|
47729
|
+
actions: [{
|
|
47730
|
+
id: "select.previous",
|
|
47731
|
+
label: require_sleep.t("Previous option", "Opzione precedente"),
|
|
47732
|
+
phrase: require_sleep.t("Select the previous option on {device}", "Seleziona l’opzione precedente su {device}"),
|
|
47733
|
+
icon: "skip-back",
|
|
47734
|
+
openArgs: [{
|
|
47735
|
+
key: "cycle",
|
|
47736
|
+
label: require_sleep.t("Wrap to the last option", "Ricomincia dall’ultima opzione"),
|
|
47737
|
+
offer: { kind: "boolean" }
|
|
47738
|
+
}]
|
|
47739
|
+
}]
|
|
47740
|
+
}),
|
|
47741
|
+
/** Select the first entry of `options` (#544). */
|
|
47742
|
+
first: require_sleep.optionalMethod(ControlBoundaryInputSchema, zod.z.void(), {
|
|
47743
|
+
kind: "mutation",
|
|
47744
|
+
auth: "protected",
|
|
47745
|
+
actions: [{
|
|
47746
|
+
id: "select.first",
|
|
47747
|
+
label: require_sleep.t("First option", "Prima opzione"),
|
|
47748
|
+
phrase: require_sleep.t("Select the first option on {device}", "Seleziona la prima opzione su {device}"),
|
|
47749
|
+
icon: "chevron-first"
|
|
47750
|
+
}]
|
|
47751
|
+
}),
|
|
47752
|
+
/** Select the last entry of `options` (#544). */
|
|
47753
|
+
last: require_sleep.optionalMethod(ControlBoundaryInputSchema, zod.z.void(), {
|
|
47754
|
+
kind: "mutation",
|
|
47755
|
+
auth: "protected",
|
|
47756
|
+
actions: [{
|
|
47757
|
+
id: "select.last",
|
|
47758
|
+
label: require_sleep.t("Last option", "Ultima opzione"),
|
|
47759
|
+
phrase: require_sleep.t("Select the last option on {device}", "Seleziona l’ultima opzione su {device}"),
|
|
47760
|
+
icon: "chevron-last"
|
|
47761
|
+
}]
|
|
47762
|
+
})
|
|
47763
|
+
},
|
|
47637
47764
|
status: {
|
|
47638
47765
|
schema: ControlStatusSchema,
|
|
47639
47766
|
kind: "push"
|
|
@@ -48669,7 +48796,7 @@ var mediaPlayerCapability = {
|
|
|
48669
48796
|
//#region src/generated/customize-catalog.ts
|
|
48670
48797
|
/**
|
|
48671
48798
|
* Customize catalog, projected from every `*.cap.ts` `customize` block.
|
|
48672
|
-
*
|
|
48799
|
+
* 12 caps. Field keys are `runtimeState` paths. No Zod.
|
|
48673
48800
|
*/
|
|
48674
48801
|
var CAP_CUSTOMIZE_CATALOG = {
|
|
48675
48802
|
"battery": {
|
|
@@ -48728,6 +48855,51 @@ var CAP_CUSTOMIZE_CATALOG = {
|
|
|
48728
48855
|
]
|
|
48729
48856
|
}]
|
|
48730
48857
|
},
|
|
48858
|
+
"climate-control": {
|
|
48859
|
+
version: 1,
|
|
48860
|
+
targets: [{
|
|
48861
|
+
id: "room-temperature",
|
|
48862
|
+
cardinality: "scalar",
|
|
48863
|
+
deviceTypes: [require_composed_stable_id.DeviceType.Climate],
|
|
48864
|
+
apply: "replace",
|
|
48865
|
+
vocabularyCap: "climate-control",
|
|
48866
|
+
vocabularyStateField: "currentTemp",
|
|
48867
|
+
sources: [{
|
|
48868
|
+
kind: "numeric",
|
|
48869
|
+
transformKinds: ["identity"],
|
|
48870
|
+
transforms: [{ kind: "identity" }]
|
|
48871
|
+
}],
|
|
48872
|
+
sourceReport: { status: "assignment-status" },
|
|
48873
|
+
advancedExpression: false,
|
|
48874
|
+
path: "currentTemp",
|
|
48875
|
+
valueKind: "number",
|
|
48876
|
+
nullable: true
|
|
48877
|
+
}, {
|
|
48878
|
+
id: "room-humidity",
|
|
48879
|
+
cardinality: "scalar",
|
|
48880
|
+
deviceTypes: [require_composed_stable_id.DeviceType.Climate],
|
|
48881
|
+
apply: "replace",
|
|
48882
|
+
vocabularyCap: "climate-control",
|
|
48883
|
+
vocabularyStateField: "currentHumidity",
|
|
48884
|
+
sources: [{
|
|
48885
|
+
kind: "numeric",
|
|
48886
|
+
transformKinds: ["identity"],
|
|
48887
|
+
transforms: [{ kind: "identity" }]
|
|
48888
|
+
}],
|
|
48889
|
+
sourceReport: { status: "assignment-status" },
|
|
48890
|
+
advancedExpression: false,
|
|
48891
|
+
path: "currentHumidity",
|
|
48892
|
+
valueKind: "number",
|
|
48893
|
+
nullable: true
|
|
48894
|
+
}],
|
|
48895
|
+
overridable: [{
|
|
48896
|
+
path: "currentTemp",
|
|
48897
|
+
by: "room-temperature"
|
|
48898
|
+
}, {
|
|
48899
|
+
path: "currentHumidity",
|
|
48900
|
+
by: "room-humidity"
|
|
48901
|
+
}]
|
|
48902
|
+
},
|
|
48731
48903
|
"consumables": {
|
|
48732
48904
|
version: 1,
|
|
48733
48905
|
targets: [{
|
|
@@ -48758,6 +48930,7 @@ var CAP_CUSTOMIZE_CATALOG = {
|
|
|
48758
48930
|
require_composed_stable_id.DeviceType.Control,
|
|
48759
48931
|
require_composed_stable_id.DeviceType.Presence,
|
|
48760
48932
|
require_composed_stable_id.DeviceType.Weather,
|
|
48933
|
+
require_composed_stable_id.DeviceType.WeatherStation,
|
|
48761
48934
|
require_composed_stable_id.DeviceType.Vacuum,
|
|
48762
48935
|
require_composed_stable_id.DeviceType.LawnMower,
|
|
48763
48936
|
require_composed_stable_id.DeviceType.Container,
|
|
@@ -50211,7 +50384,7 @@ var CHANGED = {
|
|
|
50211
50384
|
fieldPath: "lastChangedAt",
|
|
50212
50385
|
expr: "now"
|
|
50213
50386
|
};
|
|
50214
|
-
function numeric(input) {
|
|
50387
|
+
function numeric$1(input) {
|
|
50215
50388
|
const { alsoFrom, ...base } = input;
|
|
50216
50389
|
return {
|
|
50217
50390
|
...base,
|
|
@@ -50246,7 +50419,7 @@ function binary(input) {
|
|
|
50246
50419
|
};
|
|
50247
50420
|
}
|
|
50248
50421
|
var GROUP_TEMPLATES = [
|
|
50249
|
-
numeric({
|
|
50422
|
+
numeric$1({
|
|
50250
50423
|
id: "temperature",
|
|
50251
50424
|
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
50252
50425
|
role: require_composed_stable_id.DeviceRole.TemperatureSensor,
|
|
@@ -50264,7 +50437,7 @@ var GROUP_TEMPLATES = [
|
|
|
50264
50437
|
}
|
|
50265
50438
|
}
|
|
50266
50439
|
}),
|
|
50267
|
-
numeric({
|
|
50440
|
+
numeric$1({
|
|
50268
50441
|
id: "humidity",
|
|
50269
50442
|
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
50270
50443
|
role: require_composed_stable_id.DeviceRole.HumiditySensor,
|
|
@@ -50282,7 +50455,7 @@ var GROUP_TEMPLATES = [
|
|
|
50282
50455
|
}
|
|
50283
50456
|
}
|
|
50284
50457
|
}),
|
|
50285
|
-
numeric({
|
|
50458
|
+
numeric$1({
|
|
50286
50459
|
id: "pressure",
|
|
50287
50460
|
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
50288
50461
|
role: require_composed_stable_id.DeviceRole.PressureSensor,
|
|
@@ -50293,7 +50466,7 @@ var GROUP_TEMPLATES = [
|
|
|
50293
50466
|
empty: "null",
|
|
50294
50467
|
companions: [NOW$3]
|
|
50295
50468
|
}),
|
|
50296
|
-
numeric({
|
|
50469
|
+
numeric$1({
|
|
50297
50470
|
id: "illuminance",
|
|
50298
50471
|
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
50299
50472
|
role: require_composed_stable_id.DeviceRole.AmbientLightSensor,
|
|
@@ -50304,7 +50477,7 @@ var GROUP_TEMPLATES = [
|
|
|
50304
50477
|
empty: "null",
|
|
50305
50478
|
companions: [NOW$3]
|
|
50306
50479
|
}),
|
|
50307
|
-
numeric({
|
|
50480
|
+
numeric$1({
|
|
50308
50481
|
id: "power",
|
|
50309
50482
|
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
50310
50483
|
role: require_composed_stable_id.DeviceRole.PowerSensor,
|
|
@@ -50315,7 +50488,7 @@ var GROUP_TEMPLATES = [
|
|
|
50315
50488
|
empty: "omit",
|
|
50316
50489
|
companions: [NOW$3]
|
|
50317
50490
|
}),
|
|
50318
|
-
numeric({
|
|
50491
|
+
numeric$1({
|
|
50319
50492
|
id: "energy",
|
|
50320
50493
|
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
50321
50494
|
role: require_composed_stable_id.DeviceRole.EnergySensor,
|
|
@@ -50326,7 +50499,7 @@ var GROUP_TEMPLATES = [
|
|
|
50326
50499
|
empty: "omit",
|
|
50327
50500
|
companions: [NOW$3]
|
|
50328
50501
|
}),
|
|
50329
|
-
numeric({
|
|
50502
|
+
numeric$1({
|
|
50330
50503
|
id: "battery",
|
|
50331
50504
|
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
50332
50505
|
role: require_composed_stable_id.DeviceRole.BatterySensor,
|
|
@@ -50350,7 +50523,7 @@ var GROUP_TEMPLATES = [
|
|
|
50350
50523
|
}
|
|
50351
50524
|
]
|
|
50352
50525
|
}),
|
|
50353
|
-
numeric({
|
|
50526
|
+
numeric$1({
|
|
50354
50527
|
id: "numeric",
|
|
50355
50528
|
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
50356
50529
|
role: require_composed_stable_id.DeviceRole.NumericSensor,
|
|
@@ -50600,7 +50773,7 @@ function groupTemplate(id) {
|
|
|
50600
50773
|
//#region src/generated/history-catalog.ts
|
|
50601
50774
|
/**
|
|
50602
50775
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
50603
|
-
* 45 caps with series (104 series),
|
|
50776
|
+
* 45 caps with series (104 series), 38 caps answered `'none'`.
|
|
50604
50777
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
50605
50778
|
*/
|
|
50606
50779
|
var HISTORY_CATALOG = {
|
|
@@ -51199,6 +51372,7 @@ var HISTORY_NONE_CAPS = [
|
|
|
51199
51372
|
"stream-signals",
|
|
51200
51373
|
"timed-run",
|
|
51201
51374
|
"update",
|
|
51375
|
+
"weather-station",
|
|
51202
51376
|
"zone-analytics",
|
|
51203
51377
|
"zone-rules",
|
|
51204
51378
|
"zones"
|
|
@@ -53209,6 +53383,17 @@ var RawSecretMigrationReportSchema = zod.z.object({
|
|
|
53209
53383
|
* so a block that throws or never returns is marked `failed` and visible
|
|
53210
53384
|
* instead of taking the hub with it (D6). Every method here is admin-only, and
|
|
53211
53385
|
* must stay so.
|
|
53386
|
+
*
|
|
53387
|
+
* **Calling a device cap from a block.** `ctx.api.<cap>.<method>.mutate(...)`
|
|
53388
|
+
* is the same call an addon makes — e.g. driving a `select` / `input_select`
|
|
53389
|
+
* device through `control` (#544, a UniFi-triggered script cycling a scene
|
|
53390
|
+
* selector):
|
|
53391
|
+
*
|
|
53392
|
+
* ```ts
|
|
53393
|
+
* await ctx.api.control.next.mutate({ deviceId, cycle: true })
|
|
53394
|
+
* await ctx.api.control.first.mutate({ deviceId })
|
|
53395
|
+
* const status = await ctx.api.control.getStatus.query({ deviceId })
|
|
53396
|
+
* ```
|
|
53212
53397
|
*/
|
|
53213
53398
|
/**
|
|
53214
53399
|
* Prefix for a block's generated addon id AND its runner id — one addon, one
|
|
@@ -63411,6 +63596,7 @@ var HERO_SCENE_BY_TYPE = {
|
|
|
63411
63596
|
[require_composed_stable_id.DeviceType.Control]: "control-dial",
|
|
63412
63597
|
[require_composed_stable_id.DeviceType.Presence]: "presence",
|
|
63413
63598
|
[require_composed_stable_id.DeviceType.Weather]: "weather",
|
|
63599
|
+
[require_composed_stable_id.DeviceType.WeatherStation]: "weather",
|
|
63414
63600
|
[require_composed_stable_id.DeviceType.Vacuum]: "vacuum",
|
|
63415
63601
|
[require_composed_stable_id.DeviceType.LawnMower]: "lawn-mower",
|
|
63416
63602
|
[require_composed_stable_id.DeviceType.Container]: "generic",
|
|
@@ -79564,6 +79750,8 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
79564
79750
|
"storage-location-low",
|
|
79565
79751
|
"storage-location-critical",
|
|
79566
79752
|
"storage-location-ok",
|
|
79753
|
+
"storage-drain-progress",
|
|
79754
|
+
"storage-drain-complete",
|
|
79567
79755
|
"addon-crash-loop",
|
|
79568
79756
|
"addon-update-available",
|
|
79569
79757
|
"server-update-available",
|
|
@@ -81325,6 +81513,14 @@ var NC_CONDITION_CATALOG = [
|
|
|
81325
81513
|
value: "storage-location-ok",
|
|
81326
81514
|
label: "Storage location ok again"
|
|
81327
81515
|
},
|
|
81516
|
+
{
|
|
81517
|
+
value: "storage-drain-progress",
|
|
81518
|
+
label: "Storage drain progress"
|
|
81519
|
+
},
|
|
81520
|
+
{
|
|
81521
|
+
value: "storage-drain-complete",
|
|
81522
|
+
label: "Storage drain complete"
|
|
81523
|
+
},
|
|
81328
81524
|
{
|
|
81329
81525
|
value: "addon-crash-loop",
|
|
81330
81526
|
label: "Addon stopped after repeated crashes"
|
|
@@ -99949,6 +100145,71 @@ var weatherCapability = {
|
|
|
99949
100145
|
]
|
|
99950
100146
|
}
|
|
99951
100147
|
};
|
|
100148
|
+
var WeatherStationStatusSchema = zod.z.object({
|
|
100149
|
+
temperature: zod.z.number().nullable().meta(require_sleep.readingMeta("temperature", { precision: 1 })),
|
|
100150
|
+
humidity: zod.z.number().min(0).max(100).nullable().meta(require_sleep.readingMeta("humidity")),
|
|
100151
|
+
pressure: zod.z.number().nullable().meta(require_sleep.readingMeta("pressure")),
|
|
100152
|
+
windSpeed: zod.z.number().nullable().meta(require_sleep.readingMeta("speed")),
|
|
100153
|
+
windGust: zod.z.number().nullable().meta(require_sleep.readingMeta("speed")),
|
|
100154
|
+
windBearing: zod.z.number().nullable().meta(require_sleep.readingMeta("angle")),
|
|
100155
|
+
rainRate: zod.z.number().nullable().meta(require_sleep.readingMeta("precipitation-rate", { precision: 1 })),
|
|
100156
|
+
rainDaily: zod.z.number().nullable().meta(require_sleep.readingMeta("precipitation", { precision: 1 })),
|
|
100157
|
+
rainEvent: zod.z.number().nullable().meta(require_sleep.readingMeta("precipitation", { precision: 1 })),
|
|
100158
|
+
uv: zod.z.number().nullable().meta(require_sleep.readingMeta("index", { precision: 1 })),
|
|
100159
|
+
solarRadiation: zod.z.number().nullable().meta(require_sleep.readingMeta("irradiance")),
|
|
100160
|
+
dewPoint: zod.z.number().nullable().meta(require_sleep.readingMeta("temperature", { precision: 1 }))
|
|
100161
|
+
}).extend({
|
|
100162
|
+
/** Ms epoch of the poll that produced this slice. 0 before the first one. */
|
|
100163
|
+
lastFetchedAt: zod.z.number() });
|
|
100164
|
+
var numeric = (field, quantity, label, unit, icon) => ({
|
|
100165
|
+
kind: "numeric",
|
|
100166
|
+
field,
|
|
100167
|
+
quantity,
|
|
100168
|
+
label,
|
|
100169
|
+
unit,
|
|
100170
|
+
icon
|
|
100171
|
+
});
|
|
100172
|
+
var weatherStationCapability = {
|
|
100173
|
+
name: "weather-station",
|
|
100174
|
+
scope: "device",
|
|
100175
|
+
deviceNative: true,
|
|
100176
|
+
mode: "singleton",
|
|
100177
|
+
deviceTypes: [require_composed_stable_id.DeviceType.WeatherStation],
|
|
100178
|
+
methods: {},
|
|
100179
|
+
status: {
|
|
100180
|
+
schema: WeatherStationStatusSchema,
|
|
100181
|
+
kind: "push"
|
|
100182
|
+
},
|
|
100183
|
+
runtimeState: WeatherStationStatusSchema,
|
|
100184
|
+
/**
|
|
100185
|
+
* The sensor children already record each reading. The station slice is the
|
|
100186
|
+
* live aggregate a template reads; it does not keep a second series.
|
|
100187
|
+
*/
|
|
100188
|
+
history: "none",
|
|
100189
|
+
/**
|
|
100190
|
+
* Runtime-state durability: **session** — a station reading is stale the
|
|
100191
|
+
* moment the hub is down; the provider re-reads on the next poll.
|
|
100192
|
+
*/
|
|
100193
|
+
durability: "session",
|
|
100194
|
+
vocabulary: {
|
|
100195
|
+
noun: require_sleep.t("Weather station", "Stazione meteo"),
|
|
100196
|
+
order: 5235,
|
|
100197
|
+
state: [
|
|
100198
|
+
numeric("temperature", require_sleep.t("the outdoor temperature", "la temperatura esterna"), require_sleep.t("Temperature", "Temperatura"), "°C", "thermometer"),
|
|
100199
|
+
numeric("humidity", require_sleep.t("the outdoor humidity", "l’umidità esterna"), require_sleep.t("Humidity", "Umidità"), "%", "droplets"),
|
|
100200
|
+
numeric("pressure", require_sleep.t("the air pressure", "la pressione atmosferica"), require_sleep.t("Pressure", "Pressione"), "hPa", "gauge"),
|
|
100201
|
+
numeric("windSpeed", require_sleep.t("the wind speed", "la velocità del vento"), require_sleep.t("Wind", "Vento"), "m/s", "wind"),
|
|
100202
|
+
numeric("windGust", require_sleep.t("the wind gust", "la raffica di vento"), require_sleep.t("Gust", "Raffica"), "m/s", "wind"),
|
|
100203
|
+
numeric("windBearing", require_sleep.t("the wind bearing", "la direzione del vento"), require_sleep.t("Wind bearing", "Direzione del vento"), "°", "wind"),
|
|
100204
|
+
numeric("rainRate", require_sleep.t("the rain rate", "l’intensità della pioggia"), require_sleep.t("Rain rate", "Intensità pioggia"), "mm/h", "droplets"),
|
|
100205
|
+
numeric("rainDaily", require_sleep.t("the rain today", "la pioggia di oggi"), require_sleep.t("Rain today", "Pioggia oggi"), "mm", "droplets"),
|
|
100206
|
+
numeric("rainEvent", require_sleep.t("the rain this event", "la pioggia di questo evento"), require_sleep.t("Rain event", "Evento di pioggia"), "mm", "droplets"),
|
|
100207
|
+
numeric("uv", require_sleep.t("the UV index", "l’indice UV"), require_sleep.t("UV", "UV"), "", "cloud-sun"),
|
|
100208
|
+
numeric("solarRadiation", require_sleep.t("the solar radiation", "la radiazione solare"), require_sleep.t("Solar", "Sole"), "W/m²", "cloud-sun"),
|
|
100209
|
+
numeric("dewPoint", require_sleep.t("the dew point", "il punto di rugiada"), require_sleep.t("Dew point", "Punto di rugiada"), "°C", "thermometer")
|
|
100210
|
+
]
|
|
100211
|
+
}
|
|
100212
|
+
};
|
|
99952
100213
|
//#endregion
|
|
99953
100214
|
//#region src/capabilities/webrtc-session.cap.ts
|
|
99954
100215
|
/**
|
|
@@ -101207,6 +101468,7 @@ var CAPABILITY_NAMES = {
|
|
|
101207
101468
|
viewerUi: "viewer-ui",
|
|
101208
101469
|
waterHeater: "water-heater",
|
|
101209
101470
|
weather: "weather",
|
|
101471
|
+
weatherStation: "weather-station",
|
|
101210
101472
|
webrtcSession: "webrtc-session",
|
|
101211
101473
|
zoneAnalytics: "zone-analytics",
|
|
101212
101474
|
zoneRules: "zone-rules",
|
|
@@ -102022,6 +102284,10 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
102022
102284
|
key: "weather",
|
|
102023
102285
|
name: "weather"
|
|
102024
102286
|
},
|
|
102287
|
+
{
|
|
102288
|
+
key: "weatherStation",
|
|
102289
|
+
name: "weather-station"
|
|
102290
|
+
},
|
|
102025
102291
|
{
|
|
102026
102292
|
key: "webrtcSession",
|
|
102027
102293
|
name: "webrtc-session"
|
|
@@ -102251,6 +102517,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
102251
102517
|
require_sleep.viewerUiCapability,
|
|
102252
102518
|
waterHeaterCapability,
|
|
102253
102519
|
weatherCapability,
|
|
102520
|
+
weatherStationCapability,
|
|
102254
102521
|
webrtcSessionCapability,
|
|
102255
102522
|
zoneAnalyticsCapability,
|
|
102256
102523
|
zoneRulesCapability,
|
|
@@ -103955,6 +104222,67 @@ function buildEventKindDescriptor(kind, source) {
|
|
|
103955
104222
|
};
|
|
103956
104223
|
}
|
|
103957
104224
|
//#endregion
|
|
104225
|
+
//#region src/capabilities/control-select-navigation.ts
|
|
104226
|
+
/**
|
|
104227
|
+
* Resolve the option a step lands on, given the select's current option
|
|
104228
|
+
* list and value.
|
|
104229
|
+
*
|
|
104230
|
+
* - `first` / `last` ignore `current` entirely — they only need a non-empty
|
|
104231
|
+
* option list.
|
|
104232
|
+
* - `next` / `previous` walk from `current`'s index. Past either end:
|
|
104233
|
+
* `cycle: true` wraps to the other end (HA `select_next` / `select_previous`
|
|
104234
|
+
* default); `cycle: false` STOPS — returns `null`, a no-op the caller must
|
|
104235
|
+
* not mistake for an error.
|
|
104236
|
+
*
|
|
104237
|
+
* Throws when the list is empty (nothing to select) or — for `next` /
|
|
104238
|
+
* `previous` only — when `current` is not one of `options` (there is no
|
|
104239
|
+
* index to step from; `first` / `last` never throw this one).
|
|
104240
|
+
*/
|
|
104241
|
+
function resolveSelectStep(options, current, direction, cycle) {
|
|
104242
|
+
if (options.length === 0) throw new Error("control: cannot step a select with no options");
|
|
104243
|
+
if (direction === "first") return options[0] ?? null;
|
|
104244
|
+
if (direction === "last") return options[options.length - 1] ?? null;
|
|
104245
|
+
const index = options.indexOf(current);
|
|
104246
|
+
if (index === -1) throw new Error(`control: current value "${current}" is not one of the select's options`);
|
|
104247
|
+
const raw = index + (direction === "next" ? 1 : -1);
|
|
104248
|
+
if (raw >= 0 && raw < options.length) return options[raw] ?? null;
|
|
104249
|
+
if (!cycle) return null;
|
|
104250
|
+
return options[(raw % options.length + options.length) % options.length] ?? null;
|
|
104251
|
+
}
|
|
104252
|
+
/**
|
|
104253
|
+
* The generic `next` / `previous` / `first` / `last` native-provider
|
|
104254
|
+
* implementation. A select-kind `control` provider calls this with its OWN
|
|
104255
|
+
* `getStatus` / `setValue` (every provider already has both) instead of
|
|
104256
|
+
* re-implementing the stepping math:
|
|
104257
|
+
*
|
|
104258
|
+
* ```ts
|
|
104259
|
+
* const provider: InferNativeProvider<typeof controlCapability> = {
|
|
104260
|
+
* getStatus,
|
|
104261
|
+
* setValue,
|
|
104262
|
+
* ...selectNavigationMethods(getStatus, (value) => setValue({ control: { kind: 'select', value } })),
|
|
104263
|
+
* }
|
|
104264
|
+
* ```
|
|
104265
|
+
*
|
|
104266
|
+
* Throws when `getStatus` answers a non-`select` slice — that is a provider
|
|
104267
|
+
* wiring mistake (only select-kind providers should spread this in), never a
|
|
104268
|
+
* runtime condition a script should handle.
|
|
104269
|
+
*/
|
|
104270
|
+
function selectNavigationMethods(getStatus, setValue) {
|
|
104271
|
+
const step = async (direction, cycle) => {
|
|
104272
|
+
const status = await getStatus();
|
|
104273
|
+
if (status.kind !== "select" || typeof status.value !== "string") throw new Error(`control.${direction}: not a select control (kind=${status.kind})`);
|
|
104274
|
+
const target = resolveSelectStep(status.options, status.value, direction, cycle);
|
|
104275
|
+
if (target === null) return;
|
|
104276
|
+
await setValue(target);
|
|
104277
|
+
};
|
|
104278
|
+
return {
|
|
104279
|
+
next: ({ cycle }) => step("next", cycle),
|
|
104280
|
+
previous: ({ cycle }) => step("previous", cycle),
|
|
104281
|
+
first: () => step("first", true),
|
|
104282
|
+
last: () => step("last", true)
|
|
104283
|
+
};
|
|
104284
|
+
}
|
|
104285
|
+
//#endregion
|
|
103958
104286
|
//#region src/capabilities/recording-onboard-rules.ts
|
|
103959
104287
|
/** Minutes in a day. `endMinute === 1440` means "to end of day". */
|
|
103960
104288
|
var MINUTES_PER_DAY = 1440;
|
|
@@ -109785,6 +110113,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
109785
110113
|
vibration: vibrationCapability,
|
|
109786
110114
|
waterHeater: waterHeaterCapability,
|
|
109787
110115
|
weather: weatherCapability,
|
|
110116
|
+
weatherStation: weatherStationCapability,
|
|
109788
110117
|
zoneAnalytics: zoneAnalyticsCapability,
|
|
109789
110118
|
zoneRules: zoneRulesCapability,
|
|
109790
110119
|
zones: zonesCapability
|
|
@@ -111882,6 +112211,7 @@ var DEVICE_TYPE_CONTROL_KIND = {
|
|
|
111882
112211
|
[require_composed_stable_id.DeviceType.Control]: "control",
|
|
111883
112212
|
[require_composed_stable_id.DeviceType.Presence]: "sensor",
|
|
111884
112213
|
[require_composed_stable_id.DeviceType.Weather]: "weather",
|
|
112214
|
+
[require_composed_stable_id.DeviceType.WeatherStation]: "dummy",
|
|
111885
112215
|
[require_composed_stable_id.DeviceType.Vacuum]: "vacuum",
|
|
111886
112216
|
[require_composed_stable_id.DeviceType.LawnMower]: "lawn-mower",
|
|
111887
112217
|
[require_composed_stable_id.DeviceType.Container]: "dummy",
|
|
@@ -113376,6 +113706,17 @@ var SENSORS_FAMILY_CONTRIBUTIONS = {
|
|
|
113376
113706
|
doorbell: doorbellContribution,
|
|
113377
113707
|
meter: meterContribution,
|
|
113378
113708
|
weather: weatherContribution,
|
|
113709
|
+
"weather-station": contribution("weather-station", WeatherStationStatusSchema, (slice) => {
|
|
113710
|
+
if (slice === void 0 || slice.temperature === null) return { reading: reading("weather", "unknown") };
|
|
113711
|
+
const celsius = `${number(slice.temperature)}°C`;
|
|
113712
|
+
const facts = [fact("reading", "thermometer", require_sleep.t(celsius, celsius), "primary")];
|
|
113713
|
+
if (slice.humidity !== null) facts.push(fact("reading", "droplets", require_sleep.t(`${Math.round(slice.humidity)}%`, `${Math.round(slice.humidity)}%`)));
|
|
113714
|
+
if (slice.windSpeed !== null) facts.push(fact("reading", "wind", require_sleep.t(`${number(slice.windSpeed)} m/s`, `${number(slice.windSpeed)} m/s`)));
|
|
113715
|
+
return {
|
|
113716
|
+
reading: reading("weather", "on", false, require_sleep.t(celsius, celsius)),
|
|
113717
|
+
facts
|
|
113718
|
+
};
|
|
113719
|
+
}),
|
|
113379
113720
|
update: updateContribution,
|
|
113380
113721
|
image: imageContribution,
|
|
113381
113722
|
button: buttonContribution,
|
|
@@ -114911,6 +115252,7 @@ var HERO_LAYOUT_BY_TYPE = {
|
|
|
114911
115252
|
[require_composed_stable_id.DeviceType.Control]: CONTROL_LAYOUT,
|
|
114912
115253
|
[require_composed_stable_id.DeviceType.Presence]: HERO_LAYOUT_DEFAULT,
|
|
114913
115254
|
[require_composed_stable_id.DeviceType.Weather]: HERO_LAYOUT_DEFAULT,
|
|
115255
|
+
[require_composed_stable_id.DeviceType.WeatherStation]: HERO_LAYOUT_DEFAULT,
|
|
114914
115256
|
[require_composed_stable_id.DeviceType.Vacuum]: VACUUM_LAYOUT,
|
|
114915
115257
|
[require_composed_stable_id.DeviceType.LawnMower]: MOWER_LAYOUT,
|
|
114916
115258
|
[require_composed_stable_id.DeviceType.Container]: HERO_LAYOUT_DEFAULT,
|
|
@@ -115636,6 +115978,7 @@ var HERO_LOOK_BY_TYPE = {
|
|
|
115636
115978
|
[require_composed_stable_id.DeviceType.Control]: CONTROL_LOOK,
|
|
115637
115979
|
[require_composed_stable_id.DeviceType.Presence]: PRESENCE_LOOK,
|
|
115638
115980
|
[require_composed_stable_id.DeviceType.Weather]: WEATHER_LOOK,
|
|
115981
|
+
[require_composed_stable_id.DeviceType.WeatherStation]: WEATHER_LOOK,
|
|
115639
115982
|
[require_composed_stable_id.DeviceType.Vacuum]: VACUUM_LOOK,
|
|
115640
115983
|
[require_composed_stable_id.DeviceType.LawnMower]: MOWER_LOOK,
|
|
115641
115984
|
[require_composed_stable_id.DeviceType.Container]: HERO_LOOK_DEFAULT,
|
|
@@ -116140,6 +116483,7 @@ var HERO_CAP_COVERAGE = {
|
|
|
116140
116483
|
videoclips: { none: NOT_A_HERO_FACT },
|
|
116141
116484
|
"water-heater": "contributes",
|
|
116142
116485
|
weather: "contributes",
|
|
116486
|
+
"weather-station": "contributes",
|
|
116143
116487
|
"webrtc-session": { none: NOT_A_HERO_FACT },
|
|
116144
116488
|
"zone-analytics": { none: NOT_A_HERO_FACT },
|
|
116145
116489
|
"zone-rules": { none: NOT_A_HERO_FACT },
|
|
@@ -117465,6 +117809,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
117465
117809
|
access: "view",
|
|
117466
117810
|
role: "viewer"
|
|
117467
117811
|
},
|
|
117812
|
+
"control.first": {
|
|
117813
|
+
capName: "control",
|
|
117814
|
+
capScope: "device",
|
|
117815
|
+
addonId: null,
|
|
117816
|
+
access: "create",
|
|
117817
|
+
role: "viewer"
|
|
117818
|
+
},
|
|
117468
117819
|
"control.getStatus": {
|
|
117469
117820
|
capName: "control",
|
|
117470
117821
|
capScope: "device",
|
|
@@ -117472,6 +117823,27 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
117472
117823
|
access: "view",
|
|
117473
117824
|
role: "viewer"
|
|
117474
117825
|
},
|
|
117826
|
+
"control.last": {
|
|
117827
|
+
capName: "control",
|
|
117828
|
+
capScope: "device",
|
|
117829
|
+
addonId: null,
|
|
117830
|
+
access: "create",
|
|
117831
|
+
role: "viewer"
|
|
117832
|
+
},
|
|
117833
|
+
"control.next": {
|
|
117834
|
+
capName: "control",
|
|
117835
|
+
capScope: "device",
|
|
117836
|
+
addonId: null,
|
|
117837
|
+
access: "create",
|
|
117838
|
+
role: "viewer"
|
|
117839
|
+
},
|
|
117840
|
+
"control.previous": {
|
|
117841
|
+
capName: "control",
|
|
117842
|
+
capScope: "device",
|
|
117843
|
+
addonId: null,
|
|
117844
|
+
access: "create",
|
|
117845
|
+
role: "viewer"
|
|
117846
|
+
},
|
|
117475
117847
|
"control.setValue": {
|
|
117476
117848
|
capName: "control",
|
|
117477
117849
|
capScope: "device",
|
|
@@ -126418,6 +126790,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
126418
126790
|
access: "view",
|
|
126419
126791
|
role: "viewer"
|
|
126420
126792
|
},
|
|
126793
|
+
"weatherStation.getStatus": {
|
|
126794
|
+
capName: "weather-station",
|
|
126795
|
+
capScope: "device",
|
|
126796
|
+
addonId: null,
|
|
126797
|
+
access: "view",
|
|
126798
|
+
role: "viewer"
|
|
126799
|
+
},
|
|
126421
126800
|
"webrtcSession.addIceCandidate": {
|
|
126422
126801
|
capName: "webrtc-session",
|
|
126423
126802
|
capScope: "device",
|
|
@@ -126777,6 +127156,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
126777
127156
|
"viewer-ui",
|
|
126778
127157
|
"water-heater",
|
|
126779
127158
|
"weather",
|
|
127159
|
+
"weather-station",
|
|
126780
127160
|
"webrtc-session",
|
|
126781
127161
|
"zone-analytics",
|
|
126782
127162
|
"zone-rules",
|
|
@@ -126885,6 +127265,7 @@ var DEVICE_CAP_NAMES = [
|
|
|
126885
127265
|
"videoclips",
|
|
126886
127266
|
"water-heater",
|
|
126887
127267
|
"weather",
|
|
127268
|
+
"weather-station",
|
|
126888
127269
|
"webrtc-session",
|
|
126889
127270
|
"zone-analytics",
|
|
126890
127271
|
"zone-rules",
|
|
@@ -127577,6 +127958,7 @@ var DEVICE_TYPE_ICON = {
|
|
|
127577
127958
|
[require_composed_stable_id.DeviceType.Control]: "sliders-horizontal",
|
|
127578
127959
|
[require_composed_stable_id.DeviceType.Presence]: "map-pin",
|
|
127579
127960
|
[require_composed_stable_id.DeviceType.Weather]: "cloud-sun",
|
|
127961
|
+
[require_composed_stable_id.DeviceType.WeatherStation]: "cloud-sun",
|
|
127580
127962
|
[require_composed_stable_id.DeviceType.Vacuum]: "bot",
|
|
127581
127963
|
[require_composed_stable_id.DeviceType.LawnMower]: "tractor",
|
|
127582
127964
|
[require_composed_stable_id.DeviceType.Container]: "box",
|
|
@@ -129003,7 +129385,8 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
129003
129385
|
"valve",
|
|
129004
129386
|
"vibration",
|
|
129005
129387
|
"water-heater",
|
|
129006
|
-
"weather"
|
|
129388
|
+
"weather",
|
|
129389
|
+
"weather-station"
|
|
129007
129390
|
];
|
|
129008
129391
|
//#endregion
|
|
129009
129392
|
//#region src/generated/method-device-selectors.ts
|
|
@@ -129342,11 +129725,31 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
129342
129725
|
form: "single",
|
|
129343
129726
|
optional: false
|
|
129344
129727
|
}],
|
|
129728
|
+
"control.first": [{
|
|
129729
|
+
name: "deviceId",
|
|
129730
|
+
form: "single",
|
|
129731
|
+
optional: false
|
|
129732
|
+
}],
|
|
129345
129733
|
"control.getStatus": [{
|
|
129346
129734
|
name: "deviceId",
|
|
129347
129735
|
form: "single",
|
|
129348
129736
|
optional: false
|
|
129349
129737
|
}],
|
|
129738
|
+
"control.last": [{
|
|
129739
|
+
name: "deviceId",
|
|
129740
|
+
form: "single",
|
|
129741
|
+
optional: false
|
|
129742
|
+
}],
|
|
129743
|
+
"control.next": [{
|
|
129744
|
+
name: "deviceId",
|
|
129745
|
+
form: "single",
|
|
129746
|
+
optional: false
|
|
129747
|
+
}],
|
|
129748
|
+
"control.previous": [{
|
|
129749
|
+
name: "deviceId",
|
|
129750
|
+
form: "single",
|
|
129751
|
+
optional: false
|
|
129752
|
+
}],
|
|
129350
129753
|
"control.setValue": [{
|
|
129351
129754
|
name: "deviceId",
|
|
129352
129755
|
form: "single",
|
|
@@ -132012,6 +132415,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
132012
132415
|
form: "single",
|
|
132013
132416
|
optional: false
|
|
132014
132417
|
}],
|
|
132418
|
+
"weatherStation.getStatus": [{
|
|
132419
|
+
name: "deviceId",
|
|
132420
|
+
form: "single",
|
|
132421
|
+
optional: false
|
|
132422
|
+
}],
|
|
132015
132423
|
"webrtcSession.addIceCandidate": [{
|
|
132016
132424
|
name: "deviceId",
|
|
132017
132425
|
form: "single",
|
|
@@ -132359,7 +132767,7 @@ function getCapsByProviderKind(kind) {
|
|
|
132359
132767
|
//#region src/generated/runtime-state-durability.ts
|
|
132360
132768
|
/**
|
|
132361
132769
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
132362
|
-
* `runtimeState`.
|
|
132770
|
+
* `runtimeState`. 84 caps: 42 `restored`, 42 `session`.
|
|
132363
132771
|
*
|
|
132364
132772
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
132365
132773
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -132687,6 +133095,10 @@ var RUNTIME_STATE_POLICY = {
|
|
|
132687
133095
|
durability: "session",
|
|
132688
133096
|
volatileFields: []
|
|
132689
133097
|
},
|
|
133098
|
+
"weather-station": {
|
|
133099
|
+
durability: "session",
|
|
133100
|
+
volatileFields: []
|
|
133101
|
+
},
|
|
132690
133102
|
"zone-analytics": {
|
|
132691
133103
|
durability: "session",
|
|
132692
133104
|
volatileFields: []
|
|
@@ -135292,7 +135704,7 @@ function systemEventFilterApplies(kind, filter) {
|
|
|
135292
135704
|
switch (filter) {
|
|
135293
135705
|
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("package-llm-") || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
135294
135706
|
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("package-llm-");
|
|
135295
|
-
case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated" || kind.startsWith("storage-location-") || kind.startsWith("alert-");
|
|
135707
|
+
case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated" || kind.startsWith("storage-location-") || kind.startsWith("storage-drain-") || kind.startsWith("alert-");
|
|
135296
135708
|
case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
|
|
135297
135709
|
case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
|
|
135298
135710
|
case "commandActions":
|
|
@@ -135380,6 +135792,8 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
135380
135792
|
"storage-location-low": "system",
|
|
135381
135793
|
"storage-location-critical": "system",
|
|
135382
135794
|
"storage-location-ok": "system",
|
|
135795
|
+
"storage-drain-progress": "system",
|
|
135796
|
+
"storage-drain-complete": "system",
|
|
135383
135797
|
"alarm-triggered": "alarm",
|
|
135384
135798
|
"alarm-armed": "alarm",
|
|
135385
135799
|
"alarm-disarmed": "alarm",
|
|
@@ -135536,6 +135950,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
135536
135950
|
"storage-location-ok"
|
|
135537
135951
|
]
|
|
135538
135952
|
},
|
|
135953
|
+
{
|
|
135954
|
+
id: "storage-drain",
|
|
135955
|
+
family: "system",
|
|
135956
|
+
label: "Storage drain progress",
|
|
135957
|
+
kinds: ["storage-drain-progress", "storage-drain-complete"]
|
|
135958
|
+
},
|
|
135539
135959
|
{
|
|
135540
135960
|
id: "alerts",
|
|
135541
135961
|
family: "system",
|
|
@@ -137527,6 +137947,7 @@ var ALERT_EPISODE = [
|
|
|
137527
137947
|
"alert-error",
|
|
137528
137948
|
"alert-critical-resolved"
|
|
137529
137949
|
];
|
|
137950
|
+
var STORAGE_DRAIN = ["storage-drain-progress", "storage-drain-complete"];
|
|
137530
137951
|
var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
|
|
137531
137952
|
var UPDATES = [
|
|
137532
137953
|
"addon-update-available",
|
|
@@ -138171,6 +138592,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
138171
138592
|
"storage-location-low",
|
|
138172
138593
|
"storage-location-critical",
|
|
138173
138594
|
"storage-location-ok",
|
|
138595
|
+
...STORAGE_DRAIN,
|
|
138174
138596
|
...ALERT_EPISODE
|
|
138175
138597
|
]
|
|
138176
138598
|
},
|
|
@@ -138194,6 +138616,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
138194
138616
|
"storage-location-low",
|
|
138195
138617
|
"storage-location-critical",
|
|
138196
138618
|
"storage-location-ok",
|
|
138619
|
+
...STORAGE_DRAIN,
|
|
138197
138620
|
...ALERT_EPISODE
|
|
138198
138621
|
]
|
|
138199
138622
|
},
|
|
@@ -138359,7 +138782,8 @@ var NC_TEMPLATE_VARS = [
|
|
|
138359
138782
|
systemEventKinds: [
|
|
138360
138783
|
"storage-location-low",
|
|
138361
138784
|
"storage-location-critical",
|
|
138362
|
-
"storage-location-ok"
|
|
138785
|
+
"storage-location-ok",
|
|
138786
|
+
...STORAGE_DRAIN
|
|
138363
138787
|
]
|
|
138364
138788
|
},
|
|
138365
138789
|
{
|
|
@@ -138373,9 +138797,40 @@ var NC_TEMPLATE_VARS = [
|
|
|
138373
138797
|
systemEventKinds: [
|
|
138374
138798
|
"storage-location-low",
|
|
138375
138799
|
"storage-location-critical",
|
|
138376
|
-
"storage-location-ok"
|
|
138800
|
+
"storage-location-ok",
|
|
138801
|
+
...STORAGE_DRAIN
|
|
138377
138802
|
]
|
|
138378
138803
|
},
|
|
138804
|
+
{
|
|
138805
|
+
name: "bytesRemainingGb",
|
|
138806
|
+
label: "Bytes remaining (GB)",
|
|
138807
|
+
example: "42.3",
|
|
138808
|
+
group: "system",
|
|
138809
|
+
families: ["rule"],
|
|
138810
|
+
fields: [...RULE_TEXT],
|
|
138811
|
+
kinds: ["system"],
|
|
138812
|
+
systemEventKinds: ["storage-drain-progress"]
|
|
138813
|
+
},
|
|
138814
|
+
{
|
|
138815
|
+
name: "rateGbPerDay",
|
|
138816
|
+
label: "Drain rate (GB/day)",
|
|
138817
|
+
example: "1.20",
|
|
138818
|
+
group: "system",
|
|
138819
|
+
families: ["rule"],
|
|
138820
|
+
fields: [...RULE_TEXT],
|
|
138821
|
+
kinds: ["system"],
|
|
138822
|
+
systemEventKinds: ["storage-drain-progress"]
|
|
138823
|
+
},
|
|
138824
|
+
{
|
|
138825
|
+
name: "etaDate",
|
|
138826
|
+
label: "Estimated empty date",
|
|
138827
|
+
example: "2026-12-01",
|
|
138828
|
+
group: "system",
|
|
138829
|
+
families: ["rule"],
|
|
138830
|
+
fields: [...RULE_TEXT],
|
|
138831
|
+
kinds: ["system"],
|
|
138832
|
+
systemEventKinds: ["storage-drain-progress"]
|
|
138833
|
+
},
|
|
138379
138834
|
{
|
|
138380
138835
|
name: "freePercent",
|
|
138381
138836
|
label: "Free space (%)",
|
|
@@ -138810,7 +139265,9 @@ var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
|
138810
139265
|
"rule-repaired",
|
|
138811
139266
|
"package-llm-silent",
|
|
138812
139267
|
"package-llm-answered",
|
|
138813
|
-
"device-command"
|
|
139268
|
+
"device-command",
|
|
139269
|
+
"storage-drain-progress",
|
|
139270
|
+
"storage-drain-complete"
|
|
138814
139271
|
];
|
|
138815
139272
|
/**
|
|
138816
139273
|
* The catalog as `getTemplateCatalog` SERVES it: every descriptor, with the
|
|
@@ -146590,6 +147047,7 @@ exports.CleanupDeletedDevicesResultSchema = CleanupDeletedDevicesResultSchema;
|
|
|
146590
147047
|
exports.ClearTrackRelationInputSchema = ClearTrackRelationInputSchema;
|
|
146591
147048
|
exports.ClearTrackRelationResultSchema = ClearTrackRelationResultSchema;
|
|
146592
147049
|
exports.ClientNetworkStatsSchema = ClientNetworkStatsSchema;
|
|
147050
|
+
exports.ClimateActionSchema = ClimateActionSchema;
|
|
146593
147051
|
exports.ClimateControlStatusSchema = ClimateControlStatusSchema;
|
|
146594
147052
|
exports.ClipBytesOfferSchema = ClipBytesOfferSchema;
|
|
146595
147053
|
exports.ClipBytesSchema = ClipBytesSchema;
|
|
@@ -148803,6 +149261,7 @@ exports.WELL_KNOWN_TABS = require_sleep.WELL_KNOWN_TABS;
|
|
|
148803
149261
|
exports.WELL_KNOWN_TAB_MAP = require_sleep.WELL_KNOWN_TAB_MAP;
|
|
148804
149262
|
exports.WHEN_UNROLL_DEPTH = WHEN_UNROLL_DEPTH;
|
|
148805
149263
|
exports.WaterHeaterStatusSchema = WaterHeaterStatusSchema;
|
|
149264
|
+
exports.WeatherStationStatusSchema = WeatherStationStatusSchema;
|
|
148806
149265
|
exports.WeatherStatusSchema = WeatherStatusSchema;
|
|
148807
149266
|
exports.WebrtcClimbHoldSchema = WebrtcClimbHoldSchema;
|
|
148808
149267
|
exports.WebrtcLadderDecisionSchema = WebrtcLadderDecisionSchema;
|
|
@@ -149991,6 +150450,7 @@ exports.resolveRootSupply = resolveRootSupply;
|
|
|
149991
150450
|
exports.resolveRunnerId = resolveRunnerId;
|
|
149992
150451
|
exports.resolveSecretMarkers = require_sleep.resolveSecretMarkers;
|
|
149993
150452
|
exports.resolveSecretViewsIn = require_sleep.resolveSecretViewsIn;
|
|
150453
|
+
exports.resolveSelectStep = resolveSelectStep;
|
|
149994
150454
|
exports.resolveServerName = resolveServerName;
|
|
149995
150455
|
exports.resolveStepArgs = resolveStepArgs;
|
|
149996
150456
|
exports.resolveStepArgsWithTemplates = resolveStepArgsWithTemplates;
|
|
@@ -150080,6 +150540,7 @@ exports.seekPatch = seekPatch;
|
|
|
150080
150540
|
exports.selectAppConnectionEndpoints = selectAppConnectionEndpoints;
|
|
150081
150541
|
exports.selectAssignedProfileSlots = require_sleep.selectAssignedProfileSlots;
|
|
150082
150542
|
exports.selectFewShots = selectFewShots;
|
|
150543
|
+
exports.selectNavigationMethods = selectNavigationMethods;
|
|
150083
150544
|
exports.selectRecoveryStep = selectRecoveryStep;
|
|
150084
150545
|
exports.sendTimesForEditor = sendTimesForEditor;
|
|
150085
150546
|
exports.sendTimesOfSchedule = sendTimesOfSchedule;
|
|
@@ -150299,6 +150760,7 @@ exports.waitUntil = waitUntil;
|
|
|
150299
150760
|
exports.waterHeaterCapability = waterHeaterCapability;
|
|
150300
150761
|
exports.wattMillisecondsToKwh = require_implemented_methods.wattMillisecondsToKwh;
|
|
150301
150762
|
exports.weatherCapability = weatherCapability;
|
|
150763
|
+
exports.weatherStationCapability = weatherStationCapability;
|
|
150302
150764
|
exports.webrtcClientHintsSchema = webrtcClientHintsSchema;
|
|
150303
150765
|
exports.webrtcSessionCapability = webrtcSessionCapability;
|
|
150304
150766
|
exports.weekdayOfLocalDate = weekdayOfLocalDate;
|