mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix sensor card to not crash when it finds no state history (#17181)
This commit is contained in:
parent
9ac3f745b3
commit
3d2734eb88
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user