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

first: you have a wrong indent: (look at action:)
secondly: seems like you as above poster neither read the github-documentation
third: you donā€™t have any include, your mushroom wont be applied, beside your card-mod does nothing.
fourth: Use The Power of Auto-entities ( thatā€™s what itā€™s build for )

  include:
    - entity_id: '*'
      state: 'unavailable'

Hopefully somebody can help me out here because Iā€™m beating my head against a wall.

I want to have a hold action on my scenes to add/remove them from a favorites list.
I can easily add the hold_action option when I use the ā€œincludeā€ filter. But for the life of me I canā€™t figure out how to do this for a template.

Here is my card yaml:

type: custom:auto-entities
card:
  type: entities
  title: Favorite Scenes
filter:
  template: >
    {% set scene_options = state_attr('input_select.favorite_scenes', 'options') %} 
    {% for option in scene_options %}
      scene.{{ option | replace(' ', '_') | lower }}
    {% endfor %}

Is there a way I can add a hold action to this template?

Thanks!

thanks for taking the time to reply - much appreciated

first: you have a wrong indent: (look at action:) - thanks again, had not picked that up :frowning:

secondly: seems like you as above poster neither read the github-documentation - if youā€™re referring to the auto-entities github, then yes I have read it, but do not claim to understand all of it - is there a particular section that youā€™re referring to?

third: you donā€™t have any include, your mushroom wont be applied, beside your card-mod does nothing - correct it does not have an include - Iā€™m trying to build the code based on this example, which does work, and also does not have an include

fourth: Use The Power of Auto-entities ( thatā€™s what itā€™s build for ) - as above I have the ā€œincludes & excludesā€ in a template sensor - just trying to streamline the yaml

Ok, however your code, doesnā€™t looks anywhere near/like the code-example you refers to. ( i.e no mushroom-card(s), however a "base-card / type: custom:fold-entity-row "
It also donā€™t have an ā€œoptionā€ tag

And i believe there are simple example codes, in the cards-github-page, which people can start with, to get an understanding of how the card works.
Beside if you look at my answer to you, and above poster, you got all ā€œingredientsā€ to accomplice, what your are asking for.

Yes iā€™ve seen other examples where people using template-sensors ( free choice ) and not needed for i.e a simple solution, as you are asking for

Top to Bottom , donā€™t scroll to fast through the examples, they tell/show in pictures whats stated in the text

PS: try to ā€œtabā€ in your Options-section

Hi Thomas,
I have a card set up with show_empty:false, but it still shows up when there are no results.
The card is meant to show up when there are HACS updates due, but go away when there are none.
I have a template entity defined for this:

hacs_integrations_updates_due:
  value_template: "{% if states.sensor.hacs.attributes.repositories %} {{ states.sensor.hacs.attributes.repositories | map(attribute='name') | join('\n')  }} {% else %}{% endif %}"

And hereā€™s my auto-entities card config:

type: custom:auto-entities
card:
  type: entities
  title: auto_entities
show_empty: false
filter:
  include:
    - entity_id: sensor.hacs_integrations_updates_due

What have I missed? Do I need to put something like ā€œNULLā€ in between the Else and Endif in my template?

Thanks!

Hello everyone

Iā€™m trying to put together a small gaming dashboard with Steam shortcuts. This works quite well with auto entities mushroom and card mod. But what I canā€™t quite manage are the automatic background images for the mushroom cards. if I set them statically, it works, but not dynamically.

With the mushroom image it works with the variable, but not with the background:

type: custom:auto-entities
filter:
  include:
    - entity_id: '*game_*'
      device: TEST
      name: '*Favorites*'
      options:
        type: custom:mushroom-template-card
        primary: ''
        secondary: ''
        picture: >-
          https://cdn.cloudflare.steamstatic.com/steam/apps/{% set str =
          state_attr(entity, 'friendly_name') %}{% set sub = str.split('_')[2]
          %}{{sub}}/header.jpg
        tap_action:
          action: toggle
        layout: vertical
        card_mod:
          style: |
            ha-card {     
             
                background-image: url('https://cdn.cloudflare.steamstatic.com/steam/apps/{% set str = state_attr(entity, 'friendly_name') %}{% set sub = str.split('_')[2]%}{{sub}}/header.jpg')!important;
               
                }
sort:
  method: friendly_name
card:
  square: false
  type: grid
  columns: 7
  title: Favorites
card_param: cards
show_empty: true
view_layout:
  position: main

2024-03-01 22_47_26-Gaming ā€“ Home Assistant

How could I solve this?

