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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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] = [];
});