-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
executable file
·276 lines (276 loc) · 7.33 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
# garage_remote:
# alias: Garage Remote
# sequence:
# - service: switch.toggle
# data:
# entity_id: switch.garage_door_remote_switch
# - delay:
# seconds: 1
# - service: switch.toggle
# data:
# entity_id: switch.garage_door_remote_switch
leave:
alias: Leave home
sequence:
- service: homeassistant.turn_off
data:
entity_id: group.lights_interior
- service: climate.set_away_mode
data:
entity_id: climate.home
away_mode: true
- service: lock.lock
data:
entity_id: group.locks
- service: cover.close_cover
data:
entity_id: cover.garage_door_opener
arrive:
alias: Arrive home
sequence:
- service: climate.set_away_mode
data:
entity_id: climate.home
away_mode: false
- service: lock.unlock
data:
entity_id: lock.garage_door_lock_locked
reboot_bedroom_pi:
alias: Reboot Pi
sequence:
- service: switch.turn_off
data:
entity_id: switch.bedroom_pi_switch
- delay:
seconds: 3
- service: switch.turn_on
data:
entity_id: switch.bedroom_pi_switch
reboot_kitchen_pi:
alias: Reboot Pi
sequence:
- service: switch.turn_off
data:
entity_id: switch.kitchen_dual_switch_switch_3
- delay:
seconds: 3
- service: switch.turn_on
data:
entity_id: switch.kitchen_dual_switch_switch_3
reboot_office_pi:
alias: Reboot Pi
sequence:
- service: switch.turn_off
data:
entity_id: switch.office_dual_switch_switch_2
- delay:
seconds: 3
- service: switch.turn_on
data:
entity_id: switch.office_dual_switch_switch_2
familyroom_tv_on:
alias: Familyroom TV On
sequence:
- service: remote.turn_on
data:
entity_id: remote.familyroom
activity: 31877748
- delay:
seconds: 10
- service: media_player.play_media
data:
entity_id: media_player.familyroom_tv
media_content_type: CHANNEL
media_content_id: 132
bedroom_tv_on:
alias: Bedroom TV On
sequence:
- service: remote.turn_on
data:
entity_id: remote.bedroom
- service: media_player.play_media
data_template:
entity_id: media_player.bedroom_tv
media_content_type: CHANNEL
media_content_id: '{% if (now().strftime("%H") | float) >= (5) and (now().strftime("%H") | float) <= (9) %}105{% elif (now().strftime("%H") | float) >= (10) and (now().strftime("%H") | float) <= (20) %}80{% else %}71{% endif %}'
kitchen_tv_on:
alias: Kitchen Tv On
sequence:
- service: switch.turn_on
data:
entity_id: switch.kitchen_dual_switch_switch_2
- service: media_player.play_media
data_template:
entity_id: media_player.kitchen_tv
media_content_type: CHANNEL
media_content_id: '{% if (now().strftime("%H") | float) >= (5) and (now().strftime("%H") | float) <= (9) %}105{% elif (now().strftime("%H") | float) >= (10) and (now().strftime("%H") | float) <= (20) %}80{% else %}71{% endif %}'
office_tv_on:
alias: Office Tv On
sequence:
- service: switch.turn_on
data:
entity_id: switch.office_dual_switch_switch_4
- service: media_player.play_media
data_template:
entity_id: media_player.office_tv
media_content_type: CHANNEL
media_content_id: '{% if (now().strftime("%H") | float) >= (5) and (now().strftime("%H") | float) <= (9) %}105{% elif (now().strftime("%H") | float) >= (10) and (now().strftime("%H") | float) <= (20) %}80{% else %}71{% endif %}'
familyroom_tv_off:
alias: Turn Off
sequence:
- service: media_player.media_stop
data:
entity_id: media_player.familyroom_tv
- service: remote.turn_off
data:
entity_id: remote.familyroom
bedroom_tv_off:
alias: Turn Off
sequence:
- service: media_player.media_stop
data:
entity_id: media_player.bedroom_tv
- service: remote.turn_off
data:
entity_id: remote.bedroom
kitchen_tv_off:
alias: Turn Off
sequence:
- service: media_player.media_stop
data:
entity_id: media_player.kitchen_tv
- service: switch.turn_off
data:
entity_id: switch.kitchen_dual_switch_switch_2
office_tv_off:
alias: Turn Off
sequence:
- service: switch.turn_off
data:
entity_id: switch.office_dual_switch_switch_4
- service: media_player.media_stop
data:
entity_id: media_player.office_tv
familyroom_harmony:
alias: Start activity from input select
sequence:
- service: remote.turn_on
data_template:
entity_id: remote.familyroom
activity: "{% if is_state(\"input_select.familyroom_harmony\", \"PowerOff\"\
) %}\n -1\n{% elif is_state(\"input_select.familyroom_harmony\", \"Kodi\"\
) %}\n 19534382\n{% elif is_state(\"input_select.familyroom_harmony\",\
\ \"WatchaMovie\") %}\n 17923212\n{% endif %} \n"
office_kodi_stop:
alias: Stop
sequence:
- service: media_player.media_stop
data:
entity_id: media_player.office_tv
kitchen_kodi_stop:
alias: Stop
sequence:
- service: media_player.media_stop
data:
entity_id: media_player.kitchen_tv
bedroom_kodi_stop:
alias: Stop
sequence:
- service: media_player.media_stop
data:
entity_id: media_player.bedroom_tv
familyroom_kodi_stop:
alias: Stop
sequence:
- service: media_player.media_stop
data:
entity_id: media_player.familyroom_tv
get_pvr_channels_office:
alias: Office TV Channels
sequence:
- service: media_player.kodi_call_method
data:
entity_id: media_player.office_tv
method: PVR.GetChannels
channelgroupid: 1
get_pvr_channels_kitchen:
alias: Kitchen TV Channels
sequence:
- service: media_player.kodi_call_method
data:
entity_id: media_player.kitchen_tv
method: PVR.GetChannels
channelgroupid: 1
get_pvr_channels_bedroom:
alias: Bedroom TV Channels
sequence:
- service: media_player.kodi_call_method
data:
entity_id: media_player.bedroom_tv
method: PVR.GetChannels
channelgroupid: 1
get_pvr_channels_familyroom:
alias: Famiylroom TV Channels
sequence:
- service: media_player.kodi_call_method
data:
entity_id: media_player.familyroom_tv
method: PVR.GetChannels
channelgroupid: 1
sleep_a:
alias: Sleep Part 1
sequence:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.awake
- service: remote.turn_on
data:
entity_id: remote.bedroom
- service: media_player.play_media
data:
entity_id: media_player.bedroom_tv
media_content_id: 68
media_content_type: CHANNEL
- service: light.turn_off
data:
entity_id: group.lights_interior
- service: light.turn_on
data:
brightness_pct: 45
color_name: red
entity_id: light.bedside
sleep_b:
alias: Sleep Part 2
sequence:
- service: light.turn_off
data:
entity_id: light.bedside
- delay:
minutes: 45
- service: media_player.media_stop
data:
entity_id: media_player.bedroom_tv
- service: remote.turn_off
data:
entity_id: remote.bedroom
wake:
alias: Wakeup
sequence:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.sleep
- service: light.turn_on
data:
brightness_pct: 40
color_name: white
entity_id: light.bedside
- service: light.turn_on
data:
brightness_pct: 50
entity_id:
- light.stairs
- light.foyer
- service: tts.google_say
entity_id: media_player.bedroom_speaker
data:
message: It's time to wakeup