diff --git a/homeassistant/components/russound_rio/__init__.py b/homeassistant/components/russound_rio/__init__.py index b068fbd1892..fedf5d8c686 100644 --- a/homeassistant/components/russound_rio/__init__.py +++ b/homeassistant/components/russound_rio/__init__.py @@ -1,6 +1,5 @@ """The russound_rio component.""" -import asyncio import logging from aiorussound import RussoundClient, RussoundTcpConnectionHandler @@ -11,7 +10,7 @@ from homeassistant.const import CONF_HOST, CONF_PORT, Platform from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady -from .const import CONNECT_TIMEOUT, DOMAIN, RUSSOUND_RIO_EXCEPTIONS +from .const import DOMAIN, RUSSOUND_RIO_EXCEPTIONS PLATFORMS = [Platform.MEDIA_PLAYER] @@ -40,8 +39,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: RussoundConfigEntry) -> await client.register_state_update_callbacks(_connection_update_callback) try: - async with asyncio.timeout(CONNECT_TIMEOUT): - await client.connect() + await client.connect() except RUSSOUND_RIO_EXCEPTIONS as err: raise ConfigEntryNotReady( translation_domain=DOMAIN, diff --git a/homeassistant/components/russound_rio/config_flow.py b/homeassistant/components/russound_rio/config_flow.py index e5efd309a23..f7f2e5b1d00 100644 --- a/homeassistant/components/russound_rio/config_flow.py +++ b/homeassistant/components/russound_rio/config_flow.py @@ -2,7 +2,6 @@ from __future__ import annotations -import asyncio import logging from typing import Any @@ -17,7 +16,7 @@ from homeassistant.config_entries import ( from homeassistant.const import CONF_HOST, CONF_PORT from homeassistant.helpers import config_validation as cv -from .const import CONNECT_TIMEOUT, DOMAIN, RUSSOUND_RIO_EXCEPTIONS +from .const import DOMAIN, RUSSOUND_RIO_EXCEPTIONS DATA_SCHEMA = vol.Schema( { @@ -45,10 +44,9 @@ class FlowHandler(ConfigFlow, domain=DOMAIN): client = RussoundClient(RussoundTcpConnectionHandler(host, port)) try: - async with asyncio.timeout(CONNECT_TIMEOUT): - await client.connect() - controller = client.controllers[1] - await client.disconnect() + await client.connect() + controller = client.controllers[1] + await client.disconnect() except RUSSOUND_RIO_EXCEPTIONS: _LOGGER.exception("Could not connect to Russound RIO") errors["base"] = "cannot_connect" @@ -90,10 +88,9 @@ class FlowHandler(ConfigFlow, domain=DOMAIN): # Connection logic is repeated here since this method will be removed in future releases client = RussoundClient(RussoundTcpConnectionHandler(host, port)) try: - async with asyncio.timeout(CONNECT_TIMEOUT): - await client.connect() - controller = client.controllers[1] - await client.disconnect() + await client.connect() + controller = client.controllers[1] + await client.disconnect() except RUSSOUND_RIO_EXCEPTIONS: _LOGGER.exception("Could not connect to Russound RIO") return self.async_abort( diff --git a/homeassistant/components/russound_rio/const.py b/homeassistant/components/russound_rio/const.py index af52e89d399..a142ba8641d 100644 --- a/homeassistant/components/russound_rio/const.py +++ b/homeassistant/components/russound_rio/const.py @@ -16,9 +16,6 @@ RUSSOUND_RIO_EXCEPTIONS = ( asyncio.CancelledError, ) - -CONNECT_TIMEOUT = 15 - MP_FEATURES_BY_FLAG = { FeatureFlag.COMMANDS_ZONE_MUTE_OFF_ON: MediaPlayerEntityFeature.VOLUME_MUTE }