Display sensor attributes in card

I just want to display cell_voltages attributes in a dashboard card from the delta voltage sensor in an dasboard card.

Need to separate the “cell_voltages” attribute into “cell_voltage 1”, cell_voltage 2" till “cell_voltage 16”

Whats the fastest route to achieve this?

A possible way: use a markdown card extracting parts in a template:

{% set VOLTAGES = '1.234, 5.678, 9.123' %}
{% for voltage in VOLTAGES.replace(' ','').split(',') -%}
voltage {{loop.index}}: {{voltage}}
{% endfor %}

where “VOLTAGES” should be taken from “state_attr(‘sensor.xxxxx’,‘cell_voltages’)”

Thank you @Ildar_Gabdullin

It seems values are already in list mode, so replace and split is not needed.

This worked for me:

{% set VOLTAGES = state_attr('sensor.sp05b2312190075_delta_voltage', 'cell_voltages') %}
{% for voltage in VOLTAGES %}
voltage {{ loop.index }}: {{ voltage }}
{% endfor %}