SHARE
TWEET

Untitled

a guest Jan 19th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top