Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
executable file 61 lines (51 sloc) 1.62 KB
#################################################################
## Occupancy Automations
#################################################################
##########################################################
## Turn Off Bedroom when Unoccupied
##########################################################
- alias: Occupancy - Turn Off Bedroom Lights when Unoccupied
id: 'occupancy_turn_off_bedroom_lights_when_unoccupied'
trigger:
- platform: state
entity_id: binary_sensor.bedroom_occupancy
from: 'on'
to: 'off'
for:
hours: 1
minutes: 0
seconds: 0
condition:
- condition: state
entity_id: input_boolean.disable_occupancy
state: 'off'
action:
- service: light.turn_off
entity_id:
- light.bedroom_lights
##########################################################
## Turn Off Guest Bedroom when Unoccupied
##########################################################
- alias: Occupancy - Turn Off Guest Bedroom Lights when Unoccupied
id: 'occupancy_turn_off_guest_bedroom_lights_when_unoccupied'
trigger:
- platform: state
entity_id: binary_sensor.guest_bedroom_occupancy
from: 'on'
to: 'off'
for:
hours: 0
minutes: 30
seconds: 0
condition:
- condition: state
entity_id: input_boolean.disable_occupancy
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: group.friends_and_family
state: 'home'
action:
- service: light.turn_off
entity_id: light.guest_bedroom_lights
You can’t perform that action at this time.