mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 14:56:37 +00:00
Show solar forecast even if no prod stats available (#9632)
This commit is contained in:
parent
4d330fba8a
commit
521d5df064
@ -261,10 +261,6 @@ export class HuiEnergySolarGraphCard
|
||||
const datasets: ChartDataset<"bar">[] = [];
|
||||
let endTime: Date;
|
||||
|
||||
if (statisticsData.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
endTime = new Date(
|
||||
Math.max(
|
||||
...statisticsData.map((stats) =>
|
||||
@ -273,7 +269,7 @@ export class HuiEnergySolarGraphCard
|
||||
)
|
||||
);
|
||||
|
||||
if (endTime > new Date()) {
|
||||
if (!endTime || endTime > new Date()) {
|
||||
endTime = new Date();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user