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
| Capability | brightness |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | light |
| Source | packages/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.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
setBrightness | mutation | yes | protected |
setBrightness
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
level | number | yes |
Output
Nothing.
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
brightness.full | Full brightness | level = 100 |
brightness.half | Half brightness | level = 50 |
brightness.off | Brightness off | level = 0 |
brightness.set | Set brightness | level = 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.
| Field | Type | Required | Description |
|---|---|---|---|
level | number | yes | Current level as 0..100 inclusive. Firmware-reported. |
lastChangedAt | number | yes | Ms 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.
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | number | yes | |
level | number | yes | |
lastChangedAt | number | yes |