ReferenceHTTP API
brightness
The brightness router: 2 methods of the brightness capability, with tier, scope, input and output.
Capability brightness · scope device · mode singleton · source packages/types/src/capabilities/brightness.cap.ts:28.
Every method is called at /trpc/brightness.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
setBrightness | mutation | protected | create | yes |
brightness.getStatus
- Kind: query —
GET /trpc/brightness.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitybrightness, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=brightness.getStatuson your hub
Input
{ deviceId: number }Output
BrightnessStatusSchemaShapes: BrightnessStatusSchema
brightness.setBrightness
- Kind: mutation —
POST /trpc/brightness.setBrightness - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitybrightness, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=brightness.setBrightnesson your hub
Input
{ deviceId: number; level: number }Output
void