Hello Community!

Iā€™m quite new on Home Assistent so apologies for my noob question!

Iā€™m trying to combine 2 cards / features and stuck on the fact, if its possible to use the result (entities) from the Auto-entities in a new card?

Example:

type: custom:auto-entities
filter:
  include:
    - name: '*Rollladen*'
      options: {}
  exclude:
    - entity_id: /sensor*
    - entity_id: /button*
    - name: Alle RolllƤden
      options: {}
show_empty: false
sort:
  reverse: false
  ignore_case: false
  ip: false
card:
  type: horizontal-stack
  cards:
    - type: custom:shutter-card
    - type: custom:shutter-card

Result:
image

The horizontal-stack is mandatory, otherwise the shutter will be shown vertically.

Iā€™m wondering if its possible to use this in any way / respectively to use the auto-entities to hand over the result to the shutter-card in a horizontal-stack type?

Source:https://github.com/Deejayfool/hass-shutter-card and https://www.home-assistant.io/dashboards/horizontal-stack/

Any ideas are welcome! Thank you in advance! :crossed_fingers:

try to use below:

          - type: custom:auto-entities
            card:
              square: false
              columns: 2
              type: grid
            card_param: cards
            filter:
              include:
                 - name: '*Rollladen*'
                   options:
                     type: custom:shutter-card
                     icon_color: '#87bf50'
                     etc.
                     etc.
                     etc. = configs your shutter-card support
1 Like

Thank you for the fast reply!
Unfortunately I get No type provided - config below:

- type: custom:auto-entities
  card:
    square: false
    columns: 2
    type: grid
  card_param: cards
  filter:
    include:
      - name: '*Rollladen*'
        options:
          type: custom:shutter-card
          icon_color: '#87bf50'
          buttons_position: right
          title_position: top

Thanks again!!

What you posted is a code w/o indentation.

My bad - Thanks!
Updated - still the same message No type provided :thinking:

I guess you are pasting this code into UI yaml editor.

- type: custom:auto-entities
  card:

should be just

type: custom:auto-entities
card:

uppps, my bad, i copied it from a horizontal-stack( or something) even more complex :slight_smile: ā€¦ didnā€™t think about that

Look at your own card !, as you are using auto-entities as the first Card, the code should look like your "Every Thing has to be moved in(to the left)

Thank you both!
I adapt it - no errors - but also no content :sweat:

Again, sorry for my lack of knowledge!

because you removed the - under include ( and i dont even know whether your ā€˜rolladenā€™ works as i donā€™t have such )

PS: Knowledge you get by compare and read the Docs of the specific Cards/Integrations

Card_params
options

Hardly anything right, so obviously your first code you posted, is copied somewhere from, and you donā€™t understand it, and you havenā€™t looked at the examples in the Docs, so you wont understand my code either

1 Like

If this is your 1st experience with auto-entities - I would suggest you to test with a standard card first, not with a custom:shutter-card.

1 Like
type: custom:auto-entities
card:
  square: false
  columns: 2
  type: grid
card_param: cards
filter:
  include:
    - name: '*temp*'
      options:
        type: entity

This you can c/p, and build from there

1 Like

Or this example:


and since I got only one entity named ā€œSunā€ - the grid only contains 1 card.
So:

  1. Test ONLY shutter-card w/o auto-entities.
  2. Test auto-entities with a standard card.
  3. Test auto-entities with the shutter-card.
1 Like

I agree - Iā€™ll consult the documentation more in detail and try to understand the correct syntax format.

For this special case I assume it is a limitation from shutter-card side. It seems that this card always need a direct entity. So, back to my first question, I see there s no possibility to hand the entity result(s) from the auto-entities to the shutter-card.
So for now it looks like there is now resolution.

I agree - Iā€™ll consult the documentation more in detail and try to understand the correct syntax format.

For this special case I assume it is a limitation from shutter-card side. It seems that this card always need a direct entity. So, back to my first question, I see there s no possibility to hand the entity result(s) from the auto-entities to the shutter-card.
So for now it looks like there is now resolution.

My suspicions are confirmed with the final test (thank you for providing the example code!)

Comparison
type: custom:auto-entities
card:
  square: false
  columns: 2
  type: grid
card_param: cards
filter:
  include:
    - name: '*te*'
      options:
        type: entity

works flawless =>


type: custom:auto-entities
card:
  square: false
  columns: 2
  type: grid
card_param: cards
filter:
  include:
    - name: '*te*'
      options:
        type: custom:shutter-card

results in

Thanks again for your time!