Change turn on/off lights example to use 'state' (#2555)

The example in the current documentation does not appear to work in hass 0.43.2. A trigger containing 'to' without a 'from' doesn't fire, however one that uses 'state' does.
This commit is contained in:
andrewfoster 2017-05-05 00:57:18 +10:00 committed by Fredrik Lindqvist
parent 0c36aa4d8a
commit ef98610c59

View File

@ -20,7 +20,7 @@ automation:
trigger:
platform: state
entity_id: sensor.motion_sensor
to: 'on'
state: 'on'
action:
service: homeassistant.turn_on
entity_id: light.kitchen
@ -29,7 +29,7 @@ automation:
trigger:
platform: state
entity_id: sensor.motion_sensor
to: 'off'
state: 'off'
for:
minutes: 10
action: