mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user