pump-cycle
The on/off duty cycle of a pet fountain's pump.
The on/off duty cycle of a pet fountain's pump. Some models run the pump continuously and have nothing to configure; others can alternate a run time and a rest time. That is model-specific, so it is its own optional cap on the fountain device: a fountain without cycle entities simply never composes it (planning#366), and the pet-fountain cap stays the model-independent core.
Like pet-fountain it has no native vendor provider: an operator BUILDS the cycle from loose entities (a cycle switch and two number boxes) and every method is a forward to one source entity. Durations are stored in SECONDS; a number box that cannot be read back leaves them null — unknown, never zero.
At a glance
| Capability | pump-cycle |
| 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/pump-cycle.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 |
|---|---|---|---|
setEnabled | mutation | yes | protected |
setOnMinutes | mutation | yes | protected |
setOffMinutes | mutation | yes | protected |
setEnabled
mutation
Switch the on/off duty cycle on or off (off = the pump runs continuously).
Input
| Field | Type | Required | Description |
|---|---|---|---|
on | boolean | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
pumpCycle.on | Pump cycle on | enabled = true |
pumpCycle.off | Pump cycle off | enabled = false |
setOnMinutes
mutation
Set how many minutes the pump runs per cycle.
Input
| Field | Type | Required | Description |
|---|---|---|---|
minutes | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
pumpCycle.onMinutes | Set pump run time | onTime = undefined |
setOffMinutes
mutation
Set how many minutes the pump rests per cycle.
Input
| Field | Type | Required | Description |
|---|---|---|---|
minutes | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
pumpCycle.offMinutes | Set pump rest time | offTime = undefined |
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 |
|---|---|---|---|
enabled | boolean | null | yes | True when the pump works on the on/off cycle, false when it runs continuously. Null while unknown. |
onTime | number | null | yes | How long the pump runs per cycle, in seconds. Null while unknown. |
offTime | number | null | yes | How long the pump rests per cycle, in seconds. Null while unknown. |
lastFetchedAt | number | yes | Ms epoch when the slice was last refreshed. |