mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Add missing exception translation to Home Connect (#139223)
This commit is contained in:
parent
c115a7f455
commit
54843bb422
@ -203,7 +203,13 @@ async def _get_client_and_ha_id(
|
|||||||
device_registry = dr.async_get(hass)
|
device_registry = dr.async_get(hass)
|
||||||
device_entry = device_registry.async_get(device_id)
|
device_entry = device_registry.async_get(device_id)
|
||||||
if device_entry is None:
|
if device_entry is None:
|
||||||
raise ServiceValidationError("Device entry not found for device id")
|
raise ServiceValidationError(
|
||||||
|
translation_domain=DOMAIN,
|
||||||
|
translation_key="device_entry_not_found",
|
||||||
|
translation_placeholders={
|
||||||
|
"device_id": device_id,
|
||||||
|
},
|
||||||
|
)
|
||||||
entry: HomeConnectConfigEntry | None = None
|
entry: HomeConnectConfigEntry | None = None
|
||||||
for entry_id in device_entry.config_entries:
|
for entry_id in device_entry.config_entries:
|
||||||
_entry = hass.config_entries.async_get_entry(entry_id)
|
_entry = hass.config_entries.async_get_entry(entry_id)
|
||||||
|
@ -33,6 +33,9 @@
|
|||||||
"appliance_not_found": {
|
"appliance_not_found": {
|
||||||
"message": "Appliance for device ID {device_id} not found"
|
"message": "Appliance for device ID {device_id} not found"
|
||||||
},
|
},
|
||||||
|
"device_entry_not_found": {
|
||||||
|
"message": "Device entry for device ID {device_id} not found"
|
||||||
|
},
|
||||||
"config_entry_not_found": {
|
"config_entry_not_found": {
|
||||||
"message": "Config entry for device ID {device_id} not found"
|
"message": "Config entry for device ID {device_id} not found"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user