Skip to content

Commit be4e46a

Browse files
authored
Fix statistic names w/ energy_date_selection (#28787)
1 parent 2fce89a commit be4e46a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/panels/lovelace/cards/hui-statistics-graph-card.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard {
196196

197197
public willUpdate(changedProps: PropertyValues) {
198198
super.willUpdate(changedProps);
199+
if (changedProps.has("hass") || changedProps.has("_config")) {
200+
this._computeNames();
201+
}
202+
199203
if (!this._config || !changedProps.has("_config")) {
200204
return;
201205
}
@@ -225,10 +229,6 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard {
225229
}
226230
}
227231

228-
if (changedProps.has("hass")) {
229-
this._computeNames();
230-
}
231-
232232
if (
233233
changedProps.has("_config") &&
234234
oldConfig?.entities !== this._config.entities

0 commit comments

Comments
 (0)