diff --git a/gallery/src/demos/demo-automation-trace-timeline.ts b/gallery/src/demos/demo-automation-trace-timeline.ts index 2a8ecce1fa..740c589023 100644 --- a/gallery/src/demos/demo-automation-trace-timeline.ts +++ b/gallery/src/demos/demo-automation-trace-timeline.ts @@ -17,7 +17,7 @@ import { DemoTrace } from "../data/traces/types"; const traces: DemoTrace[] = [ mockDemoTrace({ state: "running" }), mockDemoTrace({ state: "debugged" }), - mockDemoTrace({ state: "stopped", script_execution: "failed_condition" }), + mockDemoTrace({ state: "stopped", script_execution: "failed_conditions" }), mockDemoTrace({ state: "stopped", script_execution: "failed_single" }), mockDemoTrace({ state: "stopped", script_execution: "failed_max_runs" }), mockDemoTrace({ state: "stopped", script_execution: "finished" }), diff --git a/src/components/trace/hat-trace-timeline.ts b/src/components/trace/hat-trace-timeline.ts index 742c6c839c..a17cb3c81e 100644 --- a/src/components/trace/hat-trace-timeline.ts +++ b/src/components/trace/hat-trace-timeline.ts @@ -475,7 +475,7 @@ export class HaAutomationTracer extends LitElement { let extra: TemplateResult | undefined; switch (this.trace.script_execution) { - case "failed_condition": + case "failed_conditions": reason = "a condition failed"; break; case "failed_single": diff --git a/src/data/trace.ts b/src/data/trace.ts index abe9d06830..cf5f18e6c2 100644 --- a/src/data/trace.ts +++ b/src/data/trace.ts @@ -66,7 +66,7 @@ export interface AutomationTrace { }; script_execution: | // The script was not executed because the automation's condition failed - "failed_condition" + "failed_conditions" // The script was not executed because the run mode is single | "failed_single" // The script was not executed because max parallel runs would be exceeded @@ -80,8 +80,7 @@ export interface AutomationTrace { | "error" // The exception is in the trace itself or in the last element of the trace // Script execution stopped by async_stop called on the script run because home assistant is shutting down, script mode is SCRIPT_MODE_RESTART etc: - | "cancelled" - | string; + | "cancelled"; // Automation only, should become it's own type when we support script in frontend trigger: string; }