From 7182abfec5b4e3620ce81df4295dc3af925dc05d Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 14 Jun 2023 08:45:57 -0700 Subject: [PATCH] Fix history chart when final sensor state is unavailable (#16852) --- src/components/chart/state-history-chart-line.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/chart/state-history-chart-line.ts b/src/components/chart/state-history-chart-line.ts index 50f164c094..1e34d204fb 100644 --- a/src/components/chart/state-history-chart-line.ts +++ b/src/components/chart/state-history-chart-line.ts @@ -376,6 +376,9 @@ class StateHistoryChartLine extends LitElement { lastNullDate = date; } }); + if (lastNullDate !== null) { + pushData(lastNullDate, [null]); + } } // Add an entry for final values