Dominevo
ReferenceDevice capabilities

control

Unified user-settable input cap.

Unified user-settable input cap. Models HA's number / input_number / select / input_select / text / input_text / input_datetime domains as a single device-scoped cap on DeviceType.Control.

The slice is a discriminated union over four kind values that mirror the corresponding DeviceRole sub-roles (NumericControl / SelectControl / TextControl / DateTimeControl) — the device's role and the slice's kind are populated in lockstep at materialisation time. The UI reads device.role (or equivalently the slice's kind) to render the correct input widget (slider / dropdown / text field / date picker).

The select branch carries its options list IN THE SLICE (not in sourceInfo) because HA select.* entities can update their options dynamically at runtime — the slice is the live source of truth. Numeric unit/min/max/step also live IN THE SLICE — populated live from the upstream source on each state push (HA attributes.unit_of_measurement / min / max / step). The slice is the single source of truth; there is no separate sourceInfo or device-config blob for these values.

At a glance

Capabilitycontrol
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typescontrol
Sourcepackages/types/src/capabilities/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
setValuemutationyesprotected
nextmutationnoprotected
previousmutationnoprotected
firstmutationnoprotected
lastmutationnoprotected

setValue

mutation

Input

FieldTypeRequiredDescription
control{ kind: "numeric"; value: number } | { kind: "select"; value: string } | { kind: "text"; value: string } | { kind: "datetime"; value: string }yes

Output

Nothing.

next

mutation · optional for a provider

Select one step forward through options (#544). providerOptional (hence optionalMethod): only a kind: 'select' provider implements it — the stepping math is NOT re-derived per provider, it is the one shared helper selectNavigationMethods (control-select-navigation.ts) every select-kind driver spreads in.

Input

FieldTypeRequiredDescription
cyclebooleanno (default true)

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
select.nextNext option

previous

mutation · optional for a provider

Select one step backward through options (#544) — mirrors next.

Input

FieldTypeRequiredDescription
cyclebooleanno (default true)

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
select.previousPrevious option

first

mutation · optional for a provider

Select the first entry of options (#544).

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
select.firstFirst option

last

mutation · optional for a provider

Select the last entry of options (#544).

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
select.lastLast option

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 widgets (slider / dropdown / text field / date picker) read the slice's discriminant and value directly without polling the provider.

FieldTypeRequiredDescription
kind"numeric" | "select" | "text" | "datetime"yes
valuenumber | stringyesCurrent value. Numeric kind → number; select/text/datetime → string. Datetime values are ISO 8601 strings (full timestamp, date-only, or time-only — HA accepts all three forms).
optionsstring[]yesAcceptable values when kind === 'select'. Empty for other kinds.
lastChangedAtnumberyesMs epoch when the slice was last updated.
minnumbernoMinimum allowed value, in the device quantity's base unit.
maxnumbernoMaximum allowed value, in the device quantity's base unit.
stepnumbernoStep increment, in the device quantity's base unit.