mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 02:46:53 +00:00
Detail the event data for folder_watcher (#22427)
This commit is contained in:
parent
a5bc04ee3c
commit
c06a21f009
@ -55,6 +55,17 @@ folder_watcher:
|
||||
|
||||
## Automations
|
||||
|
||||
The elements the events contain are:
|
||||
- `event_type`: matching the `event_type` of the filter (one of `created`, `moved`, `modified`, `deleted`, `closed`)
|
||||
- `path`: The full path to the file (e.g. "/hello/world.txt")
|
||||
- `file`: The name of the file (e.g. "world.txt")
|
||||
- `folder`: The folder path (e.g. "/hello")
|
||||
|
||||
When the `event_type` is `moved`, the file details are for the source file and destination details are included:
|
||||
- `dest_path`: The full path to the moved file (e.g. "/hello/world.txt")
|
||||
- `dest_file`: The name of the moved file (e.g. "world.txt")
|
||||
- `dest_folder`: The folder moved path (e.g. "/hello")
|
||||
|
||||
Automations can be triggered on filesystem event data using a template. The following automation will send a notification with the name and folder of new files added to that folder:
|
||||
|
||||
{% raw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user