-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.yaml
270 lines (264 loc) · 9.83 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
restart_hass:
alias: Restart Home Assistant
sequence:
- service: shell_command.restart_hass
mode: single
refresh_van_status:
alias: Refresh Van Status
sequence:
- service: fordpass.refresh_status
mode: single
cast_dashboard:
alias: Cast Dashboard
sequence:
- service: media_player.play_media
target:
entity_id: media_player.master_bedroom_display
data:
media_content_id: admin-page
media_content_type: lovelace
metadata:
title: Admin
thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png
media_class: app
children_media_class:
navigateIds:
- {}
- media_content_type: lovelace
media_content_id: ''
mode: single
icon: mdi:tablet-dashboard
s:
alias: Stop Casting
sequence:
- service: media_player.media_stop
data: {}
target:
device_id: 4dcf3f175d182b349e216b0f93343e74
mode: single
icon: mdi:tablet-dashboard
home_diffuser:
alias: Home Diffuser
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.diffuser
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- service: switch.turn_off
data: {}
target:
entity_id: switch.diffuser
mode: single
master_bedroom_sleep_sounds:
alias: Master Bedroom Sleep Sounds
sequence:
- service: input_text.set_value
target:
entity_id: input_text.master_bedroom_random_sleep_sound
data:
value: '{{ state_attr(''input_select.ambient_sound'', ''options'') | random
}}'
- service: media_player.play_media
data:
media_content_type: audio/mp4
target:
entity_id: media_player.master_bedroom_display
data_template:
media_content_id: '{% if is_state("input_text.master_bedroom_random_sleep_sound",
"Babbling brook sounds") %} https://www.gstatic.com/voice_delight/sounds/long/brook.mp3
{% elif is_state("input_text.master_bedroom_random_sleep_sound", "Fireplace
sounds") %} https://www.gstatic.com/voice_delight/sounds/long/fireplace.mp3
{% elif is_state("input_text.master_bedroom_random_sleep_sound", "Forest sounds")
%} https://www.gstatic.com/voice_delight/sounds/long/forest.mp3 {% elif is_state("input_text.master_bedroom_random_sleep_sound",
"Country night sounds") %} https://www.gstatic.com/voice_delight/sounds/long/country_night.mp3
{% elif is_state("input_text.master_bedroom_random_sleep_sound", "Ocean sounds")
%} https://www.gstatic.com/voice_delight/sounds/long/ocean.mp3 {% elif is_state("input_text.master_bedroom_random_sleep_sound",
"Rain sounds") %} https://www.gstatic.com/voice_delight/sounds/long/rain.mp3
{% elif is_state("input_text.master_bedroom_random_sleep_sound", "River sounds")
%} https://www.gstatic.com/voice_delight/sounds/long/river.mp3 {% elif is_state("input_text.master_bedroom_random_sleep_sound",
"Thunderstorm sounds") %} https://www.gstatic.com/voice_delight/sounds/long/thunder.mp3
{% endif %}
'
mode: single
new_script:
alias: Beep Fix Master Bedroom Display
sequence:
- choose:
- conditions:
- condition: state
entity_id: media_player.master_bedroom_display
state: 'off'
sequence:
- service: media_player.volume_mute
data:
entity_id: media_player.master_bedroom_display
is_volume_muted: true
- service: media_player.turn_on
data: {}
target:
entity_id: media_player.master_bedroom_display
- wait_template: '''{{ is_state(''media_player.master_bedroom_display'', ''idle'')
}}'''
continue_on_timeout: true
- conditions:
- condition: state
entity_id: media_player.master_bedroom_display
state: idle
sequence:
- service: media_player.volume_mute
data:
entity_id: media_player.master_bedroom_display
is_volume_muted: false
mode: single
new_script_2:
alias: Stop Media Playback
sequence:
- service: media_player.media_stop
data_template:
entity_id: '{% if is_state("input_select.google_home", "Master Bedroom") %}
media_player.master_bedroom_display {% elif is_state("input_select.google_home",
"Bedroom 2") %} media_player.bedroom_2_display {% elif is_state("input_select.google_home",
"Kitchen") %} media_player.kitchen_display {% elif is_state("input_select.google_home",
"Everywhere") %} media_player.whole_home_group {% endif %}
'
mode: single
ambientsounds:
alias: Play Ambient Sounds
sequence:
- service: media_player.volume_set
data_template:
entity_id: '{% if is_state("input_select.google_home", "Master Bedroom") %}
media_player.master_bedroom_display {% elif is_state("input_select.google_home",
"Bedroom 2") %} media_player.bedroom_2_display {% elif is_state("input_select.google_home",
"Kitchen") %} media_player.kitchen_display {% elif is_state("input_select.google_home",
"Den") %} media_player.den_speaker {% elif is_state("input_select.google_home",
"Everywhere") %} media_player.whole_home_group {% endif %}
'
volume_level: '{{ states.input_number.volume_ambientsounds.state }}'
- service: media_player.play_media
data_template:
entity_id: '{% if is_state("input_select.google_home", "Master Bedroom") %}
media_player.master_bedroom_display {% elif is_state("input_select.google_home",
"Bedroom 2") %} media_player.bedroom_2_display {% elif is_state("input_select.google_home",
"Kitchen") %} media_player.kitchen_display {% elif is_state("input_select.google_home",
"Den") %} media_player.den_speaker {% elif is_state("input_select.google_home",
"Everywhere") %} media_player.whole_home_group {% endif %}
'
media_content_id: '{% if is_state("input_select.ambient_sound", "Babbling brook
sounds") %} https://www.gstatic.com/voice_delight/sounds/long/brook.mp3 {%
elif is_state("input_select.ambient_sound", "Fireplace sounds") %} https://www.gstatic.com/voice_delight/sounds/long/fireplace.mp3
{% elif is_state("input_select.ambient_sound", "Forest sounds") %} https://www.gstatic.com/voice_delight/sounds/long/forest.mp3
{% elif is_state("input_select.ambient_sound", "Country night sounds") %}
https://www.gstatic.com/voice_delight/sounds/long/country_night.mp3 {% elif
is_state("input_select.ambient_sound", "Ocean sounds") %} https://www.gstatic.com/voice_delight/sounds/long/ocean.mp3
{% elif is_state("input_select.ambient_sound", "Rain sounds") %} https://www.gstatic.com/voice_delight/sounds/long/rain.mp3
{% elif is_state("input_select.ambient_sound", "River sounds") %} https://www.gstatic.com/voice_delight/sounds/long/river.mp3
{% elif is_state("input_select.ambient_sound", "Thunderstorm sounds") %} https://www.gstatic.com/voice_delight/sounds/long/thunder.mp3
{% endif %}
'
media_content_type: audio/mp4
mode: single
master_bedroom_wakeup_lighting_2:
alias: Master Bedroom Wakeup LIghting
sequence:
- repeat:
while:
- condition: template
value_template: '{{ states("input_number.master_bedroom_wakeup") | int < 256
}}'
sequence:
- service: script.master_bedroom_lights_w_level_3
data:
level: '{{ states("input_number.master_bedroom_wakeup") }}'
- service: input_number.increment
entity_id: input_number.master_bedroom_wakeup
- delay: 00:01:00
- service: input_number.set_value
data:
entity_id: input_number.master_bedroom_wakeup
value: 17
mode: single
turn_off_all_lights_den_and_master_bedroom_hubs:
alias: Turn Off all lights
sequence:
- data: {}
service: light.turn_off
target:
area_id:
- e89e05ac0a8e11eba805f58e4fcf492a
- a05264d1dfad49e6a1f00cd6eded32cc
- bedroom_2
- closet
- bb4026037d864c1ab67fa44dd112a6e3
- 29d411c511274ebd9ac1f36d90108150
- f8a16ccd90684544a1f7301cd7af1c6d
- a22dea8388ec4724bbce0bc041eeed97
- 71773526eaa347df824e4c8d1c34a7f7
- 083f60487a1343b281433b5d3436d03e
- ffa04856c397453ca40811829c99073d
- stairway
- e6cd5b4804aa4f359d1a02440e922922
- d5ff2ed38eb842d187eb8f2ade3bb3bf
entity_id:
- light.basement_lights
device_id:
- 132fb1edfd2401ed3b17e046dafa9370
- a00975fd2a650f232b3e4dc02362bb64
- 013da8e48ec2baaa62cdee76d392ddf4
- b7b24037c495a678696b658c96369649
- b64cafd5f8a7a742671e9c53a45956bb
- 1d5dbd6c9535fcc2d6d1c478adc515b8
- 7b50550955e0e09888514d81daa5abdc
- b7eb5b43d5373f6fc30d2ee5082d50a2
- ee338f515369cd0fa1bba681983fa642
- 5720497025e1c37ea024362f2de6afd2
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.phone_light
- switch.clock_light
- switch.computer_monitor
- switch.den_left_monitor
- switch.den_right_monitor
- switch.touchscreen_monitor
- den hub
device_id:
- ee9ef71468ecfd9bc08b3316889ed7a4
- b8a1ccd4af6947ec98a5e8175047f6e7
mode: single
master_bedroom_lights_w_level_3:
alias: Master Bedroom Wakeup lights with level
sequence:
- service: light.turn_on
entity_id: light.master_bedroom_lights
data:
brightness: '{{ level | int }}
'
color_temp: 369
mode: single
keymaster_front_deadbolt_manual_notify:
alias: keymaster_front_deadbolt_manual_notify
sequence:
- service: notify.mobile_app_tristyn_s_note_10
data:
title: '{{ title }}'
message: '{{ message }}'
mode: parallel
max: 10
doorbell_popup_on_tv:
alias: Doorbell Popup on TV
sequence:
- service: rest_command.pipup_url_on_sony_tv
data:
title: Doorbell
message: Person Detected at Front Door
width: 640
height: 480
url: http://192.168.1.12:5001/api/doorbell
mode: single