mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 12:26:50 +00:00
Deprecate automation trigger "state" (#2665)
Also elaborate on the meaning of a state change when no filters are present. Also make it clear that "from" and "to" are both optional.
This commit is contained in:
parent
b871b2b999
commit
ab9950f2d1
@ -72,7 +72,7 @@ automation:
|
|||||||
|
|
||||||
### {% linkable_title State trigger %}
|
### {% linkable_title State trigger %}
|
||||||
|
|
||||||
Triggers when the state of tracked entities change. If only entity_id given will match all state changes.
|
Triggers when the state of tracked entities change. If only entity_id given will match all state changes, even if only state attributes change.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
@ -81,11 +81,9 @@ automation:
|
|||||||
entity_id: device_tracker.paulus, device_tracker.anne_therese
|
entity_id: device_tracker.paulus, device_tracker.anne_therese
|
||||||
# Optional
|
# Optional
|
||||||
from: 'not_home'
|
from: 'not_home'
|
||||||
|
# Optional
|
||||||
to: 'home'
|
to: 'home'
|
||||||
|
|
||||||
# Alias for 'to'
|
|
||||||
state: 'home'
|
|
||||||
|
|
||||||
# If given, will trigger when state has been the to state for X time.
|
# If given, will trigger when state has been the to state for X time.
|
||||||
for:
|
for:
|
||||||
hours: 1
|
hours: 1
|
||||||
@ -96,6 +94,9 @@ automation:
|
|||||||
<p class='note warning'>
|
<p class='note warning'>
|
||||||
Use quotes around your values for `from` and `to` to avoid the YAML parser interpreting values as booleans.
|
Use quotes around your values for `from` and `to` to avoid the YAML parser interpreting values as booleans.
|
||||||
</p>
|
</p>
|
||||||
|
<p class='note warning'>
|
||||||
|
Using `state` as an alias for `to` is deprecated.
|
||||||
|
</p>
|
||||||
|
|
||||||
### {% linkable_title Sun trigger %}
|
### {% linkable_title Sun trigger %}
|
||||||
Trigger when the sun is setting or rising. An optional time offset can be given to have it trigger for example 45 minutes before sunset, when dusk is setting in.
|
Trigger when the sun is setting or rising. An optional time offset can be given to have it trigger for example 45 minutes before sunset, when dusk is setting in.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user