mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-10 09:57:45 +00:00
Update src/data/history.ts
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -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] = [];
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user