diff --git a/source/_docs/automation/editor.markdown b/source/_docs/automation/editor.markdown index 9acc28299d3..3b2b41acf89 100644 --- a/source/_docs/automation/editor.markdown +++ b/source/_docs/automation/editor.markdown @@ -1,43 +1,58 @@ --- title: "Automation editor" description: "Instructions on how to use the automation editor." +related: + - docs: /getting-started/automation/ + title: Automating Home Assistant --- The automation editor is an easy way of creating and editing automations from the UI. -This page uses the [Random sensor](/integrations/random#sensor) as an example, though any other sensor with a numeric value can be used as well. +This tutorial uses the [Random sensor](/integrations/random#sensor) because it generates data (by default, values between 0 and 20). This enables us to walk through the example, even if you do not have any actual sensors connected yet. You could use any other sensor that outputs a numeric value. -From the UI, choose **{% my config %}** which is located in the sidebar, then click on **{% my automations %}** to go to the automation editor. Press the **Create Automation** button in the lower right corner to get started. You can create an automation based on a [blueprint](/docs/automation/using_blueprints/) or start from scratch. Select **Create new automation**. +1. Go to {% my automations title="**Settings** > **Automations & scenes**" %} and in the lower right corner, select the **Create Automation** button. +2. Select **Create new automation**. -![Create automation dialogue box](/images/docs/automation-editor/create-automation.png) + ![Create automation dialogue box](/images/docs/automation-editor/create-automation.png) -Click on the **Add Trigger** button and select **Numeric state**. +3. Select **Add Trigger**, and in the **Search trigger** field, type "num". + - Select **Numeric state**. -![Add trigger](/images/docs/automation-editor/add-trigger-to-automation.png) + ![Add trigger](/images/docs/automation-editor/add-trigger-to-automation.png) -If the value of the sensor is greater than 10, then the automation should trigger. +4. Enter the trigger conditions: + - Define the sensor: Under **Entity**, enter "sensor.random_sensor". + - If the sensor value is above 10, we want the automation to trigger. + - In the **Above**, field, enter "10". -![Automation trigger](/images/docs/automation-editor/new-trigger.png) + ![Automation trigger](/images/docs/automation-editor/new-trigger.png) -Click on the **Add Action** button and select **Call service**. +5. Define the action that should happen: + - In the **Then do** section, select **Add Action**. -![Add trigger](/images/docs/automation-editor/new-action.png) + ![Add action](/images/docs/automation-editor/add_action.png) -The action for this automation creates a [persistent notification](/integrations/persistent_notification/). +6. Select **Call service**. -![Automation action](/images/docs/automation-editor/send-notification.png) + ![Add trigger](/images/docs/automation-editor/new-action.png) -As the message we want a simple text that is shown as part of the notification. +7. We want to create a [persistent notification](/integrations/persistent_notification/). + - Enter "Persist" and select **Persistent notification: Create**. -```yaml -message: Sensor value greater than 10 -``` + ![Automation action](/images/docs/automation-editor/send-notification.png) - Press the **Save** button, and the save dialogue will appear. Give your automation a meaningful name and press the **Save** button again. +8. As the message, we want a simple text that is shown as part of the notification. -![New automation editor](/images/docs/automation-editor/new-automation.png) + ```yaml + message: Sensor value greater than 10 + ``` -Automations created or edited via the user interface are activated immediately after saving the automation. Read the documentation for [Automating Home Assistant](/getting-started/automation/) to learn more about automations. +9. Select **Save**, give your automation a meaningful name, and **Save** again. + + ![New automation editor](/images/docs/automation-editor/new-automation.png) + + - **Result**: Automations created or edited via the user interface are activated immediately after saving the automation. + - To learn more about automations, read the documentation for [Automating Home Assistant](/getting-started/automation/). ## Troubleshooting missing automations diff --git a/source/images/docs/automation-editor/add-trigger-to-automation.png b/source/images/docs/automation-editor/add-trigger-to-automation.png index aecd2455d78..4c755e75726 100644 Binary files a/source/images/docs/automation-editor/add-trigger-to-automation.png and b/source/images/docs/automation-editor/add-trigger-to-automation.png differ diff --git a/source/images/docs/automation-editor/add_action.png b/source/images/docs/automation-editor/add_action.png new file mode 100644 index 00000000000..ce27322f682 Binary files /dev/null and b/source/images/docs/automation-editor/add_action.png differ