Hope this helps and gives some ideas.also have a custom universal media player
configuration.yaml
media_players:
- platform: universal
name: Test Universal
state_template: >
{% if is_state('switch.remote_ir_kodi', 'idle')
and is_state('switch.remote_ir_ps4', 'off')
and is_state('switch.remote_freeview_on', 'off')
and is_state('switch.remote_ir_xbox', 'off')
and is_state('switch.remote_ir_netflix', 'off') %}
off
{% else %}
{{ states('media_player.philips_ir_control') }}
{% endif %}
children:
- media_player.playstation_4
- media_player.43put680179
- media_player.kodi__philips_tv
- media_player.philips_ir_control
commands:
turn_on:
service: media_player.turn_on
data:
entity_id: switch.remote_ir_power
turn_off:
service: media_player.turn_off
data:
entity_id: media_player.playstation_4
service: media_player.media_stop
data:
entity_id: media_player.kodi__philips_tv
service: switch.turn_off
data:
entity_id: switch.remote_ir_power
volume_up:
service: media_player.volume_up
data:
entity_id: media_player.philips_ir_control
volume_down:
service: media_player.volume_down
data:
entity_id: media_player.philips_ir_control
volume_mute:
service: media_player.volume_mute
data:
entity_id: media_player.philips_ir_control
select_source:
service: media_player.select_source
data_template:
entity_id: media_player.philips_ir_control
source: '{{ source }}'
volume_set:
service: media_player.volume_set
data_template:
entity_id: media_player.philips_ir_control
volume_level: '{{ volume_level }}'
attributes:
state: switch.living_room_tv
is_volume_muted: switch.living_room_mute
volume_level: media_player.philips_ir_control|volume_level
source: media_player.philips_ir_control|source
source_list: media_player.philips_ir_control|source_list
Also used custom PS4 media player with ps4 waker to have custom ps4 media player game select and power control etc. see Playstation 4/PS4 custom component for tutorial