-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
scripts.yaml
332 lines (332 loc) · 8.14 KB
/
scripts.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
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
broadcast_message:
alias: Broadcast message
sequence:
- service: tts.google_translate_say
data:
entity_id: '{{ entity_id }}'
message: '{{ message }}'
- service: media_player.volume_set
data:
entity_id: '{{ entity_id }}'
volume_level: '{{ volume }}'
mode: single
icon: hass:speaker
check_config:
alias: Check Configuration
sequence: []
mode: single
icon: mdi:check-circle-outline
alarm_away:
alias: Alarm - Away
sequence:
- service: automation.trigger
data:
skip_condition: false
target:
entity_id: automation.check_all_doors
enabled: true
- service: light.turn_off
data: {}
target:
entity_id: light.lights_all
- type: turn_off
device_id: 2e53d475d3d4aff442d2df10d6f77b24
entity_id: switch.monitors
domain: switch
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.plug_2_on_off
- switch.plug_3_on_off
- service: remote.turn_off
data: {}
target:
entity_id: remote.sony_bravia_tv
- if:
- condition: state
entity_id: input_select.air_conditioning_mode
state: Winter
then:
- service: climate.set_preset_mode
data:
preset_mode: away
target:
entity_id:
- climate.bedroom_heater_controller
- climate.living_room_heater_controller
- climate.computer_fan_controller
else:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.plug_2_on_off
- switch.plug_3_on_off
- service: automation.turn_on
data: {}
target:
entity_id:
- automation.alarm_cameras_detected_motion
- automation.alarm_notify_living_room
- service: homeassistant.turn_off
data: {}
target:
entity_id:
- switch.mat_nas_002_home_mode
- switch.mat_nas_001_surveillance_station_home_mode
- data: {}
service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.home_alarm
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.welcome_home
mode: single
icon: mdi:lock-outline
alarm_night:
alias: Alarm - Night
sequence:
- service: cover.close_cover
data: {}
target:
entity_id: cover.lumi_lumi_curtain_acn002_cover
- service: automation.trigger
data:
skip_condition: false
target:
entity_id: automation.check_all_doors
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.gone_to_bed
- service: light.turn_off
data: {}
target:
entity_id: light.lights_all
- type: turn_off
device_id: 2e53d475d3d4aff442d2df10d6f77b24
entity_id: switch.monitors
domain: switch
- if:
- condition: state
entity_id: input_select.air_conditioning_mode
state: Winter
then:
- service: climate.set_preset_mode
data:
preset_mode: sleep
target:
entity_id:
- climate.bedroom_heater_controller
- climate.living_room_heater_controller
- climate.computer_fan_controller
else:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.plug_2_on_off
- switch.plug_3_on_off
- service: remote.turn_off
data: {}
target:
entity_id: remote.sony_bravia_tv
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.washing_machine_on_off
- switch.plug_3
- switch.plug_2
- service: alarm_control_panel.alarm_arm_night
data: {}
target:
entity_id: alarm_control_panel.home_alarm
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- group.all_door_notifications
- group.motion_notify_downstairs
- group.motion_notify_outside
- automation.office_notify
enabled: false
- service: notify.mark_ios_devices
data:
title: ALARM
message: The alarm was armed in Night mode at {{ states('sensor.date_and_time')
}}
data:
push:
interruption-level: time-sensitive
group: Alarm
enabled: false
mode: single
icon: mdi:lock-open-alert-outline
alarm_downstairs:
alias: Alarm - Downstairs
sequence:
- service: automation.trigger
data: {}
target:
entity_id: automation.check_all_doors
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- group.door_notify_downstairs
- group.motion_notify_downstairs
- group.door_notify_outside
- group.motion_notify_outside
enabled: false
- service: automation.turn_on
data: {}
target:
entity_id:
- automation.alarm_cameras_detected_motion
- automation.alarm_notify_living_room
- service: homeassistant.turn_off
data: {}
target:
entity_id:
- switch.mat_nas_002_home_mode
- switch.mat_nas_001_surveillance_station_home_mode
- service: alarm_control_panel.alarm_arm_home
data: {}
target:
entity_id: alarm_control_panel.home_alarm
- service: notify.mark_ios_devices
data:
title: ALARM
message: The alarm was armed in Downstairs mode at {{ states('sensor.date_and_time')
}}
data:
push:
interruption-level: time-sensitive
group: Alarm
enabled: false
mode: single
icon: mdi:lock-open-check-outline
alarm_outside:
alias: Alarm - Outside
sequence:
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- group.door_notify_outside
- group.motion_notify_outside
enabled: false
- service: alarm_control_panel.alarm_arm_vacation
data: {}
target:
entity_id: alarm_control_panel.home_alarm
- service: notify.mark_ios_devices
data:
title: ALARM
message: The alarm was armed in Outside mode at {{ states('sensor.date_and_time')
}}
data:
push:
interruption-level: time-sensitive
group: Alarm
enabled: false
mode: single
icon: mdi:lock-open-check-outline
alarm_disarm:
alias: Alarm - Disarm
sequence:
- service: homeassistant.turn_off
data: {}
target:
entity_id:
- group.all_door_notifications
- group.all_motion_notifications
- service: homeassistant.turn_on
data: {}
target:
entity_id:
- switch.mat_nas_002_home_mode
- switch.mat_nas_001_surveillance_station_home_mode
- if:
- condition: state
entity_id: input_select.air_conditioning_mode
state: Winter
then:
- service: climate.set_preset_mode
data:
preset_mode: home
target:
entity_id:
- climate.bedroom_heater_controller
- climate.living_room_heater_controller
- climate.computer_fan_controller
else:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.plug_2_on_off
- switch.plug_3_on_off
- service: alarm_control_panel.alarm_disarm
data:
code: '3971'
target:
entity_id: alarm_control_panel.home_alarm
- service: notify.mark_ios_devices
data:
title: ALARM
message: The alarm was disarmed at {{ states('sensor.date_and_time') }}
data:
push:
interruption-level: time-sensitive
group: Alarm
enabled: false
mode: single
icon: mdi:lock-outline
intruder_alert:
alias: Intruder Alert
sequence:
- service: script.broadcast_message
data:
entity_id: media_player.media_player_all
message: INTRUDER! INTRUDER! INTRUDER!
volume: '{{ states(''input_number.intruder_volume'') }}'
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
mode: single
icon: mdi:alarm-light
tv_mode:
alias: TV Mode
sequence:
- if:
- condition: state
entity_id: input_boolean.tv_mode
state: 'on'
then:
- service: automation.trigger
data: {}
target:
entity_id: automation.tv_mode_off
else:
- service: automation.trigger
data: {}
target:
entity_id: automation.hue_dimmer_on_click
mode: single
icon: mdi:television
dropbox_sync:
alias: Dropbox Sync
sequence:
- service: hassio.addon_stdin
data:
addon: 719b45ef_dropback
input: sync
mode: single
icon: mdi:dropbox