@camstack/types 0.1.39 → 0.1.41
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/dist/addon/base-addon.d.ts +14 -2
- package/dist/addon/base-addon.d.ts.map +1 -1
- package/dist/addon/durable-state.d.ts +33 -0
- package/dist/addon/durable-state.d.ts.map +1 -0
- package/dist/capabilities/accessories.cap.d.ts +56 -8
- package/dist/capabilities/accessories.cap.d.ts.map +1 -1
- package/dist/capabilities/addon-settings.cap.d.ts +1 -0
- package/dist/capabilities/addon-settings.cap.d.ts.map +1 -1
- package/dist/capabilities/addons.cap.d.ts +187 -1
- package/dist/capabilities/addons.cap.d.ts.map +1 -1
- package/dist/capabilities/advanced-notifier.cap.d.ts +4 -0
- package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -1
- package/dist/capabilities/air-quality-sensor.cap.d.ts +56 -0
- package/dist/capabilities/air-quality-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/alarm-panel.cap.d.ts +154 -0
- package/dist/capabilities/alarm-panel.cap.d.ts.map +1 -0
- package/dist/capabilities/alerts.cap.d.ts +5 -5
- package/dist/capabilities/ambient-light-sensor.cap.d.ts +39 -0
- package/dist/capabilities/ambient-light-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-analyzer.cap.d.ts +2 -2
- package/dist/capabilities/automation-control.cap.d.ts +65 -0
- package/dist/capabilities/automation-control.cap.d.ts.map +1 -0
- package/dist/capabilities/battery.cap.d.ts +30 -1
- package/dist/capabilities/battery.cap.d.ts.map +1 -1
- package/dist/capabilities/binary.cap.d.ts +40 -0
- package/dist/capabilities/binary.cap.d.ts.map +1 -0
- package/dist/capabilities/brightness.cap.d.ts +3 -2
- package/dist/capabilities/brightness.cap.d.ts.map +1 -1
- package/dist/capabilities/broker.cap.d.ts +291 -0
- package/dist/capabilities/broker.cap.d.ts.map +1 -0
- package/dist/capabilities/button.cap.d.ts +27 -0
- package/dist/capabilities/button.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -1
- package/dist/capabilities/camera-pipeline-config.cap.d.ts +43 -0
- package/dist/capabilities/camera-pipeline-config.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-streams.cap.d.ts +147 -10
- package/dist/capabilities/camera-streams.cap.d.ts.map +1 -1
- package/dist/capabilities/capability-definition.d.ts +15 -0
- package/dist/capabilities/capability-definition.d.ts.map +1 -1
- package/dist/capabilities/carbon-monoxide.cap.d.ts +33 -0
- package/dist/capabilities/carbon-monoxide.cap.d.ts.map +1 -0
- package/dist/capabilities/climate-control.cap.d.ts +183 -0
- package/dist/capabilities/climate-control.cap.d.ts.map +1 -0
- package/dist/capabilities/color.cap.d.ts +186 -0
- package/dist/capabilities/color.cap.d.ts.map +1 -0
- package/dist/capabilities/connectivity.cap.d.ts +37 -0
- package/dist/capabilities/connectivity.cap.d.ts.map +1 -0
- package/dist/capabilities/consumables.cap.d.ts +105 -0
- package/dist/capabilities/consumables.cap.d.ts.map +1 -0
- package/dist/capabilities/contact.cap.d.ts +41 -0
- package/dist/capabilities/contact.cap.d.ts.map +1 -0
- package/dist/capabilities/control.cap.d.ts +167 -0
- package/dist/capabilities/control.cap.d.ts.map +1 -0
- package/dist/capabilities/cover.cap.d.ts +104 -0
- package/dist/capabilities/cover.cap.d.ts.map +1 -0
- package/dist/capabilities/custom-actions.d.ts +6 -0
- package/dist/capabilities/custom-actions.d.ts.map +1 -1
- package/dist/capabilities/decoder.cap.d.ts +1 -1
- package/dist/capabilities/device-adoption.cap.d.ts +203 -0
- package/dist/capabilities/device-adoption.cap.d.ts.map +1 -0
- package/dist/capabilities/device-discovery.cap.d.ts +44 -143
- package/dist/capabilities/device-discovery.cap.d.ts.map +1 -1
- package/dist/capabilities/device-manager.cap.d.ts +469 -0
- package/dist/capabilities/device-manager.cap.d.ts.map +1 -1
- package/dist/capabilities/device-ops.cap.d.ts +30 -0
- package/dist/capabilities/device-ops.cap.d.ts.map +1 -1
- package/dist/capabilities/device-provider.cap.d.ts +36 -0
- package/dist/capabilities/device-provider.cap.d.ts.map +1 -1
- package/dist/capabilities/device-status.cap.d.ts +1 -0
- package/dist/capabilities/device-status.cap.d.ts.map +1 -1
- package/dist/capabilities/doorbell.cap.d.ts +1 -0
- package/dist/capabilities/doorbell.cap.d.ts.map +1 -1
- package/dist/capabilities/enum-sensor.cap.d.ts +60 -0
- package/dist/capabilities/enum-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/event-emitter.cap.d.ts +79 -0
- package/dist/capabilities/event-emitter.cap.d.ts.map +1 -0
- package/dist/capabilities/fan-control.cap.d.ts +100 -0
- package/dist/capabilities/fan-control.cap.d.ts.map +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts.map +1 -1
- package/dist/capabilities/flood.cap.d.ts +37 -0
- package/dist/capabilities/flood.cap.d.ts.map +1 -0
- package/dist/capabilities/gas.cap.d.ts +34 -0
- package/dist/capabilities/gas.cap.d.ts.map +1 -0
- package/dist/capabilities/humidifier.cap.d.ts +82 -0
- package/dist/capabilities/humidifier.cap.d.ts.map +1 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts +43 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/image.cap.d.ts +44 -0
- package/dist/capabilities/image.cap.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +103 -15
- package/dist/capabilities/index.d.ts.map +1 -1
- package/dist/capabilities/integrations.cap.d.ts +12 -0
- package/dist/capabilities/integrations.cap.d.ts.map +1 -1
- package/dist/capabilities/intercom.cap.d.ts +49 -9
- package/dist/capabilities/intercom.cap.d.ts.map +1 -1
- package/dist/capabilities/lawn-mower-control.cap.d.ts +83 -0
- package/dist/capabilities/lawn-mower-control.cap.d.ts.map +1 -0
- package/dist/capabilities/local-network.cap.d.ts +1 -1
- package/dist/capabilities/lock-control.cap.d.ts +92 -0
- package/dist/capabilities/lock-control.cap.d.ts.map +1 -0
- package/dist/capabilities/mask-shape.d.ts +99 -0
- package/dist/capabilities/mask-shape.d.ts.map +1 -0
- package/dist/capabilities/media-player.cap.d.ts +201 -0
- package/dist/capabilities/media-player.cap.d.ts.map +1 -0
- package/dist/capabilities/mesh-network.cap.d.ts +3 -3
- package/dist/capabilities/motion-trigger.cap.d.ts +1 -0
- package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -1
- package/dist/capabilities/motion-zones.cap.d.ts +95 -13
- package/dist/capabilities/motion-zones.cap.d.ts.map +1 -1
- package/dist/capabilities/mqtt-broker.cap.d.ts +3 -3
- package/dist/capabilities/native-object-detection.cap.d.ts +74 -3
- package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -1
- package/dist/capabilities/network-access.cap.d.ts +7 -7
- package/dist/capabilities/network-quality.cap.d.ts +5 -0
- package/dist/capabilities/network-quality.cap.d.ts.map +1 -1
- package/dist/capabilities/notifier.cap.d.ts +173 -0
- package/dist/capabilities/notifier.cap.d.ts.map +1 -0
- package/dist/capabilities/numeric-sensor.cap.d.ts +52 -0
- package/dist/capabilities/numeric-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/oauth-integration.cap.d.ts +4 -2
- package/dist/capabilities/oauth-integration.cap.d.ts.map +1 -1
- package/dist/capabilities/osd.cap.d.ts +1 -0
- package/dist/capabilities/osd.cap.d.ts.map +1 -1
- package/dist/capabilities/pipeline-analytics.cap.d.ts +69 -22
- package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -1
- package/dist/capabilities/pipeline-executor.cap.d.ts +2 -2
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +1 -1
- package/dist/capabilities/pipeline-runner.cap.d.ts +4 -2
- package/dist/capabilities/pipeline-runner.cap.d.ts.map +1 -1
- package/dist/capabilities/platform-probe.cap.d.ts +25 -0
- package/dist/capabilities/platform-probe.cap.d.ts.map +1 -1
- package/dist/capabilities/power-meter.cap.d.ts +65 -0
- package/dist/capabilities/power-meter.cap.d.ts.map +1 -0
- package/dist/capabilities/presence.cap.d.ts +79 -0
- package/dist/capabilities/presence.cap.d.ts.map +1 -0
- package/dist/capabilities/pressure-sensor.cap.d.ts +43 -0
- package/dist/capabilities/pressure-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/privacy-mask.cap.d.ts +207 -0
- package/dist/capabilities/privacy-mask.cap.d.ts.map +1 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts +1 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -1
- package/dist/capabilities/ptz.cap.d.ts +1 -0
- package/dist/capabilities/ptz.cap.d.ts.map +1 -1
- package/dist/capabilities/reboot.cap.d.ts +1 -0
- package/dist/capabilities/reboot.cap.d.ts.map +1 -1
- package/dist/capabilities/recording.cap.d.ts +238 -32
- package/dist/capabilities/recording.cap.d.ts.map +1 -1
- package/dist/capabilities/restreamer.cap.d.ts +2 -2
- package/dist/capabilities/schemas/detection-shared.d.ts +14 -1
- package/dist/capabilities/schemas/detection-shared.d.ts.map +1 -1
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -2
- package/dist/capabilities/schemas/streaming-shared.d.ts +64 -1
- package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -1
- package/dist/capabilities/script-runner.cap.d.ts +62 -0
- package/dist/capabilities/script-runner.cap.d.ts.map +1 -0
- package/dist/capabilities/settings-store.cap.d.ts +25 -0
- package/dist/capabilities/settings-store.cap.d.ts.map +1 -1
- package/dist/capabilities/smoke.cap.d.ts +38 -0
- package/dist/capabilities/smoke.cap.d.ts.map +1 -0
- package/dist/capabilities/snapshot-provider.cap.d.ts +1 -1
- package/dist/capabilities/snapshot.cap.d.ts +1 -0
- package/dist/capabilities/snapshot.cap.d.ts.map +1 -1
- package/dist/capabilities/sso-bridge.cap.d.ts +3 -3
- package/dist/capabilities/storage-evictable.cap.d.ts +54 -0
- package/dist/capabilities/storage-evictable.cap.d.ts.map +1 -0
- package/dist/capabilities/storage-provider.cap.d.ts +31 -186
- package/dist/capabilities/storage-provider.cap.d.ts.map +1 -1
- package/dist/capabilities/storage.cap.d.ts +35 -226
- package/dist/capabilities/storage.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-broker.cap.d.ts +309 -25
- package/dist/capabilities/stream-broker.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-catalog.cap.d.ts +85 -0
- package/dist/capabilities/stream-catalog.cap.d.ts.map +1 -0
- package/dist/capabilities/stream-params.cap.d.ts +27 -26
- package/dist/capabilities/stream-params.cap.d.ts.map +1 -1
- package/dist/capabilities/switch.cap.d.ts +1 -0
- package/dist/capabilities/switch.cap.d.ts.map +1 -1
- package/dist/capabilities/tamper.cap.d.ts +33 -0
- package/dist/capabilities/tamper.cap.d.ts.map +1 -0
- package/dist/capabilities/temperature-sensor.cap.d.ts +51 -0
- package/dist/capabilities/temperature-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/update.cap.d.ts +49 -0
- package/dist/capabilities/update.cap.d.ts.map +1 -0
- package/dist/capabilities/user-management.cap.d.ts +20 -20
- package/dist/capabilities/vacuum-control.cap.d.ts +229 -0
- package/dist/capabilities/vacuum-control.cap.d.ts.map +1 -0
- package/dist/capabilities/valve.cap.d.ts +93 -0
- package/dist/capabilities/valve.cap.d.ts.map +1 -0
- package/dist/capabilities/vibration.cap.d.ts +33 -0
- package/dist/capabilities/vibration.cap.d.ts.map +1 -0
- package/dist/capabilities/water-heater.cap.d.ts +78 -0
- package/dist/capabilities/water-heater.cap.d.ts.map +1 -0
- package/dist/capabilities/weather.cap.d.ts +76 -0
- package/dist/capabilities/weather.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc-session.cap.d.ts +128 -0
- package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -1
- package/dist/constants.d.ts +0 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/device/base-device-provider.d.ts +11 -0
- package/dist/device/base-device-provider.d.ts.map +1 -1
- package/dist/device/base-device.d.ts +52 -0
- package/dist/device/base-device.d.ts.map +1 -1
- package/dist/device/device-context.d.ts +29 -0
- package/dist/device/device-context.d.ts.map +1 -1
- package/dist/device/device-link-transform.d.ts +6 -0
- package/dist/device/device-link-transform.d.ts.map +1 -0
- package/dist/device/device-management.d.ts +116 -4
- package/dist/device/device-management.d.ts.map +1 -1
- package/dist/device/device-type.d.ts +214 -3
- package/dist/device/device-type.d.ts.map +1 -1
- package/dist/device/device.d.ts +25 -0
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/index.d.ts +5 -1
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/path-util.d.ts +13 -0
- package/dist/device/path-util.d.ts.map +1 -0
- package/dist/device/schema-fields.d.ts +12 -0
- package/dist/device/schema-fields.d.ts.map +1 -0
- package/dist/device/source-info.d.ts +87 -0
- package/dist/device/source-info.d.ts.map +1 -0
- package/dist/device/system-mirror.d.ts +6 -2
- package/dist/device/system-mirror.d.ts.map +1 -1
- package/dist/encode-profile.d.ts +126 -0
- package/dist/encode-profile.d.ts.map +1 -0
- package/dist/enums/event-category.d.ts +92 -7
- package/dist/enums/event-category.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +12821 -8025
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/cap-status-types.d.ts +87 -1
- package/dist/generated/cap-status-types.d.ts.map +1 -1
- package/dist/generated/capability-router-map.d.ts +142 -7
- package/dist/generated/capability-router-map.d.ts.map +1 -1
- package/dist/generated/device-local-state.d.ts +123 -0
- package/dist/generated/device-local-state.d.ts.map +1 -1
- package/dist/generated/device-proxy.d.ts +132 -5
- package/dist/generated/device-proxy.d.ts.map +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts.map +1 -1
- package/dist/generated/provider-kind-map.d.ts +1 -1
- package/dist/generated/provider-kind-map.d.ts.map +1 -1
- package/dist/generated/system-proxy.d.ts +10 -8
- package/dist/generated/system-proxy.d.ts.map +1 -1
- package/dist/health/wiring-health.d.ts +136 -0
- package/dist/health/wiring-health.d.ts.map +1 -0
- package/dist/{index-CMM1Y9W6.js → index-BSA_TBea.js} +4774 -923
- package/dist/index-BSA_TBea.js.map +1 -0
- package/dist/{index-QRlzao1I.mjs → index-Bpj3ScIH.mjs} +5142 -1291
- package/dist/index-Bpj3ScIH.mjs.map +1 -0
- package/dist/index.d.ts +23 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1498 -119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1806 -427
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/addon-data-plane.d.ts +76 -0
- package/dist/interfaces/addon-data-plane.d.ts.map +1 -0
- package/dist/interfaces/addon.d.ts +61 -1
- package/dist/interfaces/addon.d.ts.map +1 -1
- package/dist/interfaces/advanced-notifier.d.ts +4 -0
- package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
- package/dist/interfaces/capability.d.ts +59 -1
- package/dist/interfaces/capability.d.ts.map +1 -1
- package/dist/interfaces/config-ui.d.ts +70 -6
- package/dist/interfaces/config-ui.d.ts.map +1 -1
- package/dist/interfaces/device-capabilities/camera.d.ts +2 -1
- package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
- package/dist/interfaces/event-bus.d.ts +105 -4
- package/dist/interfaces/event-bus.d.ts.map +1 -1
- package/dist/interfaces/kernel-abstractions.d.ts +10 -1
- package/dist/interfaces/kernel-abstractions.d.ts.map +1 -1
- package/dist/interfaces/network-quality.d.ts +8 -0
- package/dist/interfaces/network-quality.d.ts.map +1 -1
- package/dist/interfaces/pipeline-executor-capability.d.ts +2 -2
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts +2 -1
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -1
- package/dist/interfaces/pipeline-runner-capability.d.ts +7 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -1
- package/dist/interfaces/recording-config.d.ts +91 -0
- package/dist/interfaces/recording-config.d.ts.map +1 -0
- package/dist/interfaces/rtp-egress.d.ts +2 -3
- package/dist/interfaces/rtp-egress.d.ts.map +1 -1
- package/dist/interfaces/storage-location-declaration.d.ts +34 -0
- package/dist/interfaces/storage-location-declaration.d.ts.map +1 -0
- package/dist/interfaces/storage-location.d.ts +18 -74
- package/dist/interfaces/storage-location.d.ts.map +1 -1
- package/dist/interfaces/storage.d.ts +15 -4
- package/dist/interfaces/storage.d.ts.map +1 -1
- package/dist/interfaces/stream-broker.d.ts +39 -4
- package/dist/interfaces/stream-broker.d.ts.map +1 -1
- package/dist/interfaces/timezones.d.ts +59 -0
- package/dist/interfaces/timezones.d.ts.map +1 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +50 -8
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +51 -9
- package/dist/node.mjs.map +1 -1
- package/dist/readiness/readiness-registry.d.ts.map +1 -1
- package/dist/schemas/auth-records.d.ts +4 -4
- package/dist/storage/filesystem-storage-provider.d.ts +2 -1
- package/dist/storage/filesystem-storage-provider.d.ts.map +1 -1
- package/dist/stream-selection.d.ts +85 -0
- package/dist/stream-selection.d.ts.map +1 -0
- package/dist/types/detection.d.ts +3 -3
- package/dist/types/io.d.ts +13 -1
- package/dist/types/io.d.ts.map +1 -1
- package/dist/util/location-match.d.ts +15 -0
- package/dist/util/location-match.d.ts.map +1 -0
- package/dist/utils/canonical-hash.d.ts +20 -0
- package/dist/utils/canonical-hash.d.ts.map +1 -0
- package/dist/utils/export-reconciler.d.ts +101 -0
- package/dist/utils/export-reconciler.d.ts.map +1 -0
- package/dist/utils/privacy-grid-raster.d.ts +48 -0
- package/dist/utils/privacy-grid-raster.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +36 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/capabilities/recording-engine.cap.d.ts +0 -477
- package/dist/capabilities/recording-engine.cap.d.ts.map +0 -1
- package/dist/index-CMM1Y9W6.js.map +0 -1
- package/dist/index-QRlzao1I.mjs.map +0 -1
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* Robot-vacuum cap. Models HA `vacuum.*` entities — anything with a
|
|
6
|
+
* cleaning lifecycle plus a return-to-base / locate surface and an
|
|
7
|
+
* optional fan-speed selector.
|
|
8
|
+
*
|
|
9
|
+
* State follows HA's canonical vacuum lifecycle: `idle` / `cleaning` /
|
|
10
|
+
* `paused` / `returning` / `docked` / `error`. `batteryLevel`
|
|
11
|
+
* (0..100) is nullable — some vacuums don't report a battery
|
|
12
|
+
* percentage. `fanSpeed` is the current speed token (provider-verbatim,
|
|
13
|
+
* e.g. `'standard'` / `'turbo'`) and `availableFanSpeeds` lists the
|
|
14
|
+
* tokens the hardware accepts so the UI renders only supported choices.
|
|
15
|
+
*
|
|
16
|
+
* The `setFanSpeed` method takes the bare `speed` token — the provider
|
|
17
|
+
* validates it against the vacuum's own list. `locate` triggers the
|
|
18
|
+
* find-me chirp; `returnToBase` sends it home.
|
|
19
|
+
*
|
|
20
|
+
* Consumable / waste tanks: `cleanWater` / `dirtyWater` / `detergent` /
|
|
21
|
+
* `dustBin` each carry a nullable `{ level (0..100 %), status ('ok' |
|
|
22
|
+
* 'low' | 'full') }` reading. Native providers (e.g. Dreame, Roborock)
|
|
23
|
+
* SHOULD populate whichever tanks the hardware has — leave a field `null`
|
|
24
|
+
* only when the device has no such tank at all, and use a `TankStatus`
|
|
25
|
+
* with both inner fields `null` when the tank exists but its level is
|
|
26
|
+
* currently unknown. HA `vacuum.*` entities expose no per-tank telemetry,
|
|
27
|
+
* so the HA provider leaves all four `null`.
|
|
28
|
+
*/
|
|
29
|
+
export declare const VacuumStateSchema: z.ZodEnum<{
|
|
30
|
+
error: "error";
|
|
31
|
+
idle: "idle";
|
|
32
|
+
paused: "paused";
|
|
33
|
+
docked: "docked";
|
|
34
|
+
cleaning: "cleaning";
|
|
35
|
+
returning: "returning";
|
|
36
|
+
}>;
|
|
37
|
+
export type VacuumState = z.infer<typeof VacuumStateSchema>;
|
|
38
|
+
/**
|
|
39
|
+
* One consumable / waste tank on a robot vacuum (clean-water, dirty-water,
|
|
40
|
+
* detergent or dust-bin). A tank can report a numeric fill `level` (0..100),
|
|
41
|
+
* a discrete `status` (binary-style hardware), or both. Both `null` means the
|
|
42
|
+
* level is currently unknown; the OWNING field being `null` means the
|
|
43
|
+
* hardware has no such tank at all.
|
|
44
|
+
*/
|
|
45
|
+
export declare const TankStatusSchema: z.ZodObject<{
|
|
46
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
47
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
48
|
+
ok: "ok";
|
|
49
|
+
full: "full";
|
|
50
|
+
low: "low";
|
|
51
|
+
}>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type TankStatus = z.infer<typeof TankStatusSchema>;
|
|
54
|
+
export declare const VacuumControlStatusSchema: z.ZodObject<{
|
|
55
|
+
state: z.ZodEnum<{
|
|
56
|
+
error: "error";
|
|
57
|
+
idle: "idle";
|
|
58
|
+
paused: "paused";
|
|
59
|
+
docked: "docked";
|
|
60
|
+
cleaning: "cleaning";
|
|
61
|
+
returning: "returning";
|
|
62
|
+
}>;
|
|
63
|
+
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
fanSpeed: z.ZodNullable<z.ZodString>;
|
|
65
|
+
availableFanSpeeds: z.ZodArray<z.ZodString>;
|
|
66
|
+
cleanWater: z.ZodNullable<z.ZodObject<{
|
|
67
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
69
|
+
ok: "ok";
|
|
70
|
+
full: "full";
|
|
71
|
+
low: "low";
|
|
72
|
+
}>>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
dirtyWater: z.ZodNullable<z.ZodObject<{
|
|
75
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
77
|
+
ok: "ok";
|
|
78
|
+
full: "full";
|
|
79
|
+
low: "low";
|
|
80
|
+
}>>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
detergent: z.ZodNullable<z.ZodObject<{
|
|
83
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
84
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
85
|
+
ok: "ok";
|
|
86
|
+
full: "full";
|
|
87
|
+
low: "low";
|
|
88
|
+
}>>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
dustBin: z.ZodNullable<z.ZodObject<{
|
|
91
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
93
|
+
ok: "ok";
|
|
94
|
+
full: "full";
|
|
95
|
+
low: "low";
|
|
96
|
+
}>>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
lastChangedAt: z.ZodNumber;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export type VacuumControlStatus = z.infer<typeof VacuumControlStatusSchema>;
|
|
101
|
+
export declare const vacuumControlCapability: {
|
|
102
|
+
readonly name: "vacuum-control";
|
|
103
|
+
readonly scope: "device";
|
|
104
|
+
readonly deviceNative: true;
|
|
105
|
+
readonly mode: "singleton";
|
|
106
|
+
readonly deviceTypes: readonly [DeviceType.Vacuum];
|
|
107
|
+
readonly methods: {
|
|
108
|
+
readonly start: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
109
|
+
deviceId: z.ZodNumber;
|
|
110
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
111
|
+
readonly pause: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
112
|
+
deviceId: z.ZodNumber;
|
|
113
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
114
|
+
readonly stop: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
115
|
+
deviceId: z.ZodNumber;
|
|
116
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
117
|
+
readonly returnToBase: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
118
|
+
deviceId: z.ZodNumber;
|
|
119
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
120
|
+
readonly locate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
121
|
+
deviceId: z.ZodNumber;
|
|
122
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
123
|
+
readonly setFanSpeed: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
124
|
+
deviceId: z.ZodNumber;
|
|
125
|
+
speed: z.ZodString;
|
|
126
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
127
|
+
};
|
|
128
|
+
readonly status: {
|
|
129
|
+
readonly schema: z.ZodObject<{
|
|
130
|
+
state: z.ZodEnum<{
|
|
131
|
+
error: "error";
|
|
132
|
+
idle: "idle";
|
|
133
|
+
paused: "paused";
|
|
134
|
+
docked: "docked";
|
|
135
|
+
cleaning: "cleaning";
|
|
136
|
+
returning: "returning";
|
|
137
|
+
}>;
|
|
138
|
+
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
139
|
+
fanSpeed: z.ZodNullable<z.ZodString>;
|
|
140
|
+
availableFanSpeeds: z.ZodArray<z.ZodString>;
|
|
141
|
+
cleanWater: z.ZodNullable<z.ZodObject<{
|
|
142
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
143
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
144
|
+
ok: "ok";
|
|
145
|
+
full: "full";
|
|
146
|
+
low: "low";
|
|
147
|
+
}>>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
dirtyWater: z.ZodNullable<z.ZodObject<{
|
|
150
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
151
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
152
|
+
ok: "ok";
|
|
153
|
+
full: "full";
|
|
154
|
+
low: "low";
|
|
155
|
+
}>>;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
detergent: z.ZodNullable<z.ZodObject<{
|
|
158
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
159
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
160
|
+
ok: "ok";
|
|
161
|
+
full: "full";
|
|
162
|
+
low: "low";
|
|
163
|
+
}>>;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
dustBin: z.ZodNullable<z.ZodObject<{
|
|
166
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
168
|
+
ok: "ok";
|
|
169
|
+
full: "full";
|
|
170
|
+
low: "low";
|
|
171
|
+
}>>;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
lastChangedAt: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
readonly kind: "push";
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
179
|
+
* slice for live state + battery + fan-speed changes.
|
|
180
|
+
*/
|
|
181
|
+
readonly runtimeState: z.ZodObject<{
|
|
182
|
+
state: z.ZodEnum<{
|
|
183
|
+
error: "error";
|
|
184
|
+
idle: "idle";
|
|
185
|
+
paused: "paused";
|
|
186
|
+
docked: "docked";
|
|
187
|
+
cleaning: "cleaning";
|
|
188
|
+
returning: "returning";
|
|
189
|
+
}>;
|
|
190
|
+
batteryLevel: z.ZodNullable<z.ZodNumber>;
|
|
191
|
+
fanSpeed: z.ZodNullable<z.ZodString>;
|
|
192
|
+
availableFanSpeeds: z.ZodArray<z.ZodString>;
|
|
193
|
+
cleanWater: z.ZodNullable<z.ZodObject<{
|
|
194
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
195
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
196
|
+
ok: "ok";
|
|
197
|
+
full: "full";
|
|
198
|
+
low: "low";
|
|
199
|
+
}>>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
dirtyWater: z.ZodNullable<z.ZodObject<{
|
|
202
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
203
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
204
|
+
ok: "ok";
|
|
205
|
+
full: "full";
|
|
206
|
+
low: "low";
|
|
207
|
+
}>>;
|
|
208
|
+
}, z.core.$strip>>;
|
|
209
|
+
detergent: z.ZodNullable<z.ZodObject<{
|
|
210
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
211
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
212
|
+
ok: "ok";
|
|
213
|
+
full: "full";
|
|
214
|
+
low: "low";
|
|
215
|
+
}>>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
217
|
+
dustBin: z.ZodNullable<z.ZodObject<{
|
|
218
|
+
level: z.ZodNullable<z.ZodNumber>;
|
|
219
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
220
|
+
ok: "ok";
|
|
221
|
+
full: "full";
|
|
222
|
+
low: "low";
|
|
223
|
+
}>>;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
lastChangedAt: z.ZodNumber;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
};
|
|
228
|
+
export type IVacuumControlProvider = InferProvider<typeof vacuumControlCapability>;
|
|
229
|
+
//# sourceMappingURL=vacuum-control.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vacuum-control.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/vacuum-control.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;iBAK3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6ClC;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEoC,CAAA;AAEzC,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* Pipe / water / gas valve cap. Models HA `valve.*` entities — anything
|
|
6
|
+
* that moves between an open and a closed state with optional
|
|
7
|
+
* intermediate positioning.
|
|
8
|
+
*
|
|
9
|
+
* State follows HA's canonical lifecycle: `open` / `opening` /
|
|
10
|
+
* `closing` / `closed` / `stopped`. `position` (0 closed, 100 open) is
|
|
11
|
+
* nullable — some valves only support full open/close, while others
|
|
12
|
+
* report and accept an intermediate position. Providers populate only
|
|
13
|
+
* what the hardware reports.
|
|
14
|
+
*
|
|
15
|
+
* Unlike `cover`, valves have no tilt surface — the cap is the strict
|
|
16
|
+
* open/close + optional position subset of the cover lifecycle.
|
|
17
|
+
*
|
|
18
|
+
* Sub-surface gating paired with a `DeviceFeature` flag:
|
|
19
|
+
* - `ValvePositionable` — intermediate `position` slider / drag
|
|
20
|
+
*/
|
|
21
|
+
export declare const ValveStateSchema: z.ZodEnum<{
|
|
22
|
+
open: "open";
|
|
23
|
+
stopped: "stopped";
|
|
24
|
+
opening: "opening";
|
|
25
|
+
closing: "closing";
|
|
26
|
+
closed: "closed";
|
|
27
|
+
}>;
|
|
28
|
+
export type ValveState = z.infer<typeof ValveStateSchema>;
|
|
29
|
+
export declare const ValveStatusSchema: z.ZodObject<{
|
|
30
|
+
state: z.ZodEnum<{
|
|
31
|
+
open: "open";
|
|
32
|
+
stopped: "stopped";
|
|
33
|
+
opening: "opening";
|
|
34
|
+
closing: "closing";
|
|
35
|
+
closed: "closed";
|
|
36
|
+
}>;
|
|
37
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
38
|
+
lastChangedAt: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type ValveStatus = z.infer<typeof ValveStatusSchema>;
|
|
41
|
+
export declare const valveCapability: {
|
|
42
|
+
readonly name: "valve";
|
|
43
|
+
readonly scope: "device";
|
|
44
|
+
readonly deviceNative: true;
|
|
45
|
+
readonly mode: "singleton";
|
|
46
|
+
readonly deviceTypes: readonly [DeviceType.Valve];
|
|
47
|
+
readonly methods: {
|
|
48
|
+
readonly open: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
49
|
+
deviceId: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
51
|
+
readonly close: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
52
|
+
deviceId: z.ZodNumber;
|
|
53
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
54
|
+
readonly stop: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
55
|
+
deviceId: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
57
|
+
readonly setPosition: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
58
|
+
deviceId: z.ZodNumber;
|
|
59
|
+
position: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
61
|
+
};
|
|
62
|
+
readonly status: {
|
|
63
|
+
readonly schema: z.ZodObject<{
|
|
64
|
+
state: z.ZodEnum<{
|
|
65
|
+
open: "open";
|
|
66
|
+
stopped: "stopped";
|
|
67
|
+
opening: "opening";
|
|
68
|
+
closing: "closing";
|
|
69
|
+
closed: "closed";
|
|
70
|
+
}>;
|
|
71
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
lastChangedAt: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
readonly kind: "push";
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
78
|
+
* slice for live position changes during a move.
|
|
79
|
+
*/
|
|
80
|
+
readonly runtimeState: z.ZodObject<{
|
|
81
|
+
state: z.ZodEnum<{
|
|
82
|
+
open: "open";
|
|
83
|
+
stopped: "stopped";
|
|
84
|
+
opening: "opening";
|
|
85
|
+
closing: "closing";
|
|
86
|
+
closed: "closed";
|
|
87
|
+
}>;
|
|
88
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
89
|
+
lastChangedAt: z.ZodNumber;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
};
|
|
92
|
+
export type IValveProvider = InferProvider<typeof valveCapability>;
|
|
93
|
+
//# sourceMappingURL=valve.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valve.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/valve.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,gBAAgB;;;;;;EAM3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAQ5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmC1B;;;OAGG;;;;;;;;;;;;CAEoC,CAAA;AAEzC,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* Vibration / shake / impact sensor. Drives Home Assistant
|
|
6
|
+
* `binary_sensor` entries with `device_class: vibration`. Push-driven.
|
|
7
|
+
*/
|
|
8
|
+
export declare const VibrationStatusSchema: z.ZodObject<{
|
|
9
|
+
detected: z.ZodBoolean;
|
|
10
|
+
lastChangedAt: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type VibrationStatus = z.infer<typeof VibrationStatusSchema>;
|
|
13
|
+
export declare const vibrationCapability: {
|
|
14
|
+
readonly name: "vibration";
|
|
15
|
+
readonly scope: "device";
|
|
16
|
+
readonly deviceNative: true;
|
|
17
|
+
readonly mode: "singleton";
|
|
18
|
+
readonly deviceTypes: readonly [DeviceType.Sensor];
|
|
19
|
+
readonly methods: {};
|
|
20
|
+
readonly status: {
|
|
21
|
+
readonly schema: z.ZodObject<{
|
|
22
|
+
detected: z.ZodBoolean;
|
|
23
|
+
lastChangedAt: z.ZodNumber;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
readonly kind: "push";
|
|
26
|
+
};
|
|
27
|
+
readonly runtimeState: z.ZodObject<{
|
|
28
|
+
detected: z.ZodBoolean;
|
|
29
|
+
lastChangedAt: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
};
|
|
32
|
+
export type IVibrationProvider = InferProvider<typeof vibrationCapability>;
|
|
33
|
+
//# sourceMappingURL=vibration.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vibration.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/vibration.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;iBAIhC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;CAYS,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* Water heater / boiler cap. Models HA `water_heater.*` entities — a
|
|
6
|
+
* climate-family actuator with a target temperature, an operation-mode
|
|
7
|
+
* selector (`eco` / `electric` / `gas` / `heat_pump` / `high_demand` /
|
|
8
|
+
* `performance` / `off`), and an optional away-mode toggle.
|
|
9
|
+
*
|
|
10
|
+
* The slice carries the current + target temperature, the active
|
|
11
|
+
* operation mode (HA's `state`) and its available set (HA's
|
|
12
|
+
* `operation_list`), the away flag (HA `away_mode` 'on'/'off' → bool,
|
|
13
|
+
* null when unsupported), plus the `min_temp` / `max_temp` bounds.
|
|
14
|
+
*
|
|
15
|
+
* Providers populate only what the hardware reports — temperature and
|
|
16
|
+
* away fields stay null when the device has no such surface.
|
|
17
|
+
*/
|
|
18
|
+
export declare const WaterHeaterStatusSchema: z.ZodObject<{
|
|
19
|
+
currentTemp: z.ZodNullable<z.ZodNumber>;
|
|
20
|
+
targetTemp: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
operationMode: z.ZodNullable<z.ZodString>;
|
|
22
|
+
availableModes: z.ZodArray<z.ZodString>;
|
|
23
|
+
away: z.ZodNullable<z.ZodBoolean>;
|
|
24
|
+
minTemp: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
maxTemp: z.ZodNullable<z.ZodNumber>;
|
|
26
|
+
lastChangedAt: z.ZodNumber;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type WaterHeaterStatus = z.infer<typeof WaterHeaterStatusSchema>;
|
|
29
|
+
export declare const waterHeaterCapability: {
|
|
30
|
+
readonly name: "water-heater";
|
|
31
|
+
readonly scope: "device";
|
|
32
|
+
readonly deviceNative: true;
|
|
33
|
+
readonly mode: "singleton";
|
|
34
|
+
readonly deviceTypes: readonly [DeviceType.WaterHeater];
|
|
35
|
+
readonly methods: {
|
|
36
|
+
readonly setTargetTemp: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
37
|
+
deviceId: z.ZodNumber;
|
|
38
|
+
temp: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
40
|
+
readonly setOperationMode: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
41
|
+
deviceId: z.ZodNumber;
|
|
42
|
+
mode: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
44
|
+
readonly setAway: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
45
|
+
deviceId: z.ZodNumber;
|
|
46
|
+
on: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
48
|
+
};
|
|
49
|
+
readonly status: {
|
|
50
|
+
readonly schema: z.ZodObject<{
|
|
51
|
+
currentTemp: z.ZodNullable<z.ZodNumber>;
|
|
52
|
+
targetTemp: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
operationMode: z.ZodNullable<z.ZodString>;
|
|
54
|
+
availableModes: z.ZodArray<z.ZodString>;
|
|
55
|
+
away: z.ZodNullable<z.ZodBoolean>;
|
|
56
|
+
minTemp: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
maxTemp: z.ZodNullable<z.ZodNumber>;
|
|
58
|
+
lastChangedAt: z.ZodNumber;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
readonly kind: "push";
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
64
|
+
* slice for live temperature / mode / away changes.
|
|
65
|
+
*/
|
|
66
|
+
readonly runtimeState: z.ZodObject<{
|
|
67
|
+
currentTemp: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
targetTemp: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
operationMode: z.ZodNullable<z.ZodString>;
|
|
70
|
+
availableModes: z.ZodArray<z.ZodString>;
|
|
71
|
+
away: z.ZodNullable<z.ZodBoolean>;
|
|
72
|
+
minTemp: z.ZodNullable<z.ZodNumber>;
|
|
73
|
+
maxTemp: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
lastChangedAt: z.ZodNumber;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
};
|
|
77
|
+
export type IWaterHeaterProvider = InferProvider<typeof waterHeaterCapability>;
|
|
78
|
+
//# sourceMappingURL=water-heater.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"water-heater.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/water-heater.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;iBAoBlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoChC;;;OAGG;;;;;;;;;;;CAEoC,CAAA;AAEzC,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* Weather provider cap. Models HA `weather.*` entities — a read-only
|
|
6
|
+
* snapshot of the CURRENT conditions a weather integration reports.
|
|
7
|
+
*
|
|
8
|
+
* Read-only: there are no setters. The slice is populated from upstream
|
|
9
|
+
* pushes (the HA weather entity's state + attributes) and rendered by
|
|
10
|
+
* the UI as a sky scene + readouts.
|
|
11
|
+
*
|
|
12
|
+
* `condition` is the verbatim HA state string (`sunny` / `cloudy` /
|
|
13
|
+
* `rainy` / `snowy` / `partlycloudy` / `pouring` / `lightning` /
|
|
14
|
+
* `lightning-rainy` / `fog` / `windy` / `windy-variant` / `hail` /
|
|
15
|
+
* `clear-night` / `exceptional` / …). The UI maps it to a glyph + tint;
|
|
16
|
+
* unknown strings fall back to a neutral cloud.
|
|
17
|
+
*
|
|
18
|
+
* Every numeric reading is nullable — a given weather integration only
|
|
19
|
+
* populates the metrics it actually provides.
|
|
20
|
+
*
|
|
21
|
+
* Forecast deferred — current conditions only for v1.
|
|
22
|
+
*/
|
|
23
|
+
export declare const WeatherStatusSchema: z.ZodObject<{
|
|
24
|
+
condition: z.ZodNullable<z.ZodString>;
|
|
25
|
+
temperature: z.ZodNullable<z.ZodNumber>;
|
|
26
|
+
temperatureUnit: z.ZodNullable<z.ZodString>;
|
|
27
|
+
humidity: z.ZodNullable<z.ZodNumber>;
|
|
28
|
+
pressure: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
pressureUnit: z.ZodNullable<z.ZodString>;
|
|
30
|
+
windSpeed: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
windSpeedUnit: z.ZodNullable<z.ZodString>;
|
|
32
|
+
windBearing: z.ZodNullable<z.ZodNumber>;
|
|
33
|
+
lastFetchedAt: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type WeatherStatus = z.infer<typeof WeatherStatusSchema>;
|
|
36
|
+
export declare const weatherCapability: {
|
|
37
|
+
readonly name: "weather";
|
|
38
|
+
readonly scope: "device";
|
|
39
|
+
readonly deviceNative: true;
|
|
40
|
+
readonly mode: "singleton";
|
|
41
|
+
readonly deviceTypes: readonly [DeviceType.Weather];
|
|
42
|
+
readonly methods: {};
|
|
43
|
+
readonly status: {
|
|
44
|
+
readonly schema: z.ZodObject<{
|
|
45
|
+
condition: z.ZodNullable<z.ZodString>;
|
|
46
|
+
temperature: z.ZodNullable<z.ZodNumber>;
|
|
47
|
+
temperatureUnit: z.ZodNullable<z.ZodString>;
|
|
48
|
+
humidity: z.ZodNullable<z.ZodNumber>;
|
|
49
|
+
pressure: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
pressureUnit: z.ZodNullable<z.ZodString>;
|
|
51
|
+
windSpeed: z.ZodNullable<z.ZodNumber>;
|
|
52
|
+
windSpeedUnit: z.ZodNullable<z.ZodString>;
|
|
53
|
+
windBearing: z.ZodNullable<z.ZodNumber>;
|
|
54
|
+
lastFetchedAt: z.ZodNumber;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
readonly kind: "push";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Runtime-state slice — mirrored by the kernel. The UI reads the
|
|
60
|
+
* current conditions directly from the slice on each weather push.
|
|
61
|
+
*/
|
|
62
|
+
readonly runtimeState: z.ZodObject<{
|
|
63
|
+
condition: z.ZodNullable<z.ZodString>;
|
|
64
|
+
temperature: z.ZodNullable<z.ZodNumber>;
|
|
65
|
+
temperatureUnit: z.ZodNullable<z.ZodString>;
|
|
66
|
+
humidity: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
pressure: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
pressureUnit: z.ZodNullable<z.ZodString>;
|
|
69
|
+
windSpeed: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
windSpeedUnit: z.ZodNullable<z.ZodString>;
|
|
71
|
+
windBearing: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
lastFetchedAt: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
};
|
|
75
|
+
export type IWeatherProvider = InferProvider<typeof weatherCapability>;
|
|
76
|
+
//# sourceMappingURL=weather.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weather.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/weather.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAsB9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;IAa5B;;;OAGG;;;;;;;;;;;;;CAEoC,CAAA;AAEzC,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|