From 2557b03b11f964f4e5b000284e7232b26418c3bc Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Tue, 10 Aug 2021 19:47:09 +0200 Subject: [PATCH] Catch failing to fetch forecasts (#9765) --- .../lovelace/cards/energy/hui-energy-solar-graph-card.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts index 4c89451e97..f8e970aa5b 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts @@ -201,7 +201,11 @@ export class HuiEnergySolarGraphCard isComponentLoaded(this.hass, "forecast_solar") && solarSources.some((source) => source.config_entry_solar_forecast) ) { - forecasts = await getForecastSolarForecasts(this.hass); + try { + forecasts = await getForecastSolarForecasts(this.hass); + } catch (_e) { + // ignore + } } const statisticsData = Object.values(energyData.stats);