-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.yaml
235 lines (215 loc) · 6.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
goodnight:
alias: goodnight
sequence:
#to be done to the cadence of goodnight moon
#goodnight family room lights and media
- data:
entity_id: light.family_room
entity_id: light.joe_family_room_lamp, light.fireplace_lights_220, light.jen_family_room_lamp
service: light.turn_off
- service: switch.turn_off
data:
entity_id: switch.family_room_fan_213
- data:
activity: '-1'
entity_id: remote.family_room_2
service: remote.turn_on
#goodnight office
- data:
entity_id: light.office
service: light.turn_off
#goodnight basement lights and media
- data:
entity_id: group.basement_lights
service: light.turn_off
- data:
entity_id: remote.basement
activity: -1
service: remote.turn_on
#goodnight outside
- data:
entity_id: lock.front_door_lock_4
service: lock.lock
- data:
entity_id: group.outside_lights
service: light.turn_off
- data:
entity_id: switch.garage_door_99
service: switch.turn_off
#goodnight kitchen
- data:
entity_id: media_player.kitchen_speaker
service: media_player.media_stop
- service: light.turn_off
entity_id: group.kitchen_lights
#goodnight dining room
- service: switch.turn_off
data:
entity_id:
- switch.bookshelf
- switch.chinacabinet
#goodnight living room
- service: light.turn_off
data:
entity_id:
- light.livingroomlamp1
- light.livingroomlamp2
#good night car
- data:
entity_id: media_player.kitchen_speaker
message: "Don't forget to lock up Joe's car."
service: tts.google_say
# good night bedroom blanket and fan
# this means we turn it on....
- data:
entity_id: switch.bedfan #switch.wemo_switch_bravo
service: switch.turn_on
#reminder...goodnight car
- delay: 00:00:15
- service: tts.google_say
data:
entity_id: media_player.office_speaker
message: "did you forget to lock up the car?"
lock_up_house:
alias: Lock up house
sequence:
- service: lock.lock
entity_id: lock.front_door_lock_4
- service: switch.turn_off
entity_id: switch.garage_door_99
mbr_awake_in_bed:
alias: in bed but awake
sequence:
- service: light.turn_on
entity_id: light.mbr_lights_109
- service: switch.turn_on
entity_id: switch.mbr_fan_108
- service: light.turn_off
entity_id: group.mbr_both_lamps
mbr_nightlight_mode:
alias: pre-sleep mode
sequence:
- service: light.turn_on
entity_id: light.jens_lamp_118, light.joes_lamp_119
data:
brightness: 255
- service: light.turn_off
entity_id: light.mbr_lights_109
- service: switch.turn_on
entity_id: switch.mbr_fan_108
mbr_sleep_mode:
alias: sleep mode
sequence:
- service: light.turn_off
entity_id: light.jens_lamp_118, light.joes_lamp_119, light.mbr_lights_109
- service: switch.turn_on
entity_id: switch.mbr_fan_108
office_timed_lights:
alias: turn on office lights and set timer
sequence:
- service: script.turn_off
entity_id: script.office_timer_off
- service: light.turn_on
entity_id: light.office
- service: script.turn_on
entity_id: script.office_timer_off
office_timer_off:
alias: wait 5 mins and turn off lights
sequence:
- delay: 00:05:00
- service: light.turn_off
entity_id: light.office
outside_on_delay_off:
alias: outside lights on for ten mins then off
sequence:
- service: homeassistant.turn_on
entity_id: group.outside_lights
- delay: 00:10:00
- service: homeassistant.turn_off
entity_id: group.outside_lights
refresh_owntracks:
alias: Refresh Owntracks
sequence:
- service: mqtt.publish
data:
topic: owntracks/Joe/joesiphone6s/cmd
payload_template: '{"_type":"cmd","action":"reportLocation"}'
- service: mqtt.publish
data:
topic: owntracks/Abby/abbysiphone/cmd
payload_template: '{"_type":"cmd","action":"reportLocation"}'
reset_ring_motion:
alias: delay 30s then reset boolean
sequence:
- delay:
seconds: 30
- service: homeassistant.turn_off
data:
entity_id: input_boolean.ring_motion
timed_lamp:
alias: turn on timed lamp and set timer
sequence:
- data:
entity_id: script.timer_off
service: script.turn_off
- data_template:
entity_id: light.upstairs_hall_lamp_130
brightness: '{% set current_hour = now().strftime("%H") | int %} {%- if current_hour
<= 6 %} 64 {% elif current_hour < 20 %} 255 {% else %} 128 {% endif %}'
service: light.turn_on
- data: {}
service: script.timer_off
timer_off:
alias: turn off lamp after 5 minutes
sequence:
- delay: 00:05:00
- service: light.turn_off
data:
entity_id: light.upstairs_hall_lamp_130
turn_off_tv:
alias: Turn off Family room TV
sequence:
service: remote.turn_on
data:
entity_id: remote.family_room_2
activity: -1
'1520625872816':
alias: Downstairs hallway on 10 mins
sequence:
- alias: ''
data:
brightness: '100'
color_name: red
entity_id: light.living_room_lamp
service: light.turn_on
- delay: 00:10:00
- data:
entity_id: light.living_room_lamp
service: light.turn_off
'1520628726897':
alias: Dinnertime
sequence:
- data_template:
uri: >
{{ [ 'spotify:user:lukebryan:playlist:1Nv7H5IhZc25M9qTrv48Kb',
'spotify:user:thodge16:playlist:6SSN5UlqtN3d02xp8fE0pk',
'spotify:playlist:37i9dQZF1DX6CtTNV4Oy4M',
'spotify:playlist:37i9dQZF1DXctzlWgrxNLn',
'spotify:playlist:37i9dQZF1DX112FFcHmwq7'] | random }}
device_name: "Downstairs"
service: spotcast.start
- data: {}
service: script.turn_off_tv
# - data:
# entity_id: media_player.kitchen_speaker, media_player.kitchen_display
# volume_level: '0.22'
# service: media_player.volume_set
everyone_downstairs:
alias: everyone downstaris
sequence:
- service: light.turn_off
entity_id: light.mbr_lights_109, light.jens_lamp_118, light.joes_lamp_119
- service: switch.turn_off
entity_id: switch.mbr_fan_108, switch.bedfan, switch.desk_fan, switch.wemo_switch_bravo
- service: media_player.turn_off
entity_id: media_player.bedroom