mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 21:37:21 +00:00
Check if logbook component loaded when fetching trace (#8861)
This commit is contained in:
parent
716335df2c
commit
e4606219bc
@ -40,6 +40,7 @@ import {
|
||||
mdiDownload,
|
||||
} from "@mdi/js";
|
||||
import "./ha-automation-trace-blueprint-config";
|
||||
import { isComponentLoaded } from "../../../../common/config/is_component_loaded";
|
||||
|
||||
@customElement("ha-automation-trace")
|
||||
export class HaAutomationTrace extends LitElement {
|
||||
@ -378,11 +379,13 @@ export class HaAutomationTrace extends LitElement {
|
||||
this.automationId,
|
||||
this._runId!
|
||||
);
|
||||
this._logbookEntries = await getLogbookDataForContext(
|
||||
this.hass,
|
||||
trace.timestamp.start,
|
||||
trace.context.id
|
||||
);
|
||||
this._logbookEntries = isComponentLoaded(this.hass, "logbook")
|
||||
? await getLogbookDataForContext(
|
||||
this.hass,
|
||||
trace.timestamp.start,
|
||||
trace.context.id
|
||||
)
|
||||
: [];
|
||||
|
||||
this._trace = trace;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user