mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +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 = {
|
||||
trace: {
|
||||
automation_id: "",
|
||||
last_action: "action/3",
|
||||
last_condition: null,
|
||||
run_id: "1",
|
||||
|
@ -18,6 +18,14 @@ export interface ConditionTrace extends BaseTrace {
|
||||
result: { result: boolean };
|
||||
}
|
||||
|
||||
export interface CallServiceActionTrace extends BaseTrace {
|
||||
result: {
|
||||
limit: number;
|
||||
running_script: boolean;
|
||||
params: Record<string, unknown>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ChooseActionTrace extends BaseTrace {
|
||||
result: { choice: number };
|
||||
}
|
||||
@ -28,10 +36,13 @@ export interface ChooseChoiceActionTrace extends BaseTrace {
|
||||
|
||||
export type ActionTrace =
|
||||
| BaseTrace
|
||||
| CallServiceActionTrace
|
||||
| ChooseActionTrace
|
||||
| ChooseChoiceActionTrace;
|
||||
|
||||
export interface AutomationTrace {
|
||||
automation_id: string;
|
||||
unique_id: string;
|
||||
last_action: string | null;
|
||||
last_condition: string | null;
|
||||
run_id: string;
|
||||
@ -41,7 +52,6 @@ export interface AutomationTrace {
|
||||
finish: string | null;
|
||||
};
|
||||
trigger: unknown;
|
||||
unique_id: string;
|
||||
}
|
||||
|
||||
export interface AutomationTraceExtended extends AutomationTrace {
|
||||
|
@ -104,8 +104,13 @@ export interface UntilRepeat extends BaseRepeat {
|
||||
}
|
||||
|
||||
export interface ChooseAction {
|
||||
alias?: string;
|
||||
choose: [{ conditions: Condition[]; sequence: Action[] }];
|
||||
choose: [
|
||||
{
|
||||
alias?: string;
|
||||
conditions: string | Condition[];
|
||||
sequence: Action[];
|
||||
}
|
||||
];
|
||||
default?: Action[];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user