From 71799579e5953e8d4cd2aace8ef68486798093b8 Mon Sep 17 00:00:00 2001 From: Dave T <17680170+davet2001@users.noreply.github.com> Date: Sat, 4 Jan 2020 15:00:17 +0000 Subject: [PATCH] Grammar/typo corrections in dev docs (#379) * Improve grammar * Improve grammar * Improve grammar * Improve grammar --- docs/data_entry_flow_index.md | 12 ++++++------ docs/dev_101_config.md | 2 +- docs/dev_101_index.md | 2 +- docs/dev_101_states.md | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/data_entry_flow_index.md b/docs/data_entry_flow_index.md index 0b58ba8c..7779953f 100644 --- a/docs/data_entry_flow_index.md +++ b/docs/data_entry_flow_index.md @@ -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: diff --git a/docs/dev_101_config.md b/docs/dev_101_config.md index 5772a9c2..86fd98c0 100644 --- a/docs/dev_101_config.md +++ b/docs/dev_101_config.md @@ -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 diff --git a/docs/dev_101_index.md b/docs/dev_101_index.md index 76703ea5..8f7cbbb8 100644 --- a/docs/dev_101_index.md +++ b/docs/dev_101_index.md @@ -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 diff --git a/docs/dev_101_states.md b/docs/dev_101_states.md index c487cfca..039a827a 100644 --- a/docs/dev_101_states.md +++ b/docs/dev_101_states.md @@ -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.