mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-20 07:46:52 +00:00
Update Transmission docs with event ID info (#15905)
This commit is contained in:
parent
d7a7f01aaf
commit
23b8bb4a08
@ -79,7 +79,7 @@ The Transmission integration will add the following sensors and switches.
|
|||||||
|
|
||||||
## Event Automation
|
## 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:
|
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.
|
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 %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- alias: Completed Torrent
|
- alias: Notify and remove completed torrent
|
||||||
trigger:
|
trigger:
|
||||||
platform: event
|
platform: event
|
||||||
event_type: transmission_downloaded_torrent
|
event_type: transmission_downloaded_torrent
|
||||||
action:
|
action:
|
||||||
service: notify.telegram_notifier
|
- service: notify.telegram_notifier
|
||||||
data:
|
data:
|
||||||
title: "Torrent completed!"
|
title: "Torrent completed!"
|
||||||
message: "{{trigger.event.data.name}}"
|
message: "{{trigger.event.data.name}}"
|
||||||
|
- service: transmission.remove_torrent
|
||||||
|
data:
|
||||||
|
name: "Transmission"
|
||||||
|
id: "{{trigger.event.data.id}}"
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user