Need help with configuration of Universal Media Player. I can’t get source working as I want. If there is only media_player.orange|source its have attribute “source”. Maybe some1 could help me out to make it working well.
media_player:
- platform: universal
name: Kino domowe
device_class: tv
toggle_power: false
children:
- media_player.plex_plex_cast_chromecast_5
- media_player.plex_plex_for_android_tv_bravia_4k_vh2_2
- media_player.orange
- media_player.salon_tv
# - media_player.android_tv_192_168_1_74
commands:
media_next_channel:
service: media_player.media_next_track
data: {}
target:
entity_id: media_player.livebox
media_previous_track:
service: media_player.media_previous_track
data: {}
target:
entity_id: media_player.livebox
select_source:
service: script.turn_on
data: {}
target:
entity_id: >
{% if source == 'Netflix' %}
script.netflixx
{% elif source == 'Tv' %}
script.orange
{% elif source == 'DisneyPlus' %}
script.netflix
{% elif source == 'Amazon Prime' %}
script.prime
{% elif source == 'Youtube' %}
script.youtube
{% elif source == 'TVP 1 HD' %}
script.tvp1
{% elif source == 'TVP 2 HD' %}
script.tvp2
{% elif source == 'Polsat HD' %}
script.polsat
{% elif source == 'TVN HD' %}
script.tvn
{% elif source == 'TVN 7 HD' %}
script.tvn7
{% elif source == 'TV4 HD' %}
script.tv4
{% elif source == 'TTV HD' %}
script.ttv
{% elif source == 'TV6 HD' %}
script.tv6
{% elif source == 'Nova TV' %}
script.nova
{% elif source == 'WP HD' %}
script.wp
{% elif source == 'Paramount Network' %}
script.paramount
{% endif %}
attributes:
source: >
{% if is_state_attr('media_player.salon_tv', 'app_name', 'TV') %}
media_player.orange|source
{% else %}
media_player.kino_domowe|app_name
{% endif %}
source_list: input_select.lista_kanalow|options