Properly handle Shelly gen2 device disconnect (#71937)

This commit is contained in:
Simone Chemelli 2022-05-16 12:50:03 +02:00 committed by Paulus Schoutsen
parent a0d1c5d1e6
commit 6155a64222

View File

@ -812,7 +812,7 @@ class RpcPollingWrapper(update_coordinator.DataUpdateCoordinator):
LOGGER.debug("Polling Shelly RPC Device - %s", self.name)
async with async_timeout.timeout(AIOSHELLY_DEVICE_TIMEOUT_SEC):
await self.device.update_status()
except OSError as err:
except (OSError, aioshelly.exceptions.RPCTimeout) as err:
raise update_coordinator.UpdateFailed("Device disconnected") from err
@property