ReferenceHTTP API
actions
The actions router: 11 methods of the actions capability, with tier, scope, input and output.
Capability actions · scope system · mode singleton · source packages/types/src/capabilities/actions.cap.ts:61.
Every method is called at /trpc/actions.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
list | query | admin | admin only | no |
get | query | protected | view | yes |
run | mutation | protected | create | yes |
stop | mutation | admin | admin only | no |
getTraces | query | admin | admin only | no |
create | mutation | admin | admin only | no |
update | mutation | admin | admin only | no |
delete | mutation | admin | admin only | no |
listForCamera | query | protected | view | yes |
getLinks | query | admin | admin only | no |
setLinks | mutation | admin | admin only | no |
actions.list
- Kind: query —
GET /trpc/actions.list - 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=actions.liston your hub
Input
{}Output
({ id: string; name: string; addonId: string; source: "internal" | "addon"; readOnly: boolean; steps?: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number } })[] } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number } })[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "choose"; enabled?: boolean; branches: ({ if: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] })[] } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; maxIterations: number; waitS?: number } | { by: "until"; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; maxIterations: number; waitS?: number } | { by: "forEach"; target: { kind: "devices"; ids: number[] } }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] })[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; variables?: ({ name: string; label?: string; type: "string" | "number" | "boolean" | "select"; required?: boolean; default?: string | number | boolean; options?: string[] })[]; minDelaySec?: number; tags?: string[]; tagIds?: string[]; status: { isRunning: boolean; lastRunAt: number | null; lastError: string | null } })[]Shapes: EventVocabularyKindSchema
actions.get
- Kind: query —
GET /trpc/actions.get - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityactions, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=actions.geton your hub
Input
{ actionId: string; deviceId?: number }Output
{ action: { id: string; name: string; addonId: string; source: "internal" | "addon"; readOnly: boolean; steps?: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[] } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; variables?: ({ name: string; label?: string; type: "string" | "number" | "boolean" | "select"; required?: boolean; default?: string | number | boolean; options?: string[] })[]; minDelaySec?: number; tags?: string[]; tagIds?: string[]; status: { isRunning: boolean; lastRunAt: number | null; lastError: string | null } } | null }Shapes: EventVocabularyKindSchema
actions.run
- Kind: mutation —
POST /trpc/actions.run - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityactions, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=actions.runon your hub
Input
{ actionId: string; variables?: Record<string, string | number | boolean>; wait?: boolean; origin?: { blockId?: string }; deviceId?: number }Output
{ runId: string; outcome: "ran" | "skipped-trigger" | "skipped-conditions" | "skipped-cooldown" | "skipped-overlap" | "failed" | "aborted" | "started" | "timed-out"; message?: string }actions.stop
- Kind: mutation —
POST /trpc/actions.stop - 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=actions.stopon your hub
Input
{ actionId: string }Output
voidactions.getTraces
- Kind: query —
GET /trpc/actions.getTraces - 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=actions.getTraceson your hub
Input
{ actionId: string }Output
{ traces: ({ runId: string; startedAt: number; endedAt: number; trigger: { kind: string; path?: string; outcome: "pass" | "fail"; reason: string; vars: Record<string, string | number | boolean | null | (string | number)[]>; hold?: { phase: "pending" | "cancelled" | "fired" | "reseeded"; ms: number; mode: "held" | "stable"; since?: number; deadline?: number } }; conditions: ({ path: string; kind: "all" | "any" | "not" | "condition" | "device-is" | "device-fault-is" | "expression" | "stationary-present" | "time-is" | "triggered-by" | "device-becomes" | "device-event" | "device-fired" | "device-fault-raised" | "schedule" | "interval" | "manual" | "detection" | "stationary"; outcome: "pass" | "fail" | "not-evaluated"; reason: string; deviceId?: number; cap?: string; fieldPath?: string; operator?: string; expected?: string | number | boolean | null | (string | number)[]; observed?: string | number | boolean | null | (string | number)[] })[]; verdict?: { mode: { mode: "single" } | { mode: "restart" } | { mode: "queued"; max: number } | { mode: "parallel"; max: number } | { mode: "cooldown"; minutes: number }; decision: "run" | "queued" | "restart" | "drop" | "cooldown" | "bypass"; reason: string }; steps: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: ({ deviceId: number; outcome: "ok" | "error"; message?: string })[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; else?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string })[]; branch?: string; branchChecks?: ({ condition: "true" | "false" | "unknown"; conditionReason?: string })[]; iterations?: number; steps?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; branch?: string; branchChecks?: {…}[]; iterations?: number; steps?: {…}[] })[] })[]; outcome: "ran" | "skipped-trigger" | "skipped-conditions" | "skipped-cooldown" | "skipped-overlap" | "failed" | "aborted"; repeat: number; lastAt: number; scheduler?: "done" | "missed" | "inactive" | "condition-false" | "failed" | "held" | "gave-up" | "overridden" | "suspended-manual"; error?: string })[] }actions.create
- Kind: mutation —
POST /trpc/actions.create - 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=actions.createon your hub
Input
{ action: { name: string; steps: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[] } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; variables?: ({ name: string; label?: string; type: "string" | "number" | "boolean" | "select"; required?: boolean; default?: string | number | boolean; options?: string[] })[]; minDelaySec?: number; tags?: string[]; tagIds?: string[] } }Output
{ action: { id: string; name: string; addonId: string; source: "internal" | "addon"; readOnly: boolean; steps?: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[] } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; variables?: ({ name: string; label?: string; type: "string" | "number" | "boolean" | "select"; required?: boolean; default?: string | number | boolean; options?: string[] })[]; minDelaySec?: number; tags?: string[]; tagIds?: string[]; status: { isRunning: boolean; lastRunAt: number | null; lastError: string | null } }; warnings?: ({ path: string; deviceId?: number; field: string; value: number; assumedUnit: string; message: string })[] }Shapes: EventVocabularyKindSchema
actions.update
- Kind: mutation —
POST /trpc/actions.update - 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=actions.updateon your hub
Input
{ actionId: string; action: { name?: string; steps?: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[] } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; variables?: ({ name: string; label?: string; type: "string" | "number" | "boolean" | "select"; required?: boolean; default?: string | number | boolean; options?: string[] })[]; minDelaySec?: number; tags?: string[]; tagIds?: string[] } }Output
{ action: { id: string; name: string; addonId: string; source: "internal" | "addon"; readOnly: boolean; steps?: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[] } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…} })[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; variables?: ({ name: string; label?: string; type: "string" | "number" | "boolean" | "select"; required?: boolean; default?: string | number | boolean; options?: string[] })[]; minDelaySec?: number; tags?: string[]; tagIds?: string[]; status: { isRunning: boolean; lastRunAt: number | null; lastError: string | null } }; warnings?: ({ path: string; deviceId?: number; field: string; value: number; assumedUnit: string; message: string })[] }Shapes: EventVocabularyKindSchema
actions.delete
- Kind: mutation —
POST /trpc/actions.delete - 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=actions.deleteon your hub
Input
{ actionId: string }Output
voidactions.listForCamera
- Kind: query —
GET /trpc/actions.listForCamera - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityactions, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=actions.listForCameraon your hub
Input
{ deviceId: number }Output
({ id: string; name: string; addonId: string; source: "internal" | "addon"; readOnly: boolean; steps?: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number } })[] } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number } })[]; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed"; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean>; if?: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "choose"; enabled?: boolean; branches: ({ if: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "choose"; enabled?: boolean; branches: {…}[]; else?: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "repeat"; enabled?: boolean; loop: {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] })[] } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; maxIterations: number; waitS?: number } | { by: "until"; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; maxIterations: number; waitS?: number } | { by: "forEach"; target: { kind: "devices"; ids: number[] } }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: { kind: "devices"; ids: number[] } | { kind: "domain"; deviceType?: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; roomId?: string } | { kind: "var"; name: string }; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: { seconds: number }; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "wait-until"; enabled?: boolean; when: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; timeoutS: number; onTimeout: "continue" | "stop" } | { kind: "parallel"; enabled?: boolean; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "choose"; enabled?: boolean; branches: ({ if: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; steps: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] })[]; else?: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] } | { kind: "repeat"; enabled?: boolean; loop: { by: "count"; count: number } | { by: "while"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "until"; when: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; maxIterations: number; waitS?: number } | { by: "forEach"; target: {…} }; steps: ({ kind: "wait"; enabled?: boolean; seconds: number } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; continueOnError?: true } | { kind: "stop"; enabled?: boolean; reason: string; outcome: "ok" | "failed" } | { kind: "set"; enabled?: boolean; vars: Record<string, string | number | boolean> } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: {…}; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true })[] })[] } | { kind: "action"; enabled?: boolean; actionId: string; variables?: Record<string, string | number | boolean>; continueOnError?: true } | { kind: "notify"; enabled?: boolean; targetId: string; title?: string; body: string; continueOnError?: true } | { kind: "probe"; enabled?: boolean; host: string; port: number; timeoutSeconds: number; expect?: "reachable" | "unreachable"; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "http-request"; enabled?: boolean; method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; headers?: Record<string, string>; body?: string; timeoutSeconds: number; expect?: { on: "status" | "json"; fieldPath?: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean }; retryUntilSeconds?: number; saveAs?: string; continueOnError?: true } | { kind: "code"; enabled?: boolean; code: string })[]; variables?: ({ name: string; label?: string; type: "string" | "number" | "boolean" | "select"; required?: boolean; default?: string | number | boolean; options?: string[] })[]; minDelaySec?: number; tags?: string[]; tagIds?: string[]; status: { isRunning: boolean; lastRunAt: number | null; lastError: string | null } })[]Shapes: EventVocabularyKindSchema
actions.getLinks
- Kind: query —
GET /trpc/actions.getLinks - 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=actions.getLinkson your hub
Input
{ deviceId: number }Output
ActionLinksSchemaShapes: ActionLinksSchema
actions.setLinks
- Kind: mutation —
POST /trpc/actions.setLinks - 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=actions.setLinkson your hub
Input
ActionLinksSetInputSchemaOutput
ActionLinksSchemaShapes: ActionLinksSetInputSchema · ActionLinksSchema