Catch exception from update on initial platform setup

This commit is contained in:
Teagan M. Glenn 2016-08-17 22:29:25 -06:00
parent 62b00e1294
commit 31237a891c

View File

@ -82,7 +82,16 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
return False
else:
add_devices(sensors)
try:
rest.update()
except ValueError as err:
_LOGGER.error("Received error from WUnderground: %s", err)
return False
add_devices(sensors)
return True
class WUndergroundSensor(Entity):