mirror of
https://github.com/home-assistant/core.git
synced 2026-07-13 01:27:57 +01:00
Fix exception translation placeholder mismatches in PTDevices integration (#171750)
This commit is contained in:
@@ -58,14 +58,12 @@ class PTDevicesCoordinator(DataUpdateCoordinator[PTDevicesResponseData]):
|
||||
try:
|
||||
data = await self.interface.get_data()
|
||||
except aioptdevices.PTDevicesRequestError as err:
|
||||
# pylint: disable-next=home-assistant-exception-placeholder-mismatch
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="cannot_connect",
|
||||
translation_placeholders={"error": repr(err)},
|
||||
) from err
|
||||
except aioptdevices.PTDevicesUnauthorizedError as err:
|
||||
# pylint: disable-next=home-assistant-exception-placeholder-mismatch
|
||||
raise UpdateFailed(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="invalid_access_token",
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
},
|
||||
"exceptions": {
|
||||
"cannot_connect": {
|
||||
"message": "[%key:common::config_flow::error::cannot_connect%]"
|
||||
"message": "Failed to connect: {error}"
|
||||
},
|
||||
"invalid_access_token": {
|
||||
"message": "[%key:common::config_flow::error::invalid_access_token%]"
|
||||
"message": "Invalid access token: {error}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user