Update Shelly integration: Remove double "Error fetching ..." from error messages (#134950)

refactor: Remove double "Error fetching" from error messages
This commit is contained in:
David Rapan 2025-01-07 09:12:10 +01:00 committed by GitHub
parent 875727ed27
commit 8a052177a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -371,7 +371,7 @@ class ShellyBlockCoordinator(ShellyCoordinatorBase[BlockDevice]):
try:
await self.device.update()
except DeviceConnectionError as err:
raise UpdateFailed(f"Error fetching data: {err!r}") from err
raise UpdateFailed(repr(err)) from err
except InvalidAuthError:
await self.async_shutdown_device_and_start_reauth()
@ -456,7 +456,7 @@ class ShellyRestCoordinator(ShellyCoordinatorBase[BlockDevice]):
return
await self.device.update_shelly()
except (DeviceConnectionError, MacAddressMismatchError) as err:
raise UpdateFailed(f"Error fetching data: {err!r}") from err
raise UpdateFailed(repr(err)) from err
except InvalidAuthError:
await self.async_shutdown_device_and_start_reauth()
else: