Skip to content

The Ultimate Home Assistant Auto-Entities Guide (2026 Edition)

30/01/2026

Last updated on January 30, 2026

If you’ve been using Home Assistant for a while, you know the struggle: your dashboard (formerly Lovelace) starts to look like an overgrown jungle. Dozens of entities, cards that are only useful at certain times, and lists you have to manually update every time you add a new device. In 2026, a static dashboard is a thing of the past. This is where auto-entities comes in—the definitive tool for creating dynamic Home Assistant cards that update themselves. With this custom card, you can automatically populate your views with entities that match criteria you define, showing you only what matters, when it matters.

In this ultimate guide, I’ll walk you through everything from installation to mastery, transforming your static dashboards into intelligent, context-aware interfaces with Home Assistant auto-entities.

Installing Auto-Entities via HACS

The easiest and recommended way to install auto-entities is through the HACS (Home Assistant Community Store). If you don’t have it yet, I strongly recommend installing it, as it’s the gateway to the best community-built customizations. Once you have HACS up and running, the process is a breeze:

  1. Navigate to HACS from your Home Assistant side menu.
  2. Go to the Frontend section.
  3. Click the blue “Explore & Download Repositories” button in the bottom right corner.
  4. In the search bar, type “auto-entities” and select it from the list.
  5. On the next screen, hit the “Download” button. HACS will handle fetching the latest version for you.
  6. After downloading, HACS will prompt you to add the resource to your dashboards. Since 2025, HACS typically handles this automatically. If it doesn’t, just add /hacsfiles/auto-entities/auto-entities.js as a JavaScript Module under Settings > Dashboards > 3-dot Menu > Resources.

That’s it! You’re now ready to start building your first dynamic cards.

Core Concepts: How Does Auto-Entities Work?

To understand the power of auto-entities, you just need to grasp its basic structure. It acts as a “wrapper” for other Home Assistant cards. You tell it what kind of card to display (card) and how it should find the entities to populate it (filter).

Here’s the general syntax:

type: custom:auto-entities
card:
  type: entities # Or glance, grid, etc.
  title: My Dynamic Card
filter:
  include:
    - # Rules for including entities go here
  exclude:
    - # And rules for excluding them go here

The main components are:

  • card (Required): This is where you define the card you want to fill. It can be an Entities card, a Glance card, a Grid card, or even other custom cards. Just configure it as you normally would, but without the entities: section.
  • filter (Required): This is the brain of the operation. It’s divided into two primary lists:
    • include: Contains one or more rules. An entity will be added to the card if it meets all the conditions within any single rule block in this list.
    • exclude: Similar to include, but for removing entities. If an entity matches the conditions of a rule here, it will be removed from the final list.
  • sort: Allows you to sort the resulting entities by name, state, last change, etc. Incredibly useful for prioritizing information.
  • show_empty: Defaults to true. If you set this to false, the card will hide completely if it doesn’t find any entities to display. Perfect for keeping your dashboard clean!

Practical Home Assistant Auto-Entities Examples (2026 Guide)

The best way to learn is by doing. Here are several use cases I’ve implemented in my own Home Assistant setup that will give you a clear idea of what’s possible.

Example 1: Show Only Lights That Are On

This is the classic use case and a fantastic starting point. We’ll create a card that only appears when lights are on in the house and shows exactly which ones they are.

type: custom:auto-entities
# Hides the card if no lights are on
show_empty: false
card:
  type: glance
  title: Lights On
filter:
  include:
    # Select all entities from the 'light' domain
    - domain: light
      # Filter down to only those with the state 'on'
      # Pro-tip: 'on' and 'off' are booleans in YAML. Always wrap them in quotes!
      state: "on"
      # Add an option to each entity so tapping it toggles the light
      options:
        tap_action:
          action: toggle

Expected Outcome: You’ll see a Glance card titled “Lights On” with an icon for each light that is currently on. If all lights are off, the card will disappear entirely.

Example 2: Low Battery Monitor

An absolute must-have to avoid dead sensors. This card will display any device with a battery level below 20% and sort them so the most critical ones appear first.

type: custom:auto-entities
card:
  type: entities
  title: Low Batteries - Action Required!
sort:
  # Sort by state (the battery level) numerically
  method: state
  numeric: true
