Skip to content

Commit bc54729

Browse files
committed
fix: Graph stopped updating following ddf6ca9
1 parent ddf6ca9 commit bc54729

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/apexcharts-card.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ class ChartsCard extends LitElement {
172172
let updated = false;
173173
this._config.series.forEach((serie, index) => {
174174
const entityState = (hass && hass.states[serie.entity]) || undefined;
175-
this._entities[index] = entityState;
176-
if (entityState && this._entities[index] !== entityState) {
175+
if (!entityState) {
176+
this._entities[index] = entityState;
177+
} else if (entityState && this._entities[index] !== entityState) {
178+
this._entities[index] = entityState;
177179
updated = true;
178180
if (this._graphs && this._graphs[index]) {
179181
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

0 commit comments

Comments
 (0)