thomasloven/lovelace-fold-entity-row

global configuration settings

Mariusthvdb opened this issue · 3 comments

move out of issue, separate FR now:

btw, did you ever consider setting a global option on the fold? Or would you accept a FR to do so?

Use case, I use padding: 0 on each card, and would also use the no animation on each card. I card_mod the fold label to use

  - type: custom:fold-entity-row
    head:
      type: section
      label: Details
      card_mod:
        style: |
          .label {
            margin-left: 0px;
          }

to align , described in FR 203, so its getting a bigger config everywhere:

  - type: custom:fold-entity-row
    head:
      type: section
      label: Details
      card_mod:
        style: |
          .label {
            margin-left: 0px;
          }
    padding: 0
    no_animation: true

would there be any chance of setting that globally for all folds? the card_mod maybe get its own config option and be

  - type: custom:fold-entity-row
    head:
      type: section
      label: Details
    margin: 0
    padding: 0
    no_animation: true

and set those globally?

other option ofc would be by hacking the resource, as I did on the animation before. for me that would be ok, but it would require editing each release, and, of, it wouldn't be as flexible.

still if you'd point me to a spot in the resource where we can go from

Schermafbeelding 2022-01-28 om 14 04 00

to

Schermafbeelding 2022-01-28 om 14 05 06

that would be enormously appreciated.... for now I tried all options, even added a #label style, but that doesnt exist/work

please consider?

I think it would be great to have a support of "templates" - like it was done for custom:button-card:

  • there is a template "my_fold_entity_row";
  • this template may be used everywhere.

But implementation could be rather difficult...

Currently I am using yaml anchors for repeating code if possible.

ofc I use anchors too, even nested, but with a large set up and split configuration, I still need a huge amount of repeats...