Wait for downloader event (multiple)

Hi!

Created a automation that downloads a file to a directory.
But, it the event related to the automation is fired even when something else is downloaded.

Is there a way to wait for a event in the automation?
This is the “wait for trigger” … Waiting for downloader to be completed.

How can I set the “wait” so it actually waits for the downloader to finish in the same automation?

wait_for_trigger:
  - platform: event
    event_type: "downloader_download_completed "
continue_on_timeout: false
timeout:
  hours: 0
  minutes: 5
  seconds: 0
  milliseconds: 0
enabled: true

I know this is really late, but if you (or anyone else who winds up finding this thread) are still looking for an answer to this question: you need to also reference the event data. You can find this in the dev tools event listener, but here is an example:

wait_for_trigger:
  - trigger: event
    event_type: "downloader_download_completed"
    event_data: 
      url: http://urlofthefileyouaredownloading.com/doorsnap.jpg
      filename: doorsnap.jpg
1 Like

Thanks… :smiley:
Did forgot about this, but its appreciated!