Advertisement
marine88

Untitled

Sep 9th, 2017
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.91 KB | None | 0 0
  1. automation:
  2.  #turn on bedroom after 20 PM with movement
  3.   - alias: Turn on bedroom light after 20 PM with movement
  4.     initial_state: 'on'
  5.     trigger:
  6.       - platform: state
  7.         entity_id: binary_sensor.motion_sensor_158d00010ef41a
  8.         to: 'on'
  9.     condition:
  10.       - condition: time
  11.         after: '05:40:00'
  12.         before: '06:00:00'
  13.     action:
  14.       - service: light.turn_on
  15.         data:
  16.           entity_id: light.yeelight_rgb_f0b429b7deef
  17.           color_temp: 154
  18.           brightness: 50
  19.  
  20.   #turn off bedroom light when after 3 minutes was no movemnt
  21.   - alias: Turn off bedroom light no movement
  22.     initial_state: 'on'
  23.     trigger:
  24.       - platform: state
  25.         entity_id: binary_sensor.motion_sensor_158d00010ef41a
  26.         to: 'off'
  27.         for:
  28.           minutes: 3
  29.     action:
  30.       - service: light.turn_off
  31.         data:
  32.           entity_id: light.yeelight_rgb_f0b429b7deef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement