mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 12:15:08 +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,
|
self.nws.station,
|
||||||
status,
|
status,
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
self.observation = self.nws.observation
|
self.observation = self.nws.observation
|
||||||
|
|
||||||
_LOGGER.debug("Updating forecast")
|
_LOGGER.debug("Updating forecast")
|
||||||
try:
|
try:
|
||||||
await self.nws.update_forecast()
|
await self.nws.update_forecast()
|
||||||
@@ -233,7 +233,6 @@ class NWSWeather(WeatherEntity):
|
|||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
"Error updating forecast from station %s: %s", self.nws.station, status
|
"Error updating forecast from station %s: %s", self.nws.station, status
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
self._forecast = self.nws.forecast
|
self._forecast = self.nws.forecast
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Reference in New Issue
Block a user