Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gallery/src/demos/demo-automation-trace-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" }),
Expand Down
2 changes: 1 addition & 1 deletion src/components/trace/hat-trace-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
5 changes: 2 additions & 3 deletions src/data/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down