From 8bae9b21247206981050a00ccd2b9efad990f88b Mon Sep 17 00:00:00 2001 From: SNoof85 Date: Mon, 5 Oct 2020 16:41:16 +0200 Subject: [PATCH] Use reference strings in Tesla (#41270) * Update strings.json * Update config_flow.py * Update test_config_flow.py --- homeassistant/components/tesla/config_flow.py | 2 +- homeassistant/components/tesla/strings.json | 2 +- tests/components/tesla/test_config_flow.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/tesla/config_flow.py b/homeassistant/components/tesla/config_flow.py index fb7de78f507..debe896c9cf 100644 --- a/homeassistant/components/tesla/config_flow.py +++ b/homeassistant/components/tesla/config_flow.py @@ -62,7 +62,7 @@ class TeslaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="user", data_schema=DATA_SCHEMA, - errors={CONF_USERNAME: "already_configured_account"}, + errors={CONF_USERNAME: "already_configured"}, description_placeholders={}, ) diff --git a/homeassistant/components/tesla/strings.json b/homeassistant/components/tesla/strings.json index f174b5fc6de..503124eedd4 100644 --- a/homeassistant/components/tesla/strings.json +++ b/homeassistant/components/tesla/strings.json @@ -2,7 +2,7 @@ "config": { "error": { "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", - "already_configured_account": "[%key:common::config_flow::abort::already_configured_account%]", + "already_configured": "[%key:common::config_flow::abort::already_configured_account%]", "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]" }, "step": { diff --git a/tests/components/tesla/test_config_flow.py b/tests/components/tesla/test_config_flow.py index 321f352e28d..8b75fd904b9 100644 --- a/tests/components/tesla/test_config_flow.py +++ b/tests/components/tesla/test_config_flow.py @@ -110,7 +110,7 @@ async def test_form_repeat_identifier(hass): ) assert result2["type"] == "form" - assert result2["errors"] == {CONF_USERNAME: "already_configured_account"} + assert result2["errors"] == {CONF_USERNAME: "already_configured"} async def test_import(hass):