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

rightā€¦

    {% for a in areas()
        |reject('search','klimaat|main|mobile|huis|test') %}
    {{
      {"type": "area",
       "area": a,
       "navigation_path":"/ui-sub-views/"~a,
       "sensor_classes":
         ["temperature","humidity"],
      "alert_classes":
        ["motion","moisture","running","garage_door"],
       }
    }}, 
    {% endfor %}
1 Like

Thanks a lot, your solution is working perfect.
I just had to modify my regex for the search condition of selectattr
from: /^sensor.calendar_event[1-9]$/
to: sensor.calendar_event[1-9]

Fantastic, thanks for your help! A lot of your other posts were also really helpful to me.
Essentially, one can take their entity list from the regular entities card, put it into the filter section of the auto-entities card and it just works. Maybe a bit unintiutive, but Iā€™ll take it.

1 Like

i cannot adjust h1 tittle ā€œShellyā€ size or padding , not applying , under type: custom:stack-in-card can but not in auto entities card, any help please?

        type: custom:stack-in-card
        title: Test
        card_mod:
          style:
            .: |
              ha-card {
                overflow: auto;
                max-height: 500px;
               
              }
            $: |
              h1.card-header {
                padding: 12px 0px 0px 12px !important;
                color: #727272 !important;
                line-height: 40px;
                font-weight: 500;
                font-size: 16px !important;
              }
        cards:
          - type: custom:auto-entities
            card:
              show_header_toggle: false
              title: Shelly
              type: entities
              card_mod:
                style: |
                  .: |
                    ha-card {
                      overflow: auto;
                      max-height: 500px;
                      border: 50px !important;
                    }
                  $: |
                    h1.card-header {
                      padding: 12px 0px 0px 12px !important;
                      color: #727272 !important;
                      line-height: 40px;
                      font-weight: 500;
                      font-size: 36px !important;
                    }
                    
            filter:
              include:
                - entity_id: light.bed_light

Hi, is it possible to populate dynamic value in filter.include options?

type: custom:auto-entities
card:
  type: grid
  square: false
  columns: 2
card_param: cards
sort:
  method: entity_id
filter:
  include:
    - domain: light
      area: bedroom
      options:
        type: tile
        entity: this.entity_id
        name: |
          {{ state_attr('this.entity_id', 'friendly_name') | replace('Bedroom ', '') }}
        # I can't make this part work properly. I want to make tile cards, prefix 'Bedroom' removed in their name.
  exclude:
    - hidden_by: "*"

You cannot use template inside ā€œincludeā€ option.
The ā€œtemplateā€ option should be used instead (see in docs).
Try this (untested):

filter:
  template: >-
    {% for LIGHT in area_entities('bedroom')|
                    select('search','light.')|
                    reject('is_hidden_entity') -%}
    {{
      {
        'type': 'tile',
        'entity': LIGHT,
        'name': state_attr(LIGHT,'friendly_name') | replace('Bedroom ', '')
      }
    }},
    {% endfor %}
1 Like

hey guys, iĀ“m playing around with auto-entities, still itĀ“s kinda hard for me to get what i want.

i try to only show my aqara multisensors and populate the following card.
is there any way to do so?

type: custom:mushroom-template-card
entity: sensor.multisensor_hallway_humidity
primary: "{{states(entity) | float(0) | round(0)}}%"
secondary: >-
  {{ state_attr(entity, 'friendly_name') | title }} |
  {{states('sensor.multisensor_hallway_temperature') }}Ā° |
  {{states('sensor.multisensor_hallway_battery') }}%
multiline_secondary: false
icon: mdi:water-percent
icon_color: "{{ 'red' if (states(entity) | float(0)) > 60 else 'blue' }}"

only hallway changes to for example office

I am having a strange issue, working on a Glance card. If I do this, the margins change as expected:

card_mod:
  style: |
    ha-card {
      padding-bottom: 0px;
      }
    .entities .entity {
      margin-top: -20px;
      margin-bottom: -5px;
      --mdc-icon-size: 40px;
    }

If I do this, the color of the title changes as expected:

card_mod:
  style:
    $: |
      .card-header {
        color: red  !important;
      }

But I canā€™t find a working syntax that allows all of these changes to take place at the same time! Any ideas?

Probably this is what you need:
main card mod thread - 1st post - link at the bottom title ā€œfantasticā€ - other stuff - combining ā€œ.:ā€ and ā€œ$:ā€

Is it possible to configure the entities card? I am trying to pass ā€œshow_icon: falseā€ and canā€™t get it to ā€œtakeā€ anywhere in yaml. I would also love to hide the state and just show the name, or even a custom name, but canā€™t make this work.

yes you can card_mod the card itself, or the entities in the options of the include

this however is not an option of the entities cardā€¦ so that wont work anywhere

you cant make up settings that are not thereā€¦

you can use another card that would provide these options, like template-entity-row, or any other card with functionality you seek

hello it is possible to limit rows showed by auto entites and get a ā€œshow moreā€ button? or scroll?

By card-mod only. Search in the main card-mod thread.

Hi,

Would it be possible to include/exclude certain entities based on the floor they are in?
I know itā€™s possible based on area, but in some cases I would like to see all entities of a certain floor.

It is definitely possible by using a ā€œtemplateā€ option.

see WTH, where are the floor_entities() for the template

would be great if someone made this into an integration so we could configure this via UI. Not having simple ā€˜filter byā€™ for Labels, etc is a huge gap in both the usage and admin of entities. It seems the devs think the only way people use or admin devices is by area (room)ā€¦ which is incorrect. If I want to view and control all my RGB lights I must manually create a dashboard to see them all on the same screen. When providing a feature, we should be able to easily leverage the benefits across all of HA :frowning:

I created a card with all my battery operated devices, and show battery status of each, sorted from min to max. But ā€œunavailableā€ show at the bottom. Is there any way to show them at the top, before the min value entities?
Thanks for your awesome integration!

but we have that filter in the entities dashboard.
itā€™s not the same as showing polished cards in the Frontend, but at /config/entities, this is exactly what you can do

as a matter of fact, Ive done away with many an auto-entities card config when that filtering was introduced, it is way faster and less consuming for the system

now if only the helpers dashboard got fixed to be as robust as the entities dashboardā€¦

suppose you could write 2 auto-entities configs and stack them, I do that eg for separating inside and outside motion sensors, while all of the other parameters are identical