Dominevo
ReferenceDevice capabilities

fan-control

Fan-control cap.

Fan-control cap. Models HA fan.* entity-specific surfaces: speed percentage, preset modes, ceiling-fan direction, and oscillation. The on/off state lives on the existing switch cap (Fan devices register switch + fan-control, mirroring the Light pattern of switch + brightness + color).

availablePresets mirrors HA's preset_modes attribute so the UI renders a closed-list picker without a separate getOptions round-trip. direction and oscillating are nullable — most fans don't expose them.

Sub-surface gating paired with DeviceFeature flags:

  • FanSpeed — speed-percentage slider
  • FanPreset — preset selector
  • FanDirection — direction toggle (ceiling fans)
  • FanOscillating — oscillation toggle

Per-axis oscillation: an air circulator sweeps horizontally and vertically, each axis with its own switch, fixed angle, sweep bounds and limits. A provider may report them natively; otherwise the OPERATOR links sibling devices to each field in Customize (a replace over the fields listed in overridable — nothing is linked or inferred by itself), and a write to a linked field is forwarded to its source. oscillating stays the single summary flag: when axes exist it means "any axis oscillates" (anyAxisOscillating).

At a glance

Capabilityfan-control
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typesfan
Sourcepackages/types/src/capabilities/fan-control.cap.ts

Methods

Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.

MethodKindRequired of a providerAccess
setPercentagemutationnoprotected
setPresetmutationnoprotected
setDirectionmutationnoprotected
setOscillatingmutationnoprotected
setOscillationAxismutationnoprotected

setPercentage

mutation · optional for a provider

Input

FieldTypeRequiredDescription
speednumberyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
fan.offFan offspeed = 0
fan.fullFan fullspeed = 100
fan.speedSet speedspeed = undefined

setPreset

mutation · optional for a provider

Input

FieldTypeRequiredDescription
presetstringyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
fan.presetSet presetpreset = undefined

setDirection

mutation · optional for a provider

Input

FieldTypeRequiredDescription
direction"forward" | "reverse"yes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
fan.forwardSpin forwarddirection = "forward"
fan.reverseSpin in reversedirection = "reverse"

setOscillating

mutation · optional for a provider

Input

FieldTypeRequiredDescription
oscillatingbooleanyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
fan.oscillateOnOscillateoscillating = true
fan.oscillateOffStop oscillatingoscillating = false

setOscillationAxis

mutation · optional for a provider

Sets one oscillation axis: its switch, fixed angle and/or sweep bounds. Fields left out are untouched. A field linked in Customize is forwarded to its linked source; otherwise the native provider serves it; neither → axis-not-linked. Ranges are checked against the axis limits before anything is written; writes run in order and stop at the first failure, which the result names.

Input

FieldTypeRequiredDescription
axis"horizontal" | "vertical"yes
oscillatingbooleanno
anglenumberno
sweepFromnumberno
sweepTonumberno

Output

{ status: "applied" } | { status: "refused"; reason: "nothing-to-set" | "axis-not-linked" | "out-of-range" | "source-gone" | "source-unknown" | "source-call-failed"; field?: "oscillating" | "angle" | "sweepFrom" | "sweep…

Actions (offered in automations and on device cards)

ActionLabelSets
fan.horizontalOscillateOnHorizontal oscillation on
fan.horizontalOscillateOffHorizontal oscillation off
fan.verticalOscillateOnVertical oscillation on
fan.verticalOscillateOffVertical oscillation off

Runtime state

The state Dominevo keeps for each device with this capability, readable without calling the provider.

Runtime-state slice — mirrored by the kernel. UI fan speed sliders read speed for live updates.

FieldTypeRequiredDescription
speednumber | nullyesActive speed as 0..100 inclusive. Null when the device has no speed surface (single-speed fan).
percentageStepnumbernoSpeed granularity the device accepts (HA percentage_step, e.g. 25 for a 4-speed fan). Absent when unknown — the UI then falls back to step 1.
presetstringyesActive preset mode (auto / quiet / turbo / vendor-specific) — empty string when no preset is active or supported.
availablePresetsstring[]yesAvailable preset modes the device accepts.
direction"forward" | "reverse" | nullyesCeiling-fan blade direction. Null when the device has no direction surface.
oscillatingboolean | nullyesOscillation toggle. Null when the device has no oscillation surface.
oscillationAxes{ horizontal?: { oscillating?: boolean | null; angle?: number | null; sweepFrom?: number | null; sweepTo?: number | null; min?: number | null; max?: number | null; step?: number | null } | null; vertical?: { oscillating?…noPer-axis oscillation (air circulators). Absent when the device has no per-axis surface and nothing is linked in Customize.
lastChangedAtnumberyesMs epoch when the slice was last updated.