Dominevo
ReferenceDevice capabilities

brightness

Dimmable-light brightness control.

Dimmable-light brightness control. Co-exists with switch on the same device — the switch toggles on/off, this cap sets the level applied when the light is on. Drivers map their per-vendor dim controls to this single-method surface.

The cap is intentionally minimal: a single setBrightness({deviceId, level}) mutation plus the auto-injected getStatus. Drivers that expose richer controls (color temperature, scenes, schedules) should surface those via the device's getSettingsUISchema() instead of bloating this cap.

At a glance

Capabilitybrightness
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typeslight
Sourcepackages/types/src/capabilities/brightness.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
setBrightnessmutationyesprotected

setBrightness

mutation

Input

FieldTypeRequiredDescription
levelnumberyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
brightness.fullFull brightnesslevel = 100
brightness.halfHalf brightnesslevel = 50
brightness.offBrightness offlevel = 0
brightness.setSet brightnesslevel = undefined

Runtime state

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

Runtime-state slice — the last applied brightness level, mirrored by the kernel. Read via device.state.brightness.value so UI sliders surface the current level without polling the provider.

FieldTypeRequiredDescription
levelnumberyesCurrent level as 0..100 inclusive. Firmware-reported.
lastChangedAtnumberyesMs epoch of the last operator-driven change. Useful for UI freshness.

Events

onBrightnessChanged

Emitted whenever the brightness changes — operator action OR firmware push. Subscribers (UI sliders, automation engines) react without polling.

FieldTypeRequiredDescription
deviceIdnumberyes
levelnumberyes
lastChangedAtnumberyes