Fix Enigma2 startup hang (#149756)

This commit is contained in:
Stefan H.
2025-08-07 16:33:24 +02:00
committed by GitHub
parent 448084e2b5
commit d778afe61a

View File

@@ -1,5 +1,6 @@
"""Data update coordinator for the Enigma2 integration."""
import asyncio
import logging
from openwebif.api import OpenWebIfDevice, OpenWebIfStatus
@@ -30,6 +31,8 @@ from .const import CONF_SOURCE_BOUQUET, DOMAIN
LOGGER = logging.getLogger(__package__)
SETUP_TIMEOUT = 10
type Enigma2ConfigEntry = ConfigEntry[Enigma2UpdateCoordinator]
@@ -79,7 +82,7 @@ class Enigma2UpdateCoordinator(DataUpdateCoordinator[OpenWebIfStatus]):
async def _async_setup(self) -> None:
"""Provide needed data to the device info."""
about = await self.device.get_about()
about = await asyncio.wait_for(self.device.get_about(), timeout=SETUP_TIMEOUT)
self.device.mac_address = about["info"]["ifaces"][0]["mac"]
self.device_info["model"] = about["info"]["model"]
self.device_info["manufacturer"] = about["info"]["brand"]