Use reference strings in Notion (#41211)
This commit is contained in:
parent
20a136e2a1
commit
c7027e2828
3 changed files with 5 additions and 5 deletions
|
@ -47,6 +47,6 @@ class NotionFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
user_input[CONF_USERNAME], user_input[CONF_PASSWORD], session
|
||||
)
|
||||
except NotionError:
|
||||
return await self._show_form({"base": "invalid_credentials"})
|
||||
return await self._show_form({"base": "invalid_auth"})
|
||||
|
||||
return self.async_create_entry(title=user_input[CONF_USERNAME], data=user_input)
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"invalid_credentials": "Invalid username or password",
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
|
||||
"no_devices": "No devices found in account"
|
||||
},
|
||||
"abort": {
|
||||
"already_configured": "This username is already in use."
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ async def test_invalid_credentials(hass, mock_aionotion):
|
|||
flow.context = {"source": SOURCE_USER}
|
||||
|
||||
result = await flow.async_step_user(user_input=conf)
|
||||
assert result["errors"] == {"base": "invalid_credentials"}
|
||||
assert result["errors"] == {"base": "invalid_auth"}
|
||||
|
||||
|
||||
async def test_show_form(hass):
|
||||
|
|
Loading…
Add table
Reference in a new issue