Hi everyone!
I cannot think of the way to output the list of IPv6 addresses nicely in lovelace.
I have a sensor from Android companion app sensor.android_ipv6_addresses containing the ip6_addresses attribute, which is a list of all IPv6 addresses of the device assigned at the moment (depending on the current network config, so the length of this list is variable of course).
I currently use this the following, but it loos nicely only when there is just one IP address in the list:
Ideally, I would like to have a multi-line list of all the IPv6 addresses (within the fold). But how to achieve that? The number of IPv6 addresses varies depending on the network config, so I cannot convert the info from the attribute to the individual template sensors etc…
What would you suggest in this case? I would appreciate your advises! Thank you.
Go to Dev tools → State
Select your entity.
Copy a content of your entity:
and then post it here.
A possible presentation of complex data depends on a structure.
For instance: a “zone” entity contains a “persons” attribute which is a list and may be shown in flex-table-card:
Good, then check my variant for “zone” above - similar structure.
Imho, using flex-table-card for ONE-column-table is a bit overkill, same table may be made in Markdown:
type: markdown
content: |-
Persons
:---:
{% for PERSON in state_attr('zone.home','persons') -%}
{{ PERSON }} {{"\n"}}
{%- endfor %}
card_mod:
style:
ha-markdown $: |
table {
width: 100%;
}
th {
background-color: orange;
}
tbody tr:nth-child(even) {
background-color: lightgrey;
}
But how can I add this table to my current structure (fold-entity-row with conditional)?
It seems to be impossible to use the markdown card in the custom:fold-entity-row…
Now here is the question… Is there any way to:
1 - remove the board around the markdown card?
2 - align the icon with the fold head icon so they are on the same level.
3 - can I also align IPv6 addresses to the right side of the card (so they will be located under the IPv4 Private address in this case)?
In short, I want this to have the same style/look (in terms of icon/text position) as in this picture (because it’s all in the same fold, just different nested subfolds):