mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Use references in airvisual strings.json (#41005)
This commit is contained in:
parent
b45215f1d2
commit
4b225a87c5
@ -166,7 +166,7 @@ class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="node_pro",
|
step_id="node_pro",
|
||||||
data_schema=self.node_pro_schema,
|
data_schema=self.node_pro_schema,
|
||||||
errors={CONF_IP_ADDRESS: "unable_to_connect"},
|
errors={CONF_IP_ADDRESS: "cannot_connect"},
|
||||||
)
|
)
|
||||||
|
|
||||||
await node.async_disconnect()
|
await node.async_disconnect()
|
||||||
|
@ -29,9 +29,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"general_error": "There was an unknown error.",
|
"general_error": "[%key:common::config_flow::error::unknown%]",
|
||||||
"invalid_api_key": "Invalid API key provided.",
|
"invalid_api_key": "[%key:common::config_flow::error::invalid_api_key%]",
|
||||||
"unable_to_connect": "Unable to connect to Node/Pro unit."
|
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
|
||||||
},
|
},
|
||||||
"abort": {
|
"abort": {
|
||||||
"already_configured": "These coordinates or Node/Pro ID are already registered."
|
"already_configured": "These coordinates or Node/Pro ID are already registered."
|
||||||
|
@ -140,7 +140,7 @@ async def test_node_pro_error(hass):
|
|||||||
result["flow_id"], user_input=node_pro_conf
|
result["flow_id"], user_input=node_pro_conf
|
||||||
)
|
)
|
||||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||||
assert result["errors"] == {CONF_IP_ADDRESS: "unable_to_connect"}
|
assert result["errors"] == {CONF_IP_ADDRESS: "cannot_connect"}
|
||||||
|
|
||||||
|
|
||||||
async def test_options_flow(hass):
|
async def test_options_flow(hass):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user