🔹 Auto-entities - Automatically fill cards with entities

Is it possible to show the value of an attribute in the card rather than the main state value?

I have a bunch of Zigbee sensors integrated through zigbee2mqtt. They all have linkquality and battery attributes and some have other attributes as well. I would like to have a battery card that showed the battery levels of all of them for example.

Kind of this:

  - type: custom:auto-entities
    card:
      type: entities
    unique: true
    show_empty: true
    filter:
      include:
        - entity_id: device_tracker.*
          attributes:
            ip: "*.*"
          sort:
            count: 2
            method: name
          options:
            type: attribute          ##### show attribute value
            attribute: ip
            secondary_info: last-changed

image

The most difficult issue is to specify a filter to show only your required entities.
In my example only trackers with present “ip” attribute are listed.

1 Like

Thank you, that looks like what I need. I could not find that options: type: attribute in the documentation for the card.

I use this and it’s working OK.

card:
  title: Battery
  type: entities
type: custom:auto-entities
filter:
  include:
    - options:
        type: attribute
        attribute: battery
        secondary_info: last-changed
      attributes:
        battery: ">= 0"
sort:
  method: attribute
  attribute: battery
  numeric: true

Can I make it say “xx %” for the value?

1 Like

This is an option of the conventional Entities card.

Try using a suffix option.

Whatever is specified in the “options” section is passed directly to the row, this is not an auto-entities-specific.

Ah I see. Thank you.

For those who use Shelly devices and want a card with all their devices and clickable links to manage them:

card:
  show_header_toggle: false
  title: Shelly links
  type: entities
filter:
  template: |-
    {%- for state in states.sensor -%}
      {%- if  state.entity_id | regex_match("sensor.*ip", ignorecase=False) -%}    
          {{
            {
              'entity': state.entity_id,
              'name': state.attributes.friendly_name|replace(" IP",""),
              'type': 'weblink',
              'url': "http://"+state.state
            }
          }},
      {%- endif -%}
    {%- endfor -%}
type: custom:auto-entities

1 Like

i want to use the auto entity card and automatically build cards
so i would like to have a heading and seven entities in one vertical stack
these vertical stacks should repeat for all entities but always should contain 7 entities.

so:
vertical-stack1
heading1
entities1-7

vertical-stack2
heading2
entities8-14

and so on

any way to make a template for this?

Do you have any idea how to make the list of entities expand only to the bottom with new items?

Currently it expands both down and up making it impossible for me to place it near the top of the screen on the main screen.

Use 2 auto-entities cards with same filter & different sort options:

  • entities ## 0 … 6
  • entities ## 7 … 13

P.S. This method may be also used to list rows in 2 columns.

Unclear, can you provide more details with pics?

hey guys, reading through, but couldn’t find what im looking for.

Im wanting to have Auto Entities create cards that are grouped by area and only showing the lights in each area?

Any ideas?

Look at my post above… For entities card this works, but i have problem with other cards (light)

Nah I don’t want to filter, I want to create area cards that show all the lights??

I have floorplan with status

I would like the status field to be on the top left and new items from auto-entities to appear at the bottom and the list to only expand downwards, currently it expands both up and down as in the image below.

This is not about the auto-entities card - it’s about layout.

hmm… regardless of the selected layout for the dashboard, Auto-entities automatically fill cards with entities in the same way to the top and bottom while increasing its size, and I need it to expand only to the down with each new entity that adds.

Could you test the case with a conventional Entities card w/o auto-entities?

in the traditional dashboard, where we have several tiles on panel not only one like here, always is aligned to the top preceding tile and new entities always come to the bottom (there is no possibility to reach the top because there are other tiles).
Either way you can see that the problem only affects view 1 of the panel, and then the entities expand in two directions ;/

As I said - please test with same page, only with Entities card instead of auto-entities.

But this isn’t about dashboards - you are using a Picture Elements card aren’t you? (I can’t 100% tell from the picture of the code you posted, so I’m guessing here).

If my guess is correct, then wouldn’t this be about about how elements are placed on the Picture Elements card, choosing between relative or absolute positioning? [Apologies if I’m way off here].

EDIT: it might be helpful to post your yaml in more detail.

1 Like