thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.26k stars 115 forks source link

Feature Request: Filter by floor #434

Open SLaks opened 6 months ago

SLaks commented 6 months ago

I'd love to have an auto-entities card that shows all entities in all areas belonging to a specific floor in HA 2024.4+

pos-ei-don commented 3 months ago

yes pleeeeaaasssee!!!

mal2856 commented 3 months ago

Did anyone figure out a way to do this using the Jinja template filter workaround?

NickChristensen commented 2 months ago

You could use floors() and areas() to get entites by that heirarchy:

{% for floor in floors() %}
  Floor: {{floor}}
  {% for area in floor_areas(floor) %}
    Area: {{area}}
    {% for entity in area_entities(area) %}
      {{entity}}
    {% endfor %}
  {% endfor %}
{% endfor %}

You could adapt this to the filter/template structure, and you would have to output JSON for your card configuration similar to https://github.com/thomasloven/lovelace-auto-entities/issues/382#issuecomment-1824799660

Bsector commented 2 weeks ago

Yes, I also need this function!!!