mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Missed the entities in the editors (#6443)
This commit is contained in:
parent
8c8673a272
commit
f6fb2e4b1d
@ -61,6 +61,8 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
|||||||
|
|
||||||
private _interval?: number;
|
private _interval?: number;
|
||||||
|
|
||||||
|
private _fetching = false;
|
||||||
|
|
||||||
public getCardSize(): number {
|
public getCardSize(): number {
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
@ -138,6 +140,7 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
|||||||
>
|
>
|
||||||
<state-history-charts
|
<state-history-charts
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
.isLoadingData=${!this._stateHistory}
|
||||||
.historyData=${this._stateHistory}
|
.historyData=${this._stateHistory}
|
||||||
.names=${this._names}
|
.names=${this._names}
|
||||||
.upToNow=${true}
|
.upToNow=${true}
|
||||||
@ -149,13 +152,21 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _getStateHistory(): Promise<void> {
|
private async _getStateHistory(): Promise<void> {
|
||||||
this._stateHistory = await getRecentWithCache(
|
if (this._fetching) {
|
||||||
this.hass!,
|
return;
|
||||||
this._cacheConfig!.cacheKey,
|
}
|
||||||
this._cacheConfig!,
|
this._fetching = true;
|
||||||
this.hass!.localize,
|
try {
|
||||||
this.hass!.language
|
this._stateHistory = await getRecentWithCache(
|
||||||
);
|
this.hass!,
|
||||||
|
this._cacheConfig!.cacheKey,
|
||||||
|
this._cacheConfig!,
|
||||||
|
this.hass!.localize,
|
||||||
|
this.hass!.language
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
this._fetching = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _clearInterval(): void {
|
private _clearInterval(): void {
|
||||||
|
@ -135,7 +135,8 @@ export class HuiEntitiesCardEditor extends LitElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ev.detail && ev.detail.entities) {
|
if (ev.detail && ev.detail.entities) {
|
||||||
this._config.entities = ev.detail.entities;
|
this._config = { ...this._config, entities: ev.detail.entities };
|
||||||
|
|
||||||
this._configEntities = processEditorEntities(this._config.entities);
|
this._configEntities = processEditorEntities(this._config.entities);
|
||||||
} else if (target.configValue) {
|
} else if (target.configValue) {
|
||||||
if (target.value === "") {
|
if (target.value === "") {
|
||||||
|
@ -193,7 +193,8 @@ export class HuiGlanceCardEditor extends LitElement
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ev.detail && ev.detail.entities) {
|
if (ev.detail && ev.detail.entities) {
|
||||||
this._config.entities = ev.detail.entities;
|
this._config = { ...this._config, entities: ev.detail.entities };
|
||||||
|
|
||||||
this._configEntities = processEditorEntities(this._config.entities);
|
this._configEntities = processEditorEntities(this._config.entities);
|
||||||
} else if (target.configValue) {
|
} else if (target.configValue) {
|
||||||
if (
|
if (
|
||||||
|
@ -136,7 +136,7 @@ export class HuiHistoryGraphCardEditor extends LitElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ev.detail && ev.detail.entities) {
|
if (ev.detail && ev.detail.entities) {
|
||||||
this._config.entities = ev.detail.entities;
|
this._config = { ...this._config, entities: ev.detail.entities };
|
||||||
this._configEntities = processEditorEntities(this._config.entities);
|
this._configEntities = processEditorEntities(this._config.entities);
|
||||||
} else if (target.configValue) {
|
} else if (target.configValue) {
|
||||||
if (target.value === "") {
|
if (target.value === "") {
|
||||||
|
@ -184,7 +184,8 @@ export class HuiMapCardEditor extends LitElement implements LovelaceCardEditor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ev.detail && ev.detail.entities) {
|
if (ev.detail && ev.detail.entities) {
|
||||||
this._config.entities = ev.detail.entities;
|
this._config = { ...this._config, entities: ev.detail.entities };
|
||||||
|
|
||||||
this._configEntities = processEditorEntities(this._config.entities);
|
this._configEntities = processEditorEntities(this._config.entities);
|
||||||
fireEvent(this, "config-changed", { config: this._config });
|
fireEvent(this, "config-changed", { config: this._config });
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,8 @@ export class HuiPictureGlanceCardEditor extends LitElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ev.detail && ev.detail.entities) {
|
if (ev.detail && ev.detail.entities) {
|
||||||
this._config.entities = ev.detail.entities;
|
this._config = { ...this._config, entities: ev.detail.entities };
|
||||||
|
|
||||||
this._configEntities = processEditorEntities(this._config.entities);
|
this._configEntities = processEditorEntities(this._config.entities);
|
||||||
} else if (target.configValue) {
|
} else if (target.configValue) {
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user