Components of an automation in the context of Home Assistant
It is important to understand what are the names assigned by Home Assistant to some components of an automation, which will be helpful when you create your own automation. Before detailing what the components are, let’s first understand what an entity is in Home Assistant.
Understanding entities
Before we can discuss the components of an automation, we will need to know what an entity is. An entity is what Home Assistant calls a data structure that can be associated with a device. An entity basically has three main parts:
- ID: The identifier for the entity
- State: The current state of the entity
- Attributes: Extra information related to the entity or state
A device can have one or more entities, and each one, with its parts, can be included in an automation. As an example, the off-the-shelf plug device, desk_outlet
, that we configured in Chapter 4 has the entity structure shown in Table 5...