fold-entity-row, collapsible-card - both have own main threads.
I should have been more clear⦠I tried those but its creating a separate Header, Iām trying to make the collapse inside the existing Auto-Entities header. Thus, looks like its a card-within-a-card, which is not what Iād like.
This is what it looks likeā¦
this is the core code I want the entities to fold intoā¦
type: custom:auto-entities
card:
type: entities
title: Zone Details
filter:
template: >
{% for s in states.binary_sensor | selectattr('attributes.zone', 'defined')
-%}
{{-
{
'type': 'custom:multiple-entity-row',
'entity': s.entity_id,
'name': s.name,
'secondary_info': {'name':'Zone','attribute':'zone'},
'entities': [
{'attribute':'bypassed','name':'Bypassed'},
{'attribute':'low_battery','name':'Low battery'},
{'attribute':'tamper','name':'Tamper'}
],
'show_state': false,
'state_color': true
}
-}},
{%- endfor %}
sort:
method: attribute
attribute: zone
numeric: true
Check in fold-entity-row Docs (or in auto-entities Docs), there were examples.
Anybody have any idea? Maybe if I phrase my question differently.
Does anyone know how to use the response of an action (aka service) in template filter for auto-entities?
@thomasloven large system Bug⦠Auto-Entities card hangs / dies frequently. Especially when adding a Filter. The screen literally goes blank.
posted hereā¦
I have over 3300 entities, so I suspect the code cant handle that. If/when I get the screen to show and Select a Property, and start entering a filter, like āRGBā it hangs again and the screen goes completely blank. I must again click the browsersā back button.
I have not been a coder in a long time but unless you have a different way to do the initial on-screen, I suggest disallowing the integration to instantiate any entity list if the resultant set is greater than a specific number⦠maybe 200 or something. On the initial add of a Filter (thus the list is unfiltered)⦠Keep the resultant set blank, thus requiring at least 1 Filter to be added. That should help with large systems.
Trying to add a Filter, screen blanks. If I click browser ābackā, then it will show the screenā¦
Filter option added after above, then adding RGB text, hangs againā¦
When I get the screen to show, and the entities list (on the right) is empty because the Filter didnt return any values⦠responsiveness it as expected and I can enter/select everything just fine.
It is still unclear (at least for me) as to what you want, why āauto-entitiesā ? Why not use a todo-list card or something else?
anyone know how to modify the name of the buttons created?
I have tried Options for name:
{{ state_attr(entity, āfriendly_nameā) | replace(āRGBā, āā) | trim }}
[[[ return entity.attributes.friendly_name.replace(āRGBā, āā).trim(); ]]]
and a few other variations.
thx!
why dont you start with not entering a name for the resulting entities card? see what that gives.
I want to remove text from all the names. I know what it displays by default, which is why i want to remove the text.
I need help with making the code work
tbh, I dont understand what you are asking.
Maybe if you make a screenshot of a single item, and mark what you donāt want in it, and create a mockup of what you do want, we can help you
@Mariusthvdb looks like you were trying to do something similar years agoā¦
string.replace() ⦠remove all the RGB letters in the strings
I have tried all of these (separately)ā¦
#name: {{state_attr(entity, āfriendly_nameā) | replace('RGB', āā)}}
#name: {{state_attr(entity, āfriendly_nameā) | replace('RGB', āā) | replace(' - ', ' ')}}
#name: {{return entity.attributes.friendly_name.replace(āRGBā, āā); }}
#name: {{ replace(āRGBā, āā) }}
resultā¦
What card are you using to produce the button(s)? I donāt think itās auto-entities where youāve posted this question.
right, I believe youāve lost me completely.
I responded to
but now you say you need
?
if you keep changing your targets per post, no-one will we able to help you outā¦
I thought you were responding to my ask from yesterday. That post was 9 days ago ⦠I never did figure out how to make the collapse inside the Auto-Entities header, I resorted to using a Title Card, which is not great but it works.
Current issue is easier to figure out, I hope⦠it should be simple but seems like HA complicates most simple stuff by forcing it to be some odd template format where non-normal code (jscript, etc) stuff doesnt work 100%.
thx for the help!
this is the code Iām trying to change the names on, to remove the RGB stringā¦
type: custom:auto-entities
show_empty: false
card:
type: grid
columns: 1
square: false
card_param: cards
filter:
include:
- domain: light
name: "*RGB*"
options:
type: custom:slider-button-card
compact: true
exclude: []
grid_options:
columns: full
sort:
method: friendly_name
This has nothing to with core Ha requirements . You have to follow the custom card requirements at hand. So if the embedded card uses Jinja or JS, that is what you need.
Card-mod uses Jinja . It all depends on the card and its use in the particular card config.
I donāt use that slider-card so canāt comment on that out of the box whether it supports templates at all
edit
briefly checking GitHub - mattieha/slider-button-card: A button card with integrated slider
I donāt think it does⦠which explains the [object Object]
you cant just make up config options that dont exist
Would mod-card work in this situation?
side note (small rant):
I like HA and how capable it is but seems as many (if not most) dashboard integrations are difficult to learn/build-with due to a general lack of standardization and built-in functions which all card integrations āshouldā simply inherit from HA core. Maybe its a lack of APIs (I dont know)? Cards integrations should āby defaultā have core features like : all text manipulations for title and buttons/entities (like naming in this specific example), fonts, card colors/borders/etc, nesting, title bar expand/collapse, etc. But it looks like each integration dev is creating features separately for each card integration, and not implementing things that just should be universal.
Every time I use a new card type, there seems they are often implemented very differently and have many and different āexceptionsāā¦
- oh, you cant do XYZ with that card
- You can do that but in this case you need to place that code in features, not options
- Oh that one⦠yeah⦠turn your keyboard upside down, press ^, and recite this incantation in Latin the it will work!
That card doesnāt support templates or changing the entity name.
Hi!
I use labels for devices for various reasons.
One is giving devices names that are easy to understand by my family and the other is to use them for filtering devices by tokens:

The following auto-entities card definition shows how it works:
type: custom:auto-entities
card:
type: entities
title: Lichter schalten
filter:
template: >-
{% set tokens = ['licht', 'lampe'] %} {% set matching_labels = labels() |
select('search', tokens | join('|')) | list %} {% set devices =
matching_labels | map('label_devices') | sum(start=[]) | list %} {% set
entities = devices | map('device_entities') | sum(start=[]) | list %} {% set
filtered_entities = entities | select('match',
'^switch\.(?!.*_vch[0-9]+).*') | list %}
[{% for entity in filtered_entities %} {"entity": "{{ entity }}", "name":
"{{ label_name(labels(device_id(entity))[0]) }}"}{% if not loop.last %}, {%
endif %} {% endfor %}]
and how it comes out:
The only thing Iām missing ist using label-icons here to show up as string-lights, outdoor lights etc.
How can I do that. There is no function label_icon().
you are mixing up so many concepts here, (cards are not integrations etc, and ācard integrationsā donāt even exist) I believe you should really get to grips with the main HA concepts first.
It is important to get those concepts right, before posting about them, as that is the best way to get help.
next, you should also understand HA does not control the many custom cards/integrations/plugins/what have you.
(given the fact you are around since 2017 I should really not have to state that, I am sure you are aware of the above)
So even though I can feel your frustration of having to configure each and every custom card differently, and have to adjust the syntax based on JS or Jinja, that is what it is, no way around that.
Not a lot of use ranting about that I am afraid.
Lastly, and already mentioned that, you canāt makeup things that are not supported.
You can try to find undocumented features (and yes, even core UI is not always as configurable as the yaml counterpart , so there are indeed differences there), but it is best to always follow the docs precisely.
you can not set label icons in the auto0entities, because you can not set them at all⦠Auto-entities isnt some sort of wizard to change any frontend representation, it only feeds entities to the card you set it to consumeā¦
having said that, I am not even sure I understand what you want, because label icons are not show in the dashboard at all? Only in the /config dashboards?