Youāre missing the outer fold. If a card (auto-entities here) is contained in the fold itāll push left as you can see in my code. I have it fixed now though with card-mod.
Because the top-level fold-entity-row in your card is containing auto-entities - but you were advised to change it.
Of course, if fold-entity-row contains āentities cardā you will have horizontal paddings, then card-mod is the only way.
Actually, in your position, with so many rows & many folded lists, I would choose a āfold-entity-row contains an auto-entiiesā schema with card-mod (+scrollbars) too.
It is possible, but with a help of vertical stack w/o margins.
Just place auto-generated 2-levels lists in a stack.
Here is an example of a list of groups:
vertical-stack will give the same issue. The vertical stack canāt be placed under the fold-entity-row without something like custom:hui-element (if this is done, you have the same issue). If the vertical stack is placed at the top most level, you still need to nest the fold/auto-entities just the way I have them.
The end result should look like I have it now in the screenshot above. Do you have an example using vertical stack that produces that result?
type: some-stack-card
cards:
- auto-entities inside fold-entity-row (each element may be also auto-entites inside fold-entity-row)
- auto-entities like above
- etc
Not exactly. Each card will be auto-entities - see my example above which does not have horizontal padding.
I already gave you an example. And already explained:
Repeat: there are TWO options:
use Entities card with fold-entity-rows containing auto-entities + card-mod with negative margins;
use stack with fold-entity-rows containing auto-entities + card-mod to remove spaces between stacks (or use ready stack-in-card).
It is up to you which way to choose. Sometimes the 2nd 1st way is better since CURRENTLY there are some problems with styling fold-entity-row inside auto-entities (if needed) if using 1st 2nd way; and these problems may be solved when using 2nd 1st way; this also includes a possibility to add a scrollbar by card-mod.
Update - I meant the FIRST way in the para before
Buddy, As I said, they both have the same issue and both use card-mod to fix them. Marius solved this many posts back. Everything youāve suggested has the same issue and still requires card-mod. Iām only replying at this point so some other person doesnāt come along and try to use vertical-stack to fix this per your recommendation.
Which āsame issueā, buddy? The initial problem was about horizontal padding. The āstack methodā does not have this problem.
OK, itās up to you).
letās call the whole code in that example āmodule Xā; if needed - add static rows (i.e. not folded) inside auto-entities on a required level (either via āentitiesā option or via one more filter);
place as many āmodules Xā as you need in one stack-in-card.
As a result - you have LIST with a same horiz padding: each row is a folded list of auto-entiies, and each element may be either a folded list of auto-entities or some āstatic rowā.
If you need not-folded rows on the 1st level - add them as Entities card (and yes, here card-mod is needed to add/remove top/bottom margin or padding for the card, do not remember exactly).
Actually, using a āstackā concept in UI cay give you a lot of benefits - each card may be presented as a stack (for instance, some card = a few entity rows, some graph, a few entity rows, a logbook , ā¦). This may be achieved by placing each card in a stack.
Exactly. To get to my example, you still need card-mod and stacking doesnāt do anything to fix it. And obviously if I wanted a static list, I wouldnāt be using auto-entities in the first place.
You are not getting the difference.
In case of using a āstack methodā you only need card-mod in places like āadd a non-folded row on a root level - for that place Entities card with removed top or bottom margin/paddingā.
In case of using YOUR method you need to WIDEN the Entities card (by negative margins) for EACH list.
Probably you should make a simple TRY.
I stopped convincing you.
Not related to fold-entity-row.
Probably you need to use:
ā either a conventional entity row with an icon - but with hidden āstateā part (card-mod);
ā or template-entity-row to specify a name, an icon and w/o showing a āstateā part.
Hello All,
I have been using fold-entity-row for a long time and have found it really usefull, thank you Thomas!
Recently I added a fold-entity-row instance to a card which uses config-template-card - which may or may not be a supported combination. The foldable row can be unfolded and folded using the chevron. However, while unfolded if one of the entities āin the foldā changes state the folded row folds back up.
The card I am using includes a lot of templated values to operate, but this simplified example which removed most of the templating demonstrates the same behaviour. In this example, if the folded row is unfolded, instead of staying unfolded indefinitely it folds when the state of switch.esp_fs_relay changes state.
If line 3 ( - switch.esp_fs_relay) is removed from this example the fold/unfold state is maintained is the state of switch.esp_fs_relay changes, but the change of entity state is not shown on card.
It seems that config-custom-card monitors the state of the entities and triggers an update of the entities card, but the folded/unfolded state of the fold-entity-row reverts to folded.
Should what I am trying to do possible (ie. Using config-custom-card in conjunction with fold-entity-row), or is there an issue with config-custom-card or fold-entity-row?
Thank you for the reply. Your suggestion does work, and prevents the rold-entity-row reverting to the folded state when one of the entities changes state.
However, wrapping each row in a CTC looses the advantage of using CTC in the first place.in my usage case, which without some of the simplification looks like below. The same card definition is used many times in my frontend, with only the āNODE_NAMEā changing. Multiple CTCs would make the card definition far longer and more complex, and NODE_NAME would need to be changed in many places.
I donāt really understand why when CTC is not being used fold-entity-row remembers itās folded/unfolded state when an entiry state changes and the card is rebuilt, but wrapping the card in CTC makes fold-entity-row revert to folded with every card rebuild? Iām not clear whether a very small change (to either my config, fold-entity-row or CTC) could make this work, or whether what I am trying to do is not possible for a good reason.