- platform: template sensors: evn_cost: friendly_name: "EVN Cost" unique_id: "evn_cost" unit_of_measurement: BGN/kWh value_template: " {% set winter = [1, 2, 3, 11, 12] %} {% if now().month in winter %} {% if now().hour >= 7 and now().hour < 22 %} 0.24812 {% else %} 0.13668 {% endif %} {% else %} {% if now().hour >= 6 and now().hour < 23 %} 0.24812 {% else %} 0.13668 {% endif %} {% endif %}"