-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
324 lines (324 loc) · 8.18 KB
/
automations.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
- id: 47eeba1266d14ffe8f46ce759d8cf85b
alias: Notify Of New External IP
trigger:
- entity_id: sensor.external_ip
platform: state
condition:
- condition: template
value_template: '{% if trigger.from_state and trigger.to_state %} true {% else
%} false {% endif %}'
- condition: template
value_template: '{% if trigger.from_state.state == "unknown" %} false {% else
%} true {% endif %}'
- condition: template
value_template: '{% if trigger.to_state.state == "unknown" %} false {% else %}
true {% endif %}'
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- data:
message: External IP address has changed!
data_template:
message: Your External IP changed from {{ trigger.from_state.state }} to {{
trigger.to_state.state }}
service: notify.notify
initial_state: true
- id: f2d67db05f4a48e1b7c9f84308997b62
alias: Update Available Notification
trigger:
- entity_id: updater.updater
platform: state
action:
- data:
message: New HASS update is available!
service: notify.mobile_app_maxwells_iphone
initial_state: true
- alias: Turn Up the TV
trigger:
- platform: state
entity_id: input_boolean.turn_up_stereo_vol_bool
to: 'on'
action:
- service: remote.send_command
data:
entity_id: remote.harmony_hub
command:
- VolumeUp
device: 48040581
delay_secs: 0.1
num_repeats: 6
- service: input_boolean.turn_off
entity_id: input_boolean.turn_up_stereo_vol_bool
id: a02b85a0cb5e47ef9910a9339f191bed
- alias: Turn the TV Down
trigger:
- platform: state
entity_id: input_boolean.turn_stereo_down_vol_bool
to: 'on'
action:
- service: remote.send_command
data:
entity_id: remote.harmony_hub
command:
- VolumeDown
device: 48040581
delay_secs: 0.1
num_repeats: 6
- service: input_boolean.turn_off
entity_id: input_boolean.turn_stereo_down_vol_bool
id: b14953bda50443118b873b41dd13fe37
- alias: Mute Stereo
trigger:
- platform: state
entity_id: input_boolean.stereo_mute
to: 'on'
- platform: state
entity_id: input_boolean.stereo_unmute
to: 'off'
condition:
condition: state
entity_id: input_boolean.stereo_semaphore
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.stereo_semaphore
- service: remote.send_command
data:
entity_id: remote.harmony_hub
command:
- Mute
device: 48040581
delay_secs: 0.1
- service: input_boolean.turn_off
entity_id: input_boolean.stereo_unmute
- service: input_boolean.turn_on
entity_id: input_boolean.stereo_mute
- service: input_boolean.turn_off
entity_id: input_boolean.stereo_semaphore
id: 41e37b5560504d7f816a99527df4e09e
- alias: Unmute Stereo
trigger:
- platform: state
entity_id: input_boolean.stereo_unmute
to: 'on'
- platform: state
entity_id: input_boolean.stereo_mute
to: 'off'
condition:
condition: state
entity_id: input_boolean.stereo_semaphore
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.stereo_semaphore
- service: remote.send_command
data:
entity_id: remote.harmony_hub
command:
- Mute
device: 48040581
delay_secs: 0.1
- service: input_boolean.turn_on
entity_id: input_boolean.stereo_unmute
- service: input_boolean.turn_off
entity_id: input_boolean.stereo_mute
- service: input_boolean.turn_off
entity_id: input_boolean.stereo_semaphore
id: 85cc8fe6dac342f68760b982f80aa1fc
- alias: High CPU Notification
trigger:
- above: '50'
entity_id: sensor.processor_use
platform: numeric_state
action:
- data:
message: CPU used is {{ states.sensor.processor_use.state}}%!
title: Home Assistant CPU Alert
service: notify.notify
initial_state: true
id: 40cd64cbb07b48b5bd91d433ba2477ce
- alias: Home Assistant Starting Up
trigger:
platform: homeassistant
event: start
action:
- data:
message: Home Assistant is starting up!
title: Home Assistant Alert
service: notify.notify
id: bebeaccb913646438a7261e0e433e308
- id: '1563977738865'
alias: Turn on Lights When I Get To Work
trigger:
- entity_id: device_tracker.maxwells_iphone
event: enter
platform: zone
zone: zone.work
condition: []
action:
- data:
entity_id: light.lighty
service: light.turn_on
- data:
entity_id: light.lampy
service: light.turn_on
- data:
entity_id: light.light_strippy
service: light.turn_on
- data:
entity_id: light.brighty
service: light.turn_on
- data:
entity_id: remote.harmony_hub
service: remote.turn_on
- id: '1576648002901'
alias: Weekly Snapshot
description: ''
trigger:
- at: 02:00
platform: time
condition:
- after: 01:01:01
condition: time
weekday:
- sun
action:
- data:
addon: core_mariadb
service: hassio.addon_stop
- data:
keep_days: 7
service: auto_backup.snapshot_full
- delay: 00:00:10
- data:
addon: core_mariadb
service: hassio.addon_start
- id: llmor
alias: Test Lifx Colors
trigger:
- at: '12:00'
platform: time
action:
- service: light.turn_on
data:
entity_id:
- light.lighty
- light.lampy
- light.brighty
- light.light_strippy
brightness_pct: 10
rgb_color:
- 255
- 146
- 39
- id: hacsnewrepo
alias: Create a notification when somethig is added to HACS
trigger:
platform: event
event_type: hacs/repository
event_data:
action: registration
condition:
condition: template
value_template: '{{ trigger.event.data.repository is defined }}'
action:
service: persistent_notification.create
data_template:
title: New repository in HACS
message: '{% set repo = trigger.event.data.repository %} {% set id = trigger.event.data.repository_id
%} [{{ repo }}](/hacs/repository/{{ id }}) was just added to HACS.'
- id: hacspendingupdate
alias: Create a notification when there is updates pending in HACS
trigger:
platform: state
entity_id: sensor.hacs
condition:
- condition: template
value_template: '{{ states(trigger.entity_id) != ''unknown''}}'
- condition: template
value_template: '{{ (states(trigger.entity_id) | float) != 0}}'
action:
service: persistent_notification.create
data_template:
title: Updates pending in HACS
message: "{% for repo in state_attr(trigger.entity_id, 'repositories') %}\n\
\ **{{ repo.display_name }}** _{{ repo[\"installed version\"] }}_ -> _{{\
\ repo[\"available version\"] }}_\n{% endfor %}"
- id: '1577425794405'
alias: Leave Home
description: ''
trigger:
- entity_id: device_tracker.maxwells_iphone
event: leave
platform: zone
zone: zone.home
condition:
- after: 08:00
before: '22:00'
condition: time
action:
- scene: scene.cats_home_alone
- id: '1577426720866'
alias: Nobody Home - Morning
description: ''
trigger:
- at: 09:00
platform: time
condition:
- condition: state
entity_id: device_tracker.maxwells_iphone
state: not_home
action:
- scene: scene.cats_home_alone
- id: '1577490659750'
alias: Nobody Home - Night
description: ''
trigger:
- at: 00:00
platform: time
condition:
- condition: state
entity_id: device_tracker.maxwells_iphone
state: not_home
action:
- scene: scene.nobody_home_night
- id: '1578850811547'
alias: Test Harmony Hub
description: ''
trigger:
- entity_id: remote.harmony_hub
platform: state
to: 'on'
condition: []
action:
- entity_id: light.lampy
service: light.toggle
- id: '1579758370913'
alias: Git Pull
description: ''
trigger:
- platform: webhook
webhook_id: git-pull
condition: []
action:
- data:
addon: core_git_pull
service: hassio.addon_start
- id: '1583466105151'
alias: Turn off all lights
description: ''
trigger: []
condition: []
action:
- data: {}
entity_id: all
service: light.turn_off
- id: '1583594952643'
alias: Turn on all lights
description: ''
trigger: []
condition: []
action:
- data: {}
entity_id: all
service: light.turn_on