Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions source/_components/sensor.folder.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: page
title: "folder sensor"
description: "Component for monitoring the contents of a folder."
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.63
---

Home-assistant component for monitoring the contents of a folder.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Home-assistant -> Home Assistant.

In general, I'd suggest rewriting this sentence since it is kinda obvious that this component is for Home Assistant already 😉

The state of the sensor is the time that the most recently modified file in a folder was modified. The use case is detecting when a file in a folder is created or updated. The number of files in the folder and the names of those files are exposed as attributes. Optionally a filter can be applied to the files considered.

```yaml
sensor:
- platform: folder
folder: /share/motion
filter: '*capture.jpg'
- platform: folder
folder: /config
```

Configuration variables:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the configuration tags, for more information please see:
https://home-assistant.io/developers/documentation/create_page/#configuration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to remove the header "Configuration variables:" as well 😉


- **folder** (*Required*): The folder path
- **filter** (*Optional*): Optional filter