You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_docs/automation/action.markdown
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Automation actions"
3
3
description: "Automations result in action."
4
4
---
5
5
6
-
The action of an automation rule is what is being executed when a rule fires. The action part follows the [script syntax](/docs/scripts/) which can be used to interact with anything via other actions or events.
6
+
The action of an automation is what is being executed when an automation fires. The action part follows the [script syntax](/docs/scripts/) which can be used to interact with anything via other actions or events.
7
7
8
8
For actions, you can specify the `entity_id` that it should apply to and optional parameters (to specify for example the brightness).
Copy file name to clipboardExpand all lines: source/_docs/automation/basics.markdown
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -15,24 +15,31 @@ We can break up this automation into the following three parts:
15
15
(action) Turn the lights on in the living room
16
16
```
17
17
18
-
The first part is the [trigger](/docs/automation/trigger/) of the automation rule. Triggers describe {% term events %} that should trigger the automation rule. In this case, it is a person arriving home, which can be observed in Home Assistant using {% term devices %}/{% term sensors %} by observing the state of Paulus changing from `not_home` to `home`.
18
+
The first part is the [trigger](/docs/automation/trigger/) of the automation. Triggers describe {% term events %} that should trigger the automation. In this case, it is a person arriving home, which can be observed in Home Assistant using {% term devices %}/{% term sensors %} by observing the state of Paulus changing from `not_home` to `home`.
19
19
20
-
The second part is the [condition](/docs/automation/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.
20
+
The second part is the [condition](/docs/automation/condition/). Conditions are optional tests that can limit an automation 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.
21
21
22
-
The third part is the [action](/docs/automation/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.
22
+
The third part is the [action](/docs/automation/action/), which will be performed when an automation 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.
23
23
24
24
{% note %}
25
-
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 current state: turning a light on versus a light being on.
25
+
The difference between a trigger and a condition can be confusing as they are very similar.
26
+
27
+
Triggers require an event to happen for the conditions to be evaluated using current state information.
28
+
29
+
Event: Arrive home \
30
+
Condition: After Sunset? \
31
+
Action: Turn lights on
32
+
26
33
{% endnote %}
27
34
28
35
## Exploring the internal state
29
36
30
-
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. **{% my developer_states title="Developer Tools > States" %}** 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:
37
+
Automations 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. **{% my developer_states title="Developer Tools > States" %}** 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:
31
38
32
39
| Name | Description | Example |
33
40
| ---- | ----- | ---- |
34
-
| Entity ID | Unique identifier for the entity. | `light.kitchen`
35
-
| State | The current state of the device. | `home`
41
+
| Entity ID | Unique identifier for the entity. | `light.living_room`
42
+
| State | The current state of the device. | `off`
36
43
| Attributes | Extra data related to the device and/or current state. | `brightness`
37
44
38
45
State changes can be used as the source of triggers and the current state can be used in conditions.
0 commit comments