From 92b2ab10b2cea14547b16b187cc5241e81f64896 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Sat, 10 Aug 2024 09:52:50 +0200 Subject: [PATCH] Print host when handling request or timeout error (#397) --- homewizard_energy/homewizard_energy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homewizard_energy/homewizard_energy.py b/homewizard_energy/homewizard_energy.py index 3ffbf14..dbf5fa7 100644 --- a/homewizard_energy/homewizard_energy.py +++ b/homewizard_energy/homewizard_energy.py @@ -169,11 +169,11 @@ async def request( _LOGGER.debug("%s, %s", resp.status, await resp.text("utf-8")) except asyncio.TimeoutError as exception: raise RequestError( - "Timeout occurred while connecting to the HomeWizard Energy device" + f"Timeout occurred while connecting to the HomeWizard Energy device at {self.host}" ) from exception except (ClientError, ClientResponseError) as exception: raise RequestError( - "Error occurred while communicating with the HomeWizard Energy device" + f"Error occurred while communicating with the HomeWizard Energy device at {self.host}" ) from exception if resp.status == HTTPStatus.FORBIDDEN: