{% set power = states('input_number.simul_puissance_solaire') | float(0) %} {% if power >= 3408 %} 16 {% elif 3408 > power >= 3173 %} 15 {% elif 3173 > power >= 2939 %} 14 {% elif 2939 > power >= 2711 %} 13 {% elif 2711 > power >= 2458 %} 12 {% elif 2458 > power >= 2240 %} 11 {% elif 2240 > power >= 1984 %} 10 {% elif 1984 > power >= 1666 %} 9 {% elif 1666 > power >= 1357 %} 8 {% elif 1357 > power >= 1008 %} 7 {% else %} 6 {% endif %}