@camstack/types 1.2.547 → 1.2.549
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 +20 -0
- package/dist/addon.js +5 -5
- package/dist/addon.mjs +5 -5
- package/dist/automation/condition-eval.d.ts +24 -0
- package/dist/automation/hold.d.ts +11 -0
- package/dist/automation/index.d.ts +6 -4
- package/dist/automation/recipe.d.ts +5 -0
- package/dist/automation/step-condition.d.ts +7 -2
- package/dist/automation/trace.d.ts +6 -0
- package/dist/automation/trigger-variables.d.ts +3 -1
- package/dist/automation/when-site.d.ts +27 -0
- package/dist/automation/when.d.ts +107 -1
- package/dist/capabilities/accessories.cap.d.ts +1 -1
- package/dist/capabilities/actions.cap.d.ts +2 -0
- package/dist/capabilities/battery.cap.d.ts +2 -2
- package/dist/capabilities/capability-definition.d.ts +47 -1
- package/dist/capabilities/climate-control.cap.d.ts +8 -1
- package/dist/capabilities/core-blocks.cap.d.ts +8 -0
- package/dist/capabilities/customize-catalog.d.ts +3 -1
- package/dist/capabilities/customize-spec.d.ts +26 -2
- package/dist/capabilities/device-manager.cap.d.ts +6 -0
- package/dist/capabilities/fan-control.cap.d.ts +248 -0
- package/dist/capabilities/fan-presets.cap.d.ts +172 -536
- package/dist/capabilities/group-active.cap.d.ts +1 -1
- package/dist/capabilities/group-commands.cap.d.ts +1 -1
- package/dist/capabilities/group-status.cap.d.ts +1 -1
- package/dist/capabilities/heating-valve.cap.d.ts +1 -1
- package/dist/capabilities/hero-layout.cap.d.ts +2 -0
- package/dist/capabilities/humidifier.cap.d.ts +5 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +4 -4
- package/dist/capabilities/media-player.cap.d.ts +7 -0
- package/dist/capabilities/pet-fountain.cap.d.ts +5 -0
- package/dist/capabilities/power-meter.cap.d.ts +5 -5
- package/dist/capabilities/power-source.cap.d.ts +5 -0
- package/dist/capabilities/running-state.cap.d.ts +2 -2
- package/dist/capabilities/schedulers.cap.d.ts +2 -0
- package/dist/capabilities/switch.cap.d.ts +1 -1
- package/dist/capabilities/temperature-sensor.cap.d.ts +1 -1
- package/dist/capabilities/timed-run.cap.d.ts +19 -5
- package/dist/capabilities/water-heater.cap.d.ts +7 -0
- package/dist/client.js +7 -11
- package/dist/client.mjs +7 -11
- package/dist/{composed-stable-id-DrGLxjVF.js → composed-stable-id-CDNLq7Y8.js} +27 -10
- package/dist/{composed-stable-id-DFNyOFzz.mjs → composed-stable-id-CPp3votu.mjs} +27 -10
- package/dist/composition/composition-report.d.ts +6 -0
- package/dist/composition/evaluate-field.d.ts +7 -0
- package/dist/composition/field-kinds.d.ts +12 -1
- package/dist/composition/helpers/index.d.ts +1 -1
- package/dist/composition/helpers/source-pick.d.ts +0 -5
- package/dist/composition/power-source-link.d.ts +15 -0
- package/dist/composition/state-fields.d.ts +2 -0
- package/dist/composition/validate-composition.d.ts +15 -1
- package/dist/device/base-device-provider.d.ts +13 -0
- package/dist/device/device-control-resolution.d.ts +1 -33
- package/dist/device/device-kind.d.ts +36 -0
- package/dist/device/device-management.d.ts +3 -0
- package/dist/device/device-type.d.ts +27 -10
- package/dist/device/hero/hero-fragment.d.ts +2 -0
- package/dist/device/hero/hero-layout.d.ts +1 -3
- package/dist/device/hero/hero-look.d.ts +18 -12
- package/dist/device/hero/hero-scene.d.ts +9 -3
- package/dist/device/index.d.ts +2 -1
- package/dist/device/power-switch.d.ts +82 -0
- package/dist/device/schema-fields.d.ts +10 -1
- package/dist/generated/addon-api.d.ts +27 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +257 -8
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/{implemented-methods-M5aguGon.mjs → implemented-methods-5YMDeE3f.mjs} +1 -1
- package/dist/{implemented-methods-8AU92riC.js → implemented-methods-Cj65uy2F.js} +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.js +1783 -451
- package/dist/index.mjs +1740 -445
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-D_NpiLFP.mjs → sleep-Bn346wCJ.mjs} +46 -1
- package/dist/{sleep-vzHEmsrO.js → sleep-LFKpQ2_f.js} +46 -1
- package/dist/time/index.d.ts +1 -0
- package/dist/time/time-spec.d.ts +5 -0
- package/dist/time/time-window.d.ts +33 -0
- package/package.json +1 -1
|
@@ -92,7 +92,14 @@ export declare const climateControlCapability: {
|
|
|
92
92
|
readonly scope: 'device';
|
|
93
93
|
readonly deviceNative: true;
|
|
94
94
|
readonly mode: 'singleton';
|
|
95
|
-
readonly deviceTypes: readonly [DeviceType.
|
|
95
|
+
readonly deviceTypes: readonly [DeviceType.Climate];
|
|
96
|
+
readonly power: {
|
|
97
|
+
readonly kind: 'mode';
|
|
98
|
+
readonly field: 'mode';
|
|
99
|
+
readonly offValue: 'off';
|
|
100
|
+
readonly set: 'setMode';
|
|
101
|
+
readonly lastField: 'lastActiveMode';
|
|
102
|
+
};
|
|
96
103
|
readonly methods: {
|
|
97
104
|
readonly setMode: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
98
105
|
deviceId: z.ZodNumber;
|
|
@@ -13881,10 +13881,12 @@ export declare const coreBlocksCapability: {
|
|
|
13881
13881
|
"not-composable": "not-composable";
|
|
13882
13882
|
"not-item-array": "not-item-array";
|
|
13883
13883
|
"not-replaceable": "not-replaceable";
|
|
13884
|
+
"power-source-is-actuator": "power-source-is-actuator";
|
|
13884
13885
|
"reserved-variant": "reserved-variant";
|
|
13885
13886
|
retention: "retention";
|
|
13886
13887
|
"source-capability-missing": "source-capability-missing";
|
|
13887
13888
|
"source-field-unknown": "source-field-unknown";
|
|
13889
|
+
"source-kind-mismatch": "source-kind-mismatch";
|
|
13888
13890
|
"source-missing": "source-missing";
|
|
13889
13891
|
"source-unreadable": "source-unreadable";
|
|
13890
13892
|
"target-missing": "target-missing";
|
|
@@ -14167,6 +14169,8 @@ export declare const coreBlocksCapability: {
|
|
|
14167
14169
|
schedule: "schedule";
|
|
14168
14170
|
stationary: "stationary";
|
|
14169
14171
|
"stationary-present": "stationary-present";
|
|
14172
|
+
"time-is": "time-is";
|
|
14173
|
+
"triggered-by": "triggered-by";
|
|
14170
14174
|
}>;
|
|
14171
14175
|
outcome: z.ZodEnum<{
|
|
14172
14176
|
fail: "fail";
|
|
@@ -14352,6 +14356,8 @@ export declare const coreBlocksCapability: {
|
|
|
14352
14356
|
schedule: "schedule";
|
|
14353
14357
|
stationary: "stationary";
|
|
14354
14358
|
"stationary-present": "stationary-present";
|
|
14359
|
+
"time-is": "time-is";
|
|
14360
|
+
"triggered-by": "triggered-by";
|
|
14355
14361
|
}>;
|
|
14356
14362
|
outcome: z.ZodEnum<{
|
|
14357
14363
|
fail: "fail";
|
|
@@ -14533,6 +14539,8 @@ export declare const coreBlocksCapability: {
|
|
|
14533
14539
|
schedule: "schedule";
|
|
14534
14540
|
stationary: "stationary";
|
|
14535
14541
|
"stationary-present": "stationary-present";
|
|
14542
|
+
"time-is": "time-is";
|
|
14543
|
+
"triggered-by": "triggered-by";
|
|
14536
14544
|
}>;
|
|
14537
14545
|
outcome: z.ZodEnum<{
|
|
14538
14546
|
fail: "fail";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* server read this projection, not the cap module.
|
|
4
4
|
*/
|
|
5
5
|
import type { DeviceType } from '../device/device-type.js';
|
|
6
|
-
import type { CameraSensorCustomizeMode, CustomizeApplyAuthority, CustomizeApplyMode, CustomizeCardinality, CustomizeCompanion, CustomizeEventEdge, CustomizeOverridable, CustomizeOverrideRule, CustomizeSourceReport, CustomizeValueKind, ThresholdDeviceTypeDefaults } from './customize-spec.js';
|
|
6
|
+
import type { CameraSensorCustomizeMode, CustomizeApplyAuthority, CustomizeApplyMode, CustomizeCardinality, CustomizeCompanion, CustomizeEventEdge, CustomizeOverridable, CustomizeOverrideRule, CustomizeSourceReport, CustomizeTargetSection, CustomizeValueKind, ThresholdDeviceTypeDefaults } from './customize-spec.js';
|
|
7
7
|
export type CustomizeCatalogValueKind = 'boolean' | 'number' | 'string' | 'enum';
|
|
8
8
|
export type CustomizeCatalogTransform = {
|
|
9
9
|
readonly kind: 'identity';
|
|
@@ -95,6 +95,8 @@ export interface CustomizeCatalogTarget {
|
|
|
95
95
|
readonly companions?: readonly CustomizeCompanion[];
|
|
96
96
|
readonly sourceReport: CustomizeSourceReport;
|
|
97
97
|
readonly advancedExpression: boolean;
|
|
98
|
+
/** The Customize section the cap files this target under (D1034). */
|
|
99
|
+
readonly section?: CustomizeTargetSection;
|
|
98
100
|
}
|
|
99
101
|
export interface CustomizeCatalogEntry {
|
|
100
102
|
readonly version: 1;
|
|
@@ -22,6 +22,13 @@ export type CustomizeEventShape = (typeof CUSTOMIZE_EVENT_SHAPES)[number];
|
|
|
22
22
|
export declare const CUSTOMIZE_APPLY_AUTHORITY_KINDS: readonly ['composition-claim', 'camera-sensors'];
|
|
23
23
|
export type CustomizeApplyAuthorityKind = (typeof CUSTOMIZE_APPLY_AUTHORITY_KINDS)[number];
|
|
24
24
|
export type CustomizeValueKind = 'boolean' | 'number' | 'string' | 'enum';
|
|
25
|
+
/**
|
|
26
|
+
* A named group a cap may file its targets under in the Customize table
|
|
27
|
+
* (D1034). Admin-ui keys a section title off this list; a target without one
|
|
28
|
+
* lands in the section its cardinality implies.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CUSTOMIZE_TARGET_SECTIONS: readonly ['oscillation-axes'];
|
|
31
|
+
export type CustomizeTargetSection = (typeof CUSTOMIZE_TARGET_SECTIONS)[number];
|
|
25
32
|
/**
|
|
26
33
|
* `add`: an extension is offered only when the device lacks the capability (D944).
|
|
27
34
|
* `replace`: the extension replaces a NATIVE field, and only a field the cap
|
|
@@ -30,7 +37,11 @@ export type CustomizeValueKind = 'boolean' | 'number' | 'string' | 'enum';
|
|
|
30
37
|
export type CustomizeApplyMode = 'add' | 'replace';
|
|
31
38
|
/** A native field a named extension of the same cap may replace. The only door to `apply: 'replace'`. */
|
|
32
39
|
export interface CustomizeOverridable {
|
|
33
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* State field of the cap's runtime slice: top-level, or a dotted leaf
|
|
42
|
+
* (`oscillationAxes.horizontal.angle`, D1034) — the claim then owns that
|
|
43
|
+
* leaf only and the hub sets it into the native object.
|
|
44
|
+
*/
|
|
34
45
|
readonly path: string;
|
|
35
46
|
/** The id of the scalar target allowed to replace it. */
|
|
36
47
|
readonly by: string;
|
|
@@ -63,6 +74,8 @@ export interface CustomizeTargetBase {
|
|
|
63
74
|
readonly apply: CustomizeApplyMode;
|
|
64
75
|
readonly sourceReport: CustomizeSourceReport;
|
|
65
76
|
readonly advancedExpression?: boolean;
|
|
77
|
+
/** The Customize section the target is listed under (D1034). */
|
|
78
|
+
readonly section?: CustomizeTargetSection;
|
|
66
79
|
}
|
|
67
80
|
export type CustomizeSourceSpec = SwitchSourceSpec | BinarySourceSpec | NumericSourceSpec | EnumSourceSpec | FieldSourceSpec;
|
|
68
81
|
export interface SwitchSourceSpec {
|
|
@@ -156,7 +169,7 @@ export interface CustomizeSourceReport {
|
|
|
156
169
|
readonly nativeValue?: string;
|
|
157
170
|
readonly assignedValue?: string;
|
|
158
171
|
}
|
|
159
|
-
export type CustomizeCompanion = CustomizeConstantCompanion | CustomizeClockCompanion | CustomizeTransitionTimeCompanion;
|
|
172
|
+
export type CustomizeCompanion = CustomizeConstantCompanion | CustomizeClockCompanion | CustomizeTransitionTimeCompanion | CustomizeSourceFieldCompanion;
|
|
160
173
|
export interface CustomizeConstantCompanion {
|
|
161
174
|
readonly kind: 'constant';
|
|
162
175
|
readonly path: string;
|
|
@@ -174,6 +187,17 @@ export interface CustomizeClockCompanion {
|
|
|
174
187
|
readonly path: string;
|
|
175
188
|
readonly when: 'add' | 'always';
|
|
176
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Another field of the SAME linked source, written beside the assigned value
|
|
192
|
+
* (D1034): a fan axis takes its limits from the `min`/`max`/`step` of the
|
|
193
|
+
* control linked to its angle. Rides with the field on an add and a replace.
|
|
194
|
+
*/
|
|
195
|
+
export interface CustomizeSourceFieldCompanion {
|
|
196
|
+
readonly kind: 'source-field';
|
|
197
|
+
readonly path: string;
|
|
198
|
+
/** The field of the linked source device's cap. */
|
|
199
|
+
readonly field: string;
|
|
200
|
+
}
|
|
177
201
|
export interface CustomizeTransitionTimeCompanion {
|
|
178
202
|
readonly kind: 'transition-time';
|
|
179
203
|
readonly path: string;
|
|
@@ -859,7 +859,13 @@ export declare const deviceManagerCapability: {
|
|
|
859
859
|
enum: "enum";
|
|
860
860
|
number: "number";
|
|
861
861
|
string: "string";
|
|
862
|
+
union: "union";
|
|
862
863
|
}>;
|
|
864
|
+
unionMembers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
865
|
+
boolean: "boolean";
|
|
866
|
+
number: "number";
|
|
867
|
+
string: "string";
|
|
868
|
+
}>>>;
|
|
863
869
|
enumValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
864
870
|
item: z.ZodOptional<z.ZodBoolean>;
|
|
865
871
|
quantity: z.ZodOptional<z.ZodType<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown, z.core.$ZodTypeInternals<"angle" | "apparent-power" | "area" | "bitrate" | "colour-temperature" | "concentration-mass" | "concentration-ppb" | "concentration-volume" | "count" | "current" | "device" | "duration" | "duration-ms" | "energy" | "humidity" | "illuminance" | "index" | "information" | "irradiance" | "length" | "mass" | "none" | "percentage" | "power" | "precipitation" | "precipitation-rate" | "pressure" | "rate" | "ratio" | "signal-level" | "sound-level" | "speed" | "temperature" | "voltage" | "volume", unknown>>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import type { ScalarCustomizeTarget } from './customize-spec.js';
|
|
3
4
|
import { DeviceType } from '../device/device-type.js';
|
|
4
5
|
/**
|
|
5
6
|
* Fan-control cap. Models HA `fan.*` entity-specific surfaces:
|
|
@@ -18,12 +19,140 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
18
19
|
* - `FanPreset` — preset selector
|
|
19
20
|
* - `FanDirection` — direction toggle (ceiling fans)
|
|
20
21
|
* - `FanOscillating` — oscillation toggle
|
|
22
|
+
*
|
|
23
|
+
* Per-axis oscillation (`oscillationAxes`, `setOscillationAxis`, D1034): an air
|
|
24
|
+
* circulator sweeps horizontally and vertically, each axis with its own
|
|
25
|
+
* switch, fixed angle, sweep bounds and limits. A provider may report them
|
|
26
|
+
* natively; otherwise the OPERATOR links sibling devices to each field in
|
|
27
|
+
* Customize (a `replace` over the fields listed in `overridable` — nothing is
|
|
28
|
+
* linked or inferred by itself), and a write to a linked field is forwarded to
|
|
29
|
+
* its source. `oscillating` stays the single summary flag: when axes exist it
|
|
30
|
+
* means "any axis oscillates" (`anyAxisOscillating`).
|
|
21
31
|
*/
|
|
22
32
|
export declare const FanDirectionSchema: z.ZodEnum<{
|
|
23
33
|
forward: "forward";
|
|
24
34
|
reverse: "reverse";
|
|
25
35
|
}>;
|
|
26
36
|
export type FanDirection = z.infer<typeof FanDirectionSchema>;
|
|
37
|
+
export declare const FAN_OSCILLATION_AXES: readonly ['horizontal', 'vertical'];
|
|
38
|
+
export declare const FanOscillationAxisNameSchema: z.ZodEnum<{
|
|
39
|
+
horizontal: "horizontal";
|
|
40
|
+
vertical: "vertical";
|
|
41
|
+
}>;
|
|
42
|
+
export type FanOscillationAxisName = z.infer<typeof FanOscillationAxisNameSchema>;
|
|
43
|
+
/** The fields of one axis a caller may set. */
|
|
44
|
+
export declare const FAN_OSCILLATION_AXIS_SETTABLE: readonly ['oscillating', 'angle', 'sweepFrom', 'sweepTo'];
|
|
45
|
+
export declare const FanOscillationAxisFieldSchema: z.ZodEnum<{
|
|
46
|
+
angle: "angle";
|
|
47
|
+
oscillating: "oscillating";
|
|
48
|
+
sweepFrom: "sweepFrom";
|
|
49
|
+
sweepTo: "sweepTo";
|
|
50
|
+
}>;
|
|
51
|
+
export type FanOscillationAxisField = z.infer<typeof FanOscillationAxisFieldSchema>;
|
|
52
|
+
/** The limits of one axis, read from the source that serves its angle. */
|
|
53
|
+
export declare const FAN_OSCILLATION_AXIS_LIMITS: readonly ['min', 'max', 'step'];
|
|
54
|
+
export type FanOscillationAxisLimit = (typeof FAN_OSCILLATION_AXIS_LIMITS)[number];
|
|
55
|
+
/**
|
|
56
|
+
* One oscillation axis. Every reading the device has not reported is `null`,
|
|
57
|
+
* never `0` (D393): `0°` is a real position. Each leaf defaults to `null`, so
|
|
58
|
+
* a slice that names only the leaves it knows (a Customize link of one field)
|
|
59
|
+
* is still a whole axis.
|
|
60
|
+
*/
|
|
61
|
+
export declare const FanOscillationAxisSchema: z.ZodObject<{
|
|
62
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
63
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
64
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
65
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
66
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
67
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
68
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type FanOscillationAxis = z.infer<typeof FanOscillationAxisSchema>;
|
|
71
|
+
/** Both axes; an axis the device does not have is `null`. */
|
|
72
|
+
export declare const FanOscillationAxesSchema: z.ZodObject<{
|
|
73
|
+
horizontal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
74
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
75
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
76
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
77
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
78
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
79
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
80
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
82
|
+
vertical: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
83
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
84
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
85
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
86
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
87
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
88
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
89
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
90
|
+
}, z.core.$strip>>>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type FanOscillationAxes = z.infer<typeof FanOscillationAxesSchema>;
|
|
93
|
+
export declare const FAN_OSCILLATION_AXIS_REFUSALS: readonly [
|
|
94
|
+
/** No field to set was given. */
|
|
95
|
+
'nothing-to-set',
|
|
96
|
+
/** The field is neither linked in Customize nor served by the native provider. */
|
|
97
|
+
'axis-not-linked',
|
|
98
|
+
/** An angle lies outside the axis limits. */
|
|
99
|
+
'out-of-range',
|
|
100
|
+
/** The linked source device no longer exists. */
|
|
101
|
+
'source-gone',
|
|
102
|
+
/** The linked source could not be resolved (the device index did not answer). */
|
|
103
|
+
'source-unknown',
|
|
104
|
+
/** The linked source (or the native provider) rejected the call. */
|
|
105
|
+
'source-call-failed'];
|
|
106
|
+
export declare const FanOscillationAxisRefusalSchema: z.ZodEnum<{
|
|
107
|
+
"axis-not-linked": "axis-not-linked";
|
|
108
|
+
"nothing-to-set": "nothing-to-set";
|
|
109
|
+
"out-of-range": "out-of-range";
|
|
110
|
+
"source-call-failed": "source-call-failed";
|
|
111
|
+
"source-gone": "source-gone";
|
|
112
|
+
"source-unknown": "source-unknown";
|
|
113
|
+
}>;
|
|
114
|
+
export type FanOscillationAxisRefusal = z.infer<typeof FanOscillationAxisRefusalSchema>;
|
|
115
|
+
export declare const FanOscillationAxisResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
116
|
+
status: z.ZodLiteral<"applied">;
|
|
117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
118
|
+
status: z.ZodLiteral<"refused">;
|
|
119
|
+
reason: z.ZodEnum<{
|
|
120
|
+
"axis-not-linked": "axis-not-linked";
|
|
121
|
+
"nothing-to-set": "nothing-to-set";
|
|
122
|
+
"out-of-range": "out-of-range";
|
|
123
|
+
"source-call-failed": "source-call-failed";
|
|
124
|
+
"source-gone": "source-gone";
|
|
125
|
+
"source-unknown": "source-unknown";
|
|
126
|
+
}>;
|
|
127
|
+
field: z.ZodOptional<z.ZodEnum<{
|
|
128
|
+
angle: "angle";
|
|
129
|
+
oscillating: "oscillating";
|
|
130
|
+
sweepFrom: "sweepFrom";
|
|
131
|
+
sweepTo: "sweepTo";
|
|
132
|
+
}>>;
|
|
133
|
+
detail: z.ZodString;
|
|
134
|
+
applied: z.ZodArray<z.ZodEnum<{
|
|
135
|
+
angle: "angle";
|
|
136
|
+
oscillating: "oscillating";
|
|
137
|
+
sweepFrom: "sweepFrom";
|
|
138
|
+
sweepTo: "sweepTo";
|
|
139
|
+
}>>;
|
|
140
|
+
}, z.core.$strip>], "status">;
|
|
141
|
+
export type FanOscillationAxisResult = z.infer<typeof FanOscillationAxisResultSchema>;
|
|
142
|
+
export declare const SetOscillationAxisInputSchema: z.ZodObject<{
|
|
143
|
+
deviceId: z.ZodNumber;
|
|
144
|
+
axis: z.ZodEnum<{
|
|
145
|
+
horizontal: "horizontal";
|
|
146
|
+
vertical: "vertical";
|
|
147
|
+
}>;
|
|
148
|
+
oscillating: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
sweepFrom: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
sweepTo: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export type SetOscillationAxisInput = z.infer<typeof SetOscillationAxisInputSchema>;
|
|
154
|
+
/** The state path of one axis field: `oscillationAxes.<axis>.<field>`. */
|
|
155
|
+
export declare function fanAxisPath(axis: FanOscillationAxisName, field: FanOscillationAxisField | FanOscillationAxisLimit): string;
|
|
27
156
|
export declare const FanControlStatusSchema: z.ZodObject<{
|
|
28
157
|
speed: z.ZodNullable<z.ZodNumber>;
|
|
29
158
|
percentageStep: z.ZodOptional<z.ZodNumber>;
|
|
@@ -34,9 +163,34 @@ export declare const FanControlStatusSchema: z.ZodObject<{
|
|
|
34
163
|
reverse: "reverse";
|
|
35
164
|
}>>;
|
|
36
165
|
oscillating: z.ZodNullable<z.ZodBoolean>;
|
|
166
|
+
oscillationAxes: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
horizontal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
168
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
169
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
170
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
171
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
172
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
173
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
174
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
175
|
+
}, z.core.$strip>>>;
|
|
176
|
+
vertical: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
177
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
178
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
179
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
180
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
181
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
182
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
183
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
184
|
+
}, z.core.$strip>>>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
37
186
|
lastChangedAt: z.ZodNumber;
|
|
38
187
|
}, z.core.$strip>;
|
|
39
188
|
export type FanControlStatus = z.infer<typeof FanControlStatusSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* The summary flag: with axes, "any axis oscillates"; without an axis that
|
|
191
|
+
* reports, the device's own `oscillating`.
|
|
192
|
+
*/
|
|
193
|
+
export declare function anyAxisOscillating(status: Pick<FanControlStatus, 'oscillating' | 'oscillationAxes'>): boolean | null;
|
|
40
194
|
export declare const fanControlCapability: {
|
|
41
195
|
readonly name: 'fan-control';
|
|
42
196
|
readonly scope: 'device';
|
|
@@ -71,6 +225,52 @@ export declare const fanControlCapability: {
|
|
|
71
225
|
}, z.core.$strip>, z.ZodVoid, "mutation"> & {
|
|
72
226
|
readonly providerOptional: true;
|
|
73
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* Sets one oscillation axis: its switch, fixed angle and/or sweep bounds.
|
|
230
|
+
* Fields left out are untouched. A field linked in Customize is forwarded
|
|
231
|
+
* to its linked source (D1034); otherwise the native provider serves it;
|
|
232
|
+
* neither → `axis-not-linked`. Ranges are checked against the axis limits
|
|
233
|
+
* before anything is written; writes run in order and stop at the first
|
|
234
|
+
* failure, which the result names.
|
|
235
|
+
*/
|
|
236
|
+
readonly setOscillationAxis: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
237
|
+
deviceId: z.ZodNumber;
|
|
238
|
+
axis: z.ZodEnum<{
|
|
239
|
+
horizontal: "horizontal";
|
|
240
|
+
vertical: "vertical";
|
|
241
|
+
}>;
|
|
242
|
+
oscillating: z.ZodOptional<z.ZodBoolean>;
|
|
243
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
sweepFrom: z.ZodOptional<z.ZodNumber>;
|
|
245
|
+
sweepTo: z.ZodOptional<z.ZodNumber>;
|
|
246
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
247
|
+
status: z.ZodLiteral<"applied">;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
status: z.ZodLiteral<"refused">;
|
|
250
|
+
reason: z.ZodEnum<{
|
|
251
|
+
"axis-not-linked": "axis-not-linked";
|
|
252
|
+
"nothing-to-set": "nothing-to-set";
|
|
253
|
+
"out-of-range": "out-of-range";
|
|
254
|
+
"source-call-failed": "source-call-failed";
|
|
255
|
+
"source-gone": "source-gone";
|
|
256
|
+
"source-unknown": "source-unknown";
|
|
257
|
+
}>;
|
|
258
|
+
field: z.ZodOptional<z.ZodEnum<{
|
|
259
|
+
angle: "angle";
|
|
260
|
+
oscillating: "oscillating";
|
|
261
|
+
sweepFrom: "sweepFrom";
|
|
262
|
+
sweepTo: "sweepTo";
|
|
263
|
+
}>>;
|
|
264
|
+
detail: z.ZodString;
|
|
265
|
+
applied: z.ZodArray<z.ZodEnum<{
|
|
266
|
+
angle: "angle";
|
|
267
|
+
oscillating: "oscillating";
|
|
268
|
+
sweepFrom: "sweepFrom";
|
|
269
|
+
sweepTo: "sweepTo";
|
|
270
|
+
}>>;
|
|
271
|
+
}, z.core.$strip>], "status">, "mutation"> & {
|
|
272
|
+
readonly providerOptional: true;
|
|
273
|
+
};
|
|
74
274
|
};
|
|
75
275
|
readonly status: {
|
|
76
276
|
readonly schema: z.ZodObject<{
|
|
@@ -83,6 +283,26 @@ export declare const fanControlCapability: {
|
|
|
83
283
|
reverse: "reverse";
|
|
84
284
|
}>>;
|
|
85
285
|
oscillating: z.ZodNullable<z.ZodBoolean>;
|
|
286
|
+
oscillationAxes: z.ZodOptional<z.ZodObject<{
|
|
287
|
+
horizontal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
288
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
289
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
290
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
291
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
292
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
293
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
294
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
295
|
+
}, z.core.$strip>>>;
|
|
296
|
+
vertical: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
297
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
298
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
299
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
300
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
301
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
302
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
303
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
304
|
+
}, z.core.$strip>>>;
|
|
305
|
+
}, z.core.$strip>>;
|
|
86
306
|
lastChangedAt: z.ZodNumber;
|
|
87
307
|
}, z.core.$strip>;
|
|
88
308
|
readonly kind: 'push';
|
|
@@ -101,8 +321,36 @@ export declare const fanControlCapability: {
|
|
|
101
321
|
reverse: "reverse";
|
|
102
322
|
}>>;
|
|
103
323
|
oscillating: z.ZodNullable<z.ZodBoolean>;
|
|
324
|
+
oscillationAxes: z.ZodOptional<z.ZodObject<{
|
|
325
|
+
horizontal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
326
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
327
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
328
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
329
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
330
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
331
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
332
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
333
|
+
}, z.core.$strip>>>;
|
|
334
|
+
vertical: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
335
|
+
oscillating: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
336
|
+
angle: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
337
|
+
sweepFrom: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
338
|
+
sweepTo: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
339
|
+
min: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
340
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
341
|
+
step: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
342
|
+
}, z.core.$strip>>>;
|
|
343
|
+
}, z.core.$strip>>;
|
|
104
344
|
lastChangedAt: z.ZodNumber;
|
|
105
345
|
}, z.core.$strip>;
|
|
346
|
+
readonly customize: {
|
|
347
|
+
readonly version: 1;
|
|
348
|
+
readonly overridable: {
|
|
349
|
+
path: string;
|
|
350
|
+
by: string;
|
|
351
|
+
}[];
|
|
352
|
+
readonly targets: readonly ScalarCustomizeTarget[];
|
|
353
|
+
};
|
|
106
354
|
/**
|
|
107
355
|
* Runtime-state durability: **session** — as `brightness`.
|
|
108
356
|
*
|