From f73e469f8cf7fca84d4c0ff67bdf2737110db8af Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Fri, 26 Dec 2025 14:12:23 +0000 Subject: [PATCH 1/6] Add transmission labels documentation --- source/_integrations/transmission.markdown | 45 ++++++++++++++-------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index fb41a0b4771e..405829e023a5 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -70,7 +70,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 containing the torrent name and ID, which can be used with automations. +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, ID, and labels, which can be used with automations. Possible events are: @@ -80,24 +80,35 @@ Possible events are: Inside the event, there is the name of the torrent that is started or completed and the path where the files are downloaded, as seen in the Transmission User Interface. -Example of an automation that notifies on successful download and removes the torrent from the client: +Example of an automation that notifies on successful download and removes the torrent from the client if the torrent has a label of remove: {% raw %} ```yaml -- alias: "Notify and remove completed torrent" - triggers: - - trigger: event - event_type: transmission_downloaded_torrent - actions: - - action: notify.telegram_notifier - data: - title: "Torrent completed!" - message: "{{trigger.event.data.name}} downloaded to {{trigger.event.data.download_path}}" - - action: transmission.remove_torrent - data: - entry_id: eeb52bc78e11d813a1e6bc68c8ff93c8 - id: "{{trigger.event.data.id}}" +alias: Transmission download complete +description: "Notify on download complete and remove if label set." +triggers: + - trigger: event + event_type: transmission_downloaded_torrent +conditions: [] +actions: + - action: notify.persistent_notification + metadata: {} + data: + message: >- + {{trigger.event.data.name}} downloaded to + {{trigger.event.data.download_path}} with labels + {{trigger.event.data.labels}} + - if: + - condition: template + value_template: "{{ 'remove' in trigger.event.data.labels }}" + then: + - action: transmission.remove_torrent + metadata: {} + data: + delete_data: false + entry_id: YOUR_TRANSMISSION_CONFIG_ENTITY_ID + id: "{{trigger.event.data.id}}" ``` {% endraw %} @@ -122,6 +133,10 @@ The `transmission.add_torrent` action is used to add a new torrent to download. - **Description**: The absolute path to the download directory. If not specified, the Transmission's default directory will be used. - **Optional**: Yes +- **Data attribute**: `labels` + - **Description**: A comma-separated list of labels to assign to the torrent. + - **Optional**: Yes + ### Action: Remove torrent The `transmission.remove_torrent` action is used to remove a torrent from the client. From 1a5bcfb4ce962d6bf89404214137d269e6337def Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Fri, 26 Dec 2025 15:12:28 +0000 Subject: [PATCH 2/6] Fix example yaml --- source/_integrations/transmission.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index 405829e023a5..4707d952dcbd 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -90,7 +90,6 @@ description: "Notify on download complete and remove if label set." triggers: - trigger: event event_type: transmission_downloaded_torrent -conditions: [] actions: - action: notify.persistent_notification metadata: {} @@ -104,7 +103,6 @@ actions: value_template: "{{ 'remove' in trigger.event.data.labels }}" then: - action: transmission.remove_torrent - metadata: {} data: delete_data: false entry_id: YOUR_TRANSMISSION_CONFIG_ENTITY_ID From 8fea4c671592ab84a1fa517244ecb2a31c764340 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Fri, 26 Dec 2025 15:13:24 +0000 Subject: [PATCH 3/6] Fix config entry id --- source/_integrations/transmission.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index 4707d952dcbd..1acb3d562f13 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -105,7 +105,7 @@ actions: - action: transmission.remove_torrent data: delete_data: false - entry_id: YOUR_TRANSMISSION_CONFIG_ENTITY_ID + entry_id: YOUR_TRANSMISSION_ENTRY_ID id: "{{trigger.event.data.id}}" ``` From ed6b8e53f39e3abc3e744d0b7eab5182609aa669 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Fri, 26 Dec 2025 15:15:17 +0000 Subject: [PATCH 4/6] Fix description --- source/_integrations/transmission.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index 1acb3d562f13..e8426a89171a 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -86,7 +86,7 @@ Example of an automation that notifies on successful download and removes the to ```yaml alias: Transmission download complete -description: "Notify on download complete and remove if label set." +description: "Notify on download complete and remove if label set" triggers: - trigger: event event_type: transmission_downloaded_torrent From 85faafa380fa4929e8ad8a1586e8f0856018ca9c Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Sat, 27 Dec 2025 12:52:52 +0000 Subject: [PATCH 5/6] Make example match action yaml --- source/_integrations/transmission.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index e8426a89171a..752c5a0eaf68 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -100,7 +100,7 @@ actions: {{trigger.event.data.labels}} - if: - condition: template - value_template: "{{ 'remove' in trigger.event.data.labels }}" + value_template: "{{ 'Remove' in trigger.event.data.labels }}" then: - action: transmission.remove_torrent data: From bd7da6d95c3477885845237d003b80708b23eb7a Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Sat, 27 Dec 2025 12:53:22 +0000 Subject: [PATCH 6/6] Casing fix --- source/_integrations/transmission.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/transmission.markdown b/source/_integrations/transmission.markdown index 752c5a0eaf68..44b7f48c7566 100644 --- a/source/_integrations/transmission.markdown +++ b/source/_integrations/transmission.markdown @@ -80,7 +80,7 @@ Possible events are: Inside the event, there is the name of the torrent that is started or completed and the path where the files are downloaded, as seen in the Transmission User Interface. -Example of an automation that notifies on successful download and removes the torrent from the client if the torrent has a label of remove: +Example of an automation that notifies on successful download and removes the torrent from the client if the torrent has a label of Remove: {% raw %}