-
-
Save epochaudio/4e9f1918026e712f4dd938be7e479817 to your computer and use it in GitHub Desktop.
可以实现Roon播放器和画屏联动
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: 可以实现Roon播放器和画屏联动。网址:http://www.epochaudio.cn/?p=1178 | |
description: 合并的Roon控制自动化集合 | |
domain: automation | |
input: | |
media_player_roon: | |
name: Roon媒体播放器 | |
description: Roon媒体播放器实体ID | |
selector: | |
entity: | |
domain: media_player | |
media_player_android_tv: | |
name: Android TV 媒体播放器 | |
description: Android TV 媒体播放器实体ID | |
selector: | |
entity: | |
domain: media_player | |
trigger: | |
- platform: state | |
entity_id: !input media_player_roon | |
to: playing | |
- platform: state | |
entity_id: !input media_player_roon | |
to: paused | |
- platform: state | |
entity_id: !input media_player_roon | |
to: idle | |
condition: [] | |
action: | |
- choose: | |
- conditions: | |
- condition: state | |
entity_id: !input media_player_roon | |
state: playing | |
sequence: | |
- service: androidtv.adb_command | |
data: | |
command: am start -n mark.via/mark.via.Shell | |
target: | |
entity_id: !input media_player_android_tv | |
- conditions: | |
- condition: or | |
conditions: | |
- condition: state | |
entity_id: !input media_player_roon | |
state: paused | |
- condition: state | |
entity_id: !input media_player_roon | |
state: idle | |
sequence: | |
- service: androidtv.adb_command | |
data: | |
command: am start -n com.hm.jhclock/com.hm.jhclock.hm | |
target: | |
entity_id: !input media_player_android_tv | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment