lovelace-auto-entities
lovelace-auto-entities copied to clipboard
Feature Request: Template filters don't work with special options
It does not seem to be possible to use special options with template as the "query" instead of include. Using both include and template will set for example the card type defined in options for the results from include but not from template, which will result in a "card type not found error.
type: custom:auto-entities
card:
type: vertical-stack
card_param: cards
filter:
template: |
{%
set grouped =
states.light
| selectattr('entity_id', 'in', area_entities('Wohnzimmer'))
| selectattr('attributes.entity_id', 'defined')
| map(attribute='attributes.entity_id')
| expand()
| map(attribute='entity_id')
| list
%} {{
states.light
| selectattr('entity_id', 'in', area_entities('Wohnzimmer'))
| rejectattr('entity_id', 'in', grouped)
| selectattr('attributes.entity_id', 'undefined')
| map(attribute='entity_id')
| list
}}
options:
type: custom:big-slider-card
attribute: brightness
transition: 0.3
colorize: true
show_percentage: true
bold_text: true
hold_time: 600
settle_time: 3000
tap_action:
action: toggle
hold_action:
action: more-info
sort:
method: entity_id
reverse: false
ignore_case: false
t does not seem to be possible to use special options with template as the "query" instead of include.
Yes, this is written in Docs.
The options
option is a part of include
& exclude
filters.
So, your issue should be a FEATURE REQUEST - then name it accordingly.
searching has led me here, hoping for the same thing. I'm using a template to only include the 'master' of speaker groups in media_player, but in doing so I must give up using custom:mini-media-player card, so that's a shame. For now I'll have to decide if I want a pretty representation of 3 cards showing the same thing, or 1 bland one.
Looking for the same thing. What a shame