mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add timeout to auto detect config
This commit is contained in:
parent
24bb89df23
commit
4d0265cb7d
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user