-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.yaml
More file actions
232 lines (232 loc) · 6.28 KB
/
scripts.yaml
File metadata and controls
232 lines (232 loc) · 6.28 KB
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
notify_ifttt_ha_started:
alias: Notify IFTTT HA started
sequence:
- data:
event: HA started
value1: RPI Home HA
value2: Test
service: ifttt.trigger
google_say_indoor_temperature:
alias: Google say indoor temperature
sequence:
- service: tts.google_say
entity_id: media_player.living_google_home
data_template:
message: "{% if (states(\"sensor.master_bedroom_temperature\")|float - states(\"sensor.living_room_temperature\")|float
) | abs <= 2.5 -%}\n The indoor temperature is {{((states(\"sensor.living_room_temperature\")|float
+ states(\"sensor.master_bedroom_temperature\")|float) / 2 ) | round(1) }}\n{%-
else -%}\n The temperature in the living room is {{states(\"sensor.living_room_temperature\")
| float | round(1)}}.\n The temperature in the master bedroom is {{states(\"sensor.master_bedroom_temperature\")
| float | round(1)}}.\n{%- endif %}\n"
cache: false
main_media_hot:
alias: Main Media HOT
sequence:
- parallel:
- sequence:
- target:
entity_id: media_player.marantz_nr1608
action: media_player.turn_on
data: {}
- target:
entity_id: media_player.marantz_nr1608
data:
source: HOT
action: media_player.select_source
- target:
entity_id:
- media_player.85c855_television
data:
source: Cable
action: media_player.select_source
- action: input_select.select_option
metadata: {}
target:
entity_id: input_select.main_media
data:
option: HOT
main_media_chromecast:
alias: Main Media Chromecast
sequence:
- target:
entity_id: media_player.marantz_nr1608
action: media_player.turn_on
- target:
entity_id: media_player.living_room_chromecast
action: media_player.turn_on
- target:
entity_id: media_player.marantz_nr1608
data:
source: TV Audio
action: media_player.select_source
- target:
entity_id: media_player.lg_tv
data:
source: Chromecast
action: media_player.select_source
- action: input_select.select_option
metadata: {}
target:
entity_id: input_select.main_media
data:
option: Chromecast
main_media_playstation:
alias: Main Media Playstation
sequence:
- entity_id:
- media_player.marantz_nr1608
action: media_player.turn_on
- data:
source: PlayStation
action: media_player.select_source
target:
entity_id: media_player.marantz_nr1608
- data:
entity_id: media_player.lg_tv
source: Receiver
action: media_player.select_source
- action: input_select.select_option
metadata: {}
target:
entity_id: input_select.main_media
data:
option: Playstation
main_media_plex:
alias: Main Media Plex
sequence:
- parallel:
- action: media_player.turn_on
metadata: {}
target:
entity_id: media_player.marantz_nr1608
data: {}
- action: media_player.turn_on
target:
entity_id: media_player.smart_tv_pro
- parallel:
- action: media_player.select_source
metadata: {}
target:
entity_id: media_player.marantz_nr1608
data:
source: TV Audio
- action: remote.turn_on
target:
entity_id: remote.tcl_tv
data:
activity: com.plexapp.android
- action: input_select.select_option
metadata: {}
target:
entity_id: input_select.main_media
data:
option: Plex
main_media_jellyfin:
alias: Main Media Jellyfin
sequence:
- parallel:
- action: media_player.turn_on
metadata: {}
target:
entity_id: media_player.marantz_nr1608
data: {}
- action: media_player.turn_on
target:
entity_id: media_player.tcl_tv
- parallel:
- action: media_player.select_source
metadata: {}
target:
entity_id: media_player.marantz_nr1608
data:
source: TV Audio
- action: remote.turn_on
target:
entity_id: remote.tcl_tv
data:
activity: org.jellyfin.androidtv
- action: input_select.select_option
metadata: {}
target:
entity_id: input_select.main_media
data:
option: Jellyfin
main_media_off:
alias: Main Media Off
sequence:
- entity_id:
- media_player.living_room_chromecast
action: media_player.turn_off
- action: media_player.turn_off
metadata: {}
target:
entity_id: media_player.marantz_nr1608
data: {}
- action: input_select.select_option
metadata: {}
target:
entity_id: input_select.main_media
data:
option: 'Off'
remount_share_restart_plex:
alias: Mount Share and restart Plex
description: Remount /mnt/Share on main host and restart Plex docker container
icon: mdi:plex
sequence:
- service: shell_command.mount_share
- service: switch.turn_off
target:
entity_id: switch.docker_plex
- wait_for_trigger:
- platform: state
entity_id: switch.docker_plex
to: 'off'
- service: switch.turn_on
target:
entity_id: switch.docker_plex
- service: notify.notify
data:
message: Share mounted and Plex restarted
mode: restart
do_nothing:
alias: Do Nothing
sequence: []
adguard_disable_protection_for_1_hour:
alias: 'AdGuard: Disable Protection for 1 Hour'
description: Turns off AdGuard protection and automatically turns it back on after
60 minutes.
icon: mdi:shield-off-outline
mode: single
sequence:
- action: switch.turn_off
metadata: {}
target:
entity_id: switch.adguard_home_filtering
data: {}
- delay:
hours: 1
minutes: 0
seconds: 0
- action: switch.turn_on
metadata: {}
target:
entity_id: switch.adguard_home_filtering
data: {}
take_camera_snapshot_and_notify:
sequence:
- data:
filename: /config/www/imou_life/snapshot_{{ now().strftime('%Y-%m-%d_%H-%M-%S')
}}.jpg
response_variable: snapshot_info
action: camera.snapshot
target:
entity_id: camera.garage_camera_hd
- data:
title: Snapshot Saved!
notification_id: snapshot_{{ now().isoformat() }}
message: Snapshot saved. [Click here to view]({{ snapshot_info.filepath | replace('/config/www',
'/local') }})
action: persistent_notification.create
alias: Take camera snapshot and notify
description: ''
icon: mdi:camera-plus-outline