making use of this very nice card, I do wonder what the default sort order is (ie when one doesnāt use sort: in the card config).
My entities are listed in a way I donāt recognize to be alphabetical, or by the config in the backend at all, nor by state or order in the group they auto-populate, well, by anything reallyā¦
Would be cool to understand how and why they are listed as they are:
Ive filed a FR to add last-triggered to the sort options, which would be way cool to auto generate a card with the most active automations and scripts, and be a magic tool for the inspection of the system. Hope you will consider.
First of all, you are using fold-entity-row and auto-entities the āwrongā way (with the disclaimer that āif itās stupid and it works, itās not stupidā - thereās no actually wrong way).
Edit: I must say your way looks really good, though.
Second; last triggered is an attribute of the script, as opposed to last_changed and last_updated which are āmagicalā values. You can already sort by attribute values.
On to your question.
The order the entities show up in if not sorted is the same they are given in the "hass object", which is pretty much your current Home Assistant state. It depends a bit on your python, version, the order your integrations are loaded in, the order things are set up in your configuration and which sign of the zodiac Jupiter is currently in. In short, think of it as random.
If you use a group, the entities should show up in the same order they are listed in the group definition, but I canāt guarantee it.
well, I hoped, but as you can see it isnāt the case. Sorted them by name for now, which at least has some eye candy, but group order would really be better, since they can be sub-ordered in the group without having to create separate groups.
cool, didnāt realize I did it the wrong way. Still, Iāll try it the correct way, and see if it changes the issues I have
thanks for reporting back!
have to think why this is happening, but, maybe good to realize the difference and make good use of it. Must admit I kind of like the elevated group popping out of the fold as an extra emphasis. But, as you say, not as per original design
@thomasloven I tried to moved from monster-card to auto-entities but I have an issue with Boolean attribute. The following card was working with monster-card, but not with auto-entites:
EDIT: the latest version fixed the issue, thanks !
which works fine, except for one thing: I have 4 threshold sensors for outside (ābuitenā) I like to display together, while now they are scattered in the list. How can I order these to show first or last in the total list groups together?
because to the extra _day and _night extension couldnāt find a way to use the decluttering template for this (yet, might have another go at it later on):
the sorting is nowhere near based on the last_triggered attributeā¦ didnāt realize it then, but now that I fixed most other issues, I would like to understand what is incorrect here. Is it too difficult for the frontend to keep adjusting this view based on last_triggered (very frequent triggering) or is the config simply incorrectā¦
note: I am talking about the sort: attribute: last_triggered, not the secondary_info: last-triggered, which is something else, and does work alrightā¦
as a matter of fact,I canāt get any sort method to work for this cardā¦ name nor entity_id. Even when I put the sort under the filter, no change is displayed?
That may very well be the problem. last_triggered is a rather new feature which I havenāt looked into yet, but since Itās a timestamp I imagine it should require some special treatmentā¦
awaiting that, do you have any suggestions for the order in this auto-card? Could I maybe only show the last 5 last_triggered entities by adding count: 5, to prevent constant re-rendering of the view?
please let me put forward another challenge I canāt find the solution for yet. Id like to auto create a card with all views to be able to create a āCastā card. I now have this manually setup:
- type: entities
title: Cast Control
show_header_toggle: false
entities:
- type: cast
name: Home
view: 'home'
- type: cast
name: System
view: 'home_assistant'
- type: cast
name: Lights
view: 'lights'
I can add all 23 tabs (ā¦) of course, but couldnāt I somehow use the auto-entities card to create this. Simply follow the setup in ui-lovelace.yaml, and read the title (name) and path (view) into this cardā¦
edit probably no, since these arenāt entitiesā¦maybe something like lovelace_gen could do thisā¦
Hi there,
Iām trying to use auto-entities,layout-card and the button card to show lights as buttons if they are on.
It works like a charm but I like to put a header over the buttons (e.g. markdown card). I set the parameter show_empty:false in auto-entities-card. If there are no lights on, the auto-entities-card is not shown. But how could I hide a the header?