diff --git a/src/components/trace/ha-trace-path-details.ts b/src/components/trace/ha-trace-path-details.ts
index cb71dd98a3..c895b19c2e 100644
--- a/src/components/trace/ha-trace-path-details.ts
+++ b/src/components/trace/ha-trace-path-details.ts
@@ -163,21 +163,22 @@ export class HaTracePathDetails extends LitElement {
}
)}
+ ${error
+ ? html`
+ ${this.hass!.localize(
+ "ui.panel.config.automation.trace.path.error",
+ {
+ error: error,
+ }
+ )}
+
`
+ : nothing}
${result
? html`${this.hass!.localize(
"ui.panel.config.automation.trace.path.result"
)}
${dump(result)}
`
- : error
- ? html`
- ${this.hass!.localize(
- "ui.panel.config.automation.trace.path.error",
- {
- error: error,
- }
- )}
-
`
- : nothing}
+ : nothing}
${Object.keys(rest).length === 0
? nothing
: html`${dump(rest)}
`}
diff --git a/src/components/trace/hat-graph-node.ts b/src/components/trace/hat-graph-node.ts
index 4da3f7b7c3..b6452587be 100644
--- a/src/components/trace/hat-graph-node.ts
+++ b/src/components/trace/hat-graph-node.ts
@@ -1,15 +1,16 @@
+import { mdiExclamationThick } from "@mdi/js";
import {
- css,
LitElement,
PropertyValues,
- html,
TemplateResult,
- svg,
+ css,
+ html,
nothing,
+ svg,
} from "lit";
import { customElement, property } from "lit/decorators";
-import { NODE_SIZE, SPACING } from "./hat-graph-const";
import { isSafari } from "../../util/is_safari";
+import { NODE_SIZE, SPACING } from "./hat-graph-const";
/**
* @attribute active
@@ -21,6 +22,8 @@ export class HatGraphNode extends LitElement {
@property({ type: Boolean, reflect: true }) public disabled = false;
+ @property({ type: Boolean }) public error = false;
+
@property({ reflect: true, type: Boolean }) notEnabled = false;
@property({ reflect: true, type: Boolean }) graphStart = false;
@@ -65,16 +68,28 @@ export class HatGraphNode extends LitElement {
`}
+ ${this.error
+ ? svg`
+
+
+
+
+ `
+ : nothing}
${this.badge
? svg`
`
: nothing}
-
+
${this.iconPath
? svg``
: svg``}
@@ -143,13 +158,22 @@ export class HatGraphNode extends LitElement {
fill: var(--background-clr);
stroke: var(--circle-clr, var(--stroke-clr));
}
+ .error circle {
+ fill: var(--error-color);
+ stroke: none;
+ stroke-width: 0;
+ }
+ .error .exclamation {
+ fill: var(--text-primary-color);
+ }
.number circle {
fill: var(--track-clr);
stroke: none;
stroke-width: 0;
}
.number text {
- font-size: smaller;
+ font-size: 10px;
+ fill: var(--text-primary-color);
}
path.icon {
fill: var(--icon-clr);
diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts
index 7bc0cbc0d9..077888293a 100644
--- a/src/components/trace/hat-script-graph.ts
+++ b/src/components/trace/hat-script-graph.ts
@@ -93,6 +93,7 @@ export class HatScriptGraph extends LitElement {
?active=${this.selected === path}
.iconPath=${mdiAsterisk}
.notEnabled=${config.enabled === false}
+ .error=${this.trace.trace[path]?.some((tr) => tr.error)}
tabindex=${track ? "0" : "-1"}
>
`;
@@ -171,6 +172,7 @@ export class HatScriptGraph extends LitElement {
?track=${trace !== undefined}
?active=${this.selected === path}
.notEnabled=${disabled || config.enabled === false}
+ .error=${this.trace.trace[path]?.some((tr) => tr.error)}
slot="head"
nofocus
>
@@ -424,6 +426,7 @@ export class HatScriptGraph extends LitElement {
?track=${path in this.trace.trace}
?active=${this.selected === path}
.notEnabled=${disabled || node.enabled === false}
+ .error=${this.trace.trace[path]?.some((tr) => tr.error)}
tabindex=${this.trace && path in this.trace.trace ? "0" : "-1"}
>
${node.service
@@ -451,6 +454,7 @@ export class HatScriptGraph extends LitElement {
?track=${path in this.trace.trace}
?active=${this.selected === path}
.notEnabled=${disabled || node.enabled === false}
+ .error=${this.trace.trace[path]?.some((tr) => tr.error)}
tabindex=${this.trace && path in this.trace.trace ? "0" : "-1"}
>
`;
@@ -517,6 +521,7 @@ export class HatScriptGraph extends LitElement {
@focus=${this.selectNode(node, path)}
?track=${path in this.trace.trace}
?active=${this.selected === path}
+ .error=${this.trace.trace[path]?.some((tr) => tr.error)}
.notEnabled=${disabled || node.enabled === false}
>
`;
diff --git a/src/panels/config/automation/ha-automation-trace.ts b/src/panels/config/automation/ha-automation-trace.ts
index cd52275ed7..c345a723c3 100644
--- a/src/panels/config/automation/ha-automation-trace.ts
+++ b/src/panels/config/automation/ha-automation-trace.ts
@@ -93,7 +93,7 @@ export class HaAutomationTrace extends LitElement {
let devButtons: TemplateResult | string = "";
if (__DEV__) {
- devButtons = html`
+ devButtons = html`
`;