mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 10:31:39 +02:00
Add return value
This commit is contained in:
@@ -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.')
|
||||||
|
Reference in New Issue
Block a user