Map errors on empty list of filtered entities
See original GitHub issueusing
- type: custom:auto-entities
show_empty: false
card:
type: map
default_zoom: 4
filter:
template: |
{% set km = states('input_number.quakes_near')|float %}
{% set location = states('input_select.quakes_near') %}
{% for s in states.geo_location|selectattr('attributes.source','eq','usgs_earthquakes_feed') %}
{% if distance(s.entity_id,location) < km %}
{{- s.entity_id -}}{{',' if not loop.last else ''}}
{% endif %}
{% endfor %}
95% of the time the map wont show, while the template is providing a list of geo_location entities. Error in the log:
Error: Either entities or geo_location_sources must be specified


every now and then I see it pop up:

this card is part of a bigger conditional entities card, which all show, except for the map, which is the small red line obviously:

I’ve also made this template into an attributes_template of another sensor, so the backend would do the work, but that doesn’t make a difference.
{{state_attr('sensor.earthquakes_near','raw_list')}}
can’t we do this?
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
List of Map filter results in an extra empty item - Stack Overflow
You are building maps by filtering on each ones contents. And one of them will be empty since no values were passed (but...
Read more >ContentDocumentLink filter error on ContentDocumentID ...
recently I encountered another very weird issue where I was not getting results for map.keySet() or Set<id> even if I put them in...
Read more >Indexer errors and warnings - Azure Cognitive Search
This article provides information and solutions to common errors and warnings you might encounter during indexing and AI enrichment in Azure ...
Read more >5 Common Hibernate Mistakes That Cause Dozens of ...
5 Common Hibernate Mistakes That Cause Dozens of Unexpected Queries ; 1 1. Not Initializing Lazily Fetched Associations. 1.1 ; 2 2. Using...
Read more >Geocoding Service | Maps JavaScript API - Google Developers
To retrieve all the political entities that contain a specific address, you should use ... An empty list of types indicates there are...
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
https://github.com/home-assistant/frontend/pull/9216