|
发表于 2018-12-12 15:07:58
|
显示全部楼层
[configuration.yaml]
..............................
shell_command:
mi_ai_player: "ssh -l root 192.168.1.22 '/usr/bin/mphelper' tone '{{song}}'"
然後, 在自動化 按這樣叫用...... (把mp3放在HA主目錄下的 www 目錄裡, 就可以直接以http/https 叫用到)
- service: shell_command.mi_ai_player
data_template:
song: https://xxxxxxxxxxxxxxxx:8123/local/ring.mp3
以上兩段要互相配合的, 漏一個都沒法完成. 同時, song: xxxxxxxx 那邊, 如果你有填, 自己把連結貼在瀏覽器上, 要能正常直接播放, 如這地址有問題, 當然永遠都播不了的. |
|