Hi, I’ve got a couple of events:
event.octopus_energy_electricity_current_day_rates
event.octopus_energy_electricity_upcoming_day_rates
When I inspect these in developer tools > states, I can see that the data is pulled in the following format:
event_types: octopus_energy_electricity_current_day_rates
event_type: octopus_energy_electricity_current_day_rates
rates:
- start: '2024-04-04T23:00:00+00:00'
end: '2024-04-04T23:30:00+00:00'
value_inc_vat: 0.1155
is_capped: false
- start: '2024-04-04T23:30:00+00:00'
end: '2024-04-05T00:00:00+00:00'
value_inc_vat: 0.08589
is_capped: false
- start: '2024-04-05T00:00:00+00:00'
end: '2024-04-05T00:30:00+00:00'
value_inc_vat: 0.07476
is_capped: false
- start: '2024-04-05T00:30:00+00:00'
end: '2024-04-05T01:00:00+00:00'
value_inc_vat: 0.061215
is_capped: false
- start: '2024-04-05T01:00:00+00:00'
end: '2024-04-05T01:30:00+00:00'
value_inc_vat: 0.05082
is_capped: false
- start: '2024-04-05T01:30:00+00:00'
end: '2024-04-05T02:00:00+00:00'
value_inc_vat: 0.03465
is_capped: false
- start: '2024-04-05T02:00:00+00:00'
end: '2024-04-05T02:30:00+00:00'
value_inc_vat: 0.038325
is_capped: false
- start: '2024-04-05T02:30:00+00:00'
end: '2024-04-05T03:00:00+00:00'
value_inc_vat: 0.02772
is_capped: false
The events are also updated fairly regularly… maybe every 10 mins or so.
What I’m aiming to do is write an automation which iterates through all of these rates, and if ANY of the value_inc_vat values are below 0, update a helper input I’ve got.
How do I utilise the event, or how might I go about getting a list of all the value_inc_vat parameters to use in an automation, please?