File size sensor: trying to monitor database file

Using the example from the docs:

sensor:
  - platform: filesize
    file_paths:
      - /config/home-assistant_v2.db

The sensor is not showing up. The docs mention that I have to add the directory to whitelist_external_dirs. This confuses me. Should I really add /config to the whitelist_external_dirs list?

2 Likes

You probably have to because the only ‘whitelisted’ directory is config/www. All other folders for config are not whitelisted.

If you’re using SQLite, check this out: Calculate home-assistant_V2.db size without whitelisting entire config dir

1 Like