Hello
I am ignorant and need your support in the code below which I have not been successful with
The idea is that I should see true/false when they are the lowest price
sensor:
- platform: template
sensors:
cheapest_hours_energy_tomorrow:
device_class: timestamp
friendly_name: Cheapest sequential electricity hours
value_template: >-
{% set l=state_attr('sensor.nordpool_kwh_se3_sek_2_10_025', 'raw_today')|sort(attribute='value') %}
{{ (now() >= l[0].start and now() <= l[0].end)
or (now() >= l[1].start and now() <= l[1].end)
or (now() >= l[2].start and now() <= l[2].end)
or (now() >= l[3].start and now() <= l[3].end) }}