diff --git a/src/dialogs/more-info/ha-more-info-logbook.ts b/src/dialogs/more-info/ha-more-info-logbook.ts index 4f3e89b3a9..08ddc48734 100644 --- a/src/dialogs/more-info/ha-more-info-logbook.ts +++ b/src/dialogs/more-info/ha-more-info-logbook.ts @@ -127,7 +127,7 @@ export class MoreInfoLogbook extends LitElement { this.entityId, true ), - loadTraceContexts(this.hass), + this.hass.user?.is_admin ? loadTraceContexts(this.hass) : {}, this._fetchUserPromise, ]); this._logbookEntries = this._logbookEntries diff --git a/src/panels/logbook/ha-panel-logbook.ts b/src/panels/logbook/ha-panel-logbook.ts index aa5aab7245..aa465e51c5 100644 --- a/src/panels/logbook/ha-panel-logbook.ts +++ b/src/panels/logbook/ha-panel-logbook.ts @@ -257,7 +257,9 @@ export class HaPanelLogbook extends LitElement { this._endDate.toISOString(), this._entityId ), - isComponentLoaded(this.hass, "trace") ? loadTraceContexts(this.hass) : {}, + isComponentLoaded(this.hass, "trace") && this.hass.user?.is_admin + ? loadTraceContexts(this.hass) + : {}, this._fetchUserPromise, ]);