mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 10:26:52 +00:00
Tidy Folder Watcher component page automation.
The automation on this page was obviously created by the automation editor and was super-ugly!!
This commit is contained in:
parent
7bfe31cbac
commit
b4fb6b7695
@ -62,19 +62,19 @@ Automations can be triggered on filesystem event data using a `data_template`. T
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
- action:
|
||||
- data_template:
|
||||
message: 'Created {{ trigger.event.data.file }} in {{ trigger.event.data.folder }}'
|
||||
title: New image captured!
|
||||
data:
|
||||
file: " {{ trigger.event.data.path }} "
|
||||
service: notify.pushbullet
|
||||
alias: New file alert
|
||||
condition: []
|
||||
id: '1520092824697'
|
||||
trigger:
|
||||
- event_data: {"event_type":"created"}
|
||||
event_type: folder_watcher
|
||||
platform: event
|
||||
#Send notification for new image (including the image itself)
|
||||
alias: New file alert
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: folder_watcher
|
||||
event_data:
|
||||
event_type: created
|
||||
action:
|
||||
service: notify.notify
|
||||
data_template:
|
||||
title: New image captured!
|
||||
message: "Created {{ trigger.event.data.file }} in {{ trigger.event.data.folder }}"
|
||||
data:
|
||||
file: "{{ trigger.event.data.path }}"
|
||||
```
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user