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

182 lines
4.9 KiB
YAML

tv_nintendo_switch:
alias: Nintendo Switch
icon: mdi:nintendo-switch
sequence:
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: Nintendo Switch
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- service: select.select_option
target:
entity_id: select.sync_box_sync_mode
data:
option: Game
tv_xbox:
alias: Xbox Series X
icon: mdi:microsoft-xbox
sequence:
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: Xbox
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- service: select.select_option
target:
entity_id: select.sync_box_sync_mode
data:
option: Game
tv_ps4:
alias: PlayStation 4
icon: mdi:sony-playstation
sequence:
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: PlayStation
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- service: select.select_option
target:
entity_id: select.sync_box_sync_mode
data:
option: Game
tv_atv:
alias: Android TV
icon: mdi:android
sequence:
- choose:
- conditions:
- condition: state
entity_id: select.harmonyhub_activities
state: 'Power Off'
sequence:
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: SHIELD TV
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- delay: 5
- service: androidtv.adb_command
data:
command: HOME
entity_id: media_player.nvidia_shield
- service: select.select_option
target:
entity_id: select.sync_box_sync_mode
data:
option: Video
tv_f1tv_bedroom:
alias: F1TV Bedroom
icon: mdi:android
sequence:
- service: input_select.select_option
data:
option: remote.bedroom_atv
target:
entity_id: input_select.tv_select
- service: script.tv_f1tv
tv_f1tv_living_room:
alias: F1TV Living Room
icon: mdi:android
sequence:
- choose:
- conditions:
- condition: state
entity_id: select.harmonyhub_activities
state: 'Power Off'
sequence:
- service: input_select.select_option
data:
option: remote.shield
target:
entity_id: input_select.tv_select
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: SHIELD TV
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
- delay: 5
- service: script.tv_f1tv
- service: select.select_option
target:
entity_id: select.sync_box_sync_mode
data:
option: Video
tv_f1tv:
alias: F1TV
icon: mdi:android
sequence:
- choose:
- conditions:
- condition: state
entity_id: select.harmonyhub_activities
state: 'Power Off'
sequence:
- service: remote.send_command
data:
command: HOME
target:
entity_id: "{{ states('input_select.tv_select') }}"
- delay: 5
- service: remote.turn_on
data:
activity: http://play.google.com/store/apps/details?id=com.formulaone.production
target:
entity_id: "{{ states('input_select.tv_select') }}"
- delay: 5
- service: remote.send_command
data:
command: DPAD_CENTER
target:
entity_id: "{{ states('input_select.tv_select') }}"
- delay: 5
- service: remote.send_command
data:
command: DPAD_CENTER
target:
entity_id: "{{ states('input_select.tv_select') }}"
- delay: 5
- service: remote.send_command
data:
command: DPAD_CENTER
target:
entity_id: "{{ states('input_select.tv_select') }}"
tv_off:
alias: 'TV Off'
icon: mdi:power
sequence:
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: power_off