From 06809a7098790d676e346353c417f4c4961fc98f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Oct 2015 12:31:30 +0100 Subject: [PATCH] Add details about the usage --- source/_components/downloader.markdown | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/_components/downloader.markdown b/source/_components/downloader.markdown index c8df92231af..a818996d030 100644 --- a/source/_components/downloader.markdown +++ b/source/_components/downloader.markdown @@ -10,21 +10,29 @@ footer: true ha_category: Other --- - The `downloader` component provides a service to download files. It will raise an error and not continue to set itself up when the download directory does not exist. -To enable it, add the following lines to your `configuration.yaml`: +To enable it, add the following lines to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry downloader: download_dir: downloads ``` -If the path is not absolute, it's assumed to be relative to the HASS configuration directory. -#### Service `downloader/download_file` +Configuration variables: -Download the specified url. +- **download_dir** (*Required*): If the path is not absolute, it's assumed to be relative to the Home Assistant configuration directory (eg. `.homeassistant/downloads`). + +### {% linkable_title Use the service %} + +Go the the "Developer Tools", then to "Call Service", and choose `downloader/download_file` from the list of available services. Fill the "Service Data" field as shown in the example below and hit "CALL SERVICE". + +```json +{"url":"http://domain.tld/path/to/file"} +``` + +This will download the file from the given URL. | Service data attribute | Optional | Description | | ---------------------- | -------- | ----------- |