found another issue. variables this.entity_id
in an auto-entities config not being handled by the decluttering card.
consider a regular entities with decluttering:
- type: entities
entities:
- type: custom:decluttering-card
template: event_date
variables:
- entity: sensor.verjaardag_me
and decluttering:
card:
type: custom:template-entity-row
entity: '[[entity]]'
state: >
{% if states[config.entity] is not none %}
{{states(config.entity)}} {{state_attr(config.entity,'unit_of_measurement')}}
{% else %} Not yet set
{% endif %}
secondary: >
{% if states[config.entity] is not none %}
{{state_attr('[[entity]]','type')}}: {{state_attr('[[entity]]','original_date')}}
{% else %} Not yet set
{% endif %}
showing perfectly in dashboard, including the secondary line based on config.entity (which is the template entity row translation of the cards entity_id.
now, setting this in an auto-entities, so I dont have to list all events manually, and, more importantly, can sort them based on state:
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.verjaardag*
- entity_id: sensor.ontmoetings*
- entity_id: sensor.trouwdag
options:
type: custom:decluttering-card
template: event_date
variables:
- entity: this.entity_id
sort:
method: state
numeric: true
it works perfectly fine, and sorts all events. However, there is no secondary line!
Ofc I also tries to use
variables:
- entity: config.entity
but that has no result at all either.
to test the card setup itself, I also entered a true entity_id like in the verbose config. No secondary line either!
yet again a decluttering-card anomaly? How come it recognizes the entity in the auto-entities, even without setting the variables:
options:
type: custom:decluttering-card
template: event_date
# variables:
# - entity: this.entity_id
but does not use it for the secondary_line…
Ive also changed the secondary line template to:
secondary: >
{% if states[config.entity] is not none %}
{{state_attr(config.entity,'type')}}: {{state_attr(config.entity,'original_date')}}
{% else %} Not yet set
{% endif %}
and still, no result using the decluttering card
heck, it doesnt even consider the options with decluttering card, I can take that out completely, and the listing remains identical… huh?
UPDATE
it was a user error…
I missed an Asterix after sensor.trouwdag, and had to copy&paste the options section on all inured filters:
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.verjaardag*
<<: &options
options:
type: custom:decluttering-card
template: event_date
variables:
- entity: this.entity_id
- entity_id: sensor.ontmoetings*
<<: *options
- entity_id: sensor.trouwdag*
<<: *options
sort:
method: state
numeric: true
now works as expected.