Skip to content

Commit

Permalink
Fix live-logs loading (#22737)
Browse files Browse the repository at this point in the history
  • Loading branch information
wendevlin authored and bramkragten committed Nov 8, 2024
1 parent e5e84ac commit 25c02b1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/panels/config/logs/error-log-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,25 @@ class ErrorLogCard extends LitElement {

protected willUpdate(changedProps: PropertyValues) {
super.willUpdate(changedProps);
if (
this._downloadSupported === undefined ||
this._streamSupported === undefined
) {
this._downloadSupported = downloadFileSupported(this.hass);
this._streamSupported = atLeastVersion(
this.hass.config.version,
2024,
11
);
}

if (changedProps.has("provider")) {
this._boot = 0;
this._loadLogs();
}
if (this.hasUpdated) {
return;
}
this._streamSupported = atLeastVersion(this.hass.config.version, 2024, 11);
this._downloadSupported = downloadFileSupported(this.hass);
// just needs to be loaded once, because only the host endpoints provide boots information
this._loadBoots();

Expand Down

0 comments on commit 25c02b1

Please sign in to comment.