Please check my code and why the cell colour does not change when cell=min_cell or max_cell.
type: grid
cards:
- type: grid
cards:
- type: markdown
content: |2-
<center><font color="#18f50c"><font size=3>01. {% if
states('sensor.accu_bms0_max_cell_voltage') == '1' %} <font
color="#3090C7">{{ states('sensor.accu_bms0_cell_1') }}
V</font> {% elif states('sensor.accu_bms0_min_cell_voltage') ==
'1' %} <font color="orange">{{
states('sensor.accu_bms0_cell_1') }} V</font> {% else %}
{{ states('sensor.accu_bms0_cell_1') }} V {% endif %}
<br>
02. {% if
states('sensor..accu_bms0_max_cell_voltage') == '2' %} <font
color="#3090C7">{{ states('sensor.accu_bms0_cell_2') }}
V</font> {% elif states('sensor.jk_bms_min_voltage_cell') ==
'2' %} <font color="orange">{{
states('sensor.accu_bms0_cell_2') }} V</font> {% else %}
{{ states('sensor.accu_bms0_cell_2') }} V {% endif %}<br>
03. {% if
states('sensor..accu_bms0_max_cell_voltage') == '3' %} <font
color="#3090C7">{{ states('sensor.accu_bms0_cell_3') }}
V</font> {% elif states('sensor..accu_bms0_min_cell_voltage') ==
'3' %} <font color="orange">{{
states('sensor.accu_bms0_cell_3') }} V</font> {% else %}
{{ states('sensor.accu_bms0_cell_3') }} V {% endif %}
<br>
04. {% if
states('sensor..accu_bms0_max_cell_voltage') == '4' %} <font
color="#3090C7">{{ states('sensor.accu_bms0_cell_4') }}
V</font> {% elif states('sensor..accu_bms0_min_cell_voltage') ==
'4' %} <font color="orange">{{
states('sensor.accu_bms0_cell_4') }} V</font> {% else %}
{{ states('sensor.accu_bms0_cell_4') }} V {% endif %}
<br>
05. {% if
states('sensor..accu_bms0_max_cell_voltage') == '5' %} <font
color="#3090C7">{{ states('sensor.accu_bms0_cell_5') }}
V</font> {% elif states('sensor..accu_bms0_min_cell_voltage') ==
'5' %} <font color="orange">{{
states('sensor.accu_bms0_cell_5') }} V</font> {% else %}
{{ states('sensor.accu_bms0_cell_5') }} V {% endif %}
<br>
06. {% if
states('sensor..accu_bms0_max_cell_voltage') == '6' %} <font
color="#3090C7">{{ states('sensor.accu_bms0_cell_6') }}
V</font> {% elif states('sensor..accu_bms0_min_cell_voltage') ==
'6' %} <font color="orange">{{
states('sensor.accu_bms0_cell_6') }} V</font> {% else %}
{{ states('sensor.accu_bms0_cell_6') }} V {% endif %}
<br>
card_mod:
style: |
ha-card {
box-shadow: none;
background: rgba(0,0,0,0);
border: white solid 1px !important;
}