Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.65 KB | None | 0 0
  1. ---
  2. #
  3. # Code to turn on the closet lights when there is motion
  4. #
  5. id: Closet light On at night
  6. alias: Turn on closet light when there is movement at night
  7. initial_state: 'on'
  8. trigger:
  9.   platform: state
  10.   entity_id: binary_sensor.master_bedroom_closet_motion_sensor
  11.   to: 'on'
  12. condition:
  13.   - condition:
  14.     condition: or
  15.     conditions:
  16.       - condition: time
  17.         after: "23:00:00" #11pm - midnight
  18.       - condition: time
  19.         before: "05:30:00" #midnight - 5:30am
  20. action:
  21.   service: light.turn_on
  22.     data:
  23.       brightness: 50
  24.       entity_id:
  25.        - light.sengled_e11_g13_030ba25e_1
  26.         - light.sengled_e11_g13_030bbabf_1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement