From e1d17f3d3ab8d3c51d453b6800b311b19fa4df91 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 21 Jan 2023 17:03:39 -1000 Subject: [PATCH] review --- src/data/history.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/history.ts b/src/data/history.ts index 51f313ec83..216f764b29 100644 --- a/src/data/history.ts +++ b/src/data/history.ts @@ -249,7 +249,9 @@ class HistoryStream { newHistory[entityId] = entityCombinedHistory.concat( streamMessage.states[entityId] ); - if (streamMessage.states[entityId][0] > lastEntityCombinedHistory) { + if ( + streamMessage.states[entityId][0].lu > lastEntityCombinedHistory.lu + ) { // If the history is out of order we have to sort it. newHistory[entityId] = newHistory[entityId].sort( (a, b) => a.lu - b.lu