Hello,
I need to get two consecutive hours with the lowest value of these attributes. Will you please help me to achieve this?
This does not work: {{state_attr('sensor.current_ote_energy_cost', 'min_value')}}
Something like this, but with value of hour and two hours.
{%set ote_price_today = state_attr('sensor.current_ote_energy_cost', 1),
state_attr('sensor.current_ote_energy_cost', 2),
state_attr('sensor.current_ote_energy_cost', 3),
state_attr('sensor.current_ote_energy_cost', 4),
state_attr('sensor.current_ote_energy_cost', 5),
state_attr('sensor.current_ote_energy_cost', 6),
state_attr('sensor.current_ote_energy_cost', 7),
state_attr('sensor.current_ote_energy_cost', 8),
state_attr('sensor.current_ote_energy_cost', 9),
state_attr('sensor.current_ote_energy_cost', 10),
state_attr('sensor.current_ote_energy_cost', 11),
state_attr('sensor.current_ote_energy_cost', 12),
state_attr('sensor.current_ote_energy_cost', 13),
state_attr('sensor.current_ote_energy_cost', 14),
state_attr('sensor.current_ote_energy_cost', 15),
state_attr('sensor.current_ote_energy_cost', 16),
state_attr('sensor.current_ote_energy_cost', 17),
state_attr('sensor.current_ote_energy_cost', 18),
state_attr('sensor.current_ote_energy_cost', 19),
state_attr('sensor.current_ote_energy_cost', 20),
state_attr('sensor.current_ote_energy_cost', 21),
state_attr('sensor.current_ote_energy_cost', 22),
state_attr('sensor.current_ote_energy_cost', 23),
state_attr('sensor.current_ote_energy_cost', 24) %}
{{ ote_price_today|max }}