I set up a universal media player entity (Universal Media Player - Home Assistant) and I was wondering if there was a way to force which child is active? Basically, my issue is this - I used it to create a media player for my harmony setup in my bedroom, with the integrations for my connected devices serving up the metadata and all that good stuff. Problem is this: since the Roku doesn’t believe in “off”, it takes a while for it to enter the “idle” state when I switch to another input. I’d solve this by making it the last item in the list, so that if other stuff is on, they’d have priority. Except… I also have a PS4, which if I’m not using it is in “Standby” - which isn’t ‘idle’ or ‘off’ so basically, it will always override the roku if it’s placed higher than it on the media list.
TLDR; is there a way for me to force the active child based on rules of my own? Maybe by leveraging the state of the harmony remote, or force it to see the state of the playstation as being turned off even when it’s on ‘standby’?
Here’s my config, in case it’s needed:
- platform: universal
name: Bedroom TV
children:
- media_player.bedroom_sage
- media_player.alphacentauri
- media_player.roku_ultra
- media_player.playstation_4
attributes:
state: remote.bedroom
source_list: remote.bedroom|activity_list
source: remote.bedroom|current_activity
is_volume_muted: media_player.bedroom_speaker_2|is_volume_muted
volume_level: media_player.bedroom_speaker_2|volume_level
commands:
turn_on:
service: remote.turn_on
target:
entity_id: remote.bedroom
turn_off:
service: remote.turn_off
target:
entity_id: remote.bedroom
volume_up:
service: media_player.volume_up
target:
entity_id: media_player.bedroom_speaker
volume_down:
service: media_player.volume_down
target:
entity_id: media_player.bedroom_speaker
volume_mute:
service: media_player.volume_mute
target:
entity_id: media_player.bedroom_speaker
select_source:
service: remote.turn_on
target:
entity_id: remote.bedroom
data:
activity: "{{ source }}"
volume_set:
service: media_player.volume_set
target:
entity_id: media_player.bedroom_speaker
data:
volume_level: "{{ volume_level }}"
device_class: tv