diff --git a/src/panels/lovelace/common/graph/coordinates.ts b/src/panels/lovelace/common/graph/coordinates.ts index b63c61af05..56f5251965 100644 --- a/src/panels/lovelace/common/graph/coordinates.ts +++ b/src/panels/lovelace/common/graph/coordinates.ts @@ -119,6 +119,9 @@ export const coordinatesMinimalResponseCompressedState = ( detail: number, limits?: { min?: number; max?: number } ): number[][] | undefined => { + if (!history) { + return undefined; + } const numericHistory: NumericEntityHistoryState[] = history.map((item) => ({ state: Number(item.s), // With minimal response and compressed state, we don't have last_changed,