文件夹监测-FolderWatcher
操作步骤
folder_watcher
与对应自动化配置解释- 上传packages配置文件,重启homeassistant
- 增加
whitelist_external_dirs
配置 - 实验配置效果
参考
- folder_watcher组件
https://www.home-assistant.io/integrations/folder_watcher
- 配置样例
example_7_5_1.yaml
```yaml # example_7_5_1.yaml folder_watcher: - folder: /home/pi patterns: - '.yaml' - '.txt'
automation: alias: Files WatchDog trigger: platform: event event_type: folder_watcher action: service: notify.zhujisheng_gmail data_template: title: 文件系统被修改! message: "{{trigger.event.data.file}} in {{trigger.event.data.folder}} has been {{ trigger.event.data.event_type }}" ```