filter:
  include:
    # Find any entity with an attribute named 'battery_level'
    - attributes:
        # The battery level must be less than or equal to 20
        battery_level: "<= 20"
      options:
        # Show the last update time as secondary info
        secondary_info: last-changed
  exclude:
    # I exclude battery sensors that report a non-numeric state
    - state: "unavailable"
    - state: "unknown"

Expected Outcome: A list of your low-battery sensors. Each row will show the sensor’s name, its current battery level, and when it last reported. The sensors with the lowest battery levels will be at the top.

Example 3: Detect Offline or Unavailable Sensors

If you use Zigbee or Z-Wave devices, you know they can occasionally drop off the network. This setup helps you spot them at a glance.

type: custom:auto-entities
show_empty: false
card:
  type: entities
  title: Unavailable Devices
filter:
  # The 'or' section allows an entity to be included if it meets ANY
  # of the nested conditions, instead of all of them.
  or:
    - state: "unavailable"
    - state: "unknown"

Expected Outcome: An Entities card that only appears if a device has stopped reporting to Home Assistant, showing you a list of everything in an `unavailable` or `unknown` state.

Example 4: Unleash Extreme Power with Jinja2 Templates

For ultimate control, you can use Jinja2 templates to generate your entity list. This opens up a world of possibilities, as you can leverage the full programming logic they offer.

This example finds all temperature sensors reading above 28°C (about 82°F).

type: custom:auto-entities
card:
  type: entities
  title: High Temperature Alerts
filter:
  template: |
    {% set threshold = 28 %}
    {% set temperatures = namespace(entities=[]) %}
    {% for sensor in states.sensor %}
      {% if 'temperature' in sensor.entity_id and sensor.state | is_number and sensor.state | float > threshold %}
        {% set temperatures.entities = temperatures.entities + [sensor.entity_id] %}
      {% endif %}
    {% endfor %}
    {{ temperatures.entities }}

Expected Outcome: A list of all sensors whose `entity_id` contains the word “temperature” and whose current state is a number greater than 28.

Quick Filter Reference Cheatsheet

The true power of auto-entities lies in its versatile filtering options. Here’s a quick reference table with the most common ones to keep handy.

Filter OptionDescriptionExample Usage
domainFilter by the entity’s type.domain: light
stateFilter by the entity’s current state.state: "on"
entity_idFilter by the unique entity ID. Supports wildcards.entity_id: "sensor.temperature_*"
nameFilter by the entity’s friendly name. Supports regular expressions.name: "/[Bb]attery/"
areaFilter by the Area assigned to the entity in Home Assistant.area: "Living Room"
attributesFilter by an entity’s attributes. Supports numeric comparisons.attributes: { battery_level: "< 20" }
last_changedFilter by minutes since the last state change.last_changed: "> 60" (changed over an hour ago).
notNegates a filter. Includes entities that DO NOT meet the nested condition.not: { state: "off" }

Common Problems & Troubleshooting

  • My card is empty or doesn’t appear: You likely have show_empty: false set and no devices are matching your filters. Double-check your filter configuration under Developer Tools > States to ensure the `entity_id` and states you’re targeting are correct. YAML indentation is also critical—one wrong space can break everything!
  • My filter isn’t working as expected: Remember the logic: inside a single filter block in include, all conditions must be met (AND logic). If you use multiple filter blocks under include, only one of them needs to be met (OR logic). Also, don’t forget to put quotes around states like “on”, “off”, and for numerical comparisons like "> 50"!
  • I see a red error saying “custom element doesn’t exist: auto-entities”: This means the resource hasn’t loaded correctly. The quickest fix is to clear your browser’s cache and do a hard refresh (Ctrl+F5 or Cmd+Shift+R). If the problem persists, verify the resource is correctly added in your dashboard configuration.

Conclusion

As you can see, auto-entities is much more than a simple custom card; it’s a complete philosophy for designing Home Assistant dashboards. It allows you to graduate from crowded, static views to clean, relevant interfaces that adapt to your context in real-time. The auto-entities examples we’ve covered are just the tip of the iceberg.

My advice as an IoT Engineer is to start simple—like the list of lights that are on—and experiment from there. Think about what information is truly useful to you at any given moment and try to build a dynamic card for it. The possibilities are virtually endless!

If you have any questions or have created a configuration you’re particularly proud of, don’t hesitate to share it in the comments below!