Skip to content

Commit d778afe

Browse files
Fix Enigma2 startup hang (home-assistant#149756)
1 parent 448084e commit d778afe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

homeassistant/components/enigma2/coordinator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Data update coordinator for the Enigma2 integration."""
22

3+
import asyncio
34
import logging
45

56
from openwebif.api import OpenWebIfDevice, OpenWebIfStatus
@@ -30,6 +31,8 @@
3031

3132
LOGGER = logging.getLogger(__package__)
3233

34+
SETUP_TIMEOUT = 10
35+
3336
type Enigma2ConfigEntry = ConfigEntry[Enigma2UpdateCoordinator]
3437

3538

@@ -79,7 +82,7 @@ def __init__(self, hass: HomeAssistant, config_entry: Enigma2ConfigEntry) -> Non
7982
async def _async_setup(self) -> None:
8083
"""Provide needed data to the device info."""
8184

82-
about = await self.device.get_about()
85+
about = await asyncio.wait_for(self.device.get_about(), timeout=SETUP_TIMEOUT)
8386
self.device.mac_address = about["info"]["ifaces"][0]["mac"]
8487
self.device_info["model"] = about["info"]["model"]
8588
self.device_info["manufacturer"] = about["info"]["brand"]

0 commit comments

Comments
 (0)