mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add return value
This commit is contained in:
parent
5df2a1cf76
commit
60d45ebf79
@ -62,6 +62,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
response = get(resource, timeout=10)
|
||||
if not response.ok:
|
||||
_LOGGER.error('Response status is "%s"', response.status_code)
|
||||
return False
|
||||
except exceptions.MissingSchema:
|
||||
_LOGGER.error('Missing resource or schema in configuration. '
|
||||
'Add http:// to your URL.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user