mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix myq increasing number of network connections (#22432)
* Fix for network issues Fix for network issues * Further changes to network connection * websession is created in pymyq websession is created in pymyq instead. Added call on stop event to close web session. * Updated requirements file * Added comment * Changed back to use aiohttp_client * Cleanup closed sockets in aiohttp Enable automatic cleanup of closed sockets in aiohttp client helper. * Updated manifest & requirements * Updated comment block
This commit is contained in:
parent
38d92b2abf
commit
7862fdd27e
@ -1,16 +1,17 @@
|
|||||||
"""Support for MyQ-Enabled Garage Doors."""
|
"""Support for MyQ-Enabled Garage Doors."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_OPEN, CoverDevice)
|
CoverDevice, PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_OPEN
|
||||||
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_PASSWORD, CONF_TYPE, CONF_USERNAME, STATE_CLOSED, STATE_CLOSING,
|
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
|
from homeassistant.helpers import aiohttp_client, config_validation as cv
|
||||||
|
|
||||||
REQUIREMENTS = ['pymyq==1.1.0']
|
REQUIREMENTS = ['pymyq==1.2.0']
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
MYQ_TO_HASS = {
|
MYQ_TO_HASS = {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Myq",
|
"name": "Myq",
|
||||||
"documentation": "https://www.home-assistant.io/components/myq",
|
"documentation": "https://www.home-assistant.io/components/myq",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"pymyq==1.1.0"
|
"pymyq==1.2.0"
|
||||||
],
|
],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
|
@ -168,7 +168,10 @@ def _async_get_connector(hass: HomeAssistantType,
|
|||||||
else:
|
else:
|
||||||
ssl_context = False
|
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
|
hass.data[key] = connector
|
||||||
|
|
||||||
async def _async_close_connector(event: Event) -> None:
|
async def _async_close_connector(event: Event) -> None:
|
||||||
|
@ -1160,7 +1160,7 @@ pymonoprice==0.3
|
|||||||
pymusiccast==0.1.6
|
pymusiccast==0.1.6
|
||||||
|
|
||||||
# homeassistant.components.myq
|
# homeassistant.components.myq
|
||||||
pymyq==1.1.0
|
pymyq==1.2.0
|
||||||
|
|
||||||
# homeassistant.components.mysensors
|
# homeassistant.components.mysensors
|
||||||
pymysensors==0.18.0
|
pymysensors==0.18.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user