mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Guard for timeout errors during wled discovery (#64130)
This commit is contained in:
parent
dee843bf6e
commit
b0387efee3
@ -1,6 +1,7 @@
|
||||
"""Config flow to configure the WLED integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
@ -74,7 +75,7 @@ class WLEDFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
self.discovered_host = discovery_info.host
|
||||
try:
|
||||
self.discovered_device = await self._async_get_device(discovery_info.host)
|
||||
except WLEDConnectionError:
|
||||
except (WLEDConnectionError, asyncio.TimeoutError):
|
||||
return self.async_abort(reason="cannot_connect")
|
||||
|
||||
await self.async_set_unique_id(self.discovered_device.info.mac_address)
|
||||
|
Loading…
x
Reference in New Issue
Block a user