mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 09:56:36 +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,
|
mdiDownload,
|
||||||
} from "@mdi/js";
|
} from "@mdi/js";
|
||||||
import "./ha-automation-trace-blueprint-config";
|
import "./ha-automation-trace-blueprint-config";
|
||||||
|
import { isComponentLoaded } from "../../../../common/config/is_component_loaded";
|
||||||
|
|
||||||
@customElement("ha-automation-trace")
|
@customElement("ha-automation-trace")
|
||||||
export class HaAutomationTrace extends LitElement {
|
export class HaAutomationTrace extends LitElement {
|
||||||
@ -378,11 +379,13 @@ export class HaAutomationTrace extends LitElement {
|
|||||||
this.automationId,
|
this.automationId,
|
||||||
this._runId!
|
this._runId!
|
||||||
);
|
);
|
||||||
this._logbookEntries = await getLogbookDataForContext(
|
this._logbookEntries = isComponentLoaded(this.hass, "logbook")
|
||||||
|
? await getLogbookDataForContext(
|
||||||
this.hass,
|
this.hass,
|
||||||
trace.timestamp.start,
|
trace.timestamp.start,
|
||||||
trace.context.id
|
trace.context.id
|
||||||
);
|
)
|
||||||
|
: [];
|
||||||
|
|
||||||
this._trace = trace;
|
this._trace = trace;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user