mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-12 20:06:52 +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 %}
|
||||
|
||||
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
|
||||
automation:
|
||||
@ -81,11 +81,9 @@ automation:
|
||||
entity_id: device_tracker.paulus, device_tracker.anne_therese
|
||||
# Optional
|
||||
from: 'not_home'
|
||||
# Optional
|
||||
to: 'home'
|
||||
|
||||
# Alias for 'to'
|
||||
state: 'home'
|
||||
|
||||
# If given, will trigger when state has been the to state for X time.
|
||||
for:
|
||||
hours: 1
|
||||
@ -96,6 +94,9 @@ automation:
|
||||
<p class='note warning'>
|
||||
Use quotes around your values for `from` and `to` to avoid the YAML parser interpreting values as booleans.
|
||||
</p>
|
||||
<p class='note warning'>
|
||||
Using `state` as an alias for `to` is deprecated.
|
||||
</p>
|
||||
|
||||
### {% 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user