-
Notifications
You must be signed in to change notification settings - Fork 1
/
automations.yaml
313 lines (313 loc) · 9.3 KB
/
automations.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
- id: '1582081784412'
alias: Turn on the Hotwater when 7:00am in everyday
description: 湯沸かしを出勤日の7:00に自動on
trigger:
- at: 07:00
platform: time
condition:
- condition: or
conditions:
- condition: state
entity_id: person.k1
state: home
- condition: state
entity_id: person.reina
state: home
action:
- device_id: 6a3e2984cbd448f3ac3c0fc1498aea57
domain: switch
entity_id: switch.kasa_hotwater
type: turn_on
- data:
event: pair_line
value1: 湯沸かしon
service: ifttt.trigger
- id: '1582083264164'
alias: Turn off the Hotwater when 23:00 in everyday
description: 毎日23時に湯沸かしをオフ
trigger:
- at: '23:00'
platform: time
condition: []
action:
- device_id: 6a3e2984cbd448f3ac3c0fc1498aea57
domain: switch
entity_id: switch.kasa_hotwater
type: turn_off
- data:
event: pair_line
value1: 湯沸かしoff
service: ifttt.trigger
- id: '1582264570294'
alias: notify when astrays go off
description: コンソールがいなくなったら通知
trigger:
- entity_id: binary_sensor.blue_astray, binary_sensor.gold_astray,binary_sensor.red_astray,
binary_sensor.green_astray, binary_sensor.mirage_astray, binary_sensor.main_router,
binary_sensor.sub_router
for: 00:03:00
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data_template:
event: log_line
value1: '{{ trigger.entity_id }} がオフになりました。'
service: ifttt.trigger
- delay: 00:03:00
- condition: template
value_template: '{{ is_state( trigger.entity_id, ''on'') }}'
- data_template:
event: log_line
value1: '{{ trigger.entity_id }} がオンになりました。'
service: ifttt.trigger
- id: '1582265720791'
alias: Send to LINE when change txtline
description: フォーム内容が変わったらLINE送信
trigger:
- entity_id: input_text.sendline
platform: state
condition: []
action:
- data_template:
event: pair_line
value1: '{{ trigger.to_state.state }}'
service: ifttt.trigger
- id: '1582266580931'
alias: Start the Casting to GoogleHub on boot
description: 起動時にGoogleNestに画面配信
trigger:
- event: start
platform: homeassistant
condition: []
action:
- delay: 00:03:00
- data:
view_path: chrome
entity_id: media_player.kitchen_googlehub
service: cast.show_lovelace_view
- id: '1582266903318'
alias: Restart on every Tuesday at 04:00
description: 毎週火曜4時に再起動
trigger:
- at: 04:00:00
platform: time
condition:
- condition: time
weekday:
- tue
action:
- service: homeassistant.restart
- id: '1582267221691'
alias: Send command that sending GPS to ios devices
description: 起動時にiosにGPS送信を指示
trigger:
- event: start
platform: homeassistant
condition: []
action:
- data:
message: request_location_update
service: notify.mobile_app_sonytabletp
- data:
message: request_location_update
service: notify.mobile_app_tiyanrena
- id: '1582267383762'
alias: Notify when HA is online
description: HA起動時にLINE通知
trigger:
- event: start
platform: homeassistant
condition: []
action:
- data:
event: log_line
value1: HA is started.
service: ifttt.trigger
- data:
data:
attachment:
url: https://1.bp.blogspot.com/-L0IgETW-DVQ/WGnPOQXqP6I/AAAAAAABA1k/jv1PTrTvRXcRRcDUFVc4HvYpZ_N6Ah1LgCLcB/s800/computer_note_good.png
message: HA is started.
service: notify.mobile_app_sonytabletp
- id: '1582267883926'
alias: Send command that upload status to tasmotas
description: HA起動時にtasmotaにstatusアップロード指示
trigger:
- event: start
platform: homeassistant
condition: []
action:
- data:
payload: '1'
topic: tasmotaps/cmnd/SetOption19
service: mqtt.publish
- data:
payload: '1'
topic: tasmotas/cmnd/SetOption19
service: mqtt.publish
- data:
payload: ''
topic: tasmotaps/cmnd/state
service: mqtt.publish
- data:
payload: ''
topic: tasmotas/cmnd/state
service: mqtt.publish
- id: '1583819074259'
alias: Auto Notify person into spot
description: ''
trigger:
- entity_id: person.k1, person.reina
from: not_home
platform: state
condition: []
action:
- delay: 00:03:00
- condition: template
value_template: '{{ states( trigger.entity_id ) != trigger.from_state.state }}'
- data_template:
event: pair_line
value1: '{{ state_attr( trigger.entity_id , ''friendly_name'') }}が{{ trigger.to_state.state
}}へ到着'
service: ifttt.trigger
- id: '1583819074323'
alias: Notify me person goout from spot
description: ''
trigger:
- entity_id: person.k1, person.reina
for: 00:05:00
platform: state
to: not_home
condition: []
action:
- condition: template
value_template: '{{ states( trigger.entity_id ) != trigger.from_state.state }}'
- data_template:
event: pair_line
value1: '{{ state_attr( trigger.entity_id , ''friendly_name'') }}が{{ trigger.from_state.state
}}から離脱'
service: ifttt.trigger
- id: '1583826441057'
alias: Rest Energy counter when day1 every month
description: 毎月1日に積算電気代報告とカウンターリセット
trigger:
- hours: '0'
minutes: '0'
platform: time_pattern
seconds: '0'
condition:
- condition: template
value_template: '{{now().day | int == 1}}'
action:
- data_template:
event: pair_line
value1: リビングA/C:前月の電気代:{{ states('sensor.pliv_price') }}
service: ifttt.trigger
- data_template:
event: pair_line
value1: 寝室A/C:前月の電気代 {{ states('sensor.pbed_price') }}
service: ifttt.trigger
- data_template:
event: pair_line
value1: TV周り:前月の電気代 {{ states('sensor.ptv_price') }}
service: ifttt.trigger
- data_template:
event: pair_line
value1: パソコン:前月の電気代 {{ states('sensor.ppc_price') }}
service: ifttt.trigger
- data:
payload: '0'
topic: tasmotaps/cmnd/EnergyReset3
service: mqtt.publish
- data:
event: pair_line
value1: 電気代積算リセット実行済
service: ifttt.trigger
- id: '1583974670099'
alias: Notify Of New External IP
description: 外部IP変更時に通知
trigger:
- entity_id: sensor.myip
platform: state
condition:
- condition: template
value_template: '{% if trigger.from_state and trigger.to_state %} true {% else
%} false {% endif %}'
- condition: template
value_template: '{% if trigger.from_state.state == ''unknown'' %} false {% else
%} true {% endif %}'
- condition: template
value_template: '{% if trigger.to_state.state == ''unknown'' %} false {% else
%} true {% endif %}'
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
action:
- data_template:
event: log_line
value1: 外部IP変更 {{ trigger.from_state.state }} → {{ trigger.to_state.state }}
service: ifttt.trigger
- id: '1583974917601'
alias: HASSIO.core Update Available Notification
description: HAのアップデートがあれば通知
trigger:
- entity_id: binary_sensor.updater
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data_template:
event: log_line
value1: HAにアップデート来たよ {{ state_attr( trigger.entity_id , 'newest_version') }}
service: ifttt.trigger
- id: '1583976024381'
alias: Notify me garbage collection
description: ごみ収集のお知らせ
trigger:
- entity_id: sensor.garbage_burnable, sensor.garbage_cans, sensor.garbage_carton,
sensor.garbage_metal, sensor.garbage_mixpaper, sensor.garbage_plastic
for: '22:00:00'
platform: state
to: Tomorrow
condition: []
action:
- data_template:
data:
attachment:
url: '{{ state_attr( trigger.entity_id , ''icon_url'') }}'
message: 明日は {{ state_attr( trigger.entity_id , 'friendly_name') }} の収集です。
title: ゴミの日
service: notify.notify
- delay: '1:00:00'
- data_template:
event: pair_line
value1: 明日は {{ state_attr( trigger.entity_id , 'friendly_name') }} の収集です。
service: ifttt.trigger
- id: '1583981158388'
alias: Check-in_Doushi
description: Check-in when I goto 道の駅どうし
trigger:
- entity_id: person.k1
event: enter
platform: zone
zone: zone.spot_doushi
condition: []
action:
- condition: template
value_template: '{{ trigger.entity_id.state == trigger.to_state }}'
- data_template:
data:
attachment:
url: https://1.bp.blogspot.com/-0TEqZxyRkCM/XS_7yvtbe3I/AAAAAAABTqE/9mpjn2SbTooaC3uqN9kS9UTcPK4X9aXRgCLcBGAs/s800/bike_helmet_man.png
message: K1が{{ state_attr(trigger.zone, 'friendly_name') }}に到着
title: チェックイン
service: notify.notify
- data_template:
comment: 自動チェックイン
ll: '{{ state_attr(trigger.entity_id, ''latitude'') }},{{ state_attr(trigger.entity_id,
''longitude'') }}'
llAcc: '{{ state_attr(trigger.entity_id, ''gps_accuracy'') }}'
venueid: '{{ state_attr( trigger.zone, ''swarmid'') }}'
service: rest_command.swarm_checkin_by_venueid