From 17bb14e260df2bfe7a7f44a64019fd4e10ee7053 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Sun, 1 Mar 2026 07:32:36 +0100 Subject: [PATCH] Update error handling messages for Powerfox Local integration (#164465) --- homeassistant/components/powerfox_local/coordinator.py | 8 ++++---- homeassistant/components/powerfox_local/strings.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/powerfox_local/coordinator.py b/homeassistant/components/powerfox_local/coordinator.py index 813cd815436c..b8a2bfe8a23a 100644 --- a/homeassistant/components/powerfox_local/coordinator.py +++ b/homeassistant/components/powerfox_local/coordinator.py @@ -49,12 +49,12 @@ class PowerfoxLocalDataUpdateCoordinator(DataUpdateCoordinator[LocalResponse]): except PowerfoxAuthenticationError as err: raise ConfigEntryAuthFailed( translation_domain=DOMAIN, - translation_key="invalid_auth", - translation_placeholders={"error": str(err)}, + translation_key="auth_failed", + translation_placeholders={"host": self.config_entry.data[CONF_HOST]}, ) from err except PowerfoxConnectionError as err: raise UpdateFailed( translation_domain=DOMAIN, - translation_key="update_failed", - translation_placeholders={"error": str(err)}, + translation_key="connection_error", + translation_placeholders={"host": self.config_entry.data[CONF_HOST]}, ) from err diff --git a/homeassistant/components/powerfox_local/strings.json b/homeassistant/components/powerfox_local/strings.json index 6b607eaf6b41..fd6ddaa07960 100644 --- a/homeassistant/components/powerfox_local/strings.json +++ b/homeassistant/components/powerfox_local/strings.json @@ -56,11 +56,11 @@ } }, "exceptions": { - "invalid_auth": { - "message": "Error while authenticating with the device: {error}" + "auth_failed": { + "message": "Authentication with the Poweropti device at {host} failed. Please check your API key." }, - "update_failed": { - "message": "Error while updating the device: {error}" + "connection_error": { + "message": "Could not connect to the Poweropti device at {host}. Please check if the device is online and reachable." } } }