Folder Watcher

This integration adds Watchdog file system monitoring, publishing events on the Home Assistant bus on the creation/deletion/modification of files within configured folders. The monitored event_type are:

  • closed
  • created
  • deleted
  • modified
  • moved

Configured folders must be added to allowlist_external_dirs. Note that by default folder monitoring is recursive, meaning that the contents of sub-folders are also monitored.


To enable the Folder Watcher integration in your installation, add the following to your configuration.yaml file:

  - folder: /config

Configuration Variables

folder string Required

The folder path

patterns string (Optional, default: *)

Pattern matching to apply


Pattern matching using fnmatch can be used to limit filesystem monitoring to only files which match the configured patterns. The following example shows the configuration required to only monitor filetypes .yaml and .txt.

  - folder: /config
      - '*.yaml'
      - '*.txt'


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:

#Send notification for new image (including the image itself)
  alias: "New file alert"
    platform: event
    event_type: folder_watcher
      event_type: created
    service: notify.notify
      title: New image captured!
      message: "Created {{ }} in {{ }}"
        file: "{{ }}"