Sensor for monitoring the contents of a folder. Note that folder paths must be added to allowlist_external_dirs. Optionally a wildcard filter can be applied to the files considered within the folder. The state of the sensor is the size in MB of files within the folder that meet the filter criteria. The sensor exposes the number of filtered files in the folder, total size in bytes of those files and a comma separated list of the file paths as attributes.


To enable the folder sensor in your installation, add the following to your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI.[Learn more] file:

  - platform: folder
    folder: /config

Configuration Variables

folder string Required

The folder path

filter string (Optional, default: *)

Filter to apply