Skip to content

Commit ad7d291

Browse files
authored
Update __init__.py
1 parent 5b325e6 commit ad7d291

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

homeassistant/components/shelly/__init__.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
6666

6767
coap_context = await get_coap_context(hass)
6868

69-
try:
70-
async with async_timeout.timeout(SETUP_ENTRY_TIMEOUT_SEC):
71-
device = await aioshelly.Device.create(
72-
aiohttp_client.async_get_clientsession(hass),
73-
coap_context,
74-
options,
75-
)
76-
except (asyncio.TimeoutError, OSError) as err:
77-
raise ConfigEntryNotReady from err
69+
device = await aioshelly.Device.create(
70+
aiohttp_client.async_get_clientsession(hass),
71+
coap_context,
72+
options,
73+
False,
74+
)
7875

7976
dev_reg = await device_registry.async_get_registry(hass)
8077
identifier = (DOMAIN, entry.unique_id)
@@ -308,7 +305,7 @@ def __init__(self, hass, device: aioshelly.Device):
308305
async def _async_update_data(self):
309306
"""Fetch data."""
310307
try:
311-
async with async_timeout.timeout(5):
308+
async with async_timeout.timeout(AIOSHELLY_DEVICE_TIMEOUT_SEC):
312309
_LOGGER.debug("REST update for %s", self.name)
313310
return await self.device.update_status()
314311
except OSError as err:

0 commit comments

Comments
 (0)