Skip to content

Instantly share code, notes, and snippets.

@Didgeridrew
Created March 20, 2021 03:02
Show Gist options
  • Save Didgeridrew/8d171cf2ae177e57ee5be2ce27e3e38f to your computer and use it in GitHub Desktop.
Save Didgeridrew/8d171cf2ae177e57ee5be2ce27e3e38f to your computer and use it in GitHub Desktop.
Using wait for trigger to executes actions from a sequence of motion sensors being tripped
alias: 'zTest: Motion sensor sequence'
description: ''
trigger:
- type: motion
platform: device
device_id: 216baa79e59311ce5959d135d14e2e40
entity_id: binary_sensor.basement_motion
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
condition:
- condition: or
conditions:
- condition: time
after: '23:00:00'
before: '23:59:59'
- condition: time
after: '00:00:00'
before: '07:00:00'
action:
- wait_for_trigger:
- type: motion
platform: device
device_id: 082963e7bb688f6cd869b348e065c7cf
entity_id: binary_sensor.sonoff_ms01_motion
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
timeout: '00:05:00'
continue_on_timeout: false
- service: light.turn_on
data: {}
target:
entity_id: light.living_room_table_lamps
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment