From 53b78b32837b55b8a0b61de6192e846f6a486754 Mon Sep 17 00:00:00 2001 From: "Flamm, Matthew H" Date: Sat, 10 Aug 2019 01:33:43 +0100 Subject: [PATCH] move observation and forecast outside try-except-else --- homeassistant/components/nws/weather.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/nws/weather.py b/homeassistant/components/nws/weather.py index dee82d8c6cf..dcdef4f7b84 100644 --- a/homeassistant/components/nws/weather.py +++ b/homeassistant/components/nws/weather.py @@ -224,8 +224,8 @@ class NWSWeather(WeatherEntity): self.nws.station, status, ) - else: - self.observation = self.nws.observation + self.observation = self.nws.observation + _LOGGER.debug("Updating forecast") try: await self.nws.update_forecast() @@ -233,8 +233,7 @@ class NWSWeather(WeatherEntity): _LOGGER.error( "Error updating forecast from station %s: %s", self.nws.station, status ) - else: - self._forecast = self.nws.forecast + self._forecast = self.nws.forecast @property def attribution(self):