From 478539d58dff579ddc6b8231df88d6c3f0a93d09 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 21 Jan 2023 16:59:06 -1000 Subject: [PATCH] Update src/data/history.ts Co-authored-by: Paulus Schoutsen --- src/data/history.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/history.ts b/src/data/history.ts index 26ecabfccb..6fcb8ad9f1 100644 --- a/src/data/history.ts +++ b/src/data/history.ts @@ -231,9 +231,9 @@ class HistoryStream { const purgeBeforePythonTime = (new Date().getTime() - 60 * 60 * this.hoursToShow * 1000) / 1000; const newHistory: HistoryStates = {}; - Object.keys(this.combinedHistory).forEach((entityId) => { + for (const entityId of Object.keys(this.combinedHistory)) { newHistory[entityId] = []; - }); + }; Object.keys(streamMessage.states).forEach((entityId) => { newHistory[entityId] = []; });