Make you card simpler.
First , test the integration filter and use lower characters
thank you that worked. but it gave more info than i bargained for lol. I just wanted the lights only.
Great, so now add domain: light under the same dash (so donāt add a new dash)
So Iām really struggling to find a way to remove the toggle button for entities populated using auto-entities. Iāve tried using card-mod but getting nowhere fast. I just need some simple pointers please.
Iāve tried lots of permetations of the following which I want to list out all of my lights which have been switched off at the mains, but I donāt want to see the toggle as I want the card to be as small and simple as possible.
type: custom:auto-entities
show_empty: false
card:
type: entities
title: Unavailable entities
show_header_toggle: false
card_mod:
style: |
ha-switch {
display: none;
}
filter:
include:
- domain: light
state: unavailable
```
General schema:
card-mod thread ā 1st post ā link at the bottom ā auto-entities
Particular styles - ask in that thread.
which link at the bottom , there are loads
if you mean - š¹ Card-mod - Add css styles to any lovelace card - #1396 by Ildar_Gabdullin
and then click on the auto-entities
list of posts with styles then it just comes back to this thread. so iām confused
it comes to a particular post in this thread
Hi all, looking for some help in filtering after I couldnāt find anything online.
what I have:
I currently have an auto-entities card set-up to give me all lights except light groups.
what Iām trying to achieve:
However, l would like to display single lights differently than lights that are part of a group.
Single lights I just want to display as is, but for grouped lights I want to display the actual group and then have the option to expand the members of the group using collapsable cards.
my issue:
I just cannot figure out how to set up the filters for this.
What I would need:
- include all entities that are:
- domain: light
- exclude all entities that are:
- a group (checking the entity_id attribute)
- part of a group ā how??
any idea how this can be achieved? Unfortunately I donāt even have an approach to show for this, as I canāt figure out where to start (thereās no attribute for this as far as I know).
edit: fixed a mistake in my exclude; I need to include entites that are part of a group, not the ones that are not part of a group
add a label to those groups (light group or whatever) and exclude/include those label entities or the reverse, just as you would need it.
then, use 2 different auto-entities configs for both of your requirements inside a container card
not sure though if we can use auto-entities to only show the groups, and make those folded/collapsible, you might need to use a n option setting with fold-entity-row for that for each row (filtered group) and set the fold option GitHub - thomasloven/lovelace-fold-entity-row: š¹ A foldable row for entities card, containing other rows
Thanks for the input!
I just fixed a small mistake in my initial post, not sure if this affects your feedback.
I am trying to exclude all entities that are part of a group. But I think your reply already considered this.
If I give the labels to the group, do these populate down to the child-entities so that these can be excluded as well? Thatās not how I would have expected it to work.
Regarding the implementation of the card: I am assuming that this can be handled via the options settings (havenāt tested id yet), but I have created a decluttering card with the template so I am assuming this to work without issues as soon as I can figure out to even set the filter for this
no, there labels are per entity, and dont trickle down
correct
also, depending on what you want auto-entities to populate, you might need to use the card_param
option, if it doesnt default to the entities:
dost assume that, decluttering can be finicky and behave unexpectedly
Iād first make it work in a direct config, and if you have that, create a decluttering based on that
no, there labels are per entity, and dont trickle down
But that would mean Iād have to give labels to each entity that is part of a group - and if ever a new entity becomes part of a group, I have to remember to put the label on this as well.
Of course, it would work - but doesnāt seem all that seamless considering all the amazing filtering options available for the auto-entities card.
But of course, if thereās no identifier, then obviously these entities canāt be identified; I just hoped there was any way to do this that I didnāt think ofā¦
no? you could include/exclude based on those labelled groups
can you tell me how to do that? my approach would have been to do it like this:
include:
- domain: light
exclude:
- attributes:
entity_id: $$*
- label: part of group
Then Iād have all entities that are not groups and are not part of groups. But in this case Iād have to give the label to all entities that are part of a group.
Any suggestions/improvements welcome
You can use the group feature of auto-entities?
type: custom:auto-entities
show_empty: false
card:
type: entities
filter:
include:
- domain: light
integration: group
will give you all lights that are groups
(might have to check the Hue groups, but, for those you can add the other filter on the attribute)
ofc, also exclude with these
other syntax:
type: custom:auto-entities
show_empty: false
card:
type: entities
filter:
include:
- domain: light
not:
integration: group
no need for a label at allā¦sorry for misleading you there
oh
will set this up and report back!
Tested this but I donāt think this is entirely what Iām looking for.
type: custom:auto-entities
card:
type: entities
filter:
include:
- domain: light
exclude:
- label: exclude
- integration: group
As far as I can tell, integration: group replaces the following, right?
attributes:
entity_id: $*
But what I am still missing is a way to exclude the entities that are members of groups. these still show up in the list of entities.
Letās take the following example:
I have 5 light entities: light.entity1 through light.entity5
I also have 2 light groups:
light.group1:
- light.entity1
- light.entity2
light.group2
- light.entity3
- light.entity4
light.entity5 is in no group.
I am looking for a filter setting that ends up giving me just light.entity5
- light.group1 and light.group2 get eliminated by integration: group (thanks for the hint!)
- but how to eliminate light.entity1, light.entity2, light.entity3, and light.entity4?
reason for this: as I am displaying my grouped lights separately with the mentioned collapsable card:
I donāt want the lights to show up twice. without this filter I have them once as an individual card (see top) and once within the collapsable grouped card (see bottom).
Any idea how this could be achieved?
Another issue I have noticed:
both cards are set-up with the auto-entities card. The top single card is just a basic auto-entities card. The bottom one is a nested auto-entities card using decluttering-cards. I am getting a list of all light groups and am creating the following card for this:
type: custom:auto-entities
filter:
include:
- domain: light
integration: group
options:
type: custom:decluttering-card
template: illumination_light-group
variables:
- Light Group: this.entity_id
- Title Expand: Mein Test
exclude:
- label: exclude
- area: system
show_empty: false
The Light Group: this.entity_id is then being used within the decluttering card again to get all the children of the group using:
include:
- group: '[[Light Group]]'
options:
type: custom:mushroom-light-card
use_light_color: true
show_brightness_control: true
collapsible_controls: false
exclude:
- area: System
- label: exclude
As you can see in the screenshot, this basically works fine. BUT: it takes a loooot of time to load the children elements into the collapsable card. However, as soon as I turn on one of these lights, the children elements are loaded immediately, no delay at all.
any idea whatās going on here and how to improve it?
Before anything else:
Test if taking out the label: filter improves speed
I canāt use it , as it completely grinds the view.
I have an open issue on that in the repo
@Mariusthvdb
What I have done is basically remove one layer of auto-entites by just setting it up manually for the two groups:
type: horizontal-stack
cards:
- type: custom:decluttering-card
template: illumination_light-group
variables:
- Light Group: light.group_dummy_light_group
- type: custom:decluttering-card
template: illumination_light-group
variables:
- Light Group: light.dummy_light_group_2
so basically auto-entities now doesnāt create cards for the groups, but only within the groups.
this loads immediately on page load. it is only when I create these cards using auto-entities (-> nested auto-entities: auto-entities creates cards for groups and then cards within each group), that the delay is introduced
Odd,
That exclude should exactly do what you wantā¦
Both legacy group, and modern light groupsā¦
Maybe itās the āorā construction . What happens if donāt use the - in front of those excludes, only use the - on the first
Meaning you āandā all filters.