mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 18:27:51 +00:00
Add common strings in Agent dvr config flow (#41279)
This commit is contained in:
parent
113d738fa2
commit
434c269f25
@ -62,7 +62,7 @@ class AgentFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
return await self._create_entry(agent_client.name)
|
return await self._create_entry(agent_client.name)
|
||||||
|
|
||||||
errors["base"] = "device_unavailable"
|
errors["base"] = "cannot_connect"
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
vol.Required(CONF_HOST): str,
|
vol.Required(CONF_HOST): str,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
||||||
"device_unavailable": "Device is not available"
|
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ async def test_connection_error(hass: HomeAssistant, aioclient_mock) -> None:
|
|||||||
data={CONF_HOST: "example.local", CONF_PORT: 8090},
|
data={CONF_HOST: "example.local", CONF_PORT: 8090},
|
||||||
)
|
)
|
||||||
|
|
||||||
assert result["errors"] == {"base": "device_unavailable"}
|
assert result["errors"] == {"base": "cannot_connect"}
|
||||||
assert result["step_id"] == "user"
|
assert result["step_id"] == "user"
|
||||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user