lovelace-auto-entities: FR: 'options:' doesn't work when I use 'template:' as filter
I’d like to have the possibility to add ‘options:’ to the entities list when I filtered them using a template. For example:
type: custom:auto-entities
card:
type: entities
show_header_toggle: false
filter:
template: |
{% set temp_map =
{ 'Diesel':'diesel',
'E10':'e10',
'Super':'e5' } %}
{% set state = states('input_select.fuel_type') %}
{% set sprit = temp_map[state] if state in temp_map %}
{% for s in states.sensor if 'tankerkoenig' in s.entity_id %}
{% if (s.attributes.fuel_type == sprit) and not is_state(s.entity_id, 'False') %}
{{ s.entity_id }}
{% endif %}
{% endfor %}
options:
name: Test
sort:
method: state
When I use the syntax with filter: include: ...
than options:
work fine as expected. But I couldn’t find a way to add ‘options:’ to a template section.
Would be great to have that.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (2 by maintainers)
fully agree with this, I have exactly the same case…
This is my current
This would be much nicer, in my opinion. But not necessary.
It would be really nice to be able to use
options:
withtemplate:
. I think that the workaround above would work in my current scenario, but it’d just be simpler if the existing feature worked.