mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix incorrect error strings in triggercmd (#128450)
This commit is contained in:
parent
0e7297873c
commit
5d079aacd6
@ -56,7 +56,7 @@ class TriggerCMDConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
except InvalidToken:
|
||||
errors[CONF_TOKEN] = "invalid_token"
|
||||
except TRIGGERcmdConnectionError:
|
||||
errors["base"] = "connection_error"
|
||||
errors["base"] = "cannot_connect"
|
||||
except Exception: # pylint: disable=broad-except
|
||||
_LOGGER.exception("Unexpected exception")
|
||||
errors["base"] = "unknown"
|
||||
|
@ -13,6 +13,7 @@
|
||||
"error": {
|
||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
|
||||
"invalid_token": "Invalid token",
|
||||
"unknown": "[%key:common::config_flow::error::unknown%]"
|
||||
},
|
||||
"abort": {
|
||||
|
@ -140,7 +140,7 @@ async def test_config_flow_connection_error(hass: HomeAssistant) -> None:
|
||||
)
|
||||
|
||||
assert result["errors"] == {
|
||||
"base": "connection_error",
|
||||
"base": "cannot_connect",
|
||||
}
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user