mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add return value
This commit is contained in:
parent
984f01359c
commit
56a151b196
@ -101,6 +101,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
response = requests.get(url, timeout=10)
|
response = requests.get(url, timeout=10)
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
_LOGGER.error('Response status is "%s"', response.status_code)
|
_LOGGER.error('Response status is "%s"', response.status_code)
|
||||||
|
return False
|
||||||
except requests.exceptions.MissingSchema:
|
except requests.exceptions.MissingSchema:
|
||||||
_LOGGER.error('Missing resource or schema in configuration. '
|
_LOGGER.error('Missing resource or schema in configuration. '
|
||||||
'Please heck our details in the configuration file.')
|
'Please heck our details in the configuration file.')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user