-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathoccupancy.yaml
executable file
·82 lines (72 loc) · 2.19 KB
/
occupancy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#################################################################
## Occupancy Automations
#################################################################
##########################################################
## Turn Off Bedroom when Unoccupied
##########################################################
- alias: Occupancy - Turn Off Bedroom Lights when Unoccupied
id: 'occupancy_turn_off_bedroom_lights_when_unoccupied'
triggers:
- trigger: state
entity_id: binary_sensor.bedroom_occupancy
from: 'on'
to: 'off'
for:
hours: 1
minutes: 0
seconds: 0
conditions:
- condition: state
entity_id: input_boolean.disable_occupancy
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: vacuum.main_floor_roomba
state: 'cleaning'
- condition: state
entity_id: vacuum.main_floor_roomba
state: 'returning'
- condition: not
conditions:
- condition: state
entity_id: light.closet_lamp
attribute: effect
state: "Plantgrowth"
actions:
- action: light.turn_off
target:
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'
triggers:
- trigger: state
entity_id: binary_sensor.guest_bedroom_occupancy
from: 'on'
to: 'off'
for:
hours: 0
minutes: 30
seconds: 0
conditions:
- condition: state
entity_id: input_boolean.disable_occupancy
state: 'off'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: vacuum.upstairs_roomba
state: 'cleaning'
- condition: state
entity_id: vacuum.upstairs_roomba
state: 'returning'
actions:
- action: light.turn_off
entity_id: light.guest_bedroom_lights