Advertisement
marine88

Untitled

Sep 10th, 2017
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.86 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.     trigger:
  5.       - platform: state
  6.         entity_id: binary_sensor.motion_sensor_158d00010ef41a
  7.         to: 'on'
  8.     condition:
  9.       - condition: time
  10.         after: '20:00:00'
  11.         before: '08:00:00'
  12.     action:
  13.       - service: homeassistant.turn_on
  14.         data:
  15.           entity_id: light.yeelight_rgb_f0b429b7deef
  16.           color_temp: 154
  17.           brightness: 50
  18.  
  19. #turn off bedroom light when after 3 minutes was no movemnt
  20.   - alias: Turn off bedroom light no movement
  21.     trigger:
  22.       - platform: state
  23.         entity_id: binary_sensor.motion_sensor_158d00010ef41a
  24.         to: 'off'
  25.         for:
  26.           minutes: 3
  27.     action:
  28.       - service: homeassistant.turn_off
  29.         entity_id: light.yeelight_rgb_f0b429b7deef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement