@camstack/types 1.2.434 → 1.2.435
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 +6 -0
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/air-quality-sensor.cap.d.ts +8 -8
- package/dist/capabilities/ambient-light-sensor.cap.d.ts +4 -4
- package/dist/capabilities/battery.cap.d.ts +14 -14
- package/dist/capabilities/brightness.cap.d.ts +7 -7
- package/dist/capabilities/capability-definition.d.ts +3 -3
- package/dist/capabilities/color.cap.d.ts +6 -6
- package/dist/capabilities/device-history.cap.d.ts +2 -2
- package/dist/capabilities/dishwasher.cap.d.ts +11 -11
- package/dist/capabilities/fan-control.cap.d.ts +6 -6
- package/dist/capabilities/humidity-sensor.cap.d.ts +4 -4
- package/dist/capabilities/lawn-mower-control.cap.d.ts +3 -3
- package/dist/capabilities/media-player.cap.d.ts +8 -8
- package/dist/capabilities/meter.cap.d.ts +1 -1
- package/dist/capabilities/network-link.cap.d.ts +13 -13
- package/dist/capabilities/power-meter.cap.d.ts +22 -22
- package/dist/capabilities/presence.cap.d.ts +1 -15
- package/dist/capabilities/pressure-sensor.cap.d.ts +4 -4
- package/dist/capabilities/temperature-sensor.cap.d.ts +4 -4
- package/dist/capabilities/vacuum-control.cap.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/client.mjs +1 -1
- package/dist/composition/composition-report.d.ts +1 -1
- package/dist/composition/examples.d.ts +1 -1
- package/dist/composition/helpers/appliance.d.ts +1 -1
- package/dist/{composition-CpAc0YfQ.js → composition-BZf_gqG7.js} +2 -2
- package/dist/{composition-Bb8iwHEJ.mjs → composition-CZImLpOI.mjs} +2 -2
- package/dist/device/base-device.d.ts +2 -2
- package/dist/device/device-runtime-state.d.ts +1 -1
- package/dist/device/device-state-handle.d.ts +1 -1
- package/dist/device/system-mirror.d.ts +1 -1
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +15 -15
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/index.js +182 -203
- package/dist/index.mjs +182 -203
- package/dist/interfaces/event-bus.d.ts +3 -3
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/{sleep-DFaVPxfm.mjs → sleep-Crlmu_tO.mjs} +26 -30
- package/dist/{sleep-CO61AfwW.js → sleep-DHitF_e4.js} +26 -30
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.435] - 2026-10-28
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Device value fields are named after their quantity (power, level, speed, signal...) instead of their unit; run the quantity-field migration after updating
|
|
15
|
+
|
|
10
16
|
## [1.2.434] - 2026-10-28
|
|
11
17
|
|
|
12
18
|
### Added
|
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-DHitF_e4.js");
|
|
3
3
|
const require_event_category = require("./event-category-E17zaHjN.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-U7lLUMNz.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as expandCapMethods, $n as REVALIDATE_AFTER_MS, $r as isSecretMarker, $t as RecordFieldPathSchema, A as HF_REPO, An as RecordUniqueViolationError, Ar as buildSecretRef, B as withoutCallerStamp, Bn as RECORD_CLASSES, C as addonSliceHandleApi, Cn as InvalidRecordError, Dn as RecordNotFoundError, En as RECORDS_ERROR_CODES, Fn as UnknownRecordKindError, Fr as parseSecretRef, G as adminUiCapability, Gn as RECORD_MAX_DATA_BYTES, Hn as RECORD_DEFAULT_MAX_DATA_BYTES, I as deviceOpsCapability, In as asRecordsError, Jn as RECORD_QUERY_MAX, Jt as defineEntryKind, Kn as RECORD_MAX_INDEXES, L as viewerUiCapability, Ln as recordsErrorFromMessage, M as CAP_ADVANCE_FIELDS, Mn as RevConflictError, Mr as globalSecretScope, Nn as TransactRefusedError, Nr as isSecretRef, On as RecordSecretUnavailableError, Or as SECRET_REF_SCHEME, P as CAP_STATE_LEAVES, Pn as UnindexedFilterError, Pr as normalizeSecretOwner, Qn as resolveSecretViewsIn, Qr as isSecretFieldView, Qt as EntryDescriptorSchema, R as DEVICE_CHILDREN_BATCH_MAX, Rn as RECORD_BATCH_MAX, Rr as createEvent, Sn as ForeignSecretMarkerError, Tn as PlaintextSecretError, U as describeCustomActions, Un as RECORD_DELETE_BATCH, Vn as RECORD_DATABASES, Wn as RECORD_ID_MAX_LENGTH, Xn as RECORD_SETTINGS_MAX_ROWS, Xr as classifySecretWrite, Xt as createRecordsAccess, Yn as RECORD_SECRET_COLLECTION_PREFIX, Yr as SECRET_CLEAR, Yt as entryBody, Zn as RECORD_SWEEP_INTERVAL_MS, Zr as isSecretClear, Zt as assertTransactScope, _ as readErrorI18n, _n as collectZodSecretPaths, an as assertValidDeclaration, ar as registerKnownSecret, b as isDeviceScopedCap, bn as DeclarationRefusedError, c as asString, cn as REMOVE_LEAF, cr as PEER_BYTES_CHUNK_BYTES, ct as readNodePin, d as parseJsonUnknown, dn as parseSecretPath, dr as PEER_BYTES_TICKET_TTL_MS, dt as ReadinessRegistry, ei as isSecretMarkerLike, en as RecordIndexSchema, er as createSecretsAccess, f as hfModelUrl, fn as recordArrayItemPath, ft as ReadinessTimeoutError, g as ErrorI18nPayloadSchema, gr as BaseAddon, hn as secretArrayPrefixes, hr as DisposerChain, ht as scopeKey, in as StoredRecordKindDeclarationSchema, ir as knownSecretCount, jn as RecordsError, jr as formatSecretScope, kn as RecordTooLargeError, kr as arrayItemFieldPath, ln as collectSecretLeaves, lr as PEER_BYTES_MAX_OUTSTANDING, mn as recordSecretRef, ni as toSecretFieldView, nn as RecordKindNameSchema, nr as clearKnownSecrets, o as asJsonObject, on as declarationsOf, or as scrubKnownSecrets, p as BOOT_RECOVERY_BACKOFF_MS, pn as recordSecretCollection, pr as DATAPLANE_SECRET_HEADER, qn as RECORD_MAX_INDEX_FIELDS, qt as makeInMemoryRecords, r as maskUrlCredentials, rn as RecordRetentionSchema, rr as forgetKnownSecret, sn as defineRecordKinds, sr as shortSecretRefHash, st as nodePin, t as sleep, ti as makeSecretMarker, tn as RecordKindDeclarationSchema, tr as MIN_SCRUBBED_LENGTH, un as mapSecretLeaves, ur as PEER_BYTES_STALL_MS, ut as MODEL_FORMATS, vn as isZodSecret, vr as normalizeAddonInitResult, w as createEventBusSliceSource, wn as NoCallerError, x as createDeviceProxy, xn as FilterRequiredError, y as DEVICE_SCOPED_CAPS, yn as BatchTooLargeError, z as CALLER_STAMPED_CAPABILITIES, zn as RECORD_BATCH_MAX_BYTES, zr as emitReadiness } from "./sleep-
|
|
1
|
+
import { $ as expandCapMethods, $n as REVALIDATE_AFTER_MS, $r as isSecretMarker, $t as RecordFieldPathSchema, A as HF_REPO, An as RecordUniqueViolationError, Ar as buildSecretRef, B as withoutCallerStamp, Bn as RECORD_CLASSES, C as addonSliceHandleApi, Cn as InvalidRecordError, Dn as RecordNotFoundError, En as RECORDS_ERROR_CODES, Fn as UnknownRecordKindError, Fr as parseSecretRef, G as adminUiCapability, Gn as RECORD_MAX_DATA_BYTES, Hn as RECORD_DEFAULT_MAX_DATA_BYTES, I as deviceOpsCapability, In as asRecordsError, Jn as RECORD_QUERY_MAX, Jt as defineEntryKind, Kn as RECORD_MAX_INDEXES, L as viewerUiCapability, Ln as recordsErrorFromMessage, M as CAP_ADVANCE_FIELDS, Mn as RevConflictError, Mr as globalSecretScope, Nn as TransactRefusedError, Nr as isSecretRef, On as RecordSecretUnavailableError, Or as SECRET_REF_SCHEME, P as CAP_STATE_LEAVES, Pn as UnindexedFilterError, Pr as normalizeSecretOwner, Qn as resolveSecretViewsIn, Qr as isSecretFieldView, Qt as EntryDescriptorSchema, R as DEVICE_CHILDREN_BATCH_MAX, Rn as RECORD_BATCH_MAX, Rr as createEvent, Sn as ForeignSecretMarkerError, Tn as PlaintextSecretError, U as describeCustomActions, Un as RECORD_DELETE_BATCH, Vn as RECORD_DATABASES, Wn as RECORD_ID_MAX_LENGTH, Xn as RECORD_SETTINGS_MAX_ROWS, Xr as classifySecretWrite, Xt as createRecordsAccess, Yn as RECORD_SECRET_COLLECTION_PREFIX, Yr as SECRET_CLEAR, Yt as entryBody, Zn as RECORD_SWEEP_INTERVAL_MS, Zr as isSecretClear, Zt as assertTransactScope, _ as readErrorI18n, _n as collectZodSecretPaths, an as assertValidDeclaration, ar as registerKnownSecret, b as isDeviceScopedCap, bn as DeclarationRefusedError, c as asString, cn as REMOVE_LEAF, cr as PEER_BYTES_CHUNK_BYTES, ct as readNodePin, d as parseJsonUnknown, dn as parseSecretPath, dr as PEER_BYTES_TICKET_TTL_MS, dt as ReadinessRegistry, ei as isSecretMarkerLike, en as RecordIndexSchema, er as createSecretsAccess, f as hfModelUrl, fn as recordArrayItemPath, ft as ReadinessTimeoutError, g as ErrorI18nPayloadSchema, gr as BaseAddon, hn as secretArrayPrefixes, hr as DisposerChain, ht as scopeKey, in as StoredRecordKindDeclarationSchema, ir as knownSecretCount, jn as RecordsError, jr as formatSecretScope, kn as RecordTooLargeError, kr as arrayItemFieldPath, ln as collectSecretLeaves, lr as PEER_BYTES_MAX_OUTSTANDING, mn as recordSecretRef, ni as toSecretFieldView, nn as RecordKindNameSchema, nr as clearKnownSecrets, o as asJsonObject, on as declarationsOf, or as scrubKnownSecrets, p as BOOT_RECOVERY_BACKOFF_MS, pn as recordSecretCollection, pr as DATAPLANE_SECRET_HEADER, qn as RECORD_MAX_INDEX_FIELDS, qt as makeInMemoryRecords, r as maskUrlCredentials, rn as RecordRetentionSchema, rr as forgetKnownSecret, sn as defineRecordKinds, sr as shortSecretRefHash, st as nodePin, t as sleep, ti as makeSecretMarker, tn as RecordKindDeclarationSchema, tr as MIN_SCRUBBED_LENGTH, un as mapSecretLeaves, ur as PEER_BYTES_STALL_MS, ut as MODEL_FORMATS, vn as isZodSecret, vr as normalizeAddonInitResult, w as createEventBusSliceSource, wn as NoCallerError, x as createDeviceProxy, xn as FilterRequiredError, y as DEVICE_SCOPED_CAPS, yn as BatchTooLargeError, z as CALLER_STAMPED_CAPABILITIES, zn as RECORD_BATCH_MAX_BYTES, zr as emitReadiness } from "./sleep-Crlmu_tO.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-DmZDPDf_.mjs";
|
|
3
3
|
import { a as DeviceType, t as errMsg } from "./err-msg-DIorGYeC.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
@@ -11,8 +11,8 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
11
11
|
* as siblings keeps a single timestamp + one slice subscription.
|
|
12
12
|
*/
|
|
13
13
|
export declare const AirQualitySensorStatusSchema: z.ZodObject<{
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
co2: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
voc: z.ZodOptional<z.ZodNumber>;
|
|
16
16
|
pm25: z.ZodOptional<z.ZodNumber>;
|
|
17
17
|
pm10: z.ZodOptional<z.ZodNumber>;
|
|
18
18
|
aqi: z.ZodOptional<z.ZodNumber>;
|
|
@@ -28,8 +28,8 @@ export declare const airQualitySensorCapability: {
|
|
|
28
28
|
readonly methods: {};
|
|
29
29
|
readonly status: {
|
|
30
30
|
readonly schema: z.ZodObject<{
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
co2: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
voc: z.ZodOptional<z.ZodNumber>;
|
|
33
33
|
pm25: z.ZodOptional<z.ZodNumber>;
|
|
34
34
|
pm10: z.ZodOptional<z.ZodNumber>;
|
|
35
35
|
aqi: z.ZodOptional<z.ZodNumber>;
|
|
@@ -38,8 +38,8 @@ export declare const airQualitySensorCapability: {
|
|
|
38
38
|
readonly kind: 'push';
|
|
39
39
|
};
|
|
40
40
|
readonly runtimeState: z.ZodObject<{
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
co2: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
voc: z.ZodOptional<z.ZodNumber>;
|
|
43
43
|
pm25: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
pm10: z.ZodOptional<z.ZodNumber>;
|
|
45
45
|
aqi: z.ZodOptional<z.ZodNumber>;
|
|
@@ -57,12 +57,12 @@ export declare const airQualitySensorCapability: {
|
|
|
57
57
|
*/
|
|
58
58
|
readonly history: {
|
|
59
59
|
readonly fields: {
|
|
60
|
-
readonly
|
|
60
|
+
readonly co2: {
|
|
61
61
|
readonly kind: 'gauge';
|
|
62
62
|
readonly unit: 'ppm';
|
|
63
63
|
readonly deadband: 5;
|
|
64
64
|
};
|
|
65
|
-
readonly
|
|
65
|
+
readonly voc: {
|
|
66
66
|
readonly kind: 'gauge';
|
|
67
67
|
readonly unit: 'ppb';
|
|
68
68
|
readonly deadband: 5;
|
|
@@ -6,7 +6,7 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
6
6
|
* entries with `device_class: illuminance`.
|
|
7
7
|
*/
|
|
8
8
|
export declare const AmbientLightSensorStatusSchema: z.ZodObject<{
|
|
9
|
-
|
|
9
|
+
illuminance: z.ZodNullable<z.ZodNumber>;
|
|
10
10
|
lastFetchedAt: z.ZodNumber;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export type AmbientLightSensorStatus = z.infer<typeof AmbientLightSensorStatusSchema>;
|
|
@@ -19,13 +19,13 @@ export declare const ambientLightSensorCapability: {
|
|
|
19
19
|
readonly methods: {};
|
|
20
20
|
readonly status: {
|
|
21
21
|
readonly schema: z.ZodObject<{
|
|
22
|
-
|
|
22
|
+
illuminance: z.ZodNullable<z.ZodNumber>;
|
|
23
23
|
lastFetchedAt: z.ZodNumber;
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
readonly kind: 'push';
|
|
26
26
|
};
|
|
27
27
|
readonly runtimeState: z.ZodObject<{
|
|
28
|
-
|
|
28
|
+
illuminance: z.ZodNullable<z.ZodNumber>;
|
|
29
29
|
lastFetchedAt: z.ZodNumber;
|
|
30
30
|
}, z.core.$strip>;
|
|
31
31
|
/**
|
|
@@ -40,7 +40,7 @@ export declare const ambientLightSensorCapability: {
|
|
|
40
40
|
*/
|
|
41
41
|
readonly history: {
|
|
42
42
|
readonly fields: {
|
|
43
|
-
readonly
|
|
43
|
+
readonly illuminance: {
|
|
44
44
|
readonly kind: 'gauge';
|
|
45
45
|
readonly unit: 'lx';
|
|
46
46
|
readonly deadbandPct: 10;
|
|
@@ -9,7 +9,7 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
9
9
|
* threshold.
|
|
10
10
|
*/
|
|
11
11
|
export declare const BatteryStatusSchema: z.ZodObject<{
|
|
12
|
-
|
|
12
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
13
13
|
charging: z.ZodEnum<{
|
|
14
14
|
dc: "dc";
|
|
15
15
|
none: "none";
|
|
@@ -18,7 +18,7 @@ export declare const BatteryStatusSchema: z.ZodObject<{
|
|
|
18
18
|
}>;
|
|
19
19
|
sleeping: z.ZodBoolean;
|
|
20
20
|
lastUpdated: z.ZodNumber;
|
|
21
|
-
|
|
21
|
+
voltage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
22
22
|
lastContactAt: z.ZodOptional<z.ZodNumber>;
|
|
23
23
|
lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
|
|
24
24
|
binary: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -81,7 +81,7 @@ export declare const batteryCapability: {
|
|
|
81
81
|
readonly data: z.ZodObject<{
|
|
82
82
|
deviceId: z.ZodNumber;
|
|
83
83
|
status: z.ZodObject<{
|
|
84
|
-
|
|
84
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
85
85
|
charging: z.ZodEnum<{
|
|
86
86
|
dc: "dc";
|
|
87
87
|
none: "none";
|
|
@@ -90,7 +90,7 @@ export declare const batteryCapability: {
|
|
|
90
90
|
}>;
|
|
91
91
|
sleeping: z.ZodBoolean;
|
|
92
92
|
lastUpdated: z.ZodNumber;
|
|
93
|
-
|
|
93
|
+
voltage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
94
94
|
lastContactAt: z.ZodOptional<z.ZodNumber>;
|
|
95
95
|
lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
|
|
96
96
|
binary: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -100,7 +100,7 @@ export declare const batteryCapability: {
|
|
|
100
100
|
};
|
|
101
101
|
readonly status: {
|
|
102
102
|
readonly schema: z.ZodObject<{
|
|
103
|
-
|
|
103
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
104
104
|
charging: z.ZodEnum<{
|
|
105
105
|
dc: "dc";
|
|
106
106
|
none: "none";
|
|
@@ -109,14 +109,14 @@ export declare const batteryCapability: {
|
|
|
109
109
|
}>;
|
|
110
110
|
sleeping: z.ZodBoolean;
|
|
111
111
|
lastUpdated: z.ZodNumber;
|
|
112
|
-
|
|
112
|
+
voltage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
113
113
|
lastContactAt: z.ZodOptional<z.ZodNumber>;
|
|
114
114
|
lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
|
|
115
115
|
binary: z.ZodOptional<z.ZodBoolean>;
|
|
116
116
|
}, z.core.$strip>;
|
|
117
117
|
readonly kind: 'push';
|
|
118
118
|
readonly empty: {
|
|
119
|
-
readonly
|
|
119
|
+
readonly level: null;
|
|
120
120
|
readonly charging: 'unknown';
|
|
121
121
|
readonly sleeping: false;
|
|
122
122
|
readonly lastUpdated: 0;
|
|
@@ -132,7 +132,7 @@ export declare const batteryCapability: {
|
|
|
132
132
|
* the underlying driver.
|
|
133
133
|
*/
|
|
134
134
|
readonly runtimeState: z.ZodObject<{
|
|
135
|
-
|
|
135
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
136
136
|
charging: z.ZodEnum<{
|
|
137
137
|
dc: "dc";
|
|
138
138
|
none: "none";
|
|
@@ -141,7 +141,7 @@ export declare const batteryCapability: {
|
|
|
141
141
|
}>;
|
|
142
142
|
sleeping: z.ZodBoolean;
|
|
143
143
|
lastUpdated: z.ZodNumber;
|
|
144
|
-
|
|
144
|
+
voltage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
145
145
|
lastContactAt: z.ZodOptional<z.ZodNumber>;
|
|
146
146
|
lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
|
|
147
147
|
binary: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -158,11 +158,11 @@ export declare const batteryCapability: {
|
|
|
158
158
|
*/
|
|
159
159
|
readonly history: {
|
|
160
160
|
readonly fields: {
|
|
161
|
-
readonly
|
|
161
|
+
readonly level: {
|
|
162
162
|
readonly kind: 'gauge';
|
|
163
163
|
readonly unit: '%';
|
|
164
164
|
};
|
|
165
|
-
readonly
|
|
165
|
+
readonly voltage: {
|
|
166
166
|
readonly kind: 'gauge';
|
|
167
167
|
readonly unit: 'V';
|
|
168
168
|
};
|
|
@@ -171,15 +171,15 @@ export declare const batteryCapability: {
|
|
|
171
171
|
readonly customize: {
|
|
172
172
|
readonly version: 1;
|
|
173
173
|
readonly targets: readonly [{
|
|
174
|
-
readonly id: '
|
|
174
|
+
readonly id: 'level';
|
|
175
175
|
readonly cardinality: 'scalar';
|
|
176
176
|
readonly vocabulary: {
|
|
177
177
|
readonly cap: 'battery';
|
|
178
|
-
readonly stateField: '
|
|
178
|
+
readonly stateField: 'level';
|
|
179
179
|
};
|
|
180
180
|
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter];
|
|
181
181
|
readonly apply: 'add';
|
|
182
|
-
readonly path: '
|
|
182
|
+
readonly path: 'level';
|
|
183
183
|
readonly sources: readonly [{
|
|
184
184
|
readonly kind: 'field';
|
|
185
185
|
readonly valueKinds: readonly ["number", "string"];
|
|
@@ -8,13 +8,13 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
8
8
|
* controls to this single-method surface.
|
|
9
9
|
*
|
|
10
10
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
11
|
-
*
|
|
11
|
+
* level})` mutation plus the auto-injected `getStatus`. Drivers
|
|
12
12
|
* that expose richer controls (color temperature, scenes, schedules)
|
|
13
13
|
* should surface those via the device's `getSettingsUISchema()`
|
|
14
14
|
* instead of bloating this cap.
|
|
15
15
|
*/
|
|
16
16
|
export declare const BrightnessStatusSchema: z.ZodObject<{
|
|
17
|
-
|
|
17
|
+
level: z.ZodNumber;
|
|
18
18
|
lastChangedAt: z.ZodNumber;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
export type BrightnessStatus = z.infer<typeof BrightnessStatusSchema>;
|
|
@@ -27,7 +27,7 @@ export declare const brightnessCapability: {
|
|
|
27
27
|
readonly methods: {
|
|
28
28
|
readonly setBrightness: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
29
29
|
deviceId: z.ZodNumber;
|
|
30
|
-
|
|
30
|
+
level: z.ZodNumber;
|
|
31
31
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
32
32
|
};
|
|
33
33
|
readonly events: {
|
|
@@ -39,14 +39,14 @@ export declare const brightnessCapability: {
|
|
|
39
39
|
readonly onBrightnessChanged: {
|
|
40
40
|
readonly data: z.ZodObject<{
|
|
41
41
|
deviceId: z.ZodNumber;
|
|
42
|
-
|
|
42
|
+
level: z.ZodNumber;
|
|
43
43
|
lastChangedAt: z.ZodNumber;
|
|
44
44
|
}, z.core.$strip>;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
readonly status: {
|
|
48
48
|
readonly schema: z.ZodObject<{
|
|
49
|
-
|
|
49
|
+
level: z.ZodNumber;
|
|
50
50
|
lastChangedAt: z.ZodNumber;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
readonly kind: 'command-driven';
|
|
@@ -57,7 +57,7 @@ export declare const brightnessCapability: {
|
|
|
57
57
|
* sliders surface the current level without polling the provider.
|
|
58
58
|
*/
|
|
59
59
|
readonly runtimeState: z.ZodObject<{
|
|
60
|
-
|
|
60
|
+
level: z.ZodNumber;
|
|
61
61
|
lastChangedAt: z.ZodNumber;
|
|
62
62
|
}, z.core.$strip>;
|
|
63
63
|
/**
|
|
@@ -72,7 +72,7 @@ export declare const brightnessCapability: {
|
|
|
72
72
|
*/
|
|
73
73
|
readonly history: {
|
|
74
74
|
readonly fields: {
|
|
75
|
-
readonly
|
|
75
|
+
readonly level: {
|
|
76
76
|
readonly kind: 'gauge';
|
|
77
77
|
readonly unit: '%';
|
|
78
78
|
readonly minIntervalMs: 0;
|
|
@@ -406,7 +406,7 @@ export declare const HISTORY_UNIT_LABELS: Readonly<Record<HistoryUnit, string>>;
|
|
|
406
406
|
export interface CapabilityHistoryField {
|
|
407
407
|
/**
|
|
408
408
|
* `gauge` — a level, averaged in a rollup. `counter` — a MONOTONIC hardware
|
|
409
|
-
* meter only (`
|
|
409
|
+
* meter only (`energy`); a drop is a reset, never a negative reading. A
|
|
410
410
|
* counter that restarts with the addon (`pressCountSinceStart`) is not one.
|
|
411
411
|
* `boolean` — stored 0/1; a rollup gives the fraction of time true.
|
|
412
412
|
* `enum` — a STATE (a `z.enum`, or a `z.string` whose values are learned):
|
|
@@ -444,7 +444,7 @@ export interface CapabilityHistoryField {
|
|
|
444
444
|
readonly deadband?: number;
|
|
445
445
|
/**
|
|
446
446
|
* Drop a change smaller than this percentage of the last recorded value
|
|
447
|
-
* (RELATIVE) — for a wide-range gauge such as
|
|
447
|
+
* (RELATIVE) — for a wide-range gauge such as illuminance. Applied together with
|
|
448
448
|
* {@link deadband} when both are set: a change must clear both.
|
|
449
449
|
*/
|
|
450
450
|
readonly deadbandPct?: number;
|
|
@@ -608,7 +608,7 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
|
|
|
608
608
|
* redeclare it, they just write through `this.runtimeState
|
|
609
609
|
* .setCapState('<capName>', value)`. Examples:
|
|
610
610
|
*
|
|
611
|
-
* - `batteryCapability.runtimeState`: `{
|
|
611
|
+
* - `batteryCapability.runtimeState`: `{ level, charging,
|
|
612
612
|
* sleeping, lastUpdated }`. A Reolink Argus, a sensor proxy,
|
|
613
613
|
* an ONVIF battery cam — every provider stores the
|
|
614
614
|
* same shape under `state.battery`.
|
|
@@ -51,7 +51,7 @@ declare const ColorInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
}, z.core.$strip>, z.ZodObject<{
|
|
53
53
|
mode: z.ZodLiteral<"mired">;
|
|
54
|
-
|
|
54
|
+
colorTemperature: z.ZodNumber;
|
|
55
55
|
}, z.core.$strip>], "mode">;
|
|
56
56
|
export declare const ColorStatusSchema: z.ZodObject<{
|
|
57
57
|
mode: z.ZodEnum<{
|
|
@@ -69,7 +69,7 @@ export declare const ColorStatusSchema: z.ZodObject<{
|
|
|
69
69
|
s: z.ZodNumber;
|
|
70
70
|
v: z.ZodNumber;
|
|
71
71
|
}, z.core.$strip>>;
|
|
72
|
-
|
|
72
|
+
colorTemperature: z.ZodOptional<z.ZodNumber>;
|
|
73
73
|
lastChangedAt: z.ZodNumber;
|
|
74
74
|
}, z.core.$strip>;
|
|
75
75
|
export type ColorStatus = z.infer<typeof ColorStatusSchema>;
|
|
@@ -102,7 +102,7 @@ export declare const colorCapability: {
|
|
|
102
102
|
}, z.core.$strip>;
|
|
103
103
|
}, z.core.$strip>, z.ZodObject<{
|
|
104
104
|
mode: z.ZodLiteral<"mired">;
|
|
105
|
-
|
|
105
|
+
colorTemperature: z.ZodNumber;
|
|
106
106
|
}, z.core.$strip>], "mode">;
|
|
107
107
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
108
108
|
};
|
|
@@ -130,7 +130,7 @@ export declare const colorCapability: {
|
|
|
130
130
|
s: z.ZodNumber;
|
|
131
131
|
v: z.ZodNumber;
|
|
132
132
|
}, z.core.$strip>>;
|
|
133
|
-
|
|
133
|
+
colorTemperature: z.ZodOptional<z.ZodNumber>;
|
|
134
134
|
lastChangedAt: z.ZodNumber;
|
|
135
135
|
}, z.core.$strip>;
|
|
136
136
|
};
|
|
@@ -152,7 +152,7 @@ export declare const colorCapability: {
|
|
|
152
152
|
s: z.ZodNumber;
|
|
153
153
|
v: z.ZodNumber;
|
|
154
154
|
}, z.core.$strip>>;
|
|
155
|
-
|
|
155
|
+
colorTemperature: z.ZodOptional<z.ZodNumber>;
|
|
156
156
|
lastChangedAt: z.ZodNumber;
|
|
157
157
|
}, z.core.$strip>;
|
|
158
158
|
readonly kind: 'command-driven';
|
|
@@ -178,7 +178,7 @@ export declare const colorCapability: {
|
|
|
178
178
|
s: z.ZodNumber;
|
|
179
179
|
v: z.ZodNumber;
|
|
180
180
|
}, z.core.$strip>>;
|
|
181
|
-
|
|
181
|
+
colorTemperature: z.ZodOptional<z.ZodNumber>;
|
|
182
182
|
lastChangedAt: z.ZodNumber;
|
|
183
183
|
}, z.core.$strip>;
|
|
184
184
|
/**
|
|
@@ -47,8 +47,8 @@ export type DeviceHistoryProducerKind = z.infer<typeof DeviceHistoryProducerKind
|
|
|
47
47
|
/**
|
|
48
48
|
* A key computed at READ time from stored series of the same device, never
|
|
49
49
|
* stored itself. Energy (kWh per bucket) comes from the power meter's
|
|
50
|
-
* `
|
|
51
|
-
* `
|
|
50
|
+
* `energy` counter when the device has one, else from integrating its
|
|
51
|
+
* `power` gauge over time.
|
|
52
52
|
*/
|
|
53
53
|
export declare const DEVICE_HISTORY_ENERGY_KEY = "derived:energy.kwh";
|
|
54
54
|
export declare const DeviceHistoryResolutionSchema: z.ZodEnum<{
|
|
@@ -83,9 +83,9 @@ export declare const DishwasherStatusSchema: z.ZodObject<{
|
|
|
83
83
|
program: z.ZodNullable<z.ZodString>;
|
|
84
84
|
selectedProgram: z.ZodNullable<z.ZodString>;
|
|
85
85
|
availablePrograms: z.ZodArray<z.ZodString>;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
remaining: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
delayedStart: z.ZodNullable<z.ZodNumber>;
|
|
88
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
89
89
|
doorOpen: z.ZodNullable<z.ZodBoolean>;
|
|
90
90
|
doorLocked: z.ZodNullable<z.ZodBoolean>;
|
|
91
91
|
remoteStartAllowed: z.ZodNullable<z.ZodBoolean>;
|
|
@@ -410,9 +410,9 @@ export declare const dishwasherCapability: {
|
|
|
410
410
|
program: z.ZodNullable<z.ZodString>;
|
|
411
411
|
selectedProgram: z.ZodNullable<z.ZodString>;
|
|
412
412
|
availablePrograms: z.ZodArray<z.ZodString>;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
413
|
+
remaining: z.ZodNullable<z.ZodNumber>;
|
|
414
|
+
delayedStart: z.ZodNullable<z.ZodNumber>;
|
|
415
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
416
416
|
doorOpen: z.ZodNullable<z.ZodBoolean>;
|
|
417
417
|
doorLocked: z.ZodNullable<z.ZodBoolean>;
|
|
418
418
|
remoteStartAllowed: z.ZodNullable<z.ZodBoolean>;
|
|
@@ -464,9 +464,9 @@ export declare const dishwasherCapability: {
|
|
|
464
464
|
program: z.ZodNullable<z.ZodString>;
|
|
465
465
|
selectedProgram: z.ZodNullable<z.ZodString>;
|
|
466
466
|
availablePrograms: z.ZodArray<z.ZodString>;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
467
|
+
remaining: z.ZodNullable<z.ZodNumber>;
|
|
468
|
+
delayedStart: z.ZodNullable<z.ZodNumber>;
|
|
469
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
470
470
|
doorOpen: z.ZodNullable<z.ZodBoolean>;
|
|
471
471
|
doorLocked: z.ZodNullable<z.ZodBoolean>;
|
|
472
472
|
remoteStartAllowed: z.ZodNullable<z.ZodBoolean>;
|
|
@@ -491,7 +491,7 @@ export declare const dishwasherCapability: {
|
|
|
491
491
|
readonly durability: 'session';
|
|
492
492
|
readonly history: {
|
|
493
493
|
readonly fields: {
|
|
494
|
-
readonly
|
|
494
|
+
readonly progress: {
|
|
495
495
|
readonly kind: 'gauge';
|
|
496
496
|
readonly unit: '%';
|
|
497
497
|
readonly deadband: 2;
|
|
@@ -502,7 +502,7 @@ export declare const dishwasherCapability: {
|
|
|
502
502
|
readonly operationState: {
|
|
503
503
|
readonly kind: 'enum';
|
|
504
504
|
};
|
|
505
|
-
readonly
|
|
505
|
+
readonly remaining: {
|
|
506
506
|
readonly kind: 'gauge';
|
|
507
507
|
readonly unit: 's';
|
|
508
508
|
readonly minIntervalMs: 60000;
|
|
@@ -25,7 +25,7 @@ export declare const FanDirectionSchema: z.ZodEnum<{
|
|
|
25
25
|
}>;
|
|
26
26
|
export type FanDirection = z.infer<typeof FanDirectionSchema>;
|
|
27
27
|
export declare const FanControlStatusSchema: z.ZodObject<{
|
|
28
|
-
|
|
28
|
+
speed: z.ZodNullable<z.ZodNumber>;
|
|
29
29
|
percentageStep: z.ZodOptional<z.ZodNumber>;
|
|
30
30
|
preset: z.ZodString;
|
|
31
31
|
availablePresets: z.ZodArray<z.ZodString>;
|
|
@@ -46,7 +46,7 @@ export declare const fanControlCapability: {
|
|
|
46
46
|
readonly methods: {
|
|
47
47
|
readonly setPercentage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
48
48
|
deviceId: z.ZodNumber;
|
|
49
|
-
|
|
49
|
+
speed: z.ZodNumber;
|
|
50
50
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
51
51
|
readonly setPreset: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
52
52
|
deviceId: z.ZodNumber;
|
|
@@ -66,7 +66,7 @@ export declare const fanControlCapability: {
|
|
|
66
66
|
};
|
|
67
67
|
readonly status: {
|
|
68
68
|
readonly schema: z.ZodObject<{
|
|
69
|
-
|
|
69
|
+
speed: z.ZodNullable<z.ZodNumber>;
|
|
70
70
|
percentageStep: z.ZodOptional<z.ZodNumber>;
|
|
71
71
|
preset: z.ZodString;
|
|
72
72
|
availablePresets: z.ZodArray<z.ZodString>;
|
|
@@ -81,10 +81,10 @@ export declare const fanControlCapability: {
|
|
|
81
81
|
};
|
|
82
82
|
/**
|
|
83
83
|
* Runtime-state slice — mirrored by the kernel. UI fan speed
|
|
84
|
-
* sliders read `
|
|
84
|
+
* sliders read `speed` for live updates.
|
|
85
85
|
*/
|
|
86
86
|
readonly runtimeState: z.ZodObject<{
|
|
87
|
-
|
|
87
|
+
speed: z.ZodNullable<z.ZodNumber>;
|
|
88
88
|
percentageStep: z.ZodOptional<z.ZodNumber>;
|
|
89
89
|
preset: z.ZodString;
|
|
90
90
|
availablePresets: z.ZodArray<z.ZodString>;
|
|
@@ -107,7 +107,7 @@ export declare const fanControlCapability: {
|
|
|
107
107
|
*/
|
|
108
108
|
readonly history: {
|
|
109
109
|
readonly fields: {
|
|
110
|
-
readonly
|
|
110
|
+
readonly speed: {
|
|
111
111
|
readonly kind: 'gauge';
|
|
112
112
|
readonly unit: '%';
|
|
113
113
|
readonly minIntervalMs: 0;
|
|
@@ -10,7 +10,7 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
10
10
|
* `sourceInfo`.
|
|
11
11
|
*/
|
|
12
12
|
export declare const HumiditySensorStatusSchema: z.ZodObject<{
|
|
13
|
-
|
|
13
|
+
humidity: z.ZodNullable<z.ZodNumber>;
|
|
14
14
|
lastFetchedAt: z.ZodNumber;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
export type HumiditySensorStatus = z.infer<typeof HumiditySensorStatusSchema>;
|
|
@@ -23,13 +23,13 @@ export declare const humiditySensorCapability: {
|
|
|
23
23
|
readonly methods: {};
|
|
24
24
|
readonly status: {
|
|
25
25
|
readonly schema: z.ZodObject<{
|
|
26
|
-
|
|
26
|
+
humidity: z.ZodNullable<z.ZodNumber>;
|
|
27
27
|
lastFetchedAt: z.ZodNumber;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
29
|
readonly kind: 'push';
|
|
30
30
|
};
|
|
31
31
|
readonly runtimeState: z.ZodObject<{
|
|
32
|
-
|
|
32
|
+
humidity: z.ZodNullable<z.ZodNumber>;
|
|
33
33
|
lastFetchedAt: z.ZodNumber;
|
|
34
34
|
}, z.core.$strip>;
|
|
35
35
|
/**
|
|
@@ -44,7 +44,7 @@ export declare const humiditySensorCapability: {
|
|
|
44
44
|
*/
|
|
45
45
|
readonly history: {
|
|
46
46
|
readonly fields: {
|
|
47
|
-
readonly
|
|
47
|
+
readonly humidity: {
|
|
48
48
|
readonly kind: 'gauge';
|
|
49
49
|
readonly unit: '%';
|
|
50
50
|
readonly deadband: 0.5;
|
|
@@ -36,7 +36,7 @@ export declare const LawnMowerControlStatusSchema: z.ZodObject<{
|
|
|
36
36
|
paused: "paused";
|
|
37
37
|
}>;
|
|
38
38
|
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
39
|
-
|
|
39
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
40
40
|
currentCode: z.ZodNullable<z.ZodNumber>;
|
|
41
41
|
currentCodeLabel: z.ZodNullable<z.ZodString>;
|
|
42
42
|
severity: z.ZodEnum<{
|
|
@@ -74,7 +74,7 @@ export declare const lawnMowerControlCapability: {
|
|
|
74
74
|
paused: "paused";
|
|
75
75
|
}>;
|
|
76
76
|
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
77
|
-
|
|
77
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
78
78
|
currentCode: z.ZodNullable<z.ZodNumber>;
|
|
79
79
|
currentCodeLabel: z.ZodNullable<z.ZodString>;
|
|
80
80
|
severity: z.ZodEnum<{
|
|
@@ -99,7 +99,7 @@ export declare const lawnMowerControlCapability: {
|
|
|
99
99
|
paused: "paused";
|
|
100
100
|
}>;
|
|
101
101
|
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
102
|
-
|
|
102
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
103
103
|
currentCode: z.ZodNullable<z.ZodNumber>;
|
|
104
104
|
currentCodeLabel: z.ZodNullable<z.ZodString>;
|
|
105
105
|
severity: z.ZodEnum<{
|
|
@@ -58,8 +58,8 @@ export declare const MediaPlayerStatusSchema: z.ZodObject<{
|
|
|
58
58
|
album: z.ZodOptional<z.ZodString>;
|
|
59
59
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
60
60
|
}, z.core.$strip>>;
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
63
63
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
64
64
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
65
65
|
all: "all";
|
|
@@ -93,7 +93,7 @@ export declare const mediaPlayerCapability: {
|
|
|
93
93
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
94
94
|
readonly seek: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
95
95
|
deviceId: z.ZodNumber;
|
|
96
|
-
|
|
96
|
+
position: z.ZodNumber;
|
|
97
97
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
98
98
|
readonly setVolume: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
99
99
|
deviceId: z.ZodNumber;
|
|
@@ -147,8 +147,8 @@ export declare const mediaPlayerCapability: {
|
|
|
147
147
|
album: z.ZodOptional<z.ZodString>;
|
|
148
148
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
149
149
|
}, z.core.$strip>>;
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
151
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
152
152
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
153
153
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
154
154
|
all: "all";
|
|
@@ -185,8 +185,8 @@ export declare const mediaPlayerCapability: {
|
|
|
185
185
|
album: z.ZodOptional<z.ZodString>;
|
|
186
186
|
imageUrl: z.ZodOptional<z.ZodString>;
|
|
187
187
|
}, z.core.$strip>>;
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
189
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
190
190
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
191
191
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
192
192
|
all: "all";
|
|
@@ -205,7 +205,7 @@ export declare const mediaPlayerCapability: {
|
|
|
205
205
|
/**
|
|
206
206
|
* History (D850): volume (a level an operator or an automation sets; the
|
|
207
207
|
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
208
|
-
* `
|
|
208
|
+
* `position` is not recorded: it moves continuously while playing.
|
|
209
209
|
*/
|
|
210
210
|
readonly history: {
|
|
211
211
|
readonly fields: {
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { type InferProvider } from './capability-definition.js';
|
|
3
3
|
import { DeviceType } from '../device/device-type.js';
|
|
4
4
|
/**
|
|
5
|
-
* A monotonic total between resets (D944). Energy uses `power-meter.
|
|
5
|
+
* A monotonic total between resets (D944). Energy uses `power-meter.energy`
|
|
6
6
|
* so dashboards keep one series; every other instantaneous reading lands here.
|
|
7
7
|
* `value` is the time integral in the source quantity's accumulated base
|
|
8
8
|
* (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
|