mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-06 16:07:48 +00:00
review
This commit is contained in:
parent
4091205b58
commit
e9c5e51f25
@ -233,11 +233,11 @@ class HistoryStream {
|
|||||||
const newHistory: HistoryStates = {};
|
const newHistory: HistoryStates = {};
|
||||||
for (const entityId of Object.keys(this.combinedHistory)) {
|
for (const entityId of Object.keys(this.combinedHistory)) {
|
||||||
newHistory[entityId] = [];
|
newHistory[entityId] = [];
|
||||||
};
|
}
|
||||||
Object.keys(streamMessage.states).forEach((entityId) => {
|
for (const entityId of Object.keys(streamMessage.states)) {
|
||||||
newHistory[entityId] = [];
|
newHistory[entityId] = [];
|
||||||
});
|
}
|
||||||
Object.keys(newHistory).forEach((entityId) => {
|
for (const entityId of Object.keys(newHistory)) {
|
||||||
let purgeOld = entityId in this.combinedHistory;
|
let purgeOld = entityId in this.combinedHistory;
|
||||||
if (
|
if (
|
||||||
entityId in this.combinedHistory &&
|
entityId in this.combinedHistory &&
|
||||||
@ -277,7 +277,7 @@ class HistoryStream {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
this.combinedHistory = newHistory;
|
this.combinedHistory = newHistory;
|
||||||
return this.combinedHistory;
|
return this.combinedHistory;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user