Fix missing translations in vilfo (#130650)

pull/130669/head
epenet 2024-11-15 01:50:47 +01:00 committed by GitHub
parent eaa8a5a750
commit b2d98ae931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 6 deletions

View File

@ -109,7 +109,7 @@ class DomainConfigFlow(ConfigFlow, domain=DOMAIN):
try:
info = await validate_input(self.hass, user_input)
except InvalidHost:
errors[CONF_HOST] = "wrong_host"
errors["base"] = "invalid_host"
except CannotConnect:
errors["base"] = "cannot_connect"
except InvalidAuth:

View File

@ -14,6 +14,7 @@
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"invalid_host": "[%key:common::config_flow::error::invalid_host%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
},
"abort": {

View File

@ -150,10 +150,6 @@ async def test_form_exceptions(
assert result["type"] is FlowResultType.CREATE_ENTRY
@pytest.mark.parametrize( # Remove when translations fixed
"ignore_translations",
["component.vilfo.config.error.wrong_host"],
)
async def test_form_wrong_host(
hass: HomeAssistant,
mock_is_valid_host: AsyncMock,
@ -169,7 +165,7 @@ async def test_form_wrong_host(
},
)
assert result["errors"] == {"host": "wrong_host"}
assert result["errors"] == {"base": "invalid_host"}
async def test_form_already_configured(