mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Catch exception from update on initial platform setup
This commit is contained in:
parent
62b00e1294
commit
31237a891c
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user