-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautomation.yaml
201 lines (183 loc) · 4.36 KB
/
automation.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
###########################################################
#
# Automations - automations.yaml
#
###########################################################
- alias: 'Daylights'
trigger:
platform: sun
event: sunset
offset: "-01:30:00"
condition:
condition: state
entity_id: group.all_devices
state: 'home'
action:
service: scene.turn_on
entity_id: scene.daytime
- alias: 'Nightlights'
trigger:
platform: sun
event: sunset
offset: "+00:00:00"
condition:
condition: state
entity_id: group.all_devices
state: 'home'
action:
service: scene.turn_on
entity_id: scene.evenings
- alias: 'Movie Time on'
trigger:
platform: state
entity_id: media_player.roku_5s56ae167930
to: playing
for:
seconds: "3"
condition:
condition: and
conditions:
- condition: state
entity_id: group.all_devices
state: 'home'
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: time
after: "20:00:00"
- condition: state
entity_id: light.bubble_lamp
state: "on"
action:
service: scene.turn_on
entity_id: scene.movie_time
- alias: 'Movie Time off'
trigger:
platform: state
entity_id: media_player.roku_5s56ae167930
from: playing
to: home
for:
seconds: "20"
condition:
condition: and
conditions:
- condition: state
entity_id: group.all_devices
state: 'home'
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: light.bubble_lamp
state: "on"
action:
service: scene.turn_on
entity_id: scene.evenings_quick
###########################################################
#
# Presence based automations
#
###########################################################
- alias: 'Welcome Home evenings'
trigger:
platform: state
entity_id: group.all_devices
from: 'not_home'
to: 'home'
for:
minutes: 1
condition:
condition: sun
after: sunset
after_offset: "-00:45:00"
action:
service: scene.turn_on
entity_id: scene.evenings_quick
###########################################################
#
# Presence based notifications
#
###########################################################
- alias: 'Motoz home zone leave test'
trigger:
platform: state
entity_id: device_tracker.motoz
from: 'home'
to: 'not_home'
for:
minutes: 1
action:
service: script.zanzito_send_notification
data:
dest_id: '6272b1f8e7150a5'
message: 'See you later'
- alias: 'Motoz home zone arrive test'
trigger:
platform: state
entity_id: device_tracker.motoz
from: 'not_home'
to: 'home'
for:
minutes: 1
action:
service: script.zanzito_send_notification
data:
dest_id: '6272b1f8e7150a5'
message: 'Welcome home'
- alias: 'Motog home zone leave test'
trigger:
platform: state
entity_id: device_tracker.motog
from: 'home'
to: 'not_home'
for:
minutes: 1
action:
service: script.zanzito_send_notification
data:
dest_id: '976607fbc133630'
message: 'See you later, have a nice day'
- alias: 'Motog home zone arrive test'
trigger:
platform: state
entity_id: device_tracker.motog
from: 'not_home'
to: 'home'
for:
minutes: 1
action:
service: script.zanzito_send_notification
data:
dest_id: '976607fbc133630'
message: 'Welcome home'
- alias: 'Motog left work'
trigger:
platform: zone
entity_id: device_tracker.motog
zone: zone.jewels
event: leave
condition:
condition: time
after: '17:30:00'
weekday:
- wed
- fri
- sat
- sun
action:
service: script.zanzito_send_notification
data:
dest_id: '6272b1f8e7150a5'
message: 'Cutie is leaving work'
- alias: 'Motoz left work'
trigger:
platform: zone
entity_id: device_tracker.motoz
zone: zone.work
event: leave
action:
service: script.zanzito_send_notification
data:
dest_id: '976607fbc133630'
message: 'Mr is leaving work'