From a866289e58c87ad1775fbbb6fcc18aa60c736394 Mon Sep 17 00:00:00 2001 From: chriscla Date: Mon, 4 Nov 2019 13:03:38 -0800 Subject: [PATCH] Nzbget download event (#10838) * Add nzbget downloaded event. * Move raw tags outside the code block * Match event name to code --- source/_integrations/nzbget.markdown | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/source/_integrations/nzbget.markdown b/source/_integrations/nzbget.markdown index 637acca2f3b..65a743d2198 100644 --- a/source/_integrations/nzbget.markdown +++ b/source/_integrations/nzbget.markdown @@ -66,6 +66,35 @@ This component will create these sensors: - `nzbget_uptime`: NZBGet server uptime. - `nzbget_size`: Amount of data downloaded since server start in MB. +## Event Automation + +The NZBGet integration continuously monitors nzbget's download history. When a download completes, an event usable for automation is triggered on the Home Assistant Bus. + +Possible events are: + +- `nzbget_download_complete` + +The event includes the name, category, and status of the downloaded nzb. + +Example automation to send a Telegram message on a completed download: +{% raw %} + +```yaml +- alias: Completed Torrent + trigger: + platform: event + event_type: nzbget_download_complete + - event_data: + category: tv + action: + service: notify.telegram_notifier + data_template: + title: "Download completed!" + message: "{{trigger.event.data.name}}" +``` + +{% endraw %} + ## Services Available services: @@ -76,6 +105,6 @@ Available services: ### Service `nzbget/set_speed` -| Service data attribute | Optional | Description | +| Service data attribute | Optional | Description | |------------------------|----------|-------------------------------------------------------------------------------------------------| | `speed` | yes | Sets the download speed limit, specified in Kb/s. 0 disables the speed limit. Defaults to 1000. |