From 9b947ef734f745c5cb51998eb3b6185f73457664 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 31 Mar 2021 18:15:06 +0200 Subject: [PATCH] Add top level logbook entries tab (#8776) --- .../automation/trace/ha-automation-trace.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/panels/config/automation/trace/ha-automation-trace.ts b/src/panels/config/automation/trace/ha-automation-trace.ts index f99503e3b5..13f9f51c2e 100644 --- a/src/panels/config/automation/trace/ha-automation-trace.ts +++ b/src/panels/config/automation/trace/ha-automation-trace.ts @@ -66,8 +66,11 @@ export class HaAutomationTrace extends LitElement { @internalProperty() private _logbookEntries?: LogbookEntry[]; - @internalProperty() private _view: "details" | "config" | "timeline" = - "details"; + @internalProperty() private _view: + | "details" + | "config" + | "timeline" + | "logbook" = "details"; protected render(): TemplateResult { const stateObj = this._entityId @@ -181,6 +184,7 @@ export class HaAutomationTrace extends LitElement { ${[ ["details", "Step Details"], ["timeline", "Trace Timeline"], + ["logbook", "Related logbook entries"], ["config", "Automation Config"], ].map( ([view, label]) => html` @@ -216,6 +220,13 @@ export class HaAutomationTrace extends LitElement { .trace=${this._trace} > ` + : this._view === "logbook" + ? html` + + ` : html`