Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- #
- # Code to turn on the closet lights when there is motion
- #
- id: Closet light On at night
- alias: Turn on closet light when there is movement at night
- initial_state: 'on'
- trigger:
- platform: state
- entity_id: binary_sensor.master_bedroom_closet_motion_sensor
- to: 'on'
- condition:
- - condition:
- condition: or
- conditions:
- - condition: time
- after: "23:00:00" #11pm - midnight
- - condition: time
- before: "05:30:00" #midnight - 5:30am
- action:
- service: light.turn_on
- data:
- brightness: 50
- entity_id:
- - light.sengled_e11_g13_030ba25e_1
- - light.sengled_e11_g13_030bbabf_1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement