Hello,
I’m trying to get a forecast of energy rates for the next day. They are available on the URL I indicate below, at the latest every day at 18:00. My automation to trigger the reading works, at 18:06 every day.
I think I understand how to read the data, but I don’t know how to present it to Home Assistant. In the general case, I’d like to fill a data structure with these rates to be able to query it later. Ideally, I’d also like to delete data older than a year.
For example, I’d like to be able to look up the 4 cheapest hours of the next night (usually from 1:00 to 5:00) and trigger actions at 1:00 and 5:00 (allowing the water heater to be switched on or off).
Even before writing code, I don’t see how a sensor can present values at times that don’t yet exist.
Thanks in advance for your guidance!
returns:
[
{
"start_timestamp": "2025-01-12T00:00:00+01:00",
"end_timestamp": "2025-01-12T00:15:00+01:00",
"vario_plus": 25.9,
"unit": "Rp./kWh"
},
{
"start_timestamp": "2025-01-12T00:15:00+01:00",
"end_timestamp": "2025-01-12T00:30:00+01:00",
"vario_plus": 26.21,
"unit": "Rp./kWh"
},
[...]
{
"start_timestamp": "2025-01-12T23:30:00+01:00",
"end_timestamp": "2025-01-12T23:45:00+01:00",
"vario_plus": 26.7,
"unit": "Rp./kWh"
},
{
"start_timestamp": "2025-01-12T23:45:00+01:00",
"end_timestamp": "2025-01-13T00:00:00+01:00",
"vario_plus": 25.64,
"unit": "Rp./kWh"
}
]