Merge pull request #5250 from mf-social/patch-1

Tidy Folder Watcher component page automation.
This commit is contained in:
DubhAd 2018-05-12 18:56:21 +01:00 committed by GitHub
commit b0d6c4b066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,19 +63,20 @@ 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'
#Send notification for new image (including the image itself)
automation:
 alias: New file alert
trigger:
- event_data: {"event_type":"created"}
event_type: folder_watcher
platform: event
  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 %}