Skip to content

useConsoleControls

useConsoleControls(deviceId): ConsoleControlsResult

Defined in: console-sdk/src/react/hooks/useConsoleControls.ts:111

Per-device console controls (SDK_PLAN.md §3.7 row 13). Always callable and identity-stable per device; buttons wire without phase narrowing.

DeviceId | null | undefined

the device to control, or null/undefined for an inert (DEV-warned no-op) controls object.

ConsoleControlsResult

the ConsoleControlsResult — bare setDisplayUnits (never rejects) plus setDisplayUnitsAsync (rejects).

const { setDisplayUnits } = useConsoleControls(deviceId);
<UnitPicker value={device.displayUnits} onChange={setDisplayUnits} />