Fix live-logs loading (#22737)

This commit is contained in:
Wendelin 2024-11-08 12:39:21 +01:00 committed by Bram Kragten
parent e5e84acd07
commit 25c02b1219

View File

@ -339,6 +339,18 @@ 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();
@ -346,8 +358,6 @@ class ErrorLogCard extends LitElement {
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();