-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomations.yaml
executable file
·226 lines (212 loc) · 5.48 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
---
- id: bedtime
initial_state: True
alias: 'Bedtime Sleep Timer'
trigger:
platform: state
entity_id: input_boolean.sleep
from: 'off'
to: 'on'
action:
service: script.turn_on
entity_id: script.sleep_b
- id: lights_on_arrive
initial_state: True
alias: 'Lights on when coming home'
trigger:
platform: state
entity_id: group.presence_devices
from: 'not_home'
to: 'home'
condition:
condition: state
entity_id: 'sun.sun'
state: 'below_horizon'
action:
service: homeassistant.turn_on
entity_id: group.lights_presence
- id: garage_notify
initial_state: True
alias: 'Forgot to Close Garage'
trigger:
platform: state
entity_id: group.presence_devices
from: 'home'
to: 'not_home'
condition:
condition: state
entity_id: cover.garage_door_opener
state: 'open'
action:
- service: notify.gmail
data:
title: 'Garage Open'
message: 'Closing open garage door'
- service: cover.close_cover
data:
entity_id: cover.garage_door_opener
- id: doorbell_notify
initial_state: True
alias: 'Doorbell'
trigger:
platform: state
entity_id: binary_sensor.garage_door_doorbell_ding
from: 'off'
to: 'on'
action:
- service: camera.snapshot
data:
entity_id: camera.garage_door_doorbell
filename: /tmp/snapshot_front_door.jpg
- service: notify.gmail
data:
title: 'Doorbell Ring'
message: "Someone's at the front door"
data:
images:
- /tmp/snapshot_front_door.jpg
- service: notify.all_tvs
data:
title: Doorbell
message: Message to KODI from Home Assistant!
- service: tts.google_say
data:
message: Someone is at the door
- id: leave_home
initial_state: True
alias: 'Leaving Home'
trigger:
platform: state
entity_id: group.presence_devices
from: 'home'
to: 'not_home'
action:
- service: script.turn_on
entity_id: script.leave
- id: come_home
initial_state: True
alias: 'Arriving Home'
trigger:
platform: state
entity_id: group.presence_devices
from: 'not_home'
to: 'home'
action:
- service: script.turn_on
entity_id: script.arrive
- id: speed_test
initial_state: True
alias: 'Speed Test'
trigger:
- platform: numeric_state
entity_id: sensor.speedtest_download
below: 75
- platform: numeric_state
entity_id: sensor.speedtest_upload
below: 8
action:
- service: notify.twitter
data:
message: "My @WOW_WAY service just tested at {{ states('sensor.speedtest_download') }}/{{ states('sensor.speedtest_upload') }} even though I'm paying for 100/10. Why should I pay full price if @WOWCare can't deliver? @IsServiceDown #wideopenwest #speedtest #slowinternet"
- id: new_version
initial_state: True
alias: 'Available Update'
trigger:
platform: state
entity_id: updater.updater
action:
service: notify.gmail
data:
title: 'Update for Home Assistant is available.'
message: 'Available Version: {{states.sensor.ver_current.state}} Current Version: {{ states.sensor.ver_installed.state }}'
# Television based automations #
- id: remote_activity_fr
initial_state: True
alias: 'Remote start activity familyroom'
trigger:
platform: state
entity_id: input_select.familyroom_harmony
action:
service: script.turn_on
entity_id: script.familyroom_harmony
- id: remote_external_fr
initial_state: True
alias: 'Remote external update familyroom'
trigger:
platform: state
entity_id: remote.familyroom
action:
service: input_select.select_option
data_template:
entity_id: input_select.familyroom_harmony
option: >
{{ states.remote.familyroom.attributes.current_activity }}
- id: cron
initial_state: True
alias: 'Cron'
trigger:
- platform: time
at: '03:15:00'
- platform: homeassistant
event: start
action:
- delay: 00:00:30
- service: script.turn_on
entity_id: script.get_pvr_channels_office
- service: script.turn_on
entity_id: script.get_pvr_channels_kitchen
- service: script.turn_on
entity_id: script.get_pvr_channels_bedroom
- service: script.turn_on
entity_id: script.get_pvr_channels_familyroom
- service: frontend.set_theme
data:
name: dark
- service: group.set_visibility
entity_id: group.bedroom, group.office, group.kitchen, group.familyroom
data:
visible: false
- id: zwave ready
initial_state: True
alias: Zwave Initialization
trigger:
platform: event
event_type: zwave.network_ready
action:
- service: switch.turn_on
entity_id: switch.office_dual_switch_switch_2
- service: switch.turn_on
entity_id: switch.kitchen_dual_switch_switch_3
- service: switch.turn_on
entity_id: switch.bedroom_pi_switch
- id: wakeup
initial_state: True
alias: 'Wakeup'
trigger:
platform: state
entity_id: input_boolean.awake
from: 'off'
to: 'on'
action:
service: script.turn_on
entity_id: script.wake
- id: lights_on_at_dusk
initial_state: True
alias: Turn on lights at dusk
trigger:
platform: sun
event: sunset
action:
service: switch.turn_on
data:
entity_id: group.lights_exterior
- id: lights off at sunrise
initial_state: True
alias: lights off at sunrise
trigger:
platform: sun
event: sunrise
action:
service: switch.turn_off
data:
entity_id: group.lights_exterior