mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
move observation and forecast outside try-except-else
This commit is contained in:
@@ -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):
|
||||
|
Reference in New Issue
Block a user