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

Fix myq increasing number of network connections #22432

Merged
merged 9 commits into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from 8 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
16 changes: 11 additions & 5 deletions homeassistant/components/myq/cover.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
"""Support for MyQ-Enabled Garage Doors."""
import logging
"""
Support for MyQ-Enabled Garage Doors.

For more details about this platform, please refer to the documentation
https://home-assistant.io/components/cover.myq/
ehendrix23 marked this conversation as resolved.
Show resolved Hide resolved
"""
import logging
import voluptuous as vol

from homeassistant.components.cover import (
PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_OPEN, CoverDevice)
CoverDevice, PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_OPEN
)
from homeassistant.const import (
CONF_PASSWORD, CONF_TYPE, CONF_USERNAME, STATE_CLOSED, STATE_CLOSING,
STATE_OPEN, STATE_OPENING)
STATE_OPEN, STATE_OPENING
)
from homeassistant.helpers import aiohttp_client, config_validation as cv

REQUIREMENTS = ['pymyq==1.1.0']
REQUIREMENTS = ['pymyq==1.2.0']
_LOGGER = logging.getLogger(__name__)

MYQ_TO_HASS = {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/myq/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Myq",
"documentation": "https://www.home-assistant.io/components/myq",
"requirements": [
"pymyq==1.1.0"
"pymyq==1.2.0"
],
"dependencies": [],
"codeowners": []
Expand Down
5 changes: 4 additions & 1 deletion homeassistant/helpers/aiohttp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ def _async_get_connector(hass: HomeAssistantType,
else:
ssl_context = False

connector = aiohttp.TCPConnector(loop=hass.loop, ssl=ssl_context)
connector = aiohttp.TCPConnector(loop=hass.loop,
enable_cleanup_closed=True,
ssl=ssl_context,
)
hass.data[key] = connector

async def _async_close_connector(event: Event) -> None:
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ pymonoprice==0.3
pymusiccast==0.1.6

# homeassistant.components.myq
pymyq==1.1.0
pymyq==1.2.0

# homeassistant.components.mysensors
pymysensors==0.18.0
Expand Down