1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-15 07:25:54 +00:00

Fix statistic names w/ energy_date_selection (#28787)

This commit is contained in:
karwosts
2026-01-04 23:51:49 -08:00
committed by Bram Kragten
parent ab5b5a4276
commit c007206fa0

View File

@@ -196,6 +196,10 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard {
public willUpdate(changedProps: PropertyValues) {
super.willUpdate(changedProps);
if (changedProps.has("hass") || changedProps.has("_config")) {
this._computeNames();
}
if (!this._config || !changedProps.has("_config")) {
return;
}
@@ -225,10 +229,6 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard {
}
}
if (changedProps.has("hass")) {
this._computeNames();
}
if (
changedProps.has("_config") &&
oldConfig?.entities !== this._config.entities