diff --git a/homeassistant/components/weather/ipma.py b/homeassistant/components/weather/ipma.py index a2f5058ac1e8041676ab11b37d7dc43607ba8af0..fda0fef4f25951a04434de5519ffadc6dc19dd8e 100644 --- a/homeassistant/components/weather/ipma.py +++ b/homeassistant/components/weather/ipma.py @@ -116,6 +116,9 @@ class IPMAWeather(WeatherEntity): @property def condition(self): """Return the current condition.""" + if not self._forecast: + return + return next((k for k, v in CONDITION_CLASSES.items() if self._forecast[0].idWeatherType in v), None)