1
0
ansible-home-assistant/scripts/20.android-tv.yaml

176 lines
4.7 KiB
YAML

tv_nintendo_switch:
alias: Nintendo Switch
icon: mdi:nintendo-switch
sequence:
- service: switch.turn_on
entity_id: switch.harmonyhub_play_a_game
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
tv_ps4:
alias: PlayStation 4
icon: mdi:sony-playstation
sequence:
- service: switch.turn_on
entity_id: switch.harmonyhub_play_ps4
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
tv_twitch:
alias: Twitch
icon: mdi:twitch
sequence:
- choose:
- conditions:
- condition: state
entity_id: switch.harmonyhub_shield_tv
state: 'off'
sequence:
- service: switch.turn_on
entity_id: switch.harmonyhub_shield_tv
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- delay: 5
- service: media_player.select_source
data:
source: 'AndroidTV Launcher'
target:
entity_id: media_player.nvidia_shield
- delay: 1
- service: media_player.select_source
data:
source: Twitch
target:
entity_id: media_player.nvidia_shield
tv_youtube:
alias: YouTube
icon: mdi:youtube
sequence:
- choose:
- conditions:
- condition: state
entity_id: switch.harmonyhub_shield_tv
state: 'off'
sequence:
- service: switch.turn_on
entity_id: switch.harmonyhub_shield_tv
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- delay: 5
- service: media_player.select_source
data:
source: 'AndroidTV Launcher'
target:
entity_id: media_player.nvidia_shield
- delay: 1
- service: media_player.select_source
data:
source: YouTube
target:
entity_id: media_player.nvidia_shield
tv_netflix:
alias: Netflix
icon: mdi:netflix
sequence:
- choose:
- conditions:
- condition: state
entity_id: switch.harmonyhub_shield_tv
state: 'off'
sequence:
- service: switch.turn_on
entity_id: switch.harmonyhub_shield_tv
- delay: 5
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- service: media_player.select_source
data:
source: 'AndroidTV Launcher'
target:
entity_id: media_player.nvidia_shield
- delay: 1
- service: media_player.select_source
data:
source: Netflix
target:
entity_id: media_player.nvidia_shield
tv_hbogo:
alias: HBO GO
icon: mdi:netflix
sequence:
- choose:
- conditions:
- condition: state
entity_id: switch.harmonyhub_shield_tv
state: 'off'
sequence:
- service: switch.turn_on
entity_id: switch.harmonyhub_shield_tv
- delay: 5
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- service: media_player.select_source
data:
source: 'AndroidTV Launcher'
target:
entity_id: media_player.nvidia_shield
- delay: 1
- service: media_player.select_source
data:
source: 'HBO GO'
target:
entity_id: media_player.nvidia_shield
tv_firefox:
alias: Firefox
icon: mdi:firefox
sequence:
- choose:
- conditions:
- condition: state
entity_id: switch.harmonyhub_shield_tv
state: 'off'
sequence:
- service: switch.turn_on
entity_id: switch.harmonyhub_shield_tv
- delay: 5
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- service: media_player.select_source
data:
source: 'AndroidTV Launcher'
target:
entity_id: media_player.nvidia_shield
- delay: 1
- service: media_player.select_source
data:
source: Firefox
target:
entity_id: media_player.nvidia_shield
tv_off:
alias: 'TV Off'
icon: mdi:power
sequence:
- service: switch.turn_off
entity_id: switch.harmonyhub_play_a_game
- service: switch.turn_off
entity_id: switch.harmonyhub_shield_tv