-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome_modes.yaml
145 lines (138 loc) · 4.29 KB
/
home_modes.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
input_boolean:
guest_mode:
name: Gastmodus
initial: false
icon: mdi:account-check
vacation_mode:
name: Vakantiemodus
initial: false
icon: mdi:beach
group:
residents:
name: Bewoners
icon: mdi:human-greeting
entities:
- person.sander
automation:
- id: vacation_mode
alias: Vakantie modus - automatisch activeren en deactiveren
mode: single
triggers:
- trigger: state
entity_id: group.residents
to: not_home
for: "24:00:00"
id: aan
- trigger: state
entity_id: group.residents
to: home
actions:
- if:
- condition: trigger
id: aan
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
then:
- alias: Turn on vacation mode
action: input_boolean.turn_on
entity_id: input_boolean.vacation_mode
else:
- alias: Turn off vacation mode
action: input_boolean.turn_off
entity_id: input_boolean.vacation_mode
- id: vacation_mode_presence
alias: Vakantie modus - aanwezigheid nabootsen
mode: parallel
triggers:
- trigger: numeric_state
entity_id: sensor.epl_eettafel_illuminance
below: 2.2
for:
minutes: 30
id: woonkamer_avond
- trigger: time
at: "23:30:00"
id: tanden_poetsen
- trigger: time
at: "00:45:00"
id: nacht_toilet
- trigger: time
at: "00:00:00"
id: alles_uit
conditions:
- condition: state
entity_id: input_boolean.vacation_mode
state: "on"
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
actions:
- choose:
- conditions:
- condition: trigger
id: woonkamer_avond
sequence:
- alias: Wait a little to randomize the behavior
delay:
minutes: "{{ range(0, 15) | random }}"
- alias: Turn on the light
action: light.turn_on
data:
xy_color: [0.459, 0.408] # Helder
brightness: 1
target:
entity_id: light.woonkamer_groot_2
- alias: Wait till a certain time
wait_for_trigger:
- trigger: time
at: "22:00:00"
- alias: Wait a little to randomize the behavior
delay:
minutes: "{{ range(0, 30) | random }}"
- alias: Turn off the light
action: light.turn_off
target:
entity_id: light.woonkamer_groot_2
- conditions:
- condition: trigger
id: tanden_poetsen
sequence:
- alias: Wait a little to randomize the behavior
delay:
minutes: "{{ range(0, 30) | random }}"
- alias: Turn on the light
action: scene.turn_on
target:
entity_id: scene.badkamer_helder
- alias: Wait a little to randomize the behavior
delay:
minutes: "{{ range(3, 5) | random }}"
- alias: Turn off the light
action: light.turn_off
target:
entity_id: light.badkamer
- conditions:
- condition: trigger
id: nacht_toilet
sequence:
- alias: Wait a little to randomize the behavior
delay:
minutes: "{{ range(0, 30) | random }}"
- alias: Turn on the light
action: scene.turn_on
target:
entity_id: scene.badkamer_ontspannen
- alias: Wait a little to randomize the behavior
delay:
minutes: "{{ range(1, 3) | random }}"
- alias: Turn off the light
action: light.turn_off
target:
entity_id: light.badkamer
- conditions:
- condition: trigger
id: alles_uit
sequence:
- alias: Make sure everything is off
action: script.everything_off