Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified arlo object to make smarter HTTP requests for an async envir… #13445

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions homeassistant/components/arlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import voluptuous as vol
from requests.exceptions import HTTPError, ConnectTimeout
from requests.adapters import HTTPAdapter

from homeassistant.helpers import config_validation as cv
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
Expand Down Expand Up @@ -43,6 +44,8 @@ def setup(hass, config):
from pyarlo import PyArlo

arlo = PyArlo(username, password, preload=False)
arlo.session.mount('https://',
HTTPAdapter(pool_maxsize=10, pool_block=True))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line under-indented for visual indent

if not arlo.is_connected:
return False
hass.data[DATA_ARLO] = arlo
Expand Down