mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix stalls in config flow of APCUPSD (#108931)
Fix deadlock in config flow of APCUPSD
This commit is contained in:
parent
5dac5d5c7e
commit
16a90f8f19
@ -52,9 +52,8 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
# Test the connection to the host and get the current status for serial number.
|
# Test the connection to the host and get the current status for serial number.
|
||||||
coordinator = APCUPSdCoordinator(self.hass, host, port)
|
coordinator = APCUPSdCoordinator(self.hass, host, port)
|
||||||
|
|
||||||
await coordinator.async_request_refresh()
|
await coordinator.async_request_refresh()
|
||||||
await self.hass.async_block_till_done()
|
|
||||||
if isinstance(coordinator.last_exception, (UpdateFailed, asyncio.TimeoutError)):
|
if isinstance(coordinator.last_exception, (UpdateFailed, asyncio.TimeoutError)):
|
||||||
errors = {"base": "cannot_connect"}
|
errors = {"base": "cannot_connect"}
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user