pet-fountain
Pet water-fountain cap.
Pet water-fountain cap. Models the telemetry and the control surface of a circulating drinking fountain: how much water is in the tank, how much the pet drank, whether the pump runs.
It has no native vendor provider of its own: a fountain reaches Dominevo as a container of loose entities (a pump switch, two number boxes, a "filter changed" button), and an operator BUILDS the device from them — a composed device of this type. Every method is therefore a forward to ONE method of ONE source entity, and every reading is a field derived from a source entity; the provider-shaped interface below exists so the composed device and any future native provider answer the same contract.
Quantities are stored in the base unit of their kind: volumes in LITRES, durations in SECONDS, the tank level in percent. A source that reports millilitres or minutes is converted in the composition's expression, never here. Every reading may be null: a source that is offline or does not report is unknown, never zero.
The pump's on/off duty cycle is model-specific and lives in the optional pump-cycle cap. The filter, the cleaning and the water change are not fields of this cap: they are items of the consumables cap on the same device (kind wear), reset by the same forward mechanism.
At a glance
| Capability | pet-fountain |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | pet-fountain |
| Source | packages/types/src/capabilities/pet-fountain.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
setPump | mutation | yes | protected |
setPump
mutation
Start or stop the pump.
Input
| Field | Type | Required | Description |
|---|---|---|---|
on | boolean | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
petFountain.pumpOn | Pump on | pumpRunning = true |
petFountain.pumpOff | Pump off | pumpRunning = false |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
Runtime-state slice — mirrored by the kernel; the hero card reads it whole.
| Field | Type | Required | Description |
|---|---|---|---|
waterLevel | number | null | yes | Water in the tank, 0..100 (%). Null while the source has not reported. |
waterVolume | number | null | yes | Water in the tank, in litres. Null while the source has not reported. |
empty | boolean | null | yes | True when the tank is empty. Null while unknown. |
pumpRunning | boolean | null | yes | True while the pump is running. Null while unknown. |
error | string | null | yes | Decoded fault message. Null means healthy; a non-null string is an active fault. |
lastFetchedAt | number | yes | Ms epoch when the slice was last refreshed. |