mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Use reference strings in Tesla (#41270)
* Update strings.json * Update config_flow.py * Update test_config_flow.py
This commit is contained in:
parent
4798f37c6e
commit
8bae9b2124
@ -62,7 +62,7 @@ class TeslaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="user",
|
step_id="user",
|
||||||
data_schema=DATA_SCHEMA,
|
data_schema=DATA_SCHEMA,
|
||||||
errors={CONF_USERNAME: "already_configured_account"},
|
errors={CONF_USERNAME: "already_configured"},
|
||||||
description_placeholders={},
|
description_placeholders={},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"error": {
|
"error": {
|
||||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
"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%]"
|
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]"
|
||||||
},
|
},
|
||||||
"step": {
|
"step": {
|
||||||
|
@ -110,7 +110,7 @@ async def test_form_repeat_identifier(hass):
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert result2["type"] == "form"
|
assert result2["type"] == "form"
|
||||||
assert result2["errors"] == {CONF_USERNAME: "already_configured_account"}
|
assert result2["errors"] == {CONF_USERNAME: "already_configured"}
|
||||||
|
|
||||||
|
|
||||||
async def test_import(hass):
|
async def test_import(hass):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user