šŸ”¹ Auto-entities - Automatically fill cards with entities

I donā€™t have mod-card installed, only card-mod, Iā€™ll try as Ildar suggested, if it doesnā€™t work, Iā€™ll try your method. Thank you.

you should really read up on thingsā€¦ mod-card is part of card-modā€¦

Iā€™m trying to display my wled lights as it displays other lights/switches with the word LED. I need help to show only my wled lights.
image

type: custom:auto-entities
show_empty: false
card:
  type: glance
  title: Lights On Right Now
filter:
  include:
    - name: light.*_kingwled_*
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle
    - domain: light
      state: 'on'
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle
    - domain: switch
      state: 'on'
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle
  exclude:
    - entity_id: '*tp_link*'
    - entity_id: '*washing*'
    - entity_id: '*deco*'
    - entity_id: '*led*'
    - entity_id: '*panel_sound*'
    - entity_id: '*google*'
    - entity_id: '*tv*'
    - entity_id: '*doorbell*'
    - entity_id: '*bluetooth*'
    - entity_id: '*remote*'
    - entity_id: '*report*'
    - entity_id: '*motion*'
    - entity_id: '*microphone*'
    - entity_id: '*garage_speaker*'
    - entity_id: '*firestick*'
    - entity_id: '*cloud*'
    - entity_id: '*program*'
    - entity_id: '*display*'
    - entity_id: '*schedule*'
visibility:
  - condition: user
    users:
      - cd026962296f457589569fc1e5d6706d
      - 206a02d709c74c11b47b2a5ba9f5372f

your question is a bit vague, it would help if you explain your goal/code a bit better. Here my attempt of helping:
you are currently filtering for all entities that have the name light.kingwled OR are lights that are on OR are switches that are on.

  1. I donā€™t think name: light.kingwled works; you would need to use the entity_id filter
  2. you donā€™t need the separate domain light filter. if you specify light.kingwled you already only get light entities
  3. why do you include switches if you only want your wleds?

Would this code work for you?

type: custom:auto-entities
show_empty: false
card:
  type: glance
  title: Lights On Right Now
filter:
  include:
    - entity_id: light.*_kingwled_*
      state: 'on'
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle

If you need switches as well it could look like this:

type: custom:auto-entities
show_empty: false
card:
  type: glance
  title: Lights On Right Now
filter:
  include:
    - entity_id: light.*_kingwled_*
      state: 'on'
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle
    - entity_id: switch.*_kingwled_*
      state: 'on'
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle

Hope this helps - if itā€™s not what youā€™re looking for, please try to be more specific

donā€™t these Wled light all come from the same WLED integration? If the answer is yes, you can simply use the integration filter in the auto-entities config

filter:
  include:
    - integration: wled #be sure to look this up. I dont use that so cant promise this is correct
1 Like

i have inserted your suggestion and it did not update. still the same
image

type: custom:auto-entities
show_empty: false
card:
  type: glance
  title: Lights On Right Now
filter:
  include:
    - integration: WLED
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle
    - domain: light
      state: 'on'
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle
    - domain: switch
      state: 'on'
      options:
        tap_action:
          action: more-info
        hold_action:
          action: toggle
  exclude:
    - entity_id: '*tp_link*'
    - entity_id: '*washing*'
    - entity_id: '*deco*'
    - entity_id: '*led*'
    - entity_id: '*panel_sound*'
    - entity_id: '*google*'
    - entity_id: '*tv*'
    - entity_id: '*doorbell*'
    - entity_id: '*bluetooth*'
    - entity_id: '*remote*'
    - entity_id: '*report*'
    - entity_id: '*motion*'
    - entity_id: '*microphone*'
    - entity_id: '*garage_speaker*'
    - entity_id: '*firestick*'
    - entity_id: '*cloud*'
    - entity_id: '*program*'
    - entity_id: '*display*'
    - entity_id: '*schedule*'
    - entity_id: '*Chandler*'
visibility:
  - condition: user
    users:
      - cd026962296f457589569fc1e5d6706d
      - 206a02d709c74c11b47b2a5ba9f5372f

Make you card simpler.
First , test the integration filter and use lower characters

thank you that worked. but it gave more info than i bargained for lol. I just wanted the lights only.

Great, so now add domain: light under the same dash (so donā€™t add a new dash)

So Iā€™m really struggling to find a way to remove the toggle button for entities populated using auto-entities. Iā€™ve tried using card-mod but getting nowhere fast. I just need some simple pointers please.
Iā€™ve tried lots of permetations of the following which I want to list out all of my lights which have been switched off at the mains, but I donā€™t want to see the toggle as I want the card to be as small and simple as possible.

type: custom:auto-entities
show_empty: false
card:
  type: entities
  title: Unavailable entities
  show_header_toggle: false
  card_mod:
    style: |
      ha-switch {
        display: none;
        }
filter:
  include:
    - domain: light
      state: unavailable
```

General schema:
card-mod thread ā†’ 1st post ā†’ link at the bottom ā†’ auto-entities
Particular styles - ask in that thread.

which link at the bottom , there are loads
if you mean - šŸ”¹ Card-mod - Add css styles to any lovelace card - #1396 by Ildar_Gabdullin
and then click on the auto-entities
list of posts with styles then it just comes back to this thread. so iā€™m confused

it comes to a particular post in this thread

I think I have suffered performance issues, especially when I started to use template, rather than include and exclude, for better formatting. I am currently trying to debug. But in general, I find that when using auto-entities, it takes more time to populate than if not. Now, I love auto-entitles, saves a LOT of time, but I do not want performance hits. Hardware is a RPI5.

I noticed issues when using template for auto-entities while setting up Frigate sensors. So trying to narrow it down.

Perhaps templating takes more time/resources than just using include and exclude? I didnā€™t really notice any performance issues until I started using templates in the code.

Anyone else who uses auto-entitles A LOT have any performance issues, or am I doing something wrong.

Hi all, looking for some help in filtering after I couldnā€™t find anything online.

what I have:
I currently have an auto-entities card set-up to give me all lights except light groups.

what Iā€™m trying to achieve:
However, l would like to display single lights differently than lights that are part of a group.
Single lights I just want to display as is, but for grouped lights I want to display the actual group and then have the option to expand the members of the group using collapsable cards.

my issue:
I just cannot figure out how to set up the filters for this.
What I would need:

  1. include all entities that are:
  • domain: light
  1. exclude all entities that are:
  • a group (checking the entity_id attribute)
  • part of a group ā†’ how??

any idea how this can be achieved? Unfortunately I donā€™t even have an approach to show for this, as I canā€™t figure out where to start (thereā€™s no attribute for this as far as I know).

edit: fixed a mistake in my exclude; I need to include entites that are part of a group, not the ones that are not part of a group

1 Like

add a label to those groups (light group or whatever) and exclude/include those label entities or the reverse, just as you would need it.

then, use 2 different auto-entities configs for both of your requirements inside a container card

not sure though if we can use auto-entities to only show the groups, and make those folded/collapsible, you might need to use a n option setting with fold-entity-row for that for each row (filtered group) and set the fold option GitHub - thomasloven/lovelace-fold-entity-row: šŸ”¹ A foldable row for entities card, containing other rows

Thanks for the input!
I just fixed a small mistake in my initial post, not sure if this affects your feedback.

I am trying to exclude all entities that are part of a group. But I think your reply already considered this.

If I give the labels to the group, do these populate down to the child-entities so that these can be excluded as well? Thatā€™s not how I would have expected it to work.

Regarding the implementation of the card: I am assuming that this can be handled via the options settings (havenā€™t tested id yet), but I have created a decluttering card with the template so I am assuming this to work without issues as soon as I can figure out to even set the filter for this :smile:

no, there labels are per entity, and dont trickle down

correct
also, depending on what you want auto-entities to populate, you might need to use the card_param option, if it doesnt default to the entities:

dost assume that, decluttering can be finicky and behave unexpectedly

Iā€™d first make it work in a direct config, and if you have that, create a decluttering based on that

no, there labels are per entity, and dont trickle down

But that would mean Iā€™d have to give labels to each entity that is part of a group - and if ever a new entity becomes part of a group, I have to remember to put the label on this as well.

Of course, it would work - but doesnā€™t seem all that seamless considering all the amazing filtering options available for the auto-entities card.

But of course, if thereā€™s no identifier, then obviously these entities canā€™t be identified; I just hoped there was any way to do this that I didnā€™t think ofā€¦ :confused:

no? you could include/exclude based on those labelled groups