mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Fix openweathermap hourly forecast (#74578)
This commit is contained in:
parent
104d236646
commit
4a4dabaaa5
@ -143,7 +143,11 @@ class OpenWeatherMapWeather(WeatherEntity):
|
|||||||
"""Return the forecast array."""
|
"""Return the forecast array."""
|
||||||
api_forecasts = self._weather_coordinator.data[ATTR_API_FORECAST]
|
api_forecasts = self._weather_coordinator.data[ATTR_API_FORECAST]
|
||||||
forecasts = [
|
forecasts = [
|
||||||
{ha_key: forecast[api_key] for api_key, ha_key in FORECAST_MAP.items()}
|
{
|
||||||
|
ha_key: forecast[api_key]
|
||||||
|
for api_key, ha_key in FORECAST_MAP.items()
|
||||||
|
if api_key in forecast
|
||||||
|
}
|
||||||
for forecast in api_forecasts
|
for forecast in api_forecasts
|
||||||
]
|
]
|
||||||
return cast(list[Forecast], forecasts)
|
return cast(list[Forecast], forecasts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user