From ab9950f2d113f07357e9f469a2876e09b29afef0 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Mon, 22 May 2017 16:30:13 +0200 Subject: [PATCH] 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. --- source/_docs/automation/trigger.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 3686190a619..fb729d0c149 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -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:

Use quotes around your values for `from` and `to` to avoid the YAML parser interpreting values as booleans.

+

+ Using `state` as an alias for `to` is deprecated. +

### {% 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.