Document restore of trigger-based template binary sensors (#22258)

This commit is contained in:
Erik Montnemery 2022-04-07 17:35:21 +02:00 committed by GitHub
parent c739f0e087
commit a63c7250df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ Sensor, binary sensor, button, number and select template entities are defined i
_For old sensor/binary sensor configuration format, [see below](#legacy-binary-sensor-configuration-format)._
## State-based template sensors
## State-based template binary sensors, buttons, numbers, selects and sensors
Template entities will by default update as soon as any of the referenced data in the template updates.
@ -68,7 +68,7 @@ template:
{% endraw %}
## Trigger-based template sensors
## Trigger-based template binary sensors, buttons, numbers, selects and sensors
If you want more control over when an entity updates, you can define a trigger. Triggers follow the same format and work exactly the same as [triggers in automations][trigger-doc]. This feature is a great way to create entities based on webhook data ([example](#storing-webhook-information)), or update entities based on a schedule.
@ -76,6 +76,8 @@ Whenever the trigger fires, all related entities will re-render and it will have
Trigger-based entities do not automatically update when states referenced in the templates change. This functionality can be added back by defining a [state trigger](/docs/automation/trigger/#state-trigger) for each entity that you want to trigger updates.
The state, including attributes, of trigger-based binary sensors is restored when Home Assistant is restarted. The state of other trigger-based template entities is not restored.
{% raw %}
```yaml