本帖最后由 lidicn 于 2017-12-20 18:47 编辑
前置需求
安装方法
- 下载解压,复制到deps/bin文件夹内【也可以是其他路径】【本教程基于Hass.io】
- 配置yaml
sensor:
- platform: transmission
host: 192.168.2.200
monitored_variables:
- 'current_status'
- 'download_speed'
- 'upload_speed'
- 'active_torrents'
shell_command:
download_subtitle: 'python3 /config/deps/bin/subfinder.py -r /share/transmisson/downloads/complete'
group:
transmission:
view: false
name: "Transmission下载"
icon: mdi:download
entities:
- sensor.transmission_active_torrents
- sensor.transmission_down_speed
- sensor.transmission_up_speed
- sensor.transmission_status
automation:
- alias: download_subtitle
trigger:
platform: state
entity_id: sensor.transmission_status
to: 'idle'
action:
service: shell_command.download_subtitle
shell_command:
download_subtitle: 'python3 /subfinder所在路径/subfinder.py -r /你的/电影所在/downloads/路径'
#-r 参数会下载路径下面的所有文件夹【任意层级】的电影字幕,包含中文跟英文字幕
subfinder来源
https://github.com/L-xm/python-shooter
|