diff --git a/homeassistant/components/rflink/__init__.py b/homeassistant/components/rflink/__init__.py index 542c63f3b7a..68b6d841654 100644 --- a/homeassistant/components/rflink/__init__.py +++ b/homeassistant/components/rflink/__init__.py @@ -230,7 +230,7 @@ async def async_setup(hass, config): ) try: - with async_timeout.timeout(CONNECTION_TIMEOUT, loop=hass.loop): + with async_timeout.timeout(CONNECTION_TIMEOUT): transport, protocol = await connection except ( diff --git a/homeassistant/components/shell_command/__init__.py b/homeassistant/components/shell_command/__init__.py index 89a1a20e8e4..dc9fd8769d6 100644 --- a/homeassistant/components/shell_command/__init__.py +++ b/homeassistant/components/shell_command/__init__.py @@ -56,7 +56,6 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: # pylint: disable=no-member create_process = asyncio.subprocess.create_subprocess_shell( cmd, - loop=hass.loop, stdin=None, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, @@ -69,7 +68,6 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool: # pylint: disable=no-member create_process = asyncio.subprocess.create_subprocess_exec( *shlexed_cmd, - loop=hass.loop, stdin=None, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, diff --git a/homeassistant/components/tradfri/__init__.py b/homeassistant/components/tradfri/__init__.py index a797607e243..cef22c636c1 100644 --- a/homeassistant/components/tradfri/__init__.py +++ b/homeassistant/components/tradfri/__init__.py @@ -100,7 +100,6 @@ async def async_setup_entry(hass, entry): entry.data[CONF_HOST], psk_id=entry.data[CONF_IDENTITY], psk=entry.data[CONF_KEY], - loop=hass.loop, ) async def on_hass_stop(event): diff --git a/homeassistant/components/tradfri/config_flow.py b/homeassistant/components/tradfri/config_flow.py index 1663ba675a3..2ade04cff55 100644 --- a/homeassistant/components/tradfri/config_flow.py +++ b/homeassistant/components/tradfri/config_flow.py @@ -178,7 +178,7 @@ async def get_gateway_info(hass, host, identity, key): """Return info for the gateway.""" try: - factory = APIFactory(host, psk_id=identity, psk=key, loop=hass.loop) + factory = APIFactory(host, psk_id=identity, psk=key) api = factory.request gateway = Gateway() diff --git a/homeassistant/helpers/aiohttp_client.py b/homeassistant/helpers/aiohttp_client.py index eee891b7f88..73658c7a6cb 100644 --- a/homeassistant/helpers/aiohttp_client.py +++ b/homeassistant/helpers/aiohttp_client.py @@ -64,10 +64,7 @@ def async_create_clientsession( connector = _async_get_connector(hass, verify_ssl) clientsession = aiohttp.ClientSession( - loop=hass.loop, - connector=connector, - headers={USER_AGENT: SERVER_SOFTWARE}, - **kwargs, + connector=connector, headers={USER_AGENT: SERVER_SOFTWARE}, **kwargs, ) if auto_cleanup: @@ -174,9 +171,7 @@ def _async_get_connector( else: ssl_context = False - connector = aiohttp.TCPConnector( - loop=hass.loop, enable_cleanup_closed=True, ssl=ssl_context - ) + connector = aiohttp.TCPConnector(enable_cleanup_closed=True, ssl=ssl_context) hass.data[key] = connector async def _async_close_connector(event: Event) -> None: