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

Just updated to 1.14.6 and noticed this in release notes:

  • Allows you to do entity: this.entity_id in options. You shouldn’t, though.

What shall I do instead ? This is what I’m using now for listing batteries with slider:

type: custom:auto-entities
card:
  square: false
  type: grid
  columns: 1
card_param: cards
filter:
  include:
    - entity_id: "*battery*"
      state: <51
      options:
        type: tile
        features_position: inline
        features:
          - type: custom:service-call
            entries:
              - type: slider
                entity_id: this.entity_id
                range:
                  - 0
                  - 100
                tap_action:
                  action: none
                thumb: flat
                step: 1
        entity: this.entity_id
  exclude:
    - state: "=0"
    - entity_id: "*battery_plus"
    - entity_id: "*temperature*"
    - entity_id: "*lifetime*"
    - entity_id: "*charge*"
    - entity_id: "*battery_power"
    - entity_id: "*battery_cycles"
    - entity_id: "*givenergy*"
    - entity_id: "*givtcp*"
    - entity_id: "*runtime*"
    - entity_id: "*battery_soc_reserve"
    - entity_id: "*battery_type"
sort:
  method: state
  reverse: true
  numeric: true

hey guys, just playing around with auto-entities and wanted to ask if this code is the best way to do it. i mean, it works, but i“m asking myself if there is a better way.

type: custom:auto-entities
card:
  square: false
  columns: 2
  type: grid
card_param: cards
sort:
  method: state
  numeric: true
  reverse: false
filter:
  include:
    - group: sensor.climate_battery
      options:
        type: custom:mushroom-entity-card
        primary_info: state
        secondary_info: name
show_empty: true

Thank you!

Does anyone know if there’s a way to insert a line or break between domains/areas?

type: custom:auto-entities
card:
  type: entities
filter:
  include:
    - domain: sensor
      area: kitchen
      attributes:
        device_class: "illuminance"
     - domain: sensor
      area: bedroom
      attributes:
        device_class: "illuminance"
  exclude: []

you should be able to sort by area, if that is sort of what you mean?

method: Required One of domain, entity_id, name, device, area, state, attribute, last_changed last_updated or last_triggered.

Its been such a long time ago, I cant remember what I am doing wrong here… Need to auto-entities list the geo_location entities, but I also want my home location to be on the Map…

if I add it under entities in the auto-entities config (which should be the official way:

      - type: custom:auto-entities
        entities:
          - zone.home
        show_empty: false
        filter:
          include:
            - entity_id: 'geo_location.*'
          exclude:
            - attributes:
                source: wwlln
        card:
          type: map
          hours_to_show: 48

it isn’t shown …
which obvious option am I missing… please help?

edit
wait, it is shown, but the zoom is not correctly including it
heading over to the docs I add auto_fit and fit_zones

      - type: custom:auto-entities
        show_empty: false
        filter:
          include:
            - entity_id: 'geo_location.*'
          exclude:
            - attributes:
                source: wwlln
        card:
          type: map
          hours_to_show: 48
          auto_fit: true
          fit_zones: true

but that has 0 effect. same zoom level and zone.home is out of that zoom…
edit2

peculiar…

      - type: custom:auto-entities
        entities:
          - zone.home
        show_empty: false
        filter:
          include:
            - entity_id: 'geo_location.*'
          exclude:
            - attributes:
                source: wwlln
        card:
          type: map
          fit_zones: true

does work. anyways, just for the record :wink:

Greatday,
Hi, I’ve noticed since the latest updates the ā€œstate_notā€ method is ignored.
Did some change in the code required such and what’s the best work around ?
Thanks.

I do not recall this option described in docs.

Auto-entities with Map card does not make it auto-sized and positioned. There is an issue in GitHub

Yeah but see my edit, I found the fix

Try panel view.

no, it is for a card like this:

type: entities
card_mod: !include /config/dashboard/card_mods/entities_header_box_shadow.yaml
visibility:
  - condition: state
    entity: binary_sensor.gdacs_waarschuwingen
    state: 'on'
title: GDACS waarschuwingen
entities:
  - type: custom:auto-entities
    show_empty: false
    card:
      type: entities
    filter:
      include:
        - entity_id: 'geo_location.*'
      exclude:
        - attributes:
            source: wwlln

  - type: custom:fold-entity-row
    card_mod: !include /config/dashboard/card_mods/fold_items.yaml
    head:
      type: section
      label: Op de kaart
      card_mod: !include /config/dashboard/card_mods/label.yaml
#     padding: 0
#     no_animation : true
    entities:
      - type: custom:auto-entities
        entities:
          - zone.home
        show_empty: false
        filter:
          include:
            - entity_id: 'geo_location.*'
          exclude:
            - attributes:
                source: wwlln
        card:
          type: map
          fit_zones: true

I do not recall this option described in docs

Hi, thanks, i think it was mentioned by you within this post around August 2023;

The state_not function did worked great for me till the latest updates.
It would be cool to get the function back within this card if possible :slight_smile:

The option was mentioned by me as a part of conditional card.
So, it was not a part of auto-entities and there is nothing to fix/restore.

Well, in a panel view AE with Map does not make the Map to autosize and the position the objects on a card properly.

yes it does auto fit properly

ive added this now:

type: custom:auto-entities
entities:
  - zone.home
  - zone.festspielhaus_bayreuth
  - zone.griya_seni_ekalaya
show_empty: false
filter:
  include:
    - entity_id: geo_location.*
  exclude:
    - attributes:
        source: wwlln
card:
  type: map
  fit_zones: true

and the zones below home make the map zoom out per addition. the bottom one is on Java, and makes the panel look like this

in preview UI editor

and in the panel itself, which admittedly is a bit ugly because of the map size not fitting the view size.

take either of those out, and it re-sizes accordingly

I would like to filter for switches which can power off/on a device.

I have devices which have audible alarms. Home Assistant will classify these as switches also.

For example, if I have a siren Home Assistant will classify the siren as a switch.

If I use the domain switch it will show up.

Is there an easy way to filter only for devices which toggle on/off power?

Name the sirens with the word siren in them and filter that out.

Potential Bug… not sure if its HA or auto-entities.

After updating Auto Entities (several days ago - when the new UI came out) the Dashboard card works properly but if you look at the ā€˜Area’ filter it is always empty. I have 6 of these, with different areas and this is the same for all. When you view or copy the YAML, ā€˜Area’ is also empty. I can re-fill Area and it works fine again… looks like something is blanking the ā€˜Area’ field when the card was made using the older UI

but it looks fine in the Dashboard itself…

Update to the latest and always clear your cache