Grammar/typo corrections in dev docs (#379)

* Improve grammar

* Improve grammar

* Improve grammar

* Improve grammar
This commit is contained in:
Dave T 2020-01-04 15:00:17 +00:00 committed by Franck Nijhof
parent 914602ffd0
commit 71799579e5
4 changed files with 9 additions and 9 deletions

View File

@ -3,9 +3,9 @@ title: Data Entry Flow
sidebar_label: Introduction
---
Data Entry Flow is a data entry framework that is part of Home Assistant. Data entry is done via data entry flows. A flow can represent a simple login form or a multi-step setup wizard for a component. A Flow Manager is managing all flows that are in progress and handles creation of new flows.
Data Entry Flow is a data entry framework that is part of Home Assistant. Data entry is done via data entry flows. A flow can represent a simple login form or a multi-step setup wizard for a component. A Flow Manager manages all flows that are in progress and handles creation of new flows.
Data Entry Flow is being used in Home Assistant to create config entries.
Data Entry Flow is used in Home Assistant to create config entries.
## Flow Manager
@ -23,7 +23,7 @@ async def async_finish_flow(flow, result)
This async callback is called when a flow is finished or aborted. i.e. `result['type'] in [RESULT_TYPE_CREATE_ENTRY, RESULT_TYPE_ABORT]`. The callback function can modify result and return it back, if the result type changed to `RESULT_TYPE_FORM`, the flow will continue running, display another form.
If the result type is `RESULT_TYPE_FORM`, the result should like:
If the result type is `RESULT_TYPE_FORM`, the result should look like:
```python
{
# The result type of the flow
@ -43,7 +43,7 @@ If the result type is `RESULT_TYPE_FORM`, the result should like:
}
```
If the result type is `RESULT_TYPE_CREATE_ENTRY`, the result should like:
If the result type is `RESULT_TYPE_CREATE_ENTRY`, the result should look like:
```python
{
# Data schema version of the entry
@ -62,7 +62,7 @@ If the result type is `RESULT_TYPE_CREATE_ENTRY`, the result should like:
}
```
If the result type is `RESULT_TYPE_ABORT`, the result should like:
If the result type is `RESULT_TYPE_ABORT`, the result should look like:
```python
{
# The result type of the flow
@ -81,7 +81,7 @@ If the result type is `RESULT_TYPE_ABORT`, the result should like:
Flow handlers will handle a single flow. A flow contains one or more steps. When a flow is instantiated, the `FlowHandler.init_step` step will be called. Each step has three different possible results: "Show Form", "Abort" and "Create Entry".
At a minimum, each flow handler will have to define a version number and a step. This doens't have to be `init`, as `async_create_flow` can assign `init_step` depends on diffreent workflow, for example in configuration, `context.source` will be use as `init_step`.
At a minimum, each flow handler will have to define a version number and a step. This doesn't have to be `init`, as `async_create_flow` can assign `init_step` dependent on the current workflow, for example in configuration, `context.source` will be used as `init_step`.
The bare minimum config flow:

View File

@ -6,7 +6,7 @@ Based on where you are in the code, `config` can mean various things.
### On the hass object
On the hass object is an instance of the Config class. The Config class contains the users preferred units, the path to the config directory and which components are loaded. [See available methods.](https://dev-docs.home-assistant.io/en/master/api/core.html#homeassistant.core.Config)
On the hass object it is an instance of the Config class. The Config class contains the users preferred units, the path to the config directory and which components are loaded. [See available methods.](https://dev-docs.home-assistant.io/en/master/api/core.html#homeassistant.core.Config)
### Config passed into component setup

View File

@ -34,7 +34,7 @@ Last step is to add `hello_world:` entry to your `configuration.yaml` file.
hello_world:
```
After running `hass`, we should see log entries stating that `hello_world` component was loaded. What is more, additional state card shall appear within main panel.
After running `hass`, we should see log entries stating that `hello_world` component was loaded. What is more, an additional state card will appear within the main panel.
```log
2018-04-03 21:44:20 INFO (MainThread) [homeassistant.loader] Loaded hello_world from custom_components.hello_world

View File

@ -125,4 +125,4 @@ def device_state_attributes(self):
> Entities also have a similar property `state_attributes`, which normally doesn't need to be defined by new platforms. This property is used by base components to add standard sets of attributes to a state. Example: The light component uses `state_attributes` to add brightness to the state dictionary. If you are designing a new component, you should define `state_attributes` instead.
To get your component included in the Home Assistant releases, follow the steps described in the [Submit your work](development_submitting.md) section. Basically you only need to move your component in the `homeassistant/component/` directory of your fork and create a Pull Request.
To get your component included in the Home Assistant releases, follow the steps described in the [Submit your work](development_submitting.md) section. Basically you only need to move your component into the `homeassistant/component/` directory of your fork and create a Pull Request.