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

180 lines
4.9 KiB
YAML
Raw Normal View History

2021-04-03 20:55:49 +00:00
tv_nintendo_switch:
alias: Nintendo Switch
2021-05-24 22:10:22 +00:00
icon: mdi:nintendo-switch
2021-04-03 20:55:49 +00:00
sequence:
2023-12-15 13:30:32 +00:00
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: Nintendo Switch
2021-04-03 20:55:49 +00:00
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
2023-09-16 22:37:51 +00:00
- service: select.select_option
2021-09-05 17:17:28 +00:00
target:
2023-09-16 22:37:51 +00:00
entity_id: select.sync_box_sync_mode
2021-09-05 17:17:28 +00:00
data:
2023-09-16 22:37:51 +00:00
option: Game
2022-04-05 22:29:44 +00:00
tv_xbox:
alias: Xbox Series X
icon: mdi:microsoft-xbox
sequence:
2023-12-15 13:30:32 +00:00
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: Xbox
2022-04-05 22:29:44 +00:00
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
2023-09-16 22:37:51 +00:00
- service: select.select_option
2022-04-05 22:29:44 +00:00
target:
2023-09-16 22:37:51 +00:00
entity_id: select.sync_box_sync_mode
2022-04-05 22:29:44 +00:00
data:
2023-09-16 22:37:51 +00:00
option: Game
2021-04-05 09:44:03 +00:00
tv_ps4:
alias: PlayStation 4
2021-05-24 22:10:22 +00:00
icon: mdi:sony-playstation
2021-04-05 09:44:03 +00:00
sequence:
2023-12-15 13:30:32 +00:00
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: PlayStation
2021-04-05 09:44:03 +00:00
- service: media_player.select_source
data:
source: TV
target:
entity_id: media_player.living_room
2023-09-16 22:37:51 +00:00
- service: select.select_option
2021-09-05 17:17:28 +00:00
target:
2023-09-16 22:37:51 +00:00
entity_id: select.sync_box_sync_mode
2021-09-05 17:17:28 +00:00
data:
2023-09-16 22:37:51 +00:00
option: Game
2022-04-05 22:29:44 +00:00
tv_atv:
alias: Android TV
icon: mdi:android
sequence:
- choose:
- conditions:
- condition: state
2023-12-15 13:30:32 +00:00
entity_id: select.harmonyhub_activities
state: 'Power Off'
2022-04-05 22:29:44 +00:00
sequence:
2023-12-15 13:30:32 +00:00
- service: select.select_option
target:
entity_id: select.harmonyhub_activities
data:
option: SHIELD TV
2022-04-05 22:29:44 +00:00
- 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
2023-09-16 22:37:51 +00:00
- service: select.select_option
2022-04-05 22:29:44 +00:00
target:
2023-09-16 22:37:51 +00:00
entity_id: select.sync_box_sync_mode
2022-04-05 22:29:44 +00:00
data:
2023-09-16 22:37:51 +00:00
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
2023-12-15 13:30:32 +00:00
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
2023-12-15 13:30:32 +00:00
- 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
2023-09-16 22:37:51 +00:00
- service: select.select_option
target:
2023-09-16 22:37:51 +00:00
entity_id: select.sync_box_sync_mode
data:
2023-09-16 22:37:51 +00:00
option: Video
tv_f1tv:
alias: F1TV
icon: mdi:android
sequence:
- choose:
- conditions:
- condition: state
2023-12-15 13:30:32 +00:00
entity_id: select.harmonyhub_activities
state: 'Power Off'
sequence:
- service: remote.send_command
2022-08-06 22:27:53 +00:00
data:
command: HOME
target:
entity_id: "{{ states('input_select.tv_select') }}"
2022-08-06 22:27:53 +00:00
- delay: 5
- service: remote.turn_on
2022-08-06 22:27:53 +00:00
data:
activity: http://play.google.com/store/apps/details?id=com.formulaone.production
2022-08-06 22:27:53 +00:00
target:
entity_id: "{{ states('input_select.tv_select') }}"
2022-08-06 22:27:53 +00:00
- delay: 5
- service: remote.send_command
2022-08-06 22:27:53 +00:00
data:
command: DPAD_CENTER
2022-08-06 22:27:53 +00:00
target:
entity_id: "{{ states('input_select.tv_select') }}"
- delay: 5
- service: remote.send_command
2022-08-06 22:27:53 +00:00
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') }}"
2021-04-03 20:55:49 +00:00
tv_off:
alias: 'TV Off'
2021-05-24 22:10:22 +00:00
icon: mdi:power
2021-04-03 20:55:49 +00:00
sequence:
2021-09-05 17:17:28 +00:00
- service: remote.turn_off
target:
entity_id: remote.harmonyhub