From 23b8bb4a0850fb55050a8cd15f408ab78ae258a9 Mon Sep 17 00:00:00 2001 From: Alec Rust Date: Mon, 25 Jan 2021 15:06:00 +0000 Subject: [PATCH] Update Transmission docs with event ID info (#15905) --- source/_integrations/transmission.markdown | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index 827d59bbc64..22cf9e7a548 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -18,7 +18,7 @@ The Transmission integration allows you to monitor your [Transmission](https://w ## Setup -Your Transmission client must first be configured to allow remote access. In your Transmission client navigate to **Preferences** -> **Remote** tab and then click the **Allow remote access** checkbox. +Your Transmission client must first be configured to allow remote access. In your Transmission client navigate to **Preferences** -> **Remote** tab and then click the **Allow remote access** checkbox. ## Configuration @@ -79,7 +79,7 @@ The Transmission integration will add the following sensors and switches. ## Event Automation -The Transmission integration is continuously monitoring the status of torrents in the target client. Once a torrent is started or completed, an event is triggered on the Home Assistant Bus, which allows to implement any kind of automation. +The Transmission integration is continuously monitoring the status of torrents in the target client. Once a torrent is started or completed, an event is triggered on the Home Assistant Bus containing the torrent name and ID, which can be used with automations. Possible events are: @@ -89,20 +89,24 @@ Possible events are: Inside of the event, there is the name of the torrent that is started or completed, as it is seen in the Transmission User Interface. -Example of configuration of an automation with completed torrents: +Example of an automation that notifies on successful download and removes the torrent from the client: {% raw %} ```yaml -- alias: Completed Torrent +- alias: Notify and remove completed torrent trigger: platform: event event_type: transmission_downloaded_torrent action: - service: notify.telegram_notifier - data: - title: "Torrent completed!" - message: "{{trigger.event.data.name}}" + - service: notify.telegram_notifier + data: + title: "Torrent completed!" + message: "{{trigger.event.data.name}}" + - service: transmission.remove_torrent + data: + name: "Transmission" + id: "{{trigger.event.data.id}}" ``` {% endraw %}