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 _fetching = false;
|
||||
|
||||
public getCardSize(): number {
|
||||
return 4;
|
||||
}
|
||||
@ -138,6 +140,7 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
||||
>
|
||||
<state-history-charts
|
||||
.hass=${this.hass}
|
||||
.isLoadingData=${!this._stateHistory}
|
||||
.historyData=${this._stateHistory}
|
||||
.names=${this._names}
|
||||
.upToNow=${true}
|
||||
@ -149,6 +152,11 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
private async _getStateHistory(): Promise<void> {
|
||||
if (this._fetching) {
|
||||
return;
|
||||
}
|
||||
this._fetching = true;
|
||||
try {
|
||||
this._stateHistory = await getRecentWithCache(
|
||||
this.hass!,
|
||||
this._cacheConfig!.cacheKey,
|
||||
@ -156,6 +164,9 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
||||
this.hass!.localize,
|
||||
this.hass!.language
|
||||
);
|
||||
} finally {
|
||||
this._fetching = false;
|
||||
}
|
||||
}
|
||||
|
||||
private _clearInterval(): void {
|
||||
|
@ -135,7 +135,8 @@ export class HuiEntitiesCardEditor extends LitElement
|
||||
}
|
||||
|
||||
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);
|
||||
} else if (target.configValue) {
|
||||
if (target.value === "") {
|
||||
|
@ -193,7 +193,8 @@ export class HuiGlanceCardEditor extends LitElement
|
||||
return;
|
||||
}
|
||||
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);
|
||||
} else if (target.configValue) {
|
||||
if (
|
||||
|
@ -136,7 +136,7 @@ export class HuiHistoryGraphCardEditor extends LitElement
|
||||
}
|
||||
|
||||
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);
|
||||
} else if (target.configValue) {
|
||||
if (target.value === "") {
|
||||
|
@ -184,7 +184,8 @@ export class HuiMapCardEditor extends LitElement implements LovelaceCardEditor {
|
||||
return;
|
||||
}
|
||||
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);
|
||||
fireEvent(this, "config-changed", { config: this._config });
|
||||
}
|
||||
|
@ -251,7 +251,8 @@ export class HuiPictureGlanceCardEditor extends LitElement
|
||||
}
|
||||
|
||||
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);
|
||||
} else if (target.configValue) {
|
||||
if (
|
||||
|
Loading…
x
Reference in New Issue
Block a user