mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Increase httpx timeout for Tesla (#50376)
This commit is contained in:
parent
041838bdd7
commit
c1a316b2ec
@ -140,7 +140,7 @@ async def async_setup_entry(hass, config_entry):
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
config = config_entry.data
|
||||
# Because users can have multiple accounts, we always create a new session so they have separate cookies
|
||||
async_client = httpx.AsyncClient(headers={USER_AGENT: SERVER_SOFTWARE})
|
||||
async_client = httpx.AsyncClient(headers={USER_AGENT: SERVER_SOFTWARE}, timeout=60)
|
||||
email = config_entry.title
|
||||
if email in hass.data[DOMAIN] and CONF_SCAN_INTERVAL in hass.data[DOMAIN][email]:
|
||||
scan_interval = hass.data[DOMAIN][email][CONF_SCAN_INTERVAL]
|
||||
|
@ -149,7 +149,7 @@ async def validate_input(hass: core.HomeAssistant, data):
|
||||
"""
|
||||
|
||||
config = {}
|
||||
async_client = httpx.AsyncClient(headers={USER_AGENT: SERVER_SOFTWARE})
|
||||
async_client = httpx.AsyncClient(headers={USER_AGENT: SERVER_SOFTWARE}, timeout=60)
|
||||
|
||||
try:
|
||||
controller = TeslaAPI(
|
||||
|
Loading…
x
Reference in New Issue
Block a user