Types of Card for Templates
See original GitHub issueIs there a way to get templates to display a certain type of card for those that match the template? For example, I’m looking to make a card that has an input select at the top, and then a list of media players under it. After a LONG time of messing with it, I finally got it to at least display the entities I wanted, but now I’m trying to get them to display as the right type of cards. Is it possible to set the media players that the template spits out to be a different type of card than the rest similar to my second example below, but with templates?
card:
show_header_toggle: false
title: Volume Control
type: entities
filter:
include:
- entity_id: input_select.alexa_wha_groups
template: >
{%if is_state('input_select.alexa_wha_groups','Master Bedroom')%}{% for
entity_id in states.group.alexa_wha_master_bedroom.attributes.entity_id
%}{{- entity_id }},{% endfor %}
{%elif is_state('input_select.alexa_wha_groups','Downstairs')%}{% for
entity_id in states.group.alexa_wha_downstairs.attributes.entity_id %}{{-
entity_id }},{% endfor %}
{%elif is_state('input_select.alexa_wha_groups','Upstairs')%}{% for
entity_id in states.group.alexa_wha_upstairs.attributes.entity_id %}{{-
entity_id }},{% endfor %}
{%elif is_state('input_select.alexa_wha_groups','Everywhere')%}{% for
entity_id in states.group.alexa_wha_everywhere.attributes.entity_id %}{{-
entity_id }},{% endfor %}
{%elif is_state('input_select.alexa_wha_groups','Everywhere but the Living
Room')%}{% for entity_id in
states.group.alexa_wha_everywhere_but_living_room.attributes.entity_id %}{{-
entity_id }},{% endfor %}
{%endif%}
show_empty: true
type: 'custom:auto-entities'
card:
show_header_toggle: false
title: Audio Players
type: entities
filter:
exclude:
- state: standby
include:
- entity_id: media_player.spotify_media_player
options:
artwork: cover
group: true
hide:
icon: true
power: true
info: short
type: 'custom:mini-media-player'
- group: group.audio_players
options:
artwork: cover
group: true
hide:
icon: true
power: true
source: true
info: short
type: 'custom:mini-media-player'
show_empty: false
type: 'custom:auto-entities'
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
110 Different card styles and templates ideas - Pinterest
Apr 29, 2012 - Explore Linda Lafreniere's board "different card styles and templates", followed by 204 people on Pinterest. See more ideas about...
Read more >Top 5 Card Template Design Categories For 2022
Here Is The Curated List Of Top 5 Card Template Design Categories For 2022 · 01. Greeting Card Template · 02. Note Card...
Read more >Free printable card templates you can customize - Canva
Make your thoughtful and touching messages shine with Canva's free card templates that you can customize, print, and give to others on any...
Read more >Plastic Card Templates - CARDSource
When creating a plastic gift card, membership, or one of many programs, you'll need to create a card. Here are plastic card templates...
Read more >Playing Cards : Formatting & Templates - Print & Play
Standard Card Templates ; Standard Large, 3.5” x 5”, AI ; Standard Jumbo, 3.5” x 5.5”, AI ; Tarot, 2.75” x 4.75”, AI...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep … I have this issue too … appears to be no way to set options for a template filter 😦
Sorry I just cant get this to work.
I have a template that returns all Google Home Speakers:
and I’d like to display each entity in a
type: grid
as acustom:button-card
.Any help would be greatly appreciated.