mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Update Automation > Basics page to latest standards (#27204)
This commit is contained in:
parent
e106f723fc
commit
849199d96f
@ -151,6 +151,8 @@
|
||||
definition: >-
|
||||
An event is when something happens.
|
||||
link: /docs/configuration/events/
|
||||
aliases:
|
||||
- events
|
||||
|
||||
- term: Frontend
|
||||
definition: >-
|
||||
|
@ -3,7 +3,7 @@ title: "Understanding Automations"
|
||||
description: "A breakdown of what an automation consists of."
|
||||
---
|
||||
|
||||
All automations are made up of a trigger and an action. Optionally combined with a condition. Take for example the automation:
|
||||
All {% term automations %} are made up of a {% term trigger %} and an {% term action %}. Optionally combined with a {% term condition %}. Take for example the automation:
|
||||
|
||||
> When Paulus arrives home and it is after sunset: Turn the lights on in the living room.
|
||||
|
||||
@ -15,7 +15,7 @@ We can break up this automation into the following three parts:
|
||||
(action) Turn the lights on in the living room
|
||||
```
|
||||
|
||||
The first part is the [trigger](/docs/automation/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 using devices/sensors by observing the state of Paulus changing from `not_home` to `home`.
|
||||
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`.
|
||||
|
||||
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.
|
||||
|
||||
@ -27,7 +27,7 @@ The difference between a condition and a trigger can be confusing as they are ve
|
||||
|
||||
## 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. **{% 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:
|
||||
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:
|
||||
|
||||
| Name | Description | Example |
|
||||
| ---- | ----- | ---- |
|
||||
@ -37,7 +37,7 @@ Automation rules interact directly with the internal state of Home Assistant, so
|
||||
|
||||
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 **{% my developer_services title="Developer Tools -> Services" %}**. *Services* allow changing 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* {% my developer_call_service service="light.turn_on" %} is capable of turning on any light in your system. Parameters can be passed to a *service* to indicate, for example, which device to activate or which color to use.
|
||||
Actions are all about calling *services*. To explore the available *services* open the **{% my developer_services title="Developer Tools > Services" %}**. *Services* allow changing 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* {% my developer_call_service service="light.turn_on" %} is capable of turning on any light in your system. Parameters can be passed to a *service* to indicate, for example, which device to activate or which color to use.
|
||||
|
||||
## Creating automations
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user