From 3cf653501124763a3befaa814ef4f6e066d4ec60 Mon Sep 17 00:00:00 2001 From: SNoof85 Date: Tue, 6 Oct 2020 14:44:14 +0200 Subject: [PATCH] Use reference strings in Tile (#41328) --- homeassistant/components/tile/config_flow.py | 2 +- homeassistant/components/tile/strings.json | 4 ++-- tests/components/tile/test_config_flow.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/tile/config_flow.py b/homeassistant/components/tile/config_flow.py index 15ac70eeb2c..87f58193e9d 100644 --- a/homeassistant/components/tile/config_flow.py +++ b/homeassistant/components/tile/config_flow.py @@ -47,6 +47,6 @@ class TileFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): user_input[CONF_USERNAME], user_input[CONF_PASSWORD], session=session ) except TileError: - return await self._show_form({"base": "invalid_credentials"}) + return await self._show_form({"base": "invalid_auth"}) return self.async_create_entry(title=user_input[CONF_USERNAME], data=user_input) diff --git a/homeassistant/components/tile/strings.json b/homeassistant/components/tile/strings.json index 8a1ee9660d9..cdddbe54f96 100644 --- a/homeassistant/components/tile/strings.json +++ b/homeassistant/components/tile/strings.json @@ -10,10 +10,10 @@ } }, "error": { - "invalid_credentials": "Invalid Tile credentials provided." + "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]" }, "abort": { - "already_configured": "This Tile account is already registered." + "already_configured": "[%key:common::config_flow::abort::already_configured_account%]" } }, "options": { diff --git a/tests/components/tile/test_config_flow.py b/tests/components/tile/test_config_flow.py index a1812d34a57..b9d4799dc2f 100644 --- a/tests/components/tile/test_config_flow.py +++ b/tests/components/tile/test_config_flow.py @@ -44,7 +44,7 @@ async def test_invalid_credentials(hass): DOMAIN, context={"source": SOURCE_USER}, data=conf ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM - assert result["errors"] == {"base": "invalid_credentials"} + assert result["errors"] == {"base": "invalid_auth"} async def test_step_import(hass):