thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.2k stars 111 forks source link

Is there a way to use multi-line text for entity name in auto entity? #346

Open ZainAjam opened 1 year ago

ZainAjam commented 1 year ago

I use this custom card to show relevant automations on my dashboard and the automation names get quite long and on my cellphone they get cut off from view. Is there a way to enable multi-line text on the entity names inside the auto-entities card?

ildar170975 commented 1 year ago

The card only creates a list which may be represented as cards or rows. Nothing else. Any additional things like "multiline" is supposed to be done the same way you do it in a conventional Entities card.

ASNNetworks commented 1 year ago

If you use custom:button-card you can by using the correct variables in there. Auto-entities just load those in, while you set it up properly in custom:button-card which does all the work with multiline names.

cornfeedhobo commented 1 year ago

I'm extremely confused by these replies.

@ildar170975 Your reply assumes that one can pass parameters through to the resulting card. Using the example of entities, one is unable to pass the style parameter because it's not supported by this card.

I second this request. Using auto-entities will sometimes lead to entry names that are very long, and because they are prefixed with the entity name, the attribute is completely lost on a dashboard with anything more than a single card.

@thomasloven Any ideas on how we could address this?

ildar170975 commented 1 year ago

our reply assumes that one can pass parameters through to the resulting card. Using the example of entities, one is unable to pass the style parameter because it's not supported by this card.

This is not what I was talking about. I said that auto-entities creates a list of entities (let it be "entity rows" inside Entities card). Also auto-entities may pass options to each row like name, icon etc - i.e. options supported by this Entities card - including card_mod options. If your entities have long names your have 2 ways: -- either reduce them to short names (like "some_complex_sensor_xyz_co2" -> "co2"); -- or place a long name in 2 (or more) lines using card-mod.

1st way is about generating list of entities with EDITED names by using template option of auto-entities. 2nd way is about using card-mod as a part of options option of auto-entities - and the code for this card_mod is same as for simple Entities card.

cornfeedhobo commented 1 year ago

@ildar170975 card_mod is another plugin, whereas the native card supports style.. seems better to support passing that on?

Either way, I think the answer is to edit each generated entry name, but that's a manual process and pretty annoying.

ildar170975 commented 1 year ago

native card supports style

Which card? Entities card - does not have such a native option. Same about auto-entities. This is an option of card-mod.

cornfeedhobo commented 1 year ago

https://www.home-assistant.io/dashboards/entities/#style

ildar170975 commented 1 year ago

The “style” option of Entities card is for “divider” row.