Catch failing to fetch forecasts (#9765)

This commit is contained in:
Bram Kragten 2021-08-10 19:47:09 +02:00 committed by GitHub
parent 29d29a337f
commit 2557b03b11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,7 +201,11 @@ export class HuiEnergySolarGraphCard
isComponentLoaded(this.hass, "forecast_solar") &&
solarSources.some((source) => source.config_entry_solar_forecast)
) {
try {
forecasts = await getForecastSolarForecasts(this.hass);
} catch (_e) {
// ignore
}
}
const statisticsData = Object.values(energyData.stats);