Yes they are. These are created as follows (using mushroom and auto-entities):
- type: custom:auto-entities
card:
type: grid
columns: 1
show_header_toggle: false
state_color: true
square: false
title: Music Zones
card_param: cards
filter:
template: >
{% for MEDIAPLAYER in states.media_player |
selectattr("entity_id","in",integration_entities("xantech")) -%}
{% set SELECTZONE = "input_select.dax_source_" + (MEDIAPLAYER.entity_id).split("xantech8_")[1]
-%}
{% if MEDIAPLAYER.entity_id != "media_player.xantech8_xantech_house_audio"
-%}
{{
{
'type': 'custom:layout-card',
'layout_type': 'custom:grid-layout',
'layout': {
'max_cols': 3,
'grid-template-columns': 'auto 150px'
},
'cards': [
{
'type': 'custom:mushroom-media-player-card',
"tap_action": {
"action": "call-service",
"service": "media_player.toggle",
"target": {"entity_id": MEDIAPLAYER.entity_id}
},
'entity': MEDIAPLAYER.entity_id,
'layout': 'horizontal',
'fill-container': true,
'show_volume_level': true,
'collapsible_controls': false,
'use_media_info': true,
'volume_controls': ['volume_set']
},
{
"type": "custom:mushroom-select-card",
"entity": SELECTZONE,
"name": "Set Zone Sources",
"layout": "horizontal",
"icon_type": "none",
"primary_info": "none",
"secondary_info": "none",
}
]}
}},
{%- endif %}
{%- endfor %}
Why like this? … Why is because I like and use mushroom however the mushroom media_player card has no dropdown to select source.
What this does … it loops through the entire collection of media_players that have “xantech” (exceot the one for the entire unit) in the entity_id and creates a layout-card for each. Inside the layout card is a mushroom media_player and a mushroom select_card. Now these could be populated in many ways but I choose to create an input_select for each zone in a helper. The values are populated at homeassistant start:
- id: '1674499571539'
alias: Generate Dax Sources
description: ''
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: input_select.set_options
data_template:
entity_id:
- input_select.dax_source_deck
- input_select.dax_source_hot_tub
- input_select.dax_source_kitchen
- input_select.dax_source_patio
- input_select.dax_source_living_room
- input_select.dax_source_foyer
- input_select.dax_source_master
- input_select.dax_source_unused
options: '{{ state_attr(''media_player.xantech8_deck'',''source_list'') }}'
mode: single
Then changing any source in the popdown to another changes the source on the unit:
- id: '1686098641290'
alias: Change Dax Source
description: Change an individual DAX source zone
trigger:
- platform: state
entity_id:
- input_select.dax_source_deck
- input_select.dax_source_foyer
- input_select.dax_source_hot_tub
- input_select.dax_source_kitchen
- input_select.dax_source_living_room
- input_select.dax_source_master
- input_select.dax_source_patio
condition: []
action:
- service: media_player.select_source
data:
source: '{{ states(trigger.entity_id) }}'
target:
entity_id: '{{''media_player.xantech8_'' + trigger.entity_id.split(''source_'')[1]}}'
mode: single
I have other ones too like changing all the sources to the same value should you wish to like play Spotify on WiFi everywhere.
The other half of the screen allows you to pick what is coming in to a given source as some things could have multiple inputs. Like for instance, I have an Alexa plugged into one of the inputs. I can tell Alexa or send the command via Home Assistant to “Play Prince from Spotify on Stereo Alexa” … or I could also through the same Alexa play Pandora or Amazon Music or other things. I have a Volumio plugged into another input that can also have many different sources including 10,000 local mp3s.