mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Properly handle Shelly gen2 device disconnect (#71937)
This commit is contained in:
parent
f7a2a6ea21
commit
0ee838b25e
@ -812,7 +812,7 @@ class RpcPollingWrapper(update_coordinator.DataUpdateCoordinator):
|
|||||||
LOGGER.debug("Polling Shelly RPC Device - %s", self.name)
|
LOGGER.debug("Polling Shelly RPC Device - %s", self.name)
|
||||||
async with async_timeout.timeout(AIOSHELLY_DEVICE_TIMEOUT_SEC):
|
async with async_timeout.timeout(AIOSHELLY_DEVICE_TIMEOUT_SEC):
|
||||||
await self.device.update_status()
|
await self.device.update_status()
|
||||||
except OSError as err:
|
except (OSError, aioshelly.exceptions.RPCTimeout) as err:
|
||||||
raise update_coordinator.UpdateFailed("Device disconnected") from err
|
raise update_coordinator.UpdateFailed("Device disconnected") from err
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user