#folder_watcher automation doesn't seem to do anything

1 messages · Page 1 of 1 (latest)

dusk sand
#

I'm creating an automation to process uploaded text data files. I can't get it to take any notify actions.

This is the automation, in automations.yaml included in configuration.yaml:

- alias: 'New NSP data'
  id: NSP_data_automation
  description: New data upload
  trigger:
    - platform: event
      event_type: folder_watcher
      event_data:
        event_type: modified
        path: /config/watched/nspower.tsv
        file: nspower.tsv
  actions:
    - action: notify.send_message
      data:
        title: New NS Power data!
        message: "Modified {{ trigger.to_state.attributes.file }} in {{ trigger.to_state.attributes.folder }}"
    - action: persistent_notification.create
      data:
        title: New NS Power data!
        message: "Modified {{ trigger.to_state.attributes.file }} in {{ trigger.to_state.attributes.folder }}"
    - action: notify.send_message
      data:
        entity_id: notify.mqtt_notify
        message: "You have an update!"
        title: "Status changed"

After restarting, I load a new file in the watched folder, and see

Folder Watcher /config/watched detected an event

in the Logbook. But I don't get any of the attempts at notifications.

Something wrong with the trigger?

dusk sand
#

I found Developer tools: Events and Listening to folder_watcher events useful. I changed the configuration a bit and can now see that the automation is being triggered if I watch the automation entity.

I've edited my post to show the changed configuration.

Still not seeing the actions. So something wrong with how I have those configured.