mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Fix types
This commit is contained in:
parent
4b664cc142
commit
20da329a21
@ -2,6 +2,7 @@ import { DemoTrace } from "./types";
|
|||||||
|
|
||||||
export const motionLightTrace: DemoTrace = {
|
export const motionLightTrace: DemoTrace = {
|
||||||
trace: {
|
trace: {
|
||||||
|
automation_id: "",
|
||||||
last_action: "action/3",
|
last_action: "action/3",
|
||||||
last_condition: null,
|
last_condition: null,
|
||||||
run_id: "1",
|
run_id: "1",
|
||||||
|
@ -18,6 +18,14 @@ export interface ConditionTrace extends BaseTrace {
|
|||||||
result: { result: boolean };
|
result: { result: boolean };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CallServiceActionTrace extends BaseTrace {
|
||||||
|
result: {
|
||||||
|
limit: number;
|
||||||
|
running_script: boolean;
|
||||||
|
params: Record<string, unknown>;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface ChooseActionTrace extends BaseTrace {
|
export interface ChooseActionTrace extends BaseTrace {
|
||||||
result: { choice: number };
|
result: { choice: number };
|
||||||
}
|
}
|
||||||
@ -28,10 +36,13 @@ export interface ChooseChoiceActionTrace extends BaseTrace {
|
|||||||
|
|
||||||
export type ActionTrace =
|
export type ActionTrace =
|
||||||
| BaseTrace
|
| BaseTrace
|
||||||
|
| CallServiceActionTrace
|
||||||
| ChooseActionTrace
|
| ChooseActionTrace
|
||||||
| ChooseChoiceActionTrace;
|
| ChooseChoiceActionTrace;
|
||||||
|
|
||||||
export interface AutomationTrace {
|
export interface AutomationTrace {
|
||||||
|
automation_id: string;
|
||||||
|
unique_id: string;
|
||||||
last_action: string | null;
|
last_action: string | null;
|
||||||
last_condition: string | null;
|
last_condition: string | null;
|
||||||
run_id: string;
|
run_id: string;
|
||||||
@ -41,7 +52,6 @@ export interface AutomationTrace {
|
|||||||
finish: string | null;
|
finish: string | null;
|
||||||
};
|
};
|
||||||
trigger: unknown;
|
trigger: unknown;
|
||||||
unique_id: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AutomationTraceExtended extends AutomationTrace {
|
export interface AutomationTraceExtended extends AutomationTrace {
|
||||||
|
@ -104,8 +104,13 @@ export interface UntilRepeat extends BaseRepeat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ChooseAction {
|
export interface ChooseAction {
|
||||||
|
choose: [
|
||||||
|
{
|
||||||
alias?: string;
|
alias?: string;
|
||||||
choose: [{ conditions: Condition[]; sequence: Action[] }];
|
conditions: string | Condition[];
|
||||||
|
sequence: Action[];
|
||||||
|
}
|
||||||
|
];
|
||||||
default?: Action[];
|
default?: Action[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user