From efa24e1cb1196b530481e9dafc3253da8bfc710f Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 21 Feb 2018 14:52:48 +0000 Subject: [PATCH] Adds file size sensor (#4589) * Adds file size sensor * Ammend Configuration variables Have amended [as per the docs](https://home-assistant.io/developers/documentation/create_page/#configuration), doesn't look correct in my markdown preview however. * Update sensor.filesize.markdown * :arrow_up: Bumped ha_release * Update sensor.filesize.markdown * Update sensor.filesize.markdown --- source/_components/sensor.filesize.markdown | 31 +++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 source/_components/sensor.filesize.markdown diff --git a/source/_components/sensor.filesize.markdown b/source/_components/sensor.filesize.markdown new file mode 100644 index 00000000000..91eb16037ce --- /dev/null +++ b/source/_components/sensor.filesize.markdown @@ -0,0 +1,31 @@ +--- +layout: page +title: "File size sensor" +description: "Component for monitoring the size of a file." +date: 2018-02-06 14:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: file.png +ha_category: Sensor +ha_iot_class: "Local Polling" +ha_release: 0.64 +--- + +Component for displaying the size of a file. Note that paths must be added to [whitelist_external_dirs](https://home-assistant.io/docs/configuration/basic/). +Add to your config: + +```yaml +sensor: + - platform: filesize + file_paths: + - /config/home-assistant_v2.db + ``` + +{% configuration %} +file_paths: + description: The absolute path to the file. + required: true + type: list of strings +{% endconfiguration %}