ReferenceHTTP API
deviceTransitions
The deviceTransitions router: 5 methods of the device-transitions capability, with tier, scope, input and output.
Capability device-transitions · scope device · mode singleton · source packages/types/src/capabilities/device-transitions.cap.ts:64.
Every method is called at /trpc/deviceTransitions.<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 |
|---|---|---|---|---|
listTransitions | query | protected | view | yes |
getTransition | query | protected | view | yes |
listRecentTransitions | query | admin | admin only | no |
record | mutation | admin | admin only | no |
getStatus | query | admin | admin only | no |
deviceTransitions.listTransitions
- Kind: query —
GET /trpc/deviceTransitions.listTransitions - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-transitions, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceTransitions.listTransitionson your hub
Input
{ deviceId: number; capName?: string; actorKind?: "user" | "addon" | "action" | "scheduler" | "composition" | "node" | "device"; outcome?: "ok" | "failed"; atFrom?: number; atTo?: number; limit?: number = 50; cursor?: string }Output
{ transitions: ({ id: string; deviceId: number; at: number; capName: string; field: string; from: string | number | boolean | null | Record<string, unknown>; to: string | number | boolean | null | Record<string, unknown>; outcome: "ok" | "failed" | "device"; actor: { kind: "user"; userId: string; username: string; credential: "session" | "token" | "integration"; credentialId?: string } | { kind: "addon"; addonId: string; nodeId?: string; onBehalf?: { source: "homeassistant" | "homekit" | "alexa" | "google" | "matter"; principalId: string; principalName?: string } } | { kind: "action"; addonId: string; actionId: string; runId: string; automationId?: string } | { kind: "scheduler"; addonId: string; schedulerId: string } | { kind: "composition"; owner: string } | { kind: "node"; nodeId: string } | { kind: "device" }; command?: { commandId: string; method: string; args: Record<string, unknown>; requestedAt: number; error?: string } })[]; nextCursor: string | null }deviceTransitions.getTransition
- Kind: query —
GET /trpc/deviceTransitions.getTransition - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-transitions, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=deviceTransitions.getTransitionon your hub
Input
{ deviceId: number; id: string }Output
{ id: string; deviceId: number; at: number; capName: string; field: string; from: string | number | boolean | null | Record<string, unknown>; to: string | number | boolean | null | Record<string, unknown>; outcome: "ok" | "failed" | "device"; actor: { kind: "user"; userId: string; username: string; credential: "session" | "token" | "integration"; credentialId?: string } | { kind: "addon"; addonId: string; nodeId?: string; onBehalf?: { source: "homeassistant" | "homekit" | "alexa" | "google" | "matter"; principalId: string; principalName?: string } } | { kind: "action"; addonId: string; actionId: string; runId: string; automationId?: string } | { kind: "scheduler"; addonId: string; schedulerId: string } | { kind: "composition"; owner: string } | { kind: "node"; nodeId: string } | { kind: "device" }; command?: { commandId: string; method: string; args: Record<string, unknown>; requestedAt: number; error?: string } } | nulldeviceTransitions.listRecentTransitions
- Kind: query —
GET /trpc/deviceTransitions.listRecentTransitions - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceTransitions.listRecentTransitionson your hub
Input
{ actorKind?: "user" | "addon" | "action" | "scheduler" | "composition" | "node" | "device"; outcome?: "ok" | "failed"; atFrom?: number; atTo?: number; limit?: number = 50; cursor?: string }Output
{ transitions: ({ id: string; deviceId: number; at: number; capName: string; field: string; from: string | number | boolean | null | Record<string, unknown>; to: string | number | boolean | null | Record<string, unknown>; outcome: "ok" | "failed" | "device"; actor: { kind: "user"; userId: string; username: string; credential: "session" | "token" | "integration"; credentialId?: string } | { kind: "addon"; addonId: string; nodeId?: string; onBehalf?: { source: "homeassistant" | "homekit" | "alexa" | "google" | "matter"; principalId: string; principalName?: string } } | { kind: "action"; addonId: string; actionId: string; runId: string; automationId?: string } | { kind: "scheduler"; addonId: string; schedulerId: string } | { kind: "composition"; owner: string } | { kind: "node"; nodeId: string } | { kind: "device" }; command?: { commandId: string; method: string; args: Record<string, unknown>; requestedAt: number; error?: string } })[]; nextCursor: string | null }deviceTransitions.record
- Kind: mutation —
POST /trpc/deviceTransitions.record - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceTransitions.recordon your hub
Input
{ transitions: ({ id: string; deviceId: number; at: number; capName: string; field: string; from: string | number | boolean | null | Record<string, unknown>; to: string | number | boolean | null | Record<string, unknown>; outcome: "ok" | "failed" | "device"; actor: { kind: "user"; userId: string; username: string; credential: "session" | "token" | "integration"; credentialId?: string } | { kind: "addon"; addonId: string; nodeId?: string; onBehalf?: { source: "homeassistant" | "homekit" | "alexa" | "google" | "matter"; principalId: string; principalName?: string } } | { kind: "action"; addonId: string; actionId: string; runId: string; automationId?: string } | { kind: "scheduler"; addonId: string; schedulerId: string } | { kind: "composition"; owner: string } | { kind: "node"; nodeId: string } | { kind: "device" }; command?: { commandId: string; method: string; args: Record<string, unknown>; requestedAt: number; error?: string } })[] }Output
TransitionRecordResultSchemaShapes: TransitionRecordResultSchema
deviceTransitions.getStatus
- Kind: query —
GET /trpc/deviceTransitions.getStatus - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceTransitions.getStatuson your hub
Input
{}Output
TransitionsStatusSchemaShapes: TransitionsStatusSchema