1
0

Add androidtv

This commit is contained in:
pgrondek 2021-04-03 22:55:49 +02:00
parent 0a5e69aa9e
commit 30dec7589f
2 changed files with 136 additions and 0 deletions

View File

@ -42,6 +42,31 @@ influxdb:
alarm_control_panel: alarm_control_panel:
- platform: manual - platform: manual
media_player:
- platform: androidtv
name: nVidia Shield
device_class: androidtv
host: 192.168.60.18
adbkey: "/config/android/adbkey"
# exclude_unnamed_apps: true
apps:
com.google.android.leanbacklauncher: AndroidTV Launcher
com.netflix.ninja: Netflix
com.liskovsoft.smarttubetv.beta: SmartTube
tv.twitch.android.app: Twitch
org.mozilla.firefox: Firefox
com.tvp.vodtv.tv: TVP VOD
pl.redefine.ipla: IPLA
com.amazon.amazonvideo.livingroom: Prime Video
eu.hbogo.androidtv.production: HBO GO
state_detection_rules:
'com.netflix.ninja':
- 'media_session_state'
'com.amazon.amazonvideo.livingroom':
- 'media_session_state'
'eu.hbogo.androidtv.production':
- 'media_session_state'
spotify: spotify:
client_id: !secret spotify_client_id client_id: !secret spotify_client_id
client_secret: !secret spotify_client_secret client_secret: !secret spotify_client_secret

View File

@ -0,0 +1,111 @@
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_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: 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: 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: Netflix
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: 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