mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Update folder_watcher.markdown
This commit is contained in:
parent
b4fb6b7695
commit
f1cc2e0edf
@ -63,18 +63,19 @@ Automations can be triggered on filesystem event data using a `data_template`. T
|
|||||||
{% raw %}
|
{% raw %}
|
||||||
```yaml
|
```yaml
|
||||||
#Send notification for new image (including the image itself)
|
#Send notification for new image (including the image itself)
|
||||||
alias: New file alert
|
automation:
|
||||||
trigger:
|
alias: New file alert
|
||||||
platform: event
|
trigger:
|
||||||
event_type: folder_watcher
|
platform: event
|
||||||
event_data:
|
event_type: folder_watcher
|
||||||
event_type: created
|
event_data:
|
||||||
action:
|
event_type: created
|
||||||
service: notify.notify
|
action:
|
||||||
data_template:
|
service: notify.notify
|
||||||
title: New image captured!
|
data_template:
|
||||||
message: "Created {{ trigger.event.data.file }} in {{ trigger.event.data.folder }}"
|
title: New image captured!
|
||||||
data:
|
message: "Created {{ trigger.event.data.file }} in {{ trigger.event.data.folder }}"
|
||||||
file: "{{ trigger.event.data.path }}"
|
data:
|
||||||
|
file: "{{ trigger.event.data.path }}"
|
||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user