mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Log zwave_js connection errors (#46867)
This commit is contained in:
parent
c1ee9f7e4a
commit
50a07f6d25
@ -181,6 +181,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
async with timeout(CONNECT_TIMEOUT):
|
async with timeout(CONNECT_TIMEOUT):
|
||||||
await client.connect()
|
await client.connect()
|
||||||
except (asyncio.TimeoutError, BaseZwaveJSServerError) as err:
|
except (asyncio.TimeoutError, BaseZwaveJSServerError) as err:
|
||||||
|
LOGGER.error("Failed to connect: %s", err)
|
||||||
raise ConfigEntryNotReady from err
|
raise ConfigEntryNotReady from err
|
||||||
else:
|
else:
|
||||||
LOGGER.info("Connected to Zwave JS Server")
|
LOGGER.info("Connected to Zwave JS Server")
|
||||||
@ -268,8 +269,8 @@ async def client_listen(
|
|||||||
await client.listen(driver_ready)
|
await client.listen(driver_ready)
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
should_reload = False
|
should_reload = False
|
||||||
except BaseZwaveJSServerError:
|
except BaseZwaveJSServerError as err:
|
||||||
pass
|
LOGGER.error("Failed to listen: %s", err)
|
||||||
|
|
||||||
# The entry needs to be reloaded since a new driver state
|
# The entry needs to be reloaded since a new driver state
|
||||||
# will be acquired on reconnect.
|
# will be acquired on reconnect.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user