diff --git a/homeassistant/components/tesla_fleet/helpers.py b/homeassistant/components/tesla_fleet/helpers.py index d554ccce70c..28f388fd83d 100644 --- a/homeassistant/components/tesla_fleet/helpers.py +++ b/homeassistant/components/tesla_fleet/helpers.py @@ -59,7 +59,9 @@ async def handle_vehicle_command(command: Awaitable) -> bool: translation_placeholders={"error": error}, ) # No response without error (unexpected) - raise HomeAssistantError(f"Unknown response: {response}") + raise HomeAssistantError( + translation_domain=DOMAIN, translation_key="command_no_response" + ) if (result := response.get("result")) is not True: if reason := response.get("reason"): if reason in ("already_set", "not_charging", "requested"): diff --git a/homeassistant/components/tesla_fleet/strings.json b/homeassistant/components/tesla_fleet/strings.json index df32da7d4dd..728add869a7 100644 --- a/homeassistant/components/tesla_fleet/strings.json +++ b/homeassistant/components/tesla_fleet/strings.json @@ -593,6 +593,9 @@ "command_no_reason": { "message": "Command was unsuccessful but did not return a reason why." }, + "command_no_response": { + "message": "Command had no response" + }, "command_reason": { "message": "Command was unsuccessful: {reason}" }, diff --git a/homeassistant/components/teslemetry/helpers.py b/homeassistant/components/teslemetry/helpers.py index c6f15d7bfdf..0a4af0bf8ba 100644 --- a/homeassistant/components/teslemetry/helpers.py +++ b/homeassistant/components/teslemetry/helpers.py @@ -48,7 +48,9 @@ async def handle_vehicle_command(command) -> Any: translation_placeholders={"error": error}, ) # No response without error (unexpected) - raise HomeAssistantError(f"Unknown response: {response}") + raise HomeAssistantError( + translation_domain=DOMAIN, translation_key="command_no_response" + ) if (result := response.get("result")) is not True: if reason := response.get("reason"): if reason in ("already_set", "not_charging", "requested"): diff --git a/homeassistant/components/teslemetry/strings.json b/homeassistant/components/teslemetry/strings.json index 1256c1c28c9..84068107768 100644 --- a/homeassistant/components/teslemetry/strings.json +++ b/homeassistant/components/teslemetry/strings.json @@ -1097,6 +1097,9 @@ "command_exception": { "message": "Command returned exception: {message}" }, + "command_no_response": { + "message": "Command had no response" + }, "command_no_result": { "message": "Command had no result" },