Skip to content

Commit

Permalink
Fix missing translations in vilfo (home-assistant#130650)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Nov 15, 2024
1 parent eaa8a5a commit b2d98ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/vilfo/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async def async_step_user(
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:
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/vilfo/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 1 addition & 5 deletions tests/components/vilfo/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down

0 comments on commit b2d98ae

Please sign in to comment.