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 65f5cb6b590..27320af7a8f 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 @@ -36,3 +36,40 @@ automation: service: homeassistant.turn_off entity_id: light.kitchen_light ``` + +Or in the case of multiple sensors/triggers: + +```yaml +automation: +- alias: Turn on hallway lights when the doorbell rings, the front door opens or if there is movement + trigger: + - platform: state + entity_id: sensor.motion_sensor, binary_sensor.front_door, binary_sensor.doorbell + to: 'on' + action: + - service: homeassistant.turn_on + data: + entity_id: + - light.hallway_0 + - light.hallway_1 + - service: timer.start + data: + entity_id: timer.hallway + +- alias: Turn off hallway lights 10 minutes after trigger + trigger: + platform: event + event_type: timer.finished + event_data: + entity_id: timer.hallway + action: + service: homeassistant.turn_off + data: + entity_id: + - light.hallway_0 + - light.hallway_1 + +timer: + hallway: + duration: '00:10:00' +```