mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 02:46:53 +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 %}
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
- action:
|
#Send notification for new image (including the image itself)
|
||||||
- data_template:
|
alias: New file alert
|
||||||
message: 'Created {{ trigger.event.data.file }} in {{ trigger.event.data.folder }}'
|
trigger:
|
||||||
|
platform: event
|
||||||
|
event_type: folder_watcher
|
||||||
|
event_data:
|
||||||
|
event_type: created
|
||||||
|
action:
|
||||||
|
service: notify.notify
|
||||||
|
data_template:
|
||||||
title: New image captured!
|
title: New image captured!
|
||||||
|
message: "Created {{ trigger.event.data.file }} in {{ trigger.event.data.folder }}"
|
||||||
data:
|
data:
|
||||||
file: "{{ trigger.event.data.path }}"
|
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
|
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user