Translate service validation errors (#115024)

* Move service validation error message to translation cache

* Fix test

* Revert unrelated change

* Address review comments

* Improve error message

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Jan Bouwhuis 2024-04-18 14:36:03 +02:00 committed by GitHub
parent d5e5a16303
commit 3299bc5ddc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 49 additions and 13 deletions

View file

@ -204,7 +204,7 @@ async def test_return_response_error(hass: HomeAssistant, websocket_client) -> N
assert msg["id"] == 8
assert msg["type"] == const.TYPE_RESULT
assert not msg["success"]
assert msg["error"]["code"] == "unknown_error"
assert msg["error"]["code"] == "service_validation_error"
@pytest.mark.parametrize("command", ["call_service", "call_service_action"])