mirror of
https://github.com/home-assistant/core.git
synced 2025-08-16 02:51:40 +02:00
Catch exception from update on initial platform setup
This commit is contained in:
@@ -82,7 +82,16 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
add_devices(sensors)
|
add_devices(sensors)
|
||||||
|
|
||||||
|
try:
|
||||||
rest.update()
|
rest.update()
|
||||||
|
except ValueError as err:
|
||||||
|
_LOGGER.error("Received error from WUnderground: %s", err)
|
||||||
|
return False
|
||||||
|
|
||||||
|
add_devices(sensors)
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
class WUndergroundSensor(Entity):
|
class WUndergroundSensor(Entity):
|
||||||
|
Reference in New Issue
Block a user