Update F1TV script
Add script for bedroom tv Extract original script to generic one Add TV select for generic f1tv script
This commit is contained in:
parent
bea456e067
commit
7ff4e7864b
@ -109,6 +109,13 @@ input_select:
|
||||
options:
|
||||
- Spotify
|
||||
- Apple Music
|
||||
tv_select:
|
||||
name: TV Select for ATV
|
||||
icon: mdi:android
|
||||
options:
|
||||
- remote.bedroom_atv
|
||||
- remote.shield
|
||||
|
||||
input_text:
|
||||
bathroom_playlist:
|
||||
name: Bathroom playlist
|
||||
|
@ -73,6 +73,48 @@ tv_atv:
|
||||
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
|
||||
@ -83,34 +125,36 @@ tv_f1tv:
|
||||
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
|
||||
- service: remote.send_command
|
||||
data:
|
||||
command: HOME
|
||||
entity_id: media_player.nvidia_shield
|
||||
- delay: 5
|
||||
- service: media_player.select_source
|
||||
data:
|
||||
source: com.formulaone.production
|
||||
target:
|
||||
entity_id: media_player.nvidia_shield
|
||||
entity_id: "{{ states('input_select.tv_select') }}"
|
||||
- delay: 5
|
||||
- service: androidtv.adb_command
|
||||
- service: remote.turn_on
|
||||
data:
|
||||
command: CENTER
|
||||
entity_id: media_player.nvidia_shield
|
||||
- service: huesyncbox.set_sync_mode
|
||||
activity: http://play.google.com/store/apps/details?id=com.formulaone.production
|
||||
target:
|
||||
entity_id: media_player.sync_box
|
||||
entity_id: "{{ states('input_select.tv_select') }}"
|
||||
- delay: 5
|
||||
- service: remote.send_command
|
||||
data:
|
||||
mode: video
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user