Update data_entry_flow_index.md (#408)

It seems the code has moved to async_create_entry() but the docs have not.

Changes all listings of create_entry() to async_create_entry()
This commit is contained in:
Austin Mroczek 2020-02-17 08:33:53 -08:00 committed by GitHub
parent b832ad89c6
commit 9b8a18d1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ class ExampleConfigFlow(data_entry_flow.FlowHandler):
valid = await is_valid(user_input)
if valid:
# See next section on create entry usage
return self.create_entry(...)
return self.async_create_entry(...)
errors["base"] = "auth_error"
@ -174,7 +174,7 @@ When the result is "Create Entry", an entry will be created and passed to the pa
```python
class ExampleConfigFlow(data_entry_flow.FlowHandler):
async def async_step_user(self, user_input=None):
return self.create_entry(
return self.async_create_entry(
title="Title of the entry",
data={
"something_special": user_input["username"]