FR: 'options:' doesn't work when I use 'template:' as filter
See original GitHub issueI’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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (1 by maintainers)
Top Results From Across the Web
JetSmartFilters Not Working: 7 Things You Need to Check
In this troubleshooting article, you will find solutions to the 7 most common issues why JetSmartFilters may not be working.
Read more >Filter data in a range or table - Microsoft Support
Use filters to temporarily hide some of the data in a table, so you can focus on the data you want to see....
Read more >How do I perform query filtering in django templates
The easiest is to do the filtering, then pass the result to ... to templates that you are working on, but use Django's...
Read more >Built-in template tags and filters - Django documentation
This document describes Django's built-in template tags and filters. It is recommended that you use the automatic documentation, if available, ...
Read more >Edit List View Filters in Lightning Experience - Salesforce Help
The filter logic statement can't reference a filter number that doesn't exist. Note NOT doesn't work with parenthetical expressions. For example, the expression ......
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
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.