Hi.
I have this sensor:
- platform: template
sensors:
electricity_price_by_timezone:
friendly_name: Electricity price by timezone
entity_id: sensor.elspot_kwheeeur410
value_template: "{{ state_attr('sensor.elspot_kwheeeur410','today') }}"
Template editor output:
- platform: template
sensors:
electricity_price_by_timezone:
friendly_name: Electricity price by timezone
entity_id: sensor.elspot_kwheeeur410
value_template: "[0.0364, 0.035, 0.0342, 0.0338, 0.0347, 0.0465, 0.0593, 0.0656, 0.0672, 0.0674, 0.0667, 0.0667, 0.0671, 0.0667, 0.0643, 0.0569, 0.0565, 0.0584, 0.0642, 0.0646, 0.0492, 0.0433, 0.0359, 0.0343]"
How can I narrow down the “today” attribute to :
'today[now().hour-1]'