Re-organisation Documentation and Getting started (#2055)
* Split MQTT documentation * Add more details * Move content to /docs * Enable sidebar * Move content to /docs * Enable sidebar * Move content * Update links * Remove wizard stuff * Enable sidebar * Minor changes * Move MQTT parts to /docs * update links * Update links and sync content * Fix link * Enable sidebar * Remove navigation * Remove navigation and other minor updates * Update links * Add overview page * Make title linkable * Update * Plit content * Update links * Rearrange content * New getting-started section * Add icons for docs * Update for new structure * Update for new structure * Add docs navigation * Add docs overview page * Remove ecosystem navigation * Add docs and remove other collections * Move ecosystem to docs * Remove duplicate files * Re-add ecosystem overview * Move to ecosystem * Fix permission * Update navigation * Remove collection * Move overview to right folder * Move mqtt to upper level * Move notebook to ecosystem * Remove un-used files * Add one more rectangle for iOS * Move two parts back from docs and rename Run step * Remove colon * update getting-started section * Add redirect * Update * Update navigation
This commit is contained in:
parent
0677895b5b
commit
481320128f
138 changed files with 1309 additions and 909 deletions
|
@ -1,54 +1,31 @@
|
|||
---
|
||||
layout: page
|
||||
title: "Automating Home Assistant"
|
||||
description: "Steps to help you get automation setup in Home Assistant."
|
||||
date: 2015-09-19 09:40
|
||||
description: "Instructions to get started with Automation using Home Assistant."
|
||||
date: 2016-09-26 21:00
|
||||
sidebar: true
|
||||
comments: false
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
When all your devices are set up, it's time to put the cherry on the pie: automation. Home Assistant offers [a few built-in automations](/components/#automation) – but you'll be using the automation component to set up your own rules, for the most part.
|
||||
When your devices are set up, it's time to put the cherry on the pie: **automation**. Home Assistant offers [a few built-in automations](/components/#automation) – but you'll be using the automation component to set up your own rules, for the most part.
|
||||
|
||||
Home Assistant offers a wide range of automation configurations. In the next few pages, we'll try to guide you through all the different possibilities and options. Besides this documentation, there are also a couple of people who have made their automations [publicly available][cookbook-config].
|
||||
If you added a random sensor in the previous step then you can use that sensor for your very first automation:
|
||||
|
||||
[cookbook-config]: /cookbook/#example-configurationyaml
|
||||
|
||||
### {% linkable_title Automation basics %}
|
||||
|
||||
Before you can go ahead and create your own automations, it's important to learn the basics. To explore these, let's have a look at the following example home automation rule:
|
||||
|
||||
```text
|
||||
(trigger) When Paulus arrives home
|
||||
(condition) and it is after sunset:
|
||||
(action) Turn the lights in the living room on
|
||||
```yaml
|
||||
automation:
|
||||
- alias: Check sensor value and show notification
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.random
|
||||
above: 10
|
||||
action:
|
||||
service: persistent_notification.create
|
||||
data:
|
||||
message: "Sensor value greater than 10"
|
||||
```
|
||||
|
||||
The example consists of three different parts: a trigger, a condition and an action.
|
||||
For further details about automation, please take the next step or the [automation documentation](/docs/automation/).
|
||||
|
||||
The first line is the **trigger** of the automation rule. Triggers describe events that should trigger the automation rule. In this case, it is a person arriving home, which can be observed in Home Assistant by observing the state of Paulus changing from 'not_home' to 'home'.
|
||||
|
||||
The second line is the **condition**. Conditions are optional tests that can limit an automation rule to only work in your specific use cases. A condition will test against the current state of the system. This includes the current time, devices, people and other things like the sun. In this case, we only want to act when the sun has set.
|
||||
|
||||
The third part is the **action**, which will be performed when a rule is triggered and all conditions are met. For example, it can turn a light on, set the temperature on your thermostat or activate a scene.
|
||||
|
||||
<p class='note'>
|
||||
The difference between a condition and a trigger can be confusing as they are very similar. Triggers look at the actions, while conditions look at the results: turning a light on versus a light being on.
|
||||
</p>
|
||||
|
||||
### {% linkable_title Exploring the internal state %}
|
||||
|
||||
Automation rules interact directly with the internal state of Home Assistant, so you'll need to familiarize yourself with it. Home Assistant exposes its current state via the developer tools. These are available at the bottom of the sidebar in the frontend. The <img src='/images/screenshots/developer-tool-states-icon.png' class='no-shadow' height='38' /> icon will show all currently available states. An entity can be anything. A light, a switch, a person and even the sun. A state consists of the following parts:
|
||||
|
||||
| Name | Description | Example |
|
||||
| ---- | ----- | ---- |
|
||||
| Entity ID | Unique identifier for the entity. | `light.kitchen`
|
||||
| State | The current state of the device. | `home`
|
||||
| Attributes | Extra data related to the device and/or current state. | `brightness`
|
||||
|
||||
State changes can be used as the source of triggers and the current state can be used in conditions.
|
||||
|
||||
Actions are all about calling services. To explore the available services open the <img src='/images/screenshots/developer-tool-services-icon.png' class='no-shadow' height='38' /> Services developer tool. Services allow to change anything. For example turn on a light, run a script or enable a scene. Each service has a domain and a name. For example the service `light.turn_on` is capable of turning on any light in your system. Services can be passed parameters to for example tell which device to turn on or what color to use.
|
||||
|
||||
### [Next step: Your First Automation »](/getting-started/automation-create-first/)
|
||||
### [Next step: Home Assistant Automation Part 2 »](/getting-started/automation-2/)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue