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

Thank you for the response
I went ahead and looked at the card docs and even though it would solve my problem in a way it is not exactly what I am looking for

There is probably an easy way to put the state of a variable as a condition for the exclusion of certain things and that is the idea I am looking for.

Anyone else noticing a serious performance hit when using auto-entities? Using cards manually my Lovelace is a lot faster and very responsive. Having the same cards but generated using auto-entities my UI is a lot more sluggish. This is especially noticeable on mid-range smartphones/tablets.

Hi, is it possible to fill a light group with auto entities?

I want to be able to change brightness and color for the created group as if it Was one light.

Unfortunately I found no way to get it working. Some ideas?

Thank you in advance.

It is now.
I just released version 1.8.0

filter:
  include:
    - group: light.your_light_group

1.8.0 also features significant speed improvements, and a GUI editor!

I recommed Home Assistant 21.3 or later to get the full experience.

6 Likes

I think the latest version might have introduced a bug with how Auto-Entities interact with columns.

After updating, no cards will stack below an auto-entities card in a column (with the exception of other auto-entities cards). Instead, any attempt to stack a card below an auto-entities card results in a new column being created, even if thereā€™s plenty of empty space for the card to stack in the existing column.

I notice that all my auto-entities cards that have mini-graph card in it doesnā€™t load up on all browsers, iOS, Android (chrome, HA app) and Chrome and Edge (chromium) on desktop the cards are empty. This is my setup: auto-entities -> grid card -> mini-graph

I also have auto-entities that autopopulate custom button-cards, which do work. This auto-entities -> grid card -> button-card.

I cleared cache and can see in dev menu that 1.8.0b1 is installed.

Should be fixed in 1.8.1

Somehow 1.8.1 messed up my UI even more? I notice all content inside layout-card is removed now on the same tab that I mini-graph inside auto-entities. Tabs that donā€™t have mini-graph cards inside auto-entities are not affected.

I am confused.

edit: btw, I cleared browser cache and dev tool shows auto-entities 1.8.1 is loaded. Reverting to 1.7.0 fixes it. Something with mini-graph, auto-entities and now layout-card is not working nice.

same issue here with 1.8.1. I tried a test case with a vertical stack, and two auto-entities and somehow it broke that dashboard, with nothing showing up even when I tried adding a new card. Test case here.

Reverting to 1.7.0 works great.

Try 1.8.2  

1 Like

Working great now. Thanks! <3

Unfortunately I have no luck. It completely disables all cards inside the same lay-out card if mini-graph is also present. Other tabs where mini-graph is not used, all other cards show up. All cards are inside auto-entities.

Reverted to 1.7.0, works. Updated back to 1.8.2, again lost cards.

1.8.2 is working great now for my use case. Thank you for the awesome project.

Thanks for the quick fix, Thomas, 1.8.2 fixed the issue I had posted on GitHub. Appreciate all that you create and do!

anyone else noticing small gaps surrounding an auto-entities config like these all of a sudden: https://github.com/thomasloven/lovelace-auto-entities/issues/173

only thing changed is HA, and auto-entities :wink:

The following code worked perfectly ok until upgrade to 1.8.2 It kills the lovelace page containing this code. Removing it restores the remainder of the page. Any guidance to point me to the necessary correction would be appreciated:

card:
  title: GAD
  type: entities
entities:
  - entities:
      - entity: input_boolean.notify_utility
      - entity: input_datetime.gad_notification_time
    head:
      label: Notification Settings
      type: section
    padding: 0
    type: 'custom:fold-entity-row'
filter:
  include:
    - entity_id: sensor.gad_restafval
    - entity_id: sensor.gad_gft
    - entity_id: sensor.gad_papier
    - entity_id: sensor.gad_pmd
    - entity_td: sensor.gad_textiel
show_empty: false
show_header_toggle: false
sort:
  attribute: Sort-date
  method: attribute
  numeric: true
title: GAD
type: 'custom:auto-entities'

As a lot of other users, Iā€™m using some Shelly devices for my home automation.

When debugging, flashing firmware or no matter what, Iā€™m using the Shelly built-in web interface. Mainly because itā€™s user friendly and it offers more options than the app.

For now, Iā€™ve been using a static entities-card to reach the devices (all static IP adresses):

entities:
  - icon: 'mdi:power-plug-outline'
    name: Smart Plug Boiler
    type: weblink
    url: 'http://192.168.68.xxx/'
 ...etc...

Although it works fine, it stillā€¦wellā€¦static and all Shelly devices publish their IP-adress on MQTT, so it is stored in sensor.shelly_xxx_ip

Building a list is fairly simple and works perfectly:

type: 'custom:auto-entities'
card:
  type: entities
title: Smartplugs
filter:
  include:
    - entity_id: sensor.shelly*ip

But its still just an entities-card, so not clickable.

Iā€™ve been trying with custom:template-entity-row but no success.

Option 1: make all entities weblinks, but how to get the entity value in the url-field? Iā€™ve found that this field is not template-able. The entity sensor.shelly*ip just has a state (the IP adress) and a friendly_name attribute.

type: 'custom:auto-entities'
card:
  type: entities
title: Network
filter:
  include:
    - entity_id: sensor.shelly*ip
      options:
        type: weblink
        url: ???

Option 2: use custom:template-entity-row and set the tap-action but same problem here. This is also not useable for option one because you would get 2 type definitions.

type: 'custom:auto-entities'
card:
  type: entities
title: Network
filter:
  include:
    - entity_id: sensor.shelly*ip
      options:
        type: 'custom:template-entity-row'
        tap_action:
          action: url
          url_path: ???

Any suggestions from the community?

I just started playing with this card and itā€™s not behaving as Iā€™d expect. In my case, Iā€™m using it for to display info about my 3D printer. Thereā€™s a printer error sensor that is ā€œOffā€ if no error is present. Thatā€™s really the only entity I care about hiding, so Iā€™m attempting to filter and exclude sensors in state ā€œOff.ā€

type: 'custom:auto-entities'
card:
  type: entities
  entities:
    - entity: binary_sensor.ender_3_project_printing_error
      name: Print Error
      secondary_info: last-updated
    - entity: sensor.ender_3_project_job_percentage
      name: Print Completion
      icon: 'mdi:file-percent-outline'
    - entity: sensor.octoprint_time_elapsed_format
      icon: 'mdi:clock-start'
      name: Printing Time Elapsed
    - entity: sensor.octoprint_time_remaining_format
      name: Printing Time Remaining
      icon: 'mdi:clock-end'
filter:
  exclude:
    - state: "Off"

Auto-Entities

Iā€™ve gone into Developer Tools and checked the state just to be sureā€¦ and it is, in fact, ā€œOff.ā€

Do I have a syntax problem in my card somewhere?

type: custom:auto-entities
entities:
 - LIST 1
filter:
  include:
    - LIST 2
  exclude:
    - LIST 3
card:
  CARD_OPTIONS

auto-entities takes LIST 1, adds LIST 2 and removes LIST 3.
Then it adds this to CARD_OPTIONS, and thatā€™s what youā€™ll get in your card.

Thanks for your reply, but is that not what Iā€™ve done in my auto-entity card above?