mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Handle netatmo exception (#16344)
This commit is contained in:
parent
a5d95dfbdc
commit
b31890c4cb
@ -317,7 +317,11 @@ class NetAtmoData:
|
||||
|
||||
try:
|
||||
import pyatmo
|
||||
self.station_data = pyatmo.WeatherStationData(self.auth)
|
||||
try:
|
||||
self.station_data = pyatmo.WeatherStationData(self.auth)
|
||||
except TypeError:
|
||||
_LOGGER.error("Failed to connect to NetAtmo")
|
||||
return # finally statement will be executed
|
||||
|
||||
if self.station is not None:
|
||||
self.data = self.station_data.lastData(
|
||||
|
Loading…
x
Reference in New Issue
Block a user