Open thesaabdr opened 2 years ago
I have seen this, too, and haven't yet figured out the solution to the component. A work around would be to use a helper + an automation to call the select_source service on the media player.
I ended up using the Mini Media Player (can get it using HACS) instead of the built-in one. It is a very nice component that allows you to choose sources when it is off (source == 0)
In addition, to share my setup:
I created a mini-media-player block for each of my "Players" (the music sources that in my case are Sonos) with an auto-entries (also available via HACS) mini-media-player for each of the active "Speakers" (the Crestron outputs). Then I added another auto-entries block that lists all the speakers that don't currently have a source so there is a single place to easily assign sources to speakers. Check it out:
views:
- theme: Backend-selected
title: Home Music
badges: []
cards:
- type: custom:auto-entities
card:
type: entities
title: Unassigned Speakers
filter:
include:
- entity_id: media_player.*_speakers
state: 'off'
options:
type: custom:mini-media-player
group: true
toggle_power: false
hide:
controls: true
sort:
method: name
show_empty: false
unique: true
Then one of these for each Sonos (source)
- type: entities
entities:
- type: custom:mini-media-player
entity: media_player.main_floor
artwork: cover
group: true
info: short
hide:
mute: true
power: true
source: true
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: media_player.*_speakers
attributes:
source: Main Floor Sonos
options:
type: custom:mini-media-player
group: true
min_volume: 5
max_volume: 90
toggle_power: false
hide:
controls: true
mute: true
sort:
method: name
show_empty: false
unique: true
I have the media player working. If I set the source to something above 0, then I can select sources, set volume, etc in HA. If the source is 0, then I can't do anything in HA and it is grayed out. How can I select a source in HA from an off state?