mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 16:17:20 +00:00
Correct wemo static device discovery issue. (#16292)
A recent change caused an issue if a single static wemo device is offline and could not be reached, then the whole component would not initialize (and therefore all other wemo devices are not added).
This commit is contained in:
parent
232076b41d
commit
8be7a0a9b9
@ -124,14 +124,14 @@ def setup(hass, config):
|
|||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
'Unable to get description url for %s',
|
'Unable to get description url for %s',
|
||||||
'{}:{}'.format(host, port) if port else host)
|
'{}:{}'.format(host, port) if port else host)
|
||||||
return False
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
device = pywemo.discovery.device_from_description(url, None)
|
device = pywemo.discovery.device_from_description(url, None)
|
||||||
except (requests.exceptions.ConnectionError,
|
except (requests.exceptions.ConnectionError,
|
||||||
requests.exceptions.Timeout) as err:
|
requests.exceptions.Timeout) as err:
|
||||||
_LOGGER.error('Unable to access %s (%s)', url, err)
|
_LOGGER.error('Unable to access %s (%s)', url, err)
|
||||||
return False
|
continue
|
||||||
|
|
||||||
devices.append((url, device))
|
devices.append((url, device))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user