Przemek Grondek
7ff4e7864b
Add script for bedroom tv Extract original script to generic one Add TV select for generic f1tv script
165 lines
4.5 KiB
YAML
165 lines
4.5 KiB
YAML
tv_nintendo_switch:
|
|
alias: Nintendo Switch
|
|
icon: mdi:nintendo-switch
|
|
sequence:
|
|
- service: switch.turn_on
|
|
entity_id: switch.harmonyhub_play_nintendo_switch
|
|
- service: media_player.select_source
|
|
data:
|
|
source: TV
|
|
target:
|
|
entity_id: media_player.living_room
|
|
- service: huesyncbox.set_sync_mode
|
|
target:
|
|
entity_id: media_player.sync_box
|
|
data:
|
|
mode: game
|
|
tv_xbox:
|
|
alias: Xbox Series X
|
|
icon: mdi:microsoft-xbox
|
|
sequence:
|
|
- service: switch.turn_on
|
|
entity_id: switch.harmonyhub_xbox
|
|
- service: media_player.select_source
|
|
data:
|
|
source: TV
|
|
target:
|
|
entity_id: media_player.living_room
|
|
- service: huesyncbox.set_sync_mode
|
|
target:
|
|
entity_id: media_player.sync_box
|
|
data:
|
|
mode: game
|
|
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
|
|
- service: huesyncbox.set_sync_mode
|
|
target:
|
|
entity_id: media_player.sync_box
|
|
data:
|
|
mode: game
|
|
tv_atv:
|
|
alias: Android TV
|
|
icon: mdi:android
|
|
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: androidtv.adb_command
|
|
data:
|
|
command: HOME
|
|
entity_id: media_player.nvidia_shield
|
|
- service: huesyncbox.set_sync_mode
|
|
target:
|
|
entity_id: media_player.sync_box
|
|
data:
|
|
mode: 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: switch.harmonyhub_shield_tv
|
|
state: 'off'
|
|
sequence:
|
|
- service: input_select.select_option
|
|
data:
|
|
option: remote.shield
|
|
target:
|
|
entity_id: input_select.tv_select
|
|
- 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: script.tv_f1tv
|
|
- service: huesyncbox.set_sync_mode
|
|
target:
|
|
entity_id: media_player.sync_box
|
|
data:
|
|
mode: video
|
|
|
|
tv_f1tv:
|
|
alias: F1TV
|
|
icon: mdi:android
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.harmonyhub_shield_tv
|
|
state: '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: remote.turn_off
|
|
target:
|
|
entity_id: remote.harmonyhub
|