Advertisement
marine88

Untitled

Sep 10th, 2017
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.92 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: '20:00:00'
  12.     #     before: '08:00:00'
  13.     action:
  14.       - service: homeassistant.turn_on
  15.         data:
  16.           entity_id: light.yeelight_rgb_f0b429b7deef
  17.           color_temp: 154
  18.           brightness: 30
  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: 1
  29.     action:
  30.       - service: homeassistant.turn_off
  31.         entity_id: light.yeelight_rgb_f0b429b7deef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement