mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Fix failed conditions reason (#8870)
This commit is contained in:
parent
7c823c98ae
commit
d7c0c2ea72
@ -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" }),
|
||||
|
@ -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":
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user