Update src/data/history.ts

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
J. Nick Koston
2023-01-21 16:59:06 -10:00
committed by GitHub
parent ec844560af
commit 478539d58d

View File

@@ -231,9 +231,9 @@ class HistoryStream {
const purgeBeforePythonTime = const purgeBeforePythonTime =
(new Date().getTime() - 60 * 60 * this.hoursToShow * 1000) / 1000; (new Date().getTime() - 60 * 60 * this.hoursToShow * 1000) / 1000;
const newHistory: HistoryStates = {}; const newHistory: HistoryStates = {};
Object.keys(this.combinedHistory).forEach((entityId) => { for (const entityId of Object.keys(this.combinedHistory)) {
newHistory[entityId] = []; newHistory[entityId] = [];
}); };
Object.keys(streamMessage.states).forEach((entityId) => { Object.keys(streamMessage.states).forEach((entityId) => {
newHistory[entityId] = []; newHistory[entityId] = [];
}); });