Add this variable to trigger-based templates (#22879)

This commit is contained in:
akloeckner 2022-06-28 09:59:23 +02:00 committed by GitHub
parent ad8a07bc67
commit b1ebfd87f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,9 +68,6 @@ template:
{% endraw %}
### Template and action variables
State-based template entities have the special template variable `this` available in their templates and actions. The `this` variable aids [self-referencing](#self-referencing) of an entity's state and attribute in templates and actions.
## Trigger-based template binary sensors, buttons, numbers, selects and sensors
@ -283,6 +280,10 @@ template:
[trigger-doc]: /docs/automation/trigger
## Template and action variables
State-based and trigger-based template entities have the special template variable `this` available in their templates and actions. The `this` variable is the [state object](/docs/configuration/state_object) of the entity and aids [self-referencing](#self-referencing) of an entity's state and attribute in templates and actions. Trigger-based entities also provide [the trigger data](/docs/automation/templating/).
## Rate limiting updates
When there are entities present in the template and no triggers are defined, the template will be re-rendered when one of the entities changes states. To avoid this taking up too many resources in Home Assistant, rate limiting will be automatically applied if too many states are observed.