-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
314 lines (267 loc) · 9.06 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
turn_on_bedroom_fan:
alias: Turn on bedroom ceiling fan
sequence:
# - service: switch.turn_on
# data:
# entity_id:
# - switch.office_lamp
- service: switch.turn_on
data:
entity_id:
- switch.master_bedroom_ceiling_fan
- delay:
seconds: 2
- service: switch.turn_on
data_template:
entity_id: >-
{% if states('sensor.master_bedroom_temperature')|int > 72 %}
switch.bedroom_fan_high
{% elif (states('sensor.master_bedroom_temperature')|int <= 72) and (states('sensor.master_bedroom_temperature')|int >= 68) %}
switch.bedroom_fan_med
{% else %}
switch.bedroom_fan_low
{% endif %}
# Close the bedroom curtains and shades. Send close shades, wait 5 seconds and close curtains and shades again
# repeating command should improve reliability of RF transmit to shades
close_bedroom_window_coverings:
alias: Close Master Bedroom Window
sequence:
- service: cover.close_cover
data:
entity_id:
- cover.bedroom_shades
- delay:
seconds: 5
- service: cover.close_cover
data:
entity_id:
- cover.bedroom_shades
- cover.bedroom_curtains
# Open the bedroom curtains and shades. Send open shades and curtains, wait 2 seconds and open shades again
# repeating command should improve reliability of RF transmit to shades
open_bedroom_window_coverings:
alias: Open Master Bedroom Window
sequence:
- service: cover.open_cover
data:
entity_id:
- cover.bedroom_shades
- cover.bedroom_curtains
- delay:
seconds: 2
- service: cover.open_cover
data:
entity_id:
- cover.bedroom_shades
###############################################################################
## Script that is called to turn off fan light based on light in room
###############################################################################
turn_off_fan_light:
alias: Turn off Fan Light
sequence:
- condition: numeric_state
entity_id: sensor.master_bedroom_luminance
above: 40
- service: switch.turn_on
data:
entity_id: switch.bedroom_fan_light
###############################################################################
## Script that is called by automation for prepping bedroom for night
###############################################################################
bedroom_nighttime:
alias: Prep Bedroom for Night
sequence:
- service: automation.turn_off
data:
entity_id: automation.adjust_flux_color
# Turn up volume so you can hear it
- service: media_player.volume_set
data_template:
entity_id:
- media_player.gh_home_hub
volume_level: 0.7
- service: tts.google_say
entity_id:
- media_player.gh_home_hub
data_template:
message: >
{{ [
"Bedtime ya cock suckers",
"Nighty Night you filthy whore",
"Sleep well and go to Hell",
"I warmed up the bed for you... with your mother",
"Keep your dreams dry tonight son",
"Goodnight and if you dream of me, rembember I like it rough",
"Goodnight, if you're lucky you can have me for breakfast",
"Let's go to bed, I'll show you mine if you show me yours",
"Have I shown you my fish tank?",
"Let's go up stairs so I can sit on your face",
"Your clothes match my carpet perfectly, go upstairs and find out",
"That top is becoming on you... if I was on you, I'd be cumming too",
"Time to earn your rent money... get on your knees",
"Real men don't wear pink, they eat it ... cunninglingus",
"What's the difference between being hungry and being horny?... Where you put the cucumber",
"Come upstairs and fuck me like my uncle used to... hard. I promise I won't tell",
"Spank me, it's the only way I learn",
"Do as Momma says, Hold me tight and Fuck me right"
] | random }}
- delay:
seconds: 4
# Turn down volume of Google Homes
- service: media_player.volume_set
data_template:
entity_id:
- media_player.kitchen_speaker
- media_player.master_bedroom_speaker
volume_level: 0.1
- service: switch.turn_off
data:
entity_id:
- switch.fluxer
- switch.living_room_lamp
- switch.fireplace
- switch.porch_switch
- switch.exterior_garage_light
- switch.garage_light
- switch.garage_door_shelf_light
- switch.garage_shelf_light
- switch.outside_christmas_lights
- switch.laundry_room_light
- service: fan.turn_off
data:
entity_id:
- fan.living_room_fan
- service: light.turn_off
data:
entity_id:
- light.kitchen_cabinets
- light.kitchen_switch
- service: script.turn_on_bedroom_fan
- service: switch.turn_on
data:
entity_id:
- switch.air_purifier
- switch.master_bedroom_ceiling_fan
# Turn headboard LEDS to Purple 50%
- service: light.turn_on
data:
entity_id: light.headboard
brightness_pct: 50
rgb_color: [120,0,200]
# - delay:
# seconds: 1
# Turn underbed LEDs to Pink 40%
- service: light.turn_on
data:
entity_id: light.underbed_leds
brightness_pct: 20
rgb_color: [233,66,244]
# - delay:
# seconds: 1
# Turn Cornice to Green 20%
- service: light.turn_on
data:
entity_id: light.cornice
brightness_pct: 20
rgb_color: [10,255,10]
- service: light.turn_off
data:
entity_id: light.candles
# - delay:
# seconds: 1
# Turn Bedroom Lamp to Red 70% if heated blanket is on, else Blue 70%
- service: script.bedroom_lamp
- delay:
seconds: 1
# Repeat previous command%
- service: script.bedroom_lamp
# Wait for 30 sec to see if the fan light is on, if so, then turn it off
- delay:
seconds: 30
- service: script.turn_off_fan_light
###############################################################################
## Script that is called by automation for in morning
###############################################################################
bedroom_morning:
alias: Bedroom Morning
sequence:
- service: automation.turn_on
data:
entity_id: automation.adjust_flux_color
# Turn up volume on google homes so you can hear it
- service: media_player.volume_set
data_template:
entity_id:
- media_player.kitchen_speaker
- media_player.master_bedroom_speaker
volume_level: 0.4
# Turn fluxer back on, and bedroom fan off
- service: switch.turn_on
data:
entity_id:
- switch.fluxer
- switch.bedroom_fan_off
- switch.christmas_tree
- switch.garland
# Turn on the lights in the kitchen
- service: light.turn_on
data:
entity_id:
- light.kitchen_cabinets
- light.kitchen_switch
brightness_pct: 100
# Turn off air_purifier
- service: switch.turn_off
data:
entity_id:
- switch.air_purifier
- delay:
seconds: 15
- service: light.turn_on
data:
entity_id:
- light.headboard
- light.underbed_leds
brightness_pct: 100
color_temp: 500
- delay:
seconds: 10
- service: light.turn_on
data:
entity_id: light.bedroom_lamp
brightness_pct: 100
rgb_color: [255, 255, 255]
- delay:
seconds: 5
- service: light.turn_on
data:
entity_id: light.cornice
brightness_pct: 100
color_temp: 153
- delay:
seconds: 10
# Turn on Fan Light
- service: switch.turn_on
data:
entity_id: switch.bedroom_fan_light
# Open Curtains if the Sun is up
- condition: template
value_template: "{{ state_attr('sun.sun','elevation') >= 5 }}"
- service: cover.open_cover
data:
entity_id: cover.bedroom_window_coverings
###############################################################################
## Script that is called by bedroom night script for adjusting bedroom lamp
## color based on if electric blanket is on or not
###############################################################################
bedroom_lamp:
alias: Bedroom Lamp - Heated Blanket
sequence:
- service: scene.turn_on
data_template:
entity_id: >
{%- if states('switch.heated_blanket') == 'on' -%}
scene.heated_blanket_on
{%- else %}
scene.heated_blanket_off
{% endif %}