From ef98610c59b3a745b3fbd6125f34447b6680d5ac Mon Sep 17 00:00:00 2001 From: andrewfoster Date: Fri, 5 May 2017 00:57:18 +1000 Subject: [PATCH] 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. --- ...turn_on_light_for_10_minutes_when_motion_detected.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown b/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown index 4da386bbbc9..ed859cdaeed 100644 --- a/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown +++ b/source/_cookbook/turn_on_light_for_10_minutes_when_motion_detected.markdown @@ -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: