lovelace-auto-entities: Filter template in version 1.16.1 breaks history-graph in 2025.6
Before update to 1.16.1 my card worked perfectly On 1.16.1 it only shows “Configuration error” and no messages in browser DevTools Console Chrome Version 137.0.7151.120 (Official Build) (64-bit) HAOS 15.2 Supervisor 2025.05.5 HA Core 2025.6.1
type: custom:auto-entities
card:
title: Running
type: history-graph
hours_to_show: 24
filter:
template: |-
{% set STATES = states
| selectattr('entity_id', 'in', integration_entities('hassio')) -%}
{%- for STATE in STATES -%}
{%- if(STATE.entity_id.endswith('_running')) -%}
{%- set short_name = state_attr(STATE.entity_id, 'friendly_name')
.replace('Home Assistant', '')
.replace('& Web Terminal', '') -%}
{{ { 'entity': STATE.entity_id,
'name': short_name } }},
{%- endif -%}
{%- endfor %}
exclude:
- name: Home Assistant Core*
- name: Home Assistant Supervisor*
- name: Home Assistant Operating System*
sort:
method: name
layout_options:
grid_columns: 8
grid_rows: auto
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 1
- Comments: 62
Is there another Issue on the History draw delay? Let’s continue this discussion there so as to not confuse the issue.
This is the code that generates the No state found error:
The template looks up entities from a group sensor
Edit; it even works now. My sort was miss aligned, I can confirm you fixed it 🥳
Attached here - remove .txt
auto-entities.js.txt
https://github.com/home-assistant/frontend/pull/26064
@dcapslock Thank you wery much! It works ) Hope eval_js will not be broken in future releases )
The issue with History Graph delayed in showing all data, is due to downsampling introduced in 2025.6. The downsampling routine takes in
clientWidthof graph, which when hidden like in collapsable-cards, expander-card etc., is 0, so the downsampling ends up returning only a start and end point. Fingers crossed that a Frontend change can be made (don’t downsample ifclientWidthis 0). In such a case the first display may be not 100% accurate as downsampling was introduced due to eCharts not working well with non-uniform X axis. However it would mean that the first display after being non-hidden would match prior 2025.6 and back to when eCharts was introduced.I was using the iPhone companion app, and now closed the frontend cache, The config error displayed previously changed into this:
perfect! also with
type: mapI hoped this might also fix the other issue, using labels as filter, maybe somehow because the card is more efficient now, but alas, that is not the case…
it is so grindingly slow, it cant even list the available labels… but that is an old issue, and another entirely apparently
@Mariusthvdb even with the Frontend change, auto-entities is still catering for those cards with a pretty ugly hack. I am proposing a much cleaner way to address. Already have a PR created - #558. You will see that there are 6 lines added and 45 removed. The old method needed updates if error messages changed. This method only needs cards updated that we wish to workaround, currently…
If anyone wants a JS file to test I can attach to a comment. Just let me know.
Maybe a coincidence, but the issues with these cards started with the introduction of the new get_statistics service
yeah, and its funny, because we can mitigate that struggling label issue
by including that as template filter.
and make it behave super fast.
well that was truly undocumented 😉 in all these years…
for reference: https://github.com/thomasloven/lovelace-auto-entities/blob/360722dc512f6f3aea3bbfbe08553b06c37880b6/src/process_entity.ts#L22