This repository has been archived by the owner on Oct 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yml
295 lines (288 loc) · 6.74 KB
/
automations.yml
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
- id: '1598135001355'
alias: Main Lights On
description: ''
trigger:
- event: sunset
offset: -01:00:00
platform: sun
condition: []
action:
- scene: scene.main_lights_on
- device_id: d51f3a90df754251a3e7d8dc46326617
domain: switch
entity_id: switch.jasco_products_12722_on_off_relay_switch_switch
type: turn_on
mode: single
- id: '1598135112531'
alias: Main Lights Off
description: ''
trigger:
- at: 01:00
platform: time
condition: []
action:
- scene: scene.main_lights_off
- device_id: 3a96b504fddf4259aa9d5be3cda88e6f
domain: switch
entity_id: switch.jasco_products_45609_on_off_relay_switch_switch_3
type: turn_off
- device_id: d51f3a90df754251a3e7d8dc46326617
domain: switch
entity_id: switch.jasco_products_12722_on_off_relay_switch_switch
type: turn_off
mode: single
- id: '1598135403659'
alias: Outside Lights On
description: ''
trigger:
- event: sunset
offset: --00:30:00
platform: sun
condition: []
action:
- device_id: 49ed82c796d3400abc985e6cd451c372
domain: switch
entity_id: switch.jasco_products_45609_on_off_relay_switch_switch_2
type: turn_on
mode: single
- id: '1598148378661'
alias: Outside Lights Off
description: ''
trigger:
- event: sunrise
offset: '30'
platform: sun
condition: []
action:
- device_id: 49ed82c796d3400abc985e6cd451c372
domain: switch
entity_id: switch.jasco_products_45609_on_off_relay_switch_switch_2
type: turn_off
mode: single
- id: '1599962897756'
alias: Bedroom Light On
description: ''
trigger:
- at: '21:00'
platform: time
condition: []
action:
- brightness_pct: 100
device_id: 1a59a278ed9749a8934970e0832f8ba9
domain: light
entity_id: light.bedroom
type: turn_on
mode: single
- id: '1599966634142'
alias: Bedroom Light Off
description: ''
trigger:
- at: '23:00'
platform: time
condition: []
action:
- device_id: 1a59a278ed9749a8934970e0832f8ba9
domain: light
entity_id: light.bedroom
type: turn_off
mode: single
- id: '1599966769129'
alias: Bedroom Light Dim
description: ''
trigger:
- at: '22:00'
platform: time
condition:
- condition: state
entity_id: light.bedroom
state: 'on'
action:
- brightness_pct: 40
device_id: 1a59a278ed9749a8934970e0832f8ba9
domain: light
entity_id: light.bedroom
type: turn_on
mode: single
- id: '1601993860893'
alias: Turn on lights when dark
description: ''
trigger:
- below: 40
device_id: aa5312fe547d4f32835716e90b90e933
domain: sensor
entity_id: sensor.zooz_zse40_4_in_1_sensor_luminance
for:
hours: 0
minutes: 5
seconds: 0
platform: device
type: value
- event: sunset
platform: sun
- below: 30
device_id: aa5312fe547d4f32835716e90b90e933
domain: sensor
entity_id: sensor.zooz_zse40_4_in_1_sensor_luminance
platform: device
type: value
condition:
- condition: and
conditions:
- after: 09:00
before: '23:59'
condition: time
action:
- scene: scene.main_lights_on
- device_id: d51f3a90df754251a3e7d8dc46326617
domain: switch
entity_id: switch.jasco_products_12722_on_off_relay_switch_switch
type: turn_on
mode: single
- id: '1601994045594'
alias: Turn on light for motion
description: ''
trigger:
- entity_id: sensor.zooz_zse40_4_in_1_sensor_burglar
from: '0'
platform: state
condition: []
action:
- brightness_pct: 10
device_id: 896e804be1e74e31a4e590807e600589
domain: light
entity_id: light.desk_light
type: turn_on
mode: single
- id: '1601995210818'
alias: Turn off lights when bright
description: ''
trigger:
- above: 50
device_id: aa5312fe547d4f32835716e90b90e933
domain: sensor
entity_id: sensor.zooz_zse40_4_in_1_sensor_luminance
for:
hours: 0
minutes: 1
seconds: 0
platform: device
type: value
condition: []
action:
- scene: scene.main_lights_off
- device_id: d51f3a90df754251a3e7d8dc46326617
domain: switch
entity_id: switch.jasco_products_12722_on_off_relay_switch_switch
type: turn_off
mode: single
- id: '1602018646749'
alias: Turn off light for motion
description: ''
trigger:
- entity_id: sensor.zooz_zse40_4_in_1_sensor_burglar
for: '300'
platform: state
to: '0'
condition:
- after: 01:00
condition: time
action:
- device_id: 896e804be1e74e31a4e590807e600589
domain: light
entity_id: light.desk_light
type: turn_off
mode: single
## ALARM ITEMS ##
#Add all of the other sensors to the triggers below once defined
#Entry Detected While Armed
- id: '1602731931547'
alias: Trigger alarm while armed home or away
trigger:
- platform: state
entity_id: binary_sensor.back_door
to: 'on'
- platform: state
entity_id: binary_sensor.front_door
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_home
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.home_alarm
#Triggered
- id: '1602731931548'
alias: Alarm Triggered
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: triggered
action:
- service: notify.notify
data:
message: '!Alarm Triggered!'
- service: python_script.fully
data:
triggered: 'yes'
#Opened (test removing the disarmed trigger since the disarm script plays the open sound)
- id: '1602731931549'
alias: Door/Window Opened or Disarmed
trigger:
- platform: state
entity_id: binary_sensor.back_door
to: 'on'
- platform: state
entity_id: binary_sensor.front_door
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: arming
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: python_script.fully
data:
opened: 'yes'
# Disarm
- id: '1602731931550'
alias: Alarm Disarmed
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: disarmed
action:
- service: python_script.fully
data:
disarmed: 'yes'
# Armed Home
- id: '1602731931551'
alias: Alarmed Home
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: armed_home
action:
- service: python_script.fully
data:
home: 'yes'
#Armed Away
- id: '1602731931552'
alias: Alarmed Away
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: arming
action:
- service: python_script.fully
data:
away: 'yes'