mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Document restore of trigger-based template binary sensors (#22258)
This commit is contained in:
parent
c739f0e087
commit
a63c7250df
@ -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)._
|
_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.
|
Template entities will by default update as soon as any of the referenced data in the template updates.
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ template:
|
|||||||
|
|
||||||
{% endraw %}
|
{% 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.
|
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.
|
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 %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user