mirror of
https://github.com/home-assistant/core.git
synced 2025-11-14 13:30:43 +00:00
Add ServiceValidationError and translation support (#102592)
* Add ServiceValidationError * Add translation support * Extend translation support to HomeAssistantError * Add translation support for ServiceNotFound exc * Frontend translation & translation_key from caller * Improve fallback message * Set websocket_api as default translation_domain * Add MQTT ServiceValidationError exception * Follow up comments * Revert removing gueard on translation_key * Revert test changes to fix CI test * Follow up comments * Fix CI test * Follow up * Improve language * Follow up comment
This commit is contained in:
@@ -205,7 +205,7 @@ async def test_get_trace(
|
||||
_assert_raw_config(domain, sun_config, trace)
|
||||
assert trace["blueprint_inputs"] is None
|
||||
assert trace["context"]
|
||||
assert trace["error"] == "Unable to find service test.automation"
|
||||
assert trace["error"] == "Service test.automation not found."
|
||||
assert trace["state"] == "stopped"
|
||||
assert trace["script_execution"] == "error"
|
||||
assert trace["item_id"] == "sun"
|
||||
@@ -893,7 +893,7 @@ async def test_list_traces(
|
||||
assert len(_find_traces(response["result"], domain, "sun")) == 1
|
||||
trace = _find_traces(response["result"], domain, "sun")[0]
|
||||
assert trace["last_step"] == last_step[0].format(prefix=prefix)
|
||||
assert trace["error"] == "Unable to find service test.automation"
|
||||
assert trace["error"] == "Service test.automation not found."
|
||||
assert trace["state"] == "stopped"
|
||||
assert trace["script_execution"] == script_execution[0]
|
||||
assert trace["timestamp"]
|
||||
@@ -1632,7 +1632,7 @@ async def test_trace_blueprint_automation(
|
||||
assert trace["config"]["id"] == "sun"
|
||||
assert trace["blueprint_inputs"] == sun_config
|
||||
assert trace["context"]
|
||||
assert trace["error"] == "Unable to find service test.automation"
|
||||
assert trace["error"] == "Service test.automation not found."
|
||||
assert trace["state"] == "stopped"
|
||||
assert trace["script_execution"] == "error"
|
||||
assert trace["item_id"] == "sun"
|
||||
|
||||
Reference in New Issue
Block a user