Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 28 additions & 15 deletions source/_integrations/transmission.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -80,24 +80,33 @@ 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
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}}
Comment on lines +97 to +100
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multi-line string in the template exceeds 80 characters per line. According to the documentation guidelines, contents of code fenced blocks must not exceed 80 characters per line. The message template should be reformatted to keep lines within this limit while maintaining readability.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is correct

- if:
- condition: template
value_template: "{{ 'Remove' in trigger.event.data.labels }}"
then:
- action: transmission.remove_torrent
data:
delete_data: false
entry_id: YOUR_TRANSMISSION_ENTRY_ID
id: "{{trigger.event.data.id}}"
```

{% endraw %}
Expand All @@ -122,6 +131,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.
Expand Down