Closed j-loewen closed 1 year ago
So I'm looking to do exactly this and I was about to point out how it wasn't possible, but then I noticed this in the docs:
The filter section template takes a jinja2 template which evaluates to a list of entities or entity objects.
"entity objects" being the key word here.
And I think I have a proof of concept to show how this works. Here's a relevant excerpt:
...
filter:
template: |
{{
[
{
"type": "custom:mushroom-light-card",
"entity": "light.kitchen_lights"
}
]
}}
...
So you'd want to make a template that generates not a list of entities, but entity objects that have all the properties you want. Which in your case is quite complicated, but should be doable.
Also for future reference, I wanted to point out you've put the options
map in the wrong location. You've nested it under filters
, but it's meant to be a map nested under a filter definition:
...
filter:
include:
- domain: light
options:
type: custom:mushroom-light-card
...
Hope this helps!
Hello,
I need to use a filter template and a custom card type. Is this possible? Everything I try doesn't work.
What am I doing wrong?