mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Add timeout to auto detect config
This commit is contained in:
@@ -907,7 +907,8 @@ class Config(object):
|
||||
_LOGGER.info('Auto detecting location and temperature unit')
|
||||
|
||||
try:
|
||||
info = requests.get('https://freegeoip.net/json/').json()
|
||||
info = requests.get(
|
||||
'https://freegeoip.net/json/', timeout=5).json()
|
||||
except requests.RequestException:
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user