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

Re-use connection-pool of VOC #19249

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 9 additions & 5 deletions homeassistant/components/volvooncall.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.event import async_track_point_in_utc_time
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.dispatcher import (
async_dispatcher_send,
async_dispatcher_connect)
Expand All @@ -24,7 +25,7 @@

DATA_KEY = DOMAIN

REQUIREMENTS = ['volvooncall==0.7.11']
REQUIREMENTS = ['volvooncall==0.8.2']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -106,12 +107,15 @@

async def async_setup(hass, config):
"""Set up the Volvo On Call component."""
session = async_get_clientsession(hass)

from volvooncall import Connection
connection = Connection(
config[DOMAIN].get(CONF_USERNAME),
config[DOMAIN].get(CONF_PASSWORD),
config[DOMAIN].get(CONF_SERVICE_URL),
config[DOMAIN].get(CONF_REGION))
session=session,
username=config[DOMAIN].get(CONF_USERNAME),
password=config[DOMAIN].get(CONF_PASSWORD),
service_url=config[DOMAIN].get(CONF_SERVICE_URL),
region=config[DOMAIN].get(CONF_REGION))

interval = config[DOMAIN].get(CONF_UPDATE_INTERVAL)

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ venstarcolortouch==0.6
volkszaehler==0.1.2

# homeassistant.components.volvooncall
volvooncall==0.7.11
volvooncall==0.8.2

# homeassistant.components.verisure
vsure==1.5.2
Expand